Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize correct antlr nodes for enclosed transitions during disambiguation #5

Open
KvanTTT opened this issue Jul 23, 2024 · 0 comments
Assignees

Comments

@KvanTTT
Copy link
Owner

KvanTTT commented Jul 23, 2024

Given the following grammar:

DOUBLE_STAR: 'A'* 'A'* 'A';

Enclosed-transition A should not contain ANTLR node of the third token:

Expected ATN

digraph ATN {
  rankdir=LR;

  "DEFAULT_MODE(s0)" -> s12 [label="A {3:15(1), 3:20(1), 3:25(1)}"]
  s12 -> s12 [label="A {3:15(1), 3:20(1)}" taillabel=0]
  s12 -> s11 [label="end(DOUBLE_STAR)" taillabel=1 style=dotted]
}

Actual ATN

digraph ATN {
  rankdir=LR;

  "DEFAULT_MODE(s0)" -> s12 [label="A {3:15(1), 3:20(1), 3:25(1)}"]
  s12 -> s12 [label="A {3:15(1), 3:20(1), 3:25(1)}" taillabel=0]
  s12 -> s11 [label="end(DOUBLE_STAR)" taillabel=1 style=dotted]
}
@KvanTTT KvanTTT self-assigned this Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant