Global Options
Since LLK v0.4, grammar option names are NO LONGER case sensitive.
- Language - Default="Java". For now only Java is supported.
Lexer Options
- DefaultErrorHandler - Default=false.
- Greedy - Default=fase.
- IgnoreCase - Default=false.
- TokenUseText - Default=true.
- TokenUseIntern - Default=false.
- Lookahead - Default=1.
- ResetHook - Default=false.
- StaticKeyword - Default=false.
- StaticKeywordLevel - Default=8.
- Vocabulary - Default=0xff.
Parser Options
- BuildAST - Default=false.
- BuildVisitor - Default=false.
- BuildVisitorAdapter - Default=false.
- DefaultErrorHandler - Default=false.
- DelayConditional - Default=false.
- ExplicitNodePrefix - Default="AST".
- Greedy - Default=false.
- Import - Default=null.
- Lookahead - Default=1.
- Multi - Default=false.
- NodeDefaultVoid - Default=false.
- NodeFactory - Default=false.
- NodePrefix - Default="AST".
- NodeScopeHook - Default=false.
- ResetHook - Default=false.
TreeParser Options
- BuildAST - Default=false.
- BuildVisitor - Default=false.
- BuildVisitorAdapter - Default=false.
- DefaultErrorHandler - Default=false.
- DelayConditional - Default=false.
- ExplicitNodePrefix - Default="AST".
- Greedy - Default=false.
- Import - Default=null.
- Lookahead - Default=1.
- Multi - Default=false.
- NodeDefaultVoid - Default=false.
- NodeFactory - Default=false.
- NodePrefix - Default="AST".
- NodeScopeHook - Default=false.
- ResetHook - Default=false.
- Validate - Default=true.
Options description
- BuildAST - True to build AST nodes. Generate source files for the node if not already exist.
- BuildVisitor - True to generate the node visitor interface file, overwrite if file already
exists. Ignored if buildAST==false.
- BuildVisitorAdapter - True to generate an adapter for the generated visitor. This require
BuildVisitor to be true as pre-requisite.
- DefaultErrorHandler - True to generate default error handling code.
- ExplicitNodePrefix - Default node name prefix for explicitly specified node types.
- IgnoreCase - True to generate lexer that ignore case.
- Import - Init. token types from the given XML file name (eg. ILLKLLKLexer.xml). The file should
locate in same location as the input grammar file.
- Language - Currently only support "Java".
- TokenUseText - True to create text image for each token.
- TokenUseIntern - True to intern literal token text and short
strings when TokenUseText is on.
- Lookahead - Default lookahead depth.
- Multi - True to generate AST nodes and related files from node descriptors in the grammar.
- NodeDefaultVoid - True to assume #void as node descriptor not specified for the grammar
rule.
- NodeFactory - True to generate code create AST nodes through a node factory. (TODO)
- NodePrefix - Default prefix of generated AST node name, and thus the AST node files.
- NodeScopeHook - True to call llkOpenNode() and llkCloseNode when enter and exit a node
scope.
- ResetHook - True to generate call user defined llkInit() on reset.
- StaticKeyword - True to generate keyword lookup code that assume keywords can be hard-coded in
the lookup routine.
- StaticKeywordLevel - Maximum number of character index to lookup when generating static keyword
lookup (default=2).
- Validate - True to generate code, for tree parser, to validate the input tree structure.
- Vocabulary - Lexer input character set range. eg. 0xff for ASCII, 0xffff for UNICODE.
|