4. A portable and efficient LALR(1) parser generator for Scheme -- Defining a parser |
|
4.1 Loading the generatorThe file (lalr-parser [options] tokens rules ...) To use this macro, you must first load This macro, when given appropriate arguments, generates an LALR(1) syntax analyzer. The macro accepts at least two arguments. The first is a list of symbols which represent the terminal symbols of the grammar. The remaining arguments are the grammar production rules. See section The grammar format for further details. 4.2 Running the parserThe parser generated by the The lexical analyzer is zero-argument function (a thunk)
invoked each time the parser needs to look-ahead in the token stream.
A token is usually a pair whose Once the end of file is encountered, the lexical analyzer
must always return the symbol The error procedure must be a function that accepts at least two parameters. |
This Html page has been produced by
Skribe.
Last update Sun Dec 3 20:16:43 2006.