Farkle


LALRParser Module

Functions to syntactically parse a series of tokens using the LALR algorithm.

Functions and values

Function or value Description

parse grammar pp tokenizer input

Full Usage: parse grammar pp tokenizer input

Parameters:
Returns: 'TResult

Parses and post-processes tokens with the LALR(1) algorithm.

grammar : Grammar

The grammar to use.

pp : PostProcessor<'TResult>

The PostProcessor to use on the newly-fused productions.

tokenizer : Tokenizer

A Tokenizer object that gives the next tokens.

input : CharStream

The CharStream whose characters are to be parsed.

Returns: 'TResult
FarkleException An error did happen. Apart from PostProcessorException, subclasses of this exception class are caught by the runtime Farkle API.