Level

From Gallium

Jump to: navigation, search

Levels take parts of Camlp4 Grammar Extensions, expressed with the EXTEND syntax.


Merely an entry is a list of levels. And a level is an optional name, an optional associativity (left by default) and a list of rules.

Example:

 EXTEND Gram
   expression:
   [ "top"
     [ ... ]
   | "+"
     [ ... ]
   | "*"
     [ ... ]
   | "**" RIGHTA
     [ ... ]
   ...
   | "simple"
     [ ... ] ]
   ;
 END;;

Here "top", "+", "*", "**", and "simple" are level names.

Personal tools
Espace privé