-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Oliver claims expectedTokens() doesn't work on these examples #17
Comments
Is there an ANTLR bug involved? This appears to be a unit test for another application which uses ANTLR but isn't testing the ANTLR library itself. The |
Tried to clarify the code a bit, please re-check. The test concerned is expectedTokens(). Unfortunately, the stuff lies in the output to stdout. I spit out what I have parsed so far and then what tokens are to be expected using Parser#getExpectedTokens(). All I see as the expected token is the token I just parsed. Maybe I just do not grok how this is supposed to work. |
|
Hey, Sam, thanks for being patient with me. I actually mixed up stuff here and what you say makes sense. For I actually want to do: Finding out the set of valid tokens that can follow on a given position inside a buffer. Like for an editor with auto-completion. Any pointers? |
In ANTLRWorks 2 (currently closed source due to licensing details I'm working on), to get this information I needed to extend It's gruesome, but what's possible here is without a doubt the most powerful solution to this problem I've ever seen. Proof of this should be clear in what I was able to accomplish in GoWorks in under 1 month. |
Added lexer channels enum to match Java target
some small updates
http://code.google.com/p/antlr4-ast-visitor-sandbox/source/browse/trunk/test/ParserTest.java
The text was updated successfully, but these errors were encountered: