The exercise in question asks the user to identify why this grammar isn't ambiguous for the input abb:
module EXERCISE4
syntax Expr ::= "a" Expr "b"
| "abb"
| "b"
endmodule
For experienced K users, the answer is clearly that the lexer tokenises abb before the parser is ever called, but I don't see where we explain longest-match lexing in the tutorial. We should add a short section explaining this when we introduce lexing and parsing.
The exercise in question asks the user to identify why this grammar isn't ambiguous for the input
abb:For experienced K users, the answer is clearly that the lexer tokenises
abbbefore the parser is ever called, but I don't see where we explain longest-match lexing in the tutorial. We should add a short section explaining this when we introduce lexing and parsing.