-
Notifications
You must be signed in to change notification settings - Fork 39
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
How generate the LL1 table and how use it ? #16
Comments
I found this function in the project antlr4 : protected void reportInputMismatch(Parser recognizer,
InputMismatchException e)
{
String msg = "mismatched input "+getTokenErrorDisplay(e.getOffendingToken())+
" expecting "+e.getExpectedTokens().toString(recognizer.getVocabulary());
recognizer.notifyErrorListeners(e.getOffendingToken(), msg, e);
} This function builds the description of PsiErrorElement. Is it possible to add the function getExpectedTokens(offset) somewhere in your project ? Or a method to read this list of tokens in my CompletionContributor class ? |
You could try https://github.com/mike-lischke/antlr4-c3, which has a Java port. I might be possible to plug this library to a |
Thanks, it works with I will try to implement a basic list of token for the moment. It's a very good idea to plug this library to a CompletionContributor 💯 |
I tested... May be I used bad this class but sometimes, there are not responses :( |
Hello
I have difficulty to use the functions generated by ANTLR4 for Intellij.
I searched in the doc but It's not clear.
What is the name of the function to call to have the possible rules and tokens in function of offset in the file ? I see the error messages with the possible rules and tokens but I didn't found the good function to call.
I don't know if ANTLR4 for Intellij can generate the LL1 tools for my language. Have you examples of CompletionContributor class that use the basic completion tool and the LL1 tool ?
My code:
Thanks
The text was updated successfully, but these errors were encountered: