-
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
template error: attribute parser isn't defined #958
Comments
I too have this error when compiling the ANTLR Java8.g4 grammar with
Using version 4.5.1 |
Well, I ran into this same message when I tried to add semantic predicates to my lexer. Digging into it some, I think that the fact the error message is referring to 'attribute parser' may be a clue as to the cause. It should be generating a lexer when this occurs. I think I found the relevant part of the string template in JavaScript.stg, which says:
I don't know STRINGTEMPLATE very well, but it seems like the Note: the generated code seem to have the appropriate name none-the-less. |
Hi, |
I get this error
From
|
@ericvergnaud unfortunately either lexer or parser will be undefined. I think I faked it for C++ as:
I'll make the patch and add a test. Yep, that fixes it. I'll push but we still have that net.js issue |
get recognizer name properly. Fixes #958
Grammar:
generates an error below when using Javascript target (
antlr4 -Dlanguage=JavaScript Language.g4
):The text was updated successfully, but these errors were encountered: