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

Attempt runaway stack checker again #37

Open
thatch opened this issue May 31, 2016 · 0 comments
Open

Attempt runaway stack checker again #37

thatch opened this issue May 31, 2016 · 0 comments

Comments

@thatch
Copy link
Owner

thatch commented May 31, 2016

(Context: I started writing this, and had trouble with base cases in self-recursive graphs. In the end I just ensured that next-states other than #pop consume a character, which prevents infinite loops but does not help with having a stack whose length is number of characters.)

Basically, the following lexer has a problem:

tokens = {
  'root': [
    ('.', Text, 'string'),
  ],
  'string': [
    ('b', String, 'root'),
  ],
}

for root->string->root loop (there are no pops to ever reduce the depth)

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