Antlr4: sets referencing rules don't seem to work in the lexer.

Created on 24 Sep 2012  路  7Comments  路  Source: antlr/antlr4

fragment NLCHAR : [\n\r];
String : '"' ~('"' | NLCHAR)* '"';
lexers fixed feature

Most helpful comment

Hey @parrt, this is a feature which would drastically simplify some of the grammars I'm interested in. Understood that it's a feature request not a bug from this ticket, but what would be required to support fragments as set members in antlr4? I'd be happy to sink some evenings into making this happen if you're able to give some direction on where to start.

Thanks!

All 7 comments

All i did was disallow rule refs in lexer char sets (for now?)

Old issue, but I'm still bitten by that. I'd rather prefer this to be really solved (i.e. support lexer rules in sets). It's actually a regression, considering that this worked in ANTLR3. So it should get a higher prio to solve IMO.

well, antlr3->antlr4 was a complete rewrite so less a regression and more a smaller feature set ;)

:-) probably depends on the view angle...

Hey @parrt, this is a feature which would drastically simplify some of the grammars I'm interested in. Understood that it's a feature request not a bug from this ticket, but what would be required to support fragments as set members in antlr4? I'd be happy to sink some evenings into making this happen if you're able to give some direction on where to start.

Thanks!

Hi @arrdem I'm afraid I'm mostly in maintenance mode; not sure what's involved but I'd be nervous about altering anything related to the ALL(*) algorithm at this point.

at least iwth 4.5 this is still not fixed?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rpinchbeck picture rpinchbeck  路  9Comments

nevetS picture nevetS  路  7Comments

prashast picture prashast  路  7Comments

kaba2 picture kaba2  路  6Comments

tzmfreedom picture tzmfreedom  路  8Comments