Expand description
This module implements a zero-copy version of the runtime parser that uses the LR statemachine generated by rustlr. It will (for now), live side along with the original parser implemented as crate::RuntimeParser. Since Version 0.2.3, this module can now generate a basic lexical scanner based on crate::RawToken and crate::StrTokenizer.
This module implements the parsing routines that uses the state machine generated by rustlr. The main structure here is ZCParser. All parsing functions are organized around the ZCParser::parse_core function, which implements the basic LR parsing algorithm. This function expects dynamic Tokenizer and ErrReporter trait-objects. This module provides generic parsing and parser-training routines that use stdio for interface, but the ErrReporter trait allows custom user interfaces to be build separately.
Structs
E --> E:a + E:b
, the variables a and b will
be bound to values of this type, and thus inside the semantic actions
one would need to use a.value
to extract the value, which is of the
declared ‘absyntype’ of the grammar. Alternatively, one can use a
pattern: E:@a@ + E:@b@
to bind a and b directly to the values.