What are Recursive Lexer Rules in ANTLR4 good for?

Viewed 71
1 Answers

As mentioned in the comments by sepp2k: besides nested string literals, nested comments are 1 of the use cases:

COMMENT
 : '/*' ( COMMENT | . )*? '*/'
 ;
Related