asdlGen
Reference Manual
: Invocation
: Language Specific OptionsAll the commands that produce source code as output offer a different
command option to select the default base environment. The base environment
is the set of the initial definitions available to the code. It defines the
set of primitive types and functions used by the generated code. For example
using the option --base_include=my_base.h
when generating C code will
insert
#include "my_base.h"in the appropriate place so the resulting code will use the definitions found in
my_base.h
rather than the
default set of primitive types. Unless there is a need to globally redefine
the primitive types changing the base environment should be avoided. The
actual option names vary depending on the output language.
See the section on sect.support-code for a more detailed description about the interfaces to the default set of primitive types and functions provided with the current release.
--base_include=
file.h
The default value is cii_base.h
. Name of the C header file to
include that define the primitive types and functions for all the generated
code.
--mono_types=
{true
| false
}The default value is false. If true expand sequence and option types into new distinct types for each different qualified type.
--attribs_default=
{true
|false
}The default value is true. Controls whether attributes fields are included in
the argument to the default constructor generated by asdlGen
for sum
types. If true then attributes are include as argument to the default
constructors. If false the attributes are not included in the argument for
the constructors.
--default_only=
{true
|false
}The default value is true. Controls whether or not to generate two
constructors for sum types that have attributes. One constructor includes
attributes as arguments the other does not. If this value is false then
the attribs_default
argument toggles between whether the default
constructor contains attributes in the argument or the non-default
constructor does. The default constructor is a function whose name is the
same as the constructor in the sum type declaration. The non-default
constructor is a function whose name is prefixed with either
with_attribs
or no_attribs
depending on the value of
--attribs_default
. This functionality will probably get moved
into the view framework rather than being a command line switch.
--base_include=
file.hxx
The default value is asdl_base.hxx
. Name of the C++ header file to
include that defines the primitive types and functions for all the generated
code.
--simple_sequences=
{true
| false
}The default value is true. Use a simple linked list representation
for sequences. Set to false to use a template based sequence
representation. See asdl_base.hxx
for a default sequence template
example.
--base_import=
package_specThe default value is asdl_base.*
. The package import specification
to define the primitive types and functions for all the generated
code.
--simple_sequences=
{true
| false
}The default value is true. Use a simple linked list representation
for sequences. Set to false to use java.util.Vector
instead.
--base_signature=
signature_nameThe default value is BASE
. The signature to include
in
all signatures generated that define the primitive types.
--base_structure=
structure_nameThe default value is Base
. The structure to open
in
all structures generated that define the primitive types and functions.
--base_import=
moduleThe default value is HaskellBase
. The module to import unqualified
that define the primitive types and functions for all the generated
code.
asdlGen
Reference Manual
: Invocation
: Language Specific Options