Command-line Options PreviousNext

The usual way to invoke geyacc is as follows:

geyacc -o filename1 filename2

Here filename2 is the grammar file name, which usually ends with '.y', and the Eiffel parser class is generated in filename1. Thus, the geyacc -o foo.e foo.y yields an Eiffel class in foo.e describing a parser whose grammar is specified in foo.y.

Geyacc supports both traditional single-letter options and mnemonic long option names. Long option names are indicated with -- instead of -. When a long option takes an argument, like --output-file, connect the option name and the argument with =.

Here is a list of options that can be used with geyacc, alphabetized by short option:

-t classname
--tokens=classname
Write an extra class named classname (in upper-case) containing integer constants for the token type names defined in the grammar. This class is saved in file classname.e (in lower-case) unless the option -k or --tokens-file has been specified. This class is essential if you wish to put the definition of routine read_token in a separate class, because read_token needs to be able to refer to token type codes. This class also contains the routine token_name which is particularly useful to make debugging messages more human-readable.

[The options -d classname and --defines=classname are still available for compatibility with previous version of geyacc. These options will be removed in future releases.]
-k filename
--tokens-file=filename
Name of the file where the extra class containing integer constants for the token type names will be written. If the -t or --tokens option has not been specified, then nothing will be written to that file.
-h
-?
--help
Print a summary of the command-line options to geyacc and exit.
-o filename
--output-file=filename
Specify the name filename for the parser file. If this option is not specified, the parser is generated to the standard ouptut.
-v filename
--verbose=filename
Write an extra output file containing verbose descriptions of the parser states and what is done for each type of look-ahead token in that state. This is very useful when debugging your grammar with Eiffel debug instructions spread out in the parser skeleton class. This file also describes all the conflicts, both those resolved by operator precedence and the unresolved ones.
-V
--version
Print the version number of geyacc and exit.
-x
Write each semantic action into a separate routine. The default is to write all semantic actions into the same routine, which can become too large for C back-end compilers to handle.

Copyright © 2001, Eric Bezault
mailto:
ericb@gobosoft.com
http:
//www.gobosoft.com
Last Updated: 15 July 2001

HomeTocPreviousNext