[antlr-interest] change ANTLRs (generated) grammarFileName?

Marc Bischof atlan at gmx.li
Thu Nov 6 11:17:41 PST 2008


Hej List,

i have a question to ANTLRs grammar file name.
(i use antlr 3.1b2 with antlrwork1.2b5)

Within my generated source code, the complete source path is generated as 
shown below.

a) as comments spread over the file
>//$ANTLR3.1b2 /home/bischomc/studienarbeit/workspace/BPELscript/src/iaas/bpelscript/antlr/BPELscriptWalker.g 
2008-11-04 14:48:57
b) as hard coded grammarFileName
>  public String getGrammarFileName() { 
return "/home/bischomc/studienarbeit/workspace/BPELscript/src/iaas/bpelscript/antlr/BPELscriptWalker.g"; }

Now i want to share the code and i'am trying to avoid this absolute 
representation.

Is it possible to set this name (and the comment-name) by a grammar or 
antlrworks option?
Or have this be done manually?

I found nothing about this when searching in the reference or other papers. 
(the homepage is currently down)

Cheers,
        Marc


More information about the antlr-interest mailing list