Skip to content

Token types from internal rules end up in parser #302

@andreasabel

Description

@andreasabel

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.)

Metadata

Metadata

Assignees

Labels

buginternal rulesConcerning the "internal" keyword.lexerConcerning the generated lexerparserIssues concerning parser generating

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions