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

Allow running passes multiple times. #67

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aDotInTheVoid
Copy link

Previously, limit was always nonzero, which meant that !limit-- was always false, so the inner loop would never iterate.

Closes #61
Closes #66

alona@Ashtabula:~/dev$ cat issue61.ebnf 
binding-names = {name, ","}, name, ",", name;
alona@Ashtabula:~/dev$ cat issue66.ebnf 
binding-names = {name, ","}, name, ",", name, [","];
alona@Ashtabula:~/dev$ ./kgt/build/bin/kgt -l iso-ebnf -e rrutf8 < ./issue61.ebnf 
Segmentation fault
alona@Ashtabula:~/dev$ ./kgt/build/bin/kgt -l iso-ebnf -e rrutf8 < ./issue66.ebnf 
binding-names:
                      ╭────>────╮
                      │         │
    │├──╭── name ──╮──╯── "," ──╰──┤│
        │          │
        ╰── "," ───╯

alona@Ashtabula:~/dev$ ./kgt-2/build/bin/kgt -l iso-ebnf -e rrutf8 < ./issue61.ebnf 
binding-names:
    │├──╭── name ── "," ──╮── name ──┤│
        │                 │
        ╰────────<────────╯

alona@Ashtabula:~/dev$ ./kgt-2/build/bin/kgt -l iso-ebnf -e rrutf8 < ./issue66.ebnf 
binding-names:
                                     ╭────>────╮
                                     │         │
    │├──╭── name ── "," ──╮── name ──╯── "," ──╰──┤│
        │                 │
        ╰────────<────────╯

I'm not sure how to test this.

@edk0
Copy link
Collaborator

edk0 commented Sep 25, 2023

Just on a moral level running the pretty steps to convergence shouldn't be necessary to get a correct tree. It's been too long since I worked on this code, but I really feel like that's something we should fix.

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

Successfully merging this pull request may close these issues.

Incorrect railroad diagram Segfault in collapse_suffix
2 participants