buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Eagle <ea...@post.harvard.edu>
Subject Version of Antlr in buildr/antlr
Date Fri, 21 Aug 2009 05:49:56 GMT
Hi there,
I've just started using Buildr on a project, and so far I'm glad to dispense
with all that XML in Maven. A couple n00b questions:

It seems that my Antlr grammar is being compiled with the wrong version of
Antlr.
1) How can I tell the classpath being used for the JVM that's running the
antlr.Tool#process method? I'd like to confirm it's the older version (pre
3.1). My evidence so far is that new features like tree grammar and token
declarations with the literal value aren't working.

I tried hacking the classpath, based on an example I found [1], like so:
 ANTLR = ["org.antlr:antlr:jar:3.1.1", "org.antlr:stringtemplate:jar:3.2"]
 Buildr::ANTLR::REQUIRES = ANTLR
 Java.classpath.unshift ANTLR
This doesn't seem to be working either.

[1]
http://www.google.com/codesearch/p?hl=en&sa=N&cd=3&ct=rc#Ev3aWwXNqH4/Rakefile&q=buildr/antlr&l=44

2) When I change the grammar, the code generation doesn't seem to happen. I
have to do a clean build to force the antlr generation to happen again. This
seems like a bug in the way the Rake task is created? I'm running it like
this:
  antlr = antlr(_('src/main/antlr'), :in_package=>'noop.grammar')

  compile.from antlr
  compile.with ANTLR

Thanks in advance
-Alex

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message