In a grammar like
Parsable. Exp ::= Integer ;
Internal. Exp ::= String;
The definition of String should not end up in the lexer, and no parser for String should be generated.
Here is an example where parsing actually fails, similar to #204:
Main. Prg ::= Ident ;
internal IId. Prg ::= Id ;
token Id letter+ ; -- This overlaps with Ident, but should not confuse the parser.
The generated (Haskell) parser does not accept input foo but should, since this is an Ident and Id is only used internally. (Dead code should not affect the semantics.)
In a grammar like
The definition of
Stringshould not end up in the lexer, and no parser forStringshould be generated.Here is an example where parsing actually fails, similar to #204:
The generated (Haskell) parser does not accept input
foobut should, since this is anIdentandIdis only used internally. (Dead code should not affect the semantics.)