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

Support "Schrödinger's token" #3

Open
sharwell opened this issue Nov 14, 2014 · 0 comments
Open

Support "Schrödinger's token" #3

sharwell opened this issue Nov 14, 2014 · 0 comments

Comments

@sharwell
Copy link
Member

The CaretToken used in ANTLRWorks 2 and GoWorks already acts as this type of token used with ANTLR 4. A generalized mechanism for handling this could be implemented by allowing the pushMode operation to push more than one mode in parallel, creating multiple branches of the lexer. For example, a new command could be created with the following form:

pushAnyMode(PossibleModeA, PossibleModeB)

The actual determination of the mode taken during parsing is determined by the prediction algorithm at the parser at the time the potential tokens are examined.

sharwell pushed a commit that referenced this issue Aug 7, 2017
update the contributors.txt file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant