antlrantlr4antlr2

Migrating ANTLR v2 grammar to ANTLR v4


We have a grammar written for antlr V2 and I would like to migrate to antlr v4. Is there any migration Guide? I would also like to know modifications of existing V2 grammar so that we utilize v4 features well.


Solution

  • I solved this by writing a new Antlr 4 grammar file. There is no good transform from Antlr 2 to Antlr 4.