Error "grammar ANTLRv4LexBasic has no non-fragment rules"
See original GitHub issueWith antlr-4.9.2-complete.jar
I now get a an error when generating parser + lexer files for the ANTLRv4 grammar. The base lexer grammar only contains fragment lexer rules, which never had been a problem so far. Now it is and I wish the previous behavior back. What is the rational behind this error, which makes organizing grammar into separate parts difficult?
Also it would make sense to use the ANTLRv4 grammar in tests to see if that gives problems (instead of only using very simple grammars).
The error definition itself exists for a long time in ErrorType.java, so I assume something with the condition <if(arg2.implicitLexerOwner)>
must have changed recently, so that we suddenly see this error.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Error "grammar ANTLRv4LexBasic has no non-fragment rules" -
With antlr-4.9.2-complete.jar I now get a an error when generating parser + lexer files for the ANTLRv4 grammar. The base lexer grammar only ......
Read more >ANTLR error(99) grammar has no rules - Stack Overflow
I think Antlr expects the first rule name to be in small case. I was getting the same error with my grammar grammar...
Read more >Antlr Error99 Grammar Has No Rules - ADocLib
antlr4 Error grammar ANTLRv4LexBasic has no nonfragment rules Java.With antlr4.9.2complete.jar I now get a an error when generating parser + lexer.
Read more >Grammar Rules and Errors - Learning Guides - LibGuides
Error #1: Run-on Sentence or Comma Splice · Separate the clauses into two sentences. · Replace the comma with a semi-colon. · Replace...
Read more >Sentence Errors: Comma Splices, Run-ons, and Frag
Example: Tevon won the award because he had the highest score. Rules for Run-ons. A run-on or fused sentence is two independent clauses...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I created the pull request which should help. @parrt please merge ASAP.
Ok, actually the previous behavior can be rolled back because this commit fixes code generation even if no one real token is presented.