The behaviour of the RSP Compiler can be customized through a range of options. The way in which you specify options depends upon the invocation method.
From the command line interface, each option should be prefixed with a hyphen. Multiple options cannot be combined. For boolean options just the presence of the flag is sufficient to enable the option. Some options require parameters such as a filename, a flag name or a list of flag names. In these cases the parameter should be given immediately after the option separated by whitespace, e.g. -target php. Lists of flags should be comma separated with the entire list enclosed in double quotes (e.g. -debug "tokens, parse, types".
When invoked as an Ant task options can be specified as attributes to the rsp task; see Example 2.1, “Invoking the Compiler from Apache Ant” for examples. Boolean options should be given the value "yes" to enable them; their default value is always no.
Table 2.1. Summary of Compiler Options
Command Line Flag(s) | Ant Attribute Name | Parameter Type | Description |
---|---|---|---|
-version | n/a | Boolean | The compiler displays its version information and quits |
-h, -help | n/a | Boolean | The compiler displays a usage message and quits |
-v, -verbose | n/a | Boolean | Set verbose mode, in which case the compiler displays a brief message about its intended action before it commences. The message will tell you how many files are to be compiled and what they are to be compiled to. When invoked from Ant the compiler is always in verbose mode. |
-nl, -newline | newline | One of windows, max or unix | Set the type of line ending character that will be output by the generated code. This should not be confused with the type of line ending used in the generated files, which will be the appropriate line ending format for the operating system. |
-d, -destdir | destdir | A directory name | Set the name of the destination durectory in which the generated files are placed. If the directory does not exist then it will be created. |
-deps, -dependencies | dependencies | A file name | Enable dependency tracking and set the file used for dependency tracking; see the section called “Dependency Tracking” |
-t, -target | target | A target name | Set the target for code generation. If no target is specified then the compiler will validate the correctness of the source files and then exit. See Code Generation Target Names for a list of valid target names. |
-f, -flags | flags | A comma separated list of flags | Set the compiler behaviour flags. This is a general interface for setting flags that alter the behaviour of the compiler and its code generators. See Compiler Flags for valid flags. |