Skip to content

Attempt runaway stack checker again #37

@thatch

Description

@thatch

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions