Extract grammar definition from ANTLR g file -


i have rather complex antlr grammar lot of custom handling code (which among other things used creation of internal data structures , handling of data in general). i'd know if antlr provides capability (or if there existing tool) removing custom grammar handling (e.g. java code, @init, @after sections, parameters, return types, etc) , leave me barebones grammar definition. know regex handling, imagined recurring task there may out there this.

example:

rule[string blabla] returns [blabla] scope{    blablabal; } @init{    blalbabla; } :    string comma string {blablabla code blablabla;} ; 

would return

rule:    string comma string ; 

have tried -print option? (v3 far)


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -