06.01.2015 Views

Manual

Manual

Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

118 Bison 2.3<br />

%defines<br />

[Directive]<br />

Bison declaration to create a header file meant for the scanner. See Section 3.7.11<br />

[Decl Summary], page 59.<br />

%destructor<br />

[Directive]<br />

Specify how the parser should reclaim the memory associated to discarded symbols.<br />

See Section 3.7.7 [Freeing Discarded Symbols], page 57.<br />

%dprec<br />

[Directive]<br />

Bison declaration to assign a precedence to a rule that is used at parse time to resolve<br />

reduce/reduce conflicts. See Section 1.5 [Writing GLR Parsers], page 14.<br />

$end<br />

[Symbol]<br />

The predefined token marking the end of the token stream. It cannot be used in the<br />

grammar.<br />

error<br />

[Symbol]<br />

A token name reserved for error recovery. This token may be used in grammar rules<br />

so as to allow the Bison parser to recognize an error in the grammar without halting<br />

the process. In effect, a sentence containing an error may be recognized as valid.<br />

On a syntax error, the token error becomes the current look-ahead token. Actions<br />

corresponding to error are then executed, and the look-ahead token is reset to the<br />

token that originally caused the violation. See Chapter 6 [Error Recovery], page 83.<br />

%error-verbose<br />

[Directive]<br />

Bison declaration to request verbose, specific error message strings when yyerror is<br />

called.<br />

%file-prefix="prefix"<br />

[Directive]<br />

Bison declaration to set the prefix of the output files. See Section 3.7.11 [Decl Summary],<br />

page 59.<br />

%glr-parser<br />

[Directive]<br />

Bison declaration to produce a GLR parser. See Section 1.5 [Writing GLR Parsers],<br />

page 14.<br />

%initial-action<br />

[Directive]<br />

Run user code before parsing. See Section 3.7.6 [Performing Actions before Parsing],<br />

page 56.<br />

%left<br />

[Directive]<br />

Bison declaration to assign left associativity to token(s). See Section 3.7.3 [Operator<br />

Precedence], page 55.<br />

%lex-param {argument-declaration}<br />

[Directive]<br />

Bison declaration to specifying an additional parameter that yylex should accept.<br />

See Section 4.2.4 [Calling Conventions for Pure Parsers], page 66.<br />

%merge<br />

[Directive]<br />

Bison declaration to assign a merging function to a rule. If there is a reduce/reduce<br />

conflict with a rule having the same merging function, the function is applied to the

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!