-
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
ANTLR matches incomplete rule #4696
Comments
It could be as designed. But, we need to actually see a minimum reproducible example (grammar and input). Check whether your start rule is a proper EOF-terminated rule. It should be. |
@kaby76 Thank you for your feedback.
AND
with options:
The string to parse (the subject) is the string:
(does not contain parentheses at all). I expect functionsReturningNumerics rule to fail to match because of the missing (but required parentheses) and continue trying to match the other rules, and eventually match "pathExpression", but instead, ANTLR logs
and even though the parentheses are missing, the parser successfully matches functionsReturningNumerics.
The problem is that functionsReturningNumerics rule succeeds without the required parentheses. |
The comment has been updated, the logs provided. |
I'm not an ANTLR developer, so maybe take this with a grain of salt, but:
|
I am using ANTLR 4.13.2
........
passing just 'LENGTH' without parentheses, ANTLR matches the expression.
Is it an expected behaviour or it's bug?
The text was updated successfully, but these errors were encountered: