8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Hi ANTLR experts,
I have entered this grammar to the lab:
// ANTLR Grammar for identifiers decorated by zero or one prefix (separated by underscore) and zero, one or more suffixes (also separated by underscores). grammar PropNaming; options { caseInsensitive = false; } propnames : propname (NEWLINE+ propname)* NEWLINE* EOF ; propname : mathprefix? baseprop contsuffix? intenssuffix? ; mathprefix : PREFIXln | PREFIXlog ; baseprop : TOKENA | TOKENm ; contsuffix : SUFFIXig | SUFFIXres ; intenssuffix : SUFFIXV | SUFFIXm ; PREFIXln : FRAGMENTln US ; PREFIXlog : FRAGMENTlog US ; TOKENA : FRAGMENTA ; TOKENm : FRAGMENTm ; SUFFIXig : US FRAGMENTig ; SUFFIXres : US FRAGMENTres ; SUFFIXV : US FRAGMENTV ; SUFFIXm : US FRAGMENTm ; NEWLINE : '\r'? '\n' ; fragment US : '_' ; fragment FRAGMENTln : 'ln' ; fragment FRAGMENTlog : 'log' ; fragment FRAGMENTA : 'A' ; fragment FRAGMENTm : 'm' ; fragment FRAGMENTig : 'ig' ; fragment FRAGMENTres : 'res' ; fragment FRAGMENTV : 'V' ; // end of file
and applied to this (from my point of view valid) input:
A ln_A A_ig ln_A_ig ln_m_m
And I get this error message: 1:0 mismatched input 'A' expecting {'and', 'or', 'not', '='}
1:0 mismatched input 'A' expecting {'and', 'or', 'not', '='}
All sample lines seem to be wrong for ANTLR.
Where is the error(s) in my grammar?
Oliver
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi ANTLR experts,
I have entered this grammar to the lab:
and applied to this (from my point of view valid) input:
And I get this error message:
1:0 mismatched input 'A' expecting {'and', 'or', 'not', '='}
All sample lines seem to be wrong for ANTLR.
Where is the error(s) in my grammar?
Oliver
The text was updated successfully, but these errors were encountered: