Skip to content

Incorrect suggestions #5

@anmurser

Description

@anmurser

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.

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