Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Any meaning in the grouping parens in ANTLR

Are the following two rules the same in ANTLR4, or does using a parens give any additional grouping information or such, similar to a regex capturing group:

WS  : (' '|'\t'|'\r'|'\n')+ -> skip;

WS  : [ \t\r\n]+ -> skip;

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Those are synonymous. The latter is just a more concise syntax for the former.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading