www.delorie.com/gnu/docs/bison/bison_40.html   search  
 
Buy the book!


Bison 1.875

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1 Outline of a Bison Grammar

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.

3.1.1 The prologue  Syntax and usage of the prologue.
3.1.2 The Bison Declarations Section  Syntax and usage of the Bison declarations section.
3.1.3 The Grammar Rules Section  Syntax and usage of the grammar rules section.
3.1.4 The epilogue  Syntax and usage of the epilogue.


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003