[antlr-interest] antlrv3 ant task comments from a newbie..

Eitan Suez eitan.suez at gmail.com
Fri Feb 9 07:30:53 PST 2007


hi all,

  i'm an antlr newbie.  just got a copy of the betabook
  from pragprog and downloaded 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.   i tried to run a test target and am getting this:

BUILD FAILED
java.lang.UnsupportedClassVersionError: Bad version number in .class file

  i'm running java 5.  is anyone else seeing this?


2. 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

3. 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)

4. 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.

5. 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?

  separately, it's nice to see that in v3 you don't have
  to specify both a parser and lexer class declaration,
  but i'm baffled that to place the generated code in
  a specific package (which i think should be the default
  case) one must specify two @header entries.

thanks!
/ eitan
--
eitan suez / austin, texas

 ( i sent a copy of this message yesterday but it didn't
   make it through..i'm guessing perhaps it coincided
   with some of the dns settings changes.. )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070209/7261fd24/attachment.html 


More information about the antlr-interest mailing list