7.6 Format of Source Files

The source files to be read by the different grammar tools (e.g. pp and sif ) must all start by giving a specification of the fragment form (similar to grammar specifications and pretty-printer specifications).

The fragment form syntax for source files is:

-- name: category: grammar --

where grammar be the name for the grammar for this source file. Category must be the name of a construction nonterminal in the grammar, and finally name is the name chosen for this fragment form (mostly not significant). If ': grammar' is omitted, the BETA grammar is assumed.

Please note, that it is important that category is the name of a construction nonterminal, i.e. a nonterminal specified by a construction rule:

category ::= ...;

The Metaprogramming System - Reference Manual
© 1991-2004 Mjølner Informatics
[Modified: Thursday October 19th 2000 at 12:04]