Class Parser.LR.Parser
- Description
This object implements an LALR(1) parser and compiler.
Normal use of this object would be:
set_error_handler {add_rule, set_priority, set_associativity}* set_symbol_to_string compile {parse}*
- Variable error_handler
function
(SeverityLevel
,string
,string
,mixed
... :void
) Parser.LR.Parser.error_handler- Description
Compile error and warning handler.
- Variable grammar
mapping
(int
:array
(Rule
)) Parser.LR.Parser.grammar- Description
The grammar itself.
- Variable known_states
mapping
(string
:Kernel
) Parser.LR.Parser.known_states- Description
LR0 states that are already known to the compiler.
- Variable lr_error
int
Parser.LR.Parser.lr_error- Description
Error code
- Variable s_q
StateQueue
Parser.LR.Parser.s_q- Description
Contains all states used. In the queue section are the states that remain to be compiled.
- Variable start_state
Kernel
Parser.LR.Parser.start_state- Description
The initial LR0 state.