[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The general form of treecc's command-line syntax is as follows:
treecc [OPTIONS] INPUT ... |
Treecc accepts the following command-line options:
-o FILE
--output FILE
Set the name of the output file to ‘FILE’. If this option is not supplied, then the name of the first input file will be used, with its extension changed to ‘.c’. If the input is standard input, the default output file is ‘yy_tree.c’.
This option may be overridden using the ‘%output’ keyword in the input files.
-h FILE
--header FILE
Set the name of the header output file to ‘FILE’. This is only used for the C and C++ output languages. If this option is not supplied, then the name of the output file will be used, with its extension changed to ‘.h’. If the input is standard input, the default header output file is ‘yy_tree.h’.
This option may be overriden using the ‘%header’ keyword in the input files. If this option is used with a language that does not require headers, it will be ignored.
-d DIR
--output-dir DIR
Set the name of the Java output directory to ‘DIR’. This is only used for the Java language. If this option is not supplied, then the directory corresponding to the first input file is used. If the input is standard input, the default is the current directory.
This option may be overriden using the ‘%outdir’ keyword in the input files. If this option is used with a language other than Java, it will be ignored.
-e EXT
--extension EXT
Change the default output file extension to ‘ext’, instead of ‘.c’. The value ‘ext’ can have a leading dot, but this is not required.
-f
--force-create
Treecc normally attempts to optimise the creation of output files so that they are only modified if a non-trivial change has occurred in the input. This can reduce the number of source code recompiles when treecc is used in combination with make.
This option forces the output files to be created, even if they are the same as existing files with the same name.
The declaration ‘%option force’ can be used in the input files to achieve the same effect as this option.
-O OPT
--option OPT
Set a treecc option value. This is a command-line version of the ‘%option’ keyword in the input files.
-n
--no-output
Suppress the generation of output files. Treecc parses the input files, checks for errors, and then stops.
--help
Print a usage message for the treecc program.
-v
--version
Print the version of the treecc program.
--
Marks the end of the command-line options, and the beginning of the input filenames. You may need to use this if your filename begins with ‘-’. e.g. ‘treecc -- -input.tc’. This is not needed if the input is standard input: ‘treecc -’ is perfectly valid.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by Klaus Treichel on January, 18 2009 using texi2html 1.78.