1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
| # java -jar grammatica-1.5.jar
Generates source code for a C#, Java or Visual Basic parser from
a grammar file. This program comes with ABSOLUTELY NO WARRANTY;
for details see the LICENSE.txt file.
Syntax: Grammatica <grammarfile> <action> [<options>]
Actions:
--debug
Debugs the grammar by validating it and printing the
internal representation.
--tokenize <file>
Debugs the grammar by using it to tokenize the specified
file. No code has to be generated for this.
--parse <file>
Debugs the grammar by using it to parse the specified
file. No code has to be generated for this.
--profile <file>
Profiles the grammar by using it to parse the specified
file and printing a statistic summary.
--csoutput <dir>
Creates a C# parser for the grammar (in source code).
The specified directory will be used as output directory
for the source code files.
--javaoutput <dir>
Creates a Java parser for the grammar (in source code).
The specified directory will be used as the base output
directory for the source code files.
C# Output Options:
--csnamespace <package>
Sets the C# namespace to use in generated source code
files. By default no namespace declaration is included.
--csclassname <name>
Sets the C# class name prefix to use in generated source
code files. By default the grammar file name is used.
--cspublic
Sets public access for all C# types generated. By default
type access is internal.
Java Output Options:
--javapackage <package>
Sets the Java package to use in generated source code
files. By default no package declaration is included.
--javaclassname <name>
Sets the Java class name prefix to use in generated source
code files. By default the grammar file name is used.
--javapublic
Sets public access for all Java types. By default type
access is package local.
Visual Basic Output Options:
--vbnamespace <package>
Sets the namespace to use in generated source code files.
By default no namespace declaration is included.
--vbclassname <name>
Sets the class name prefix to use in generated source code
files. By default the grammar file name is used.
--vbpublic
Sets public access for all types generated. By default type
access is internal.
Error: Missing grammar file and/or action |
Partager