[antlr-interest] comments on ant task for v3..

Eitan Suez eitan.suez at gmail.com
Thu Feb 8 14:14:53 PST 2007


hi all,

  i'm an antlr newbie.  just got a copy of the betabook
  from pragprog and got a copy of antlrv3.

i have some feedback on antlr3 ant task..
or rather a laundry list of questions and
changes i'd like to see..

1. if specified outputdirectory is "gen"
  and specified package name (in .g files) is "com.xyz.foo"
  then files should auto-output to gen/com/xyz/foo

  analog:  when i invoke javac and specify target directory
  to "classes" the package directories are auto-created

2. i'd like to be able to specify "classpathref" as an xml attribute
  to antlr task, like one can do with the javac task;  e.g.:

  <antlr:antlr3 xmlns:antlr="..."
     target="Expr.g" classpathref="antlr.path" ... />

  (i.e. i prefer the above to having to define a nested
    element to specify the classpath)

3. i'd like to see support for nested fileset element for
  specifying more than one .g file.  for example if want
  to process both a parser and a tree grammar in one
  step.  e.g.:

    <antlr:antlr3 ...>
      <fileset dir="grammars" includes="*.g" />
    </antlr:antlr3>

  i believe from the command line i can specify more than
  one grammar file.

4. this is not really an issue with the ant task, more
  with the default behaviour of the tool..
   why doesn't the token libdir value default to same
   dir the .java files are written?

5. the ant task appears to be built with java 6.
  i tried to run a test target and am getting this:
BUILD FAILED
java.lang.UnsupportedClassVersionError: Bad version number in .class file

i suppose i can unbundle the source copy and manually
copy the necessary dependent libs and compile and jar
the source.  it'd be nice if the whole project were available
for download with its build file.  it would save others a little
time.

thanks!
/ eitan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070208/85ec37a4/attachment.html 


More information about the antlr-interest mailing list