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

Incorrect suggestions #5

Open
anmurser opened this issue Sep 13, 2019 · 0 comments
Open

Incorrect suggestions #5

anmurser opened this issue Sep 13, 2019 · 0 comments

Comments

@anmurser
Copy link

Hi,
I was testing the java suggester you uploaded and I found and important issue.
This is the grammar I am using:

grammar Grammar;

rul : 'If the user ' condition;

condition
    : '(' simpleCondition bracket
    | simpleCondition
    ;

simpleCondition 
    : 'is vegetarian'
    ;

bracket : ')';

When the input sentence is "If the user is vegetarian", the suggestions should be empty but the token ')' is suggested instead. It seems incorrect suggestions happen when the parser rule (in this case simpleCondition) is used in other rules and the element that follows it is another parser rule.

Do you know how to fix this?

Thank you.

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