antlr - Porting ANTLR3 to ANTLR4 symbol to token replacement -


what appropriate translation antlr3 antlr4 syntax?

tokens {          and,          or        } 

with antlr3 used following replace & token and

and_or : '&' -> ,         | '|' -> or        ; 

how declare in antlr4?

there no rewrite rules in antlr4, closest this:

and_or  : ,   | or  ;  , : '&'; or : '|'; 

Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -