Parser data
Parser data contains:
a parsing table describing what action its parser should take when a given input comes while it is in a given state.
a non terminal name indexed by non terminal identifier
the recognition point of rule for each state
The parsing table is the main information use by parser, the other information are for logging.
see the parser data class
.
State 0 is the starting state, corresponding the wait of
START
non terminal recognition.
For each state is defined:
is or not a token recognition state
a goto table by terminal for syntax analisys
a goto table by non terminal for syntax analisys
a goto table by terminal for lexical analisys
a goto table by non terminal for lexical analisys
a non terminal matched set for syntax analisys
a non terminal matched set for lexical analisys
For each non terminal give the
match manager
class name.
For the grammar below generate the following
parser data in html form
(
see parser data to html tool
)
Start : PrimaryStm
| CatStm
;
PrimaryStm : GrammarSymbol
;
CatStm : PrimaryStm PrimaryStm
;
GrammarSymbol : ws Id
;
ws : Empty
| Space
;
Space : ' ' ;
Id : [_a-zA-z] { MatchChar }
| Id [_a-zA-z0-9] { MatchIdAfterFirst }
; { MatchId }
© 2008-2009, parser4j