Skip to main content

SETTLING_STEPS

Constant SETTLING_STEPS 

Source
pub const SETTLING_STEPS: &[&str];
Expand description

The steps that settle two parses of one text that end alike, as a grammar’s (settling STEP ...) declares them.

In order (the lower repair cost always decides first): tokens, the tokens a lexer prefers (higher lexical precedence, longer, a literal over a pattern, earlier), with the lexing that goes with it (keywords, separators, immediate tokens); precedence, the shift or reduction an LR parser keeps by precedence and associativity, forking where a declared conflict asks; dynamic, the higher dynamic precedence. The last step settles a tie: first keeps the parse reached first, ambiguity keeps it and reports the ambiguity.