8000 Undetected choice conflict · Issue #163 · javacc/javacc · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Undetected choice conflict #163
Open
@sebhunt999

Description

@sebhunt999

For some grammars, javacc appears to detect a choice conflict if Kleene-* is used but fails to detect the same conflict if an auxiliary non-terminal is used instead of Kleene-*.

The conflict is detected in this version:

A ::= "new" T "[" "0" "]"
T ::= "int" ( "[" "]" )*

But not in this one:

A ::= "new" T "[" "0" "]"
T ::= "int" Q
Q ::= "[" "]" Q
Q ::=

Since follow(Q) = follow(T) = { "[" } I think the conflict should be detected.

(Javacc source attached.)
choice-conflict.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0