Quantcast
Channel: ANTLR wildcard operator not consuming expected input - Stack Overflow
Browsing index pages (2 articles)
↧

ANTLR wildcard operator not consuming expected input

I'm writing an antlr grammar that reads in yacc specification file. Yacc spec files are of the form declarations %%rules %%programs However, I'm only interested in the declarations and rules sections...

View Article


Answer by Bart Kiers for ANTLR wildcard operator not consuming expected input

What you could do is create a separate lexer grammar so that you can use lexical modes. That way, you start in the default declaration mode and when you encounter %% for the first time, you push into...

View Article

Browsing index pages (2 articles)


Latest Images