Next: Symbols, Up: Grammar File [Contents][Index]
A Bison grammar file has four main sections, shown here with the appropriate delimiters:
%{ Prologue %} Bison declarations %% Grammar rules %% Epilogue
Comments enclosed in ‘/* … */’ may appear in any of the sections. As a GNU extension, ‘//’ introduces a comment that continues until end of line.
• Prologue: | Syntax and usage of the prologue. | |
• Prologue Alternatives: | Syntax and usage of alternatives to the prologue. | |
• Bison Declarations: | Syntax and usage of the Bison declarations section. | |
• Grammar Rules: | Syntax and usage of the grammar rules section. | |
• Epilogue: | Syntax and usage of the epilogue. |