-
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
Fragments do not work as expected #3016
Comments
4.9 gives " implicit definition of token DIRECTION in parser", while 4.4 is silent. |
This works too:
|
That's just correct behavior because you can't use fragment token inside parse rule. They are only allowed inside lexer rules. Probably the error message a bit confusing. |
I see two minor issues here:
|
There is no common understanding of how inline lexer fragments work in IT because grammars are a specific topic. In ANTLR fragment lexer rules don't exist themselves, they are used within other real tokens for lexer simplification.
Yes, |
Also, it's a duplicate of #2886 |
@parrt @ericvergnaud please close since it's duplicate. |
I'm working on a plantuml grammar and fragments do not work as expected:
This works well:
This gives
line 34:16 no viable alternative at input '-------down'
:Line:
A7 }o-------down----------{ B7
The text was updated successfully, but these errors were encountered: