Skip to main content

Module parser

Module parser 

Source
Expand description

The parser: one function per rule of ECL.g4, over the token stream of crate::lexer, with winnow.

Every rule keeps the grammar’s alternative order, so an input that two alternatives admit is read the way the reference grammar reads it. The grammar’s mandatory whitespace (mws) and its adjacency (a number, a cardinality) are checked from the token spans, since the lexer skips whitespace.

Structs§

Failure
Why a rule did not match: the token class it expected, when a rule said.

Functions§

whole
A whole input: one expression constraint and nothing after it.

Type Aliases§

Tokens
The token stream.