Next: D Scanner Interface, Previous: D Parser Interface, Up: D Parsers [Contents][Index]
The parser context provides information to build error reports when you invoke ‘%define parse.error custom’.
A struct containing an enum of all the grammar symbols, tokens and nonterminals. Its enumerators are forged from the symbol names. Use ‘void toString(W)(W sink)’ to get the symbol names.
The kind of the lookahead. Return null
iff there is no lookahead.
The location of the lookahead.
YYParser.SymbolKind[]
argv, int
argc) ¶Fill argv with the expected tokens, which never includes
SymbolKind.YYERROR
, or SymbolKind.YYUNDEF
.
Never put more than argc elements into argv, and on success
return the number of tokens stored in argv. If there are more
expected tokens than argc, fill argv up to argc and return
0. If there are no expected tokens, also return 0, but set argv[0]
to null
.
If argv is null, return the size needed to store all the possible
values, which is always less than YYNTOKENS
.