[antlr-interest] [antlr-dev] ANTLRWorks ANTLR embedding
Jamie Penney
jpen054 at ec.auckland.ac.nz
Thu Feb 14 17:31:03 PST 2008
I figured out why it wouldn't compile ANTLRWorks - the 'prepare-osx'
target did not specify if="is-macos". Adding that fixed that build for me.
For a bit of additional information on my actual problem, it throws the
following exception when I call Generate in ANTLRWorks. I have examined
the Grammar source and it does not have the method ANTLRWorks is looking
for.
Exception in thread "class org.antlr.works.visualization.VisualDrawing"
java.lan
g.NoSuchMethodError: org.antlr.tool.Grammar.createNFAs()V
at
org.antlr.works.grammar.EngineGrammar.createParserGrammar(Unknown Sou
rce)
at org.antlr.works.grammar.EngineGrammar.createGrammars(Unknown
Source)
at
org.antlr.works.visualization.VisualDrawing.threadProcessText(Unknown
Source)
at org.antlr.works.visualization.VisualDrawing.threadRun(Unknown
Source)
at org.antlr.works.ate.syntax.misc.ATEThread.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception in thread "Thread-5" java.lang.NoSuchMethodError:
org.antlr.tool.Gramm
ar.createNFAs()V
at
org.antlr.works.grammar.EngineGrammar.createParserGrammar(Unknown Sou
rce)
at org.antlr.works.grammar.EngineGrammar.createGrammars(Unknown
Source)
at org.antlr.works.grammar.EngineGrammar.analyze(Unknown Source)
at org.antlr.works.grammar.CheckGrammar.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Jamie Penney wrote:
> I can't get ANTLRWorks to work with an incremental build of ANTLR -
> ANTLRWorks seems to have the ANTLR jar extracted internally, rather
> than having it as a jar so I can't just replace the jar. Extracting
> ANTLRWorks and overwriting the ANTLR class files doesn't work either -
> it either doesn't run the ANTLR Tool or doesn't start up at all. What
> is the easiest way of setting this up? I've even tried building
> ANTLRWorks from source, but that doesn't even work straight off the
> bat, so I can't try to use the updated ANTLR jar.
>
> Thanks,
> Jamie Penney
>
> Matt Benson wrote:
>> --- Thomas Brandon <tbrandonau at gmail.com> wrote:
>>
>>
>>> You can just replace the included ANTLR JAR in the
>>> ANTLRWorks JAR (or
>>> run an extracted ANTLRWorks). Seems better for
>>> bleeding edge users to
>>> do this than the extra effort of writing\maintaining
>>> code pointing it
>>> at the external JAR and requiring all users to set
>>> this up.
>>>
>>
>> I forgot that the aim was probably to have everything
>> available as a single jar. ;) Although the
>> Class-Path attribute might help an antlrworks.jar find
>> an antlr.jar in the same directory. I suppose I can
>> try to doctor my OS X install; either way I still end
>> up with a convenient single point of launch.
>>
>> -Matt
>>
>>
>>> Tom.
>>> On Feb 14, 2008 6:28 AM, Matt Benson
>>> <gudnabrsam at yahoo.com> wrote:
>>>
>>>> Would it be possible to ship ANTLRWorks such that
>>>>
>>> it
>>>
>>>> includes and references a separate ANTLR jar
>>>>
>>> rather
>>>
>>>> than embedding the contents of an ANTLR jar? Then
>>>>
>>> it
>>>
>>>> would be possible for bleeding edge depot users to
>>>> drop in an updated ANTLR jar (I expect this would
>>>> usually be compatible).
>>>>
>>>> WDYT?
>>>>
>>>> -Matt
>>>>
>>>>
>>>>
>> ____________________________________________________________________________________
>>
>>
>>>> Never miss a thing. Make Yahoo your home page.
>>>> http://www.yahoo.com/r/hs
>>>> _______________________________________________
>>>> antlr-dev mailing list
>>>> antlr-dev at antlr.org
>>>>
>>>>
>>> http://www.antlr.org/mailman/listinfo/antlr-dev
>>>
>>
>>
>>
>>
>> ____________________________________________________________________________________
>>
>> Be a better friend, newshound, and know-it-all with Yahoo! Mobile.
>> Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>>
>
More information about the antlr-interest
mailing list