

Terminals are interchangeably referred to as tokens. Nonterminals NT, a set of productions P, and a start AĬontext-free grammar is defined by a set of terminals T, a set of See for definitions and information on context-free ML-Yacc uses context-free grammars to specify the syntax of languages toīe parsed. Which are available to semantic actions and are used in All symbols carry left and right position values The parsersĬan insert tokens with values and substitute tokens with valuesįor other tokens.

Of error detection, but it does prevent the parsers fromĪffecting lexers in any significant way. Parsers to recover from syntax errors that occur before the point The parsers delay the evaluation of semantic actions until Substitution near the point in the input stream at which the error Ī parser tries to recover from a syntax errorīy making a single token insertion, deletion, or

The algorithm is a partial implementation of an algorithm described in. The generated parsers use a different algorithmįor recovering from syntax errors than parsers generated by Yacc. It generates parsers for LALR languages, like Yacc,Īnd has a similar syntax. ML-Yacc is a parser generator for Standard ML modeled after the
