[il-antlr-interest: 34059] [antlr-interest] Need some advice which ANTLR versions should be used for my project (Target: Java or Python)

2011-09-15 Thread (d)
Hi, I'm facing the task to build a language to language translator that should translate the programming language PEARL to C++. The idea is to build a combined grammar to build an AST and then output the C++ code using a tree grammar with StringTemplate. At a first glance I picked the Python t

[il-antlr-interest: 34081] Re: [antlr-interest] Need some advice which ANTLR versions should be used for my project (Target: Java or Python)

2011-09-16 Thread (d)
Thanks to all responders. I'll try to use Java as a target language and see how far I get. BTW. PEARL as input language wasn't a typo. PEARL is an acronym for Process and Experiment Automation Realtime Language and quite different from PERL. Am 15.09.2011 16:29:45 schrieb(en) The Researcher: >

[il-antlr-interest: 34602] [antlr-interest] Looking for some simplifications in a tree grammar using StringTemplate output

2011-10-27 Thread (d)
Hi all, I'm building a language to language translator with C++ as target language. I've built a preliminary version of the language description and I try to produce some output using StringTemplate. It works so far but I'm looking for some simplifications of my output rules. The first rule

[il-antlr-interest: 34604] Re: [antlr-interest] Looking for some simplifications in a tree grammar using StringTemplate output

2011-10-27 Thread (d)
tput grammar. But this can wait for later. > > Jim > Thanks for the prompt reply, Stefan > > -Original Message- > > From: antlr-interest-boun...@antlr.org [mailto:antlr-interest- > > boun...@antlr.org] On Behalf Of Stefan Mätje (d) > > Sent: Thursda

[il-antlr-interest: 34716] Re: [antlr-interest] This should be simple, but I can't find the right syntax (or is it a bug?)

2011-11-04 Thread (d)
Hi, I'm having a similar rule in my tree grammar that is simply collecting the output of other rules into a common StringTemplate. Therefore I think your rule is correct so far. (The "problem" template is in a *.stg file.) problem: ^('PROBLEM' (decls+=mod_dcl|decls+=specification)*) -> p

[il-antlr-interest: 34736] [antlr-interest] gUnitEditor does not handle *.gunit files with "@header {package my.pack.there; }" gracefully

2011-11-04 Thread (d)
Hi, the gUnitEditor seems to be a nice tool but it doesn't handle *.gunit files with an included "@header {package my.pack.there;}" gracefully. It is able to read such a file but when writing the "@header" line is discarded. I unpacked the antlr-3.4-complete.jar and patched the StringTemplate

[il-antlr-interest: 34941] [antlr-interest] Copyright question concerning the code accompanying the "Language Implementation Patterns" book

2011-11-17 Thread (d)
Hi, I'm trying to build a language to language translator using ANTLR. I'm also using the "Language Implementation Patterns" book to find my way through this task. For building my symbol tables I would like to use some parts of the source code that accompanies this book. Could anybody clarify

[il-antlr-interest: 30016] [antlr-interest] Syntactic predicate Issue

2010-08-25 Thread Massimiliano D
Hi, i have some problem in generated java code form one rule like this: grant_statement :'GRANT' (grant_system_privilege |grant_object_privilege ) ; grant_object_privilege :privilege[false] (COMMA privilege[false])* 'ON' on_object_clause grant

[il-antlr-interest: 34830] [antlr-interest] grammar works in antlrworks debug mode but not eclipse

2011-11-10 Thread D. Frej
Hi, I created a grammar with the latest antlrworks. With antlrworks' debug functionality I "tested" the grammar. For proper throughout testing I copied the generated Lexer and Parser code to my eclipse project. The only change I made to the code was to add a package declaration. However, when

[il-antlr-interest: 34841] Re: [antlr-interest] grammar works in antlrworks debug mode but not eclipse

2011-11-11 Thread D. Frej
" does not work. Eclipse outputs "ctree.type|0||". When I use simply "15" as input, I get the - correct - output "ctree.type|7|INT|". Thanks, Didi Am 10.11.2011 16:46, schrieb Jim Idle: > There is not enough information here for anyone to help. What do you

[il-antlr-interest: 34842] Re: [antlr-interest] grammar works in antlrworks debug mode but not eclipse

2011-11-11 Thread D. Frej
help. What do you mean > by " only some rules works but not all"? They give syntax errors? Lexer? > Parser? Exception? etc. > > Jim > >> -Original Message- >> From: antlr-interest-boun...@antlr.org [mailto:antlr-interest- >> boun...@antlr.org]

[il-antlr-interest: 34866] [antlr-interest] grammar option to disable recovery?

2011-11-13 Thread D. Frej
Hi, from what I read in the mailing list and in the wiki error handling and recovery is complex. Is there an easy way to disable recovery? Maybe another flag in the options{} part of a grammar? Or a method called on the Lexer/Parser to set the recovery mode? I am looking for the least invasive

[il-antlr-interest: 34936] [antlr-interest] valid grammar does not compile

2011-11-17 Thread D. Frej
Hi, I build the following grammar with antlrworks: grammar questionmark; horef     :    '\?' ('a'..'z')     ; antlrworks tells me "check grammar succeeded". However, debugging does not works because the generated code does not compile !? My question: how does the rule have to look like so tha

[il-antlr-interest: 34938] Re: [antlr-interest] valid grammar does not compile

2011-11-17 Thread D. Frej
and still: the compilation error stays even if I do not quote the question mark > > Original-Nachricht > Datum: Thu, 17 Nov 2011 09:34:45 +0100 > Von: Bart Kiers > An: "D. Frej" > CC: antlr-interest@antlr.org > Betreff: Re: [ant

[il-antlr-interest: 28563] [antlr-interest] Another JUnit testing framework

2010-04-22 Thread Alan D. Cabrera
Hello, I started working on another JUnit testing framework for ANTLR. Mainly as a mechanism to learn how to write a JUnit testing and, secondarily, to test my grammars in a way that I was comfortable with. It's a great mix of Jeremy D. Frens' assert code from

[il-antlr-interest: 28570] Re: [antlr-interest] Another JUnit testing framework

2010-04-22 Thread Alan D. Cabrera
y samples that > demonstrate usage? (I looked around but your README and docs > directories are basically empty :). > > Thanks. > > -- > Kaleb Pederson > > Blog - http://kalebpederson.com > Twitter - http://twitter.com/kalebpederson > > > On Thursday 22 April 2010

[il-antlr-interest: 31271] [antlr-interest] Need help with generating a "nested" tree

2011-01-29 Thread Alan D. Cabrera
functioncall : varOrExp nameAndArgs+ -> ^(FUNCALL varOrExp nameAndArgs+) ; generates (FUNCALL varOrExp nameAndArgs1 nameAndArgs2 nameAndArgs3 ) What I need it to do is generate (FUNCALL (FUNCALL (FUNCALL v

[il-antlr-interest: 31276] Re: [antlr-interest] Need help with generating a "nested" tree

2011-01-29 Thread Alan D. Cabrera
On Jan 29, 2011, at 8:30 PM, John B. Brodie wrote: > On Sat, 2011-01-29 at 09:34 -0800, Alan D. Cabrera wrote: >> functioncall >>: varOrExp nameAndArgs+ -> ^(FUNCALL varOrExp nameAndArgs+) >>; >> >> generates >> >> (FUNCALL >>

[il-antlr-interest: 31315] [antlr-interest] SLL(2) in "The Definitive ANTLR Reference"

2011-02-02 Thread Alan D. Cabrera
I was reading about the following grammar on page 287 of the PDF document grammar t; s : X r A B | Y r B ; r : A | ; I don't see where the problem is since the alternatives in s begin with two different tokens X and Y. I think that since these two tokens are different I can easily con

[il-antlr-interest: 31322] Re: [antlr-interest] SLL(2) in "The Definitive ANTLR Reference"

2011-02-02 Thread Alan D. Cabrera
Ahh, the DFA for the 'r' rule. That makes sense now. Interesting example. Thanks Terence and Sam! Regards, Alan On Feb 2, 2011, at 11:17 AM, Terence Parr wrote: > try for rule 'r' though ;) > Ter > On Feb 2, 2011, at 9:07 AM, Alan D. Cabrera wrote: > >

[il-antlr-interest: 31535] Re: [antlr-interest] Best way to set up lexer jUnit tests

2011-02-19 Thread Alan D. Cabrera
Check out: https://github.com/maguro/aunit Regards, Alan On Feb 18, 2011, at 9:30 PM, Bill Andersen wrote: > Hi Folks > > Can't use gUnit because I have separate parser / lexer grammar. > > Looked around and found the project on sourceforge for ANTLR jUnit tests but > don't want to use th

[il-antlr-interest: 31642] Re: [antlr-interest] Status of gUnit?

2011-02-26 Thread Alan D . Cabrera
As an alternative to gUnit I invite you to take a look at https://github.com/maguro/aunit Comments and suggestions are welcome. Regards, Alan On Feb 23, 2011, at 11:28 AM, an...@xrad.org wrote: > > Hi there, > > I'm wondering what the status of gUnit is these days? The SimpleC > example on

[il-antlr-interest: 31646] Re: [antlr-interest] Status of gUnit?

2011-02-26 Thread Alan D. Cabrera
t.java > > On Sat, Feb 26, 2011 at 3:49 PM, Terence Parr wrote: > >> No description of what it does exactly. example? >> T >> On Feb 26, 2011, at 12:37 PM, Alan D. Cabrera wrote: >> >>> As an alternative to gUnit I invite you to take a look at >&g

[il-antlr-interest: 31768] Re: [antlr-interest] ANTLR maven build failing

2011-03-08 Thread Alan D. Cabrera
I'm still seeing you run maven 3 instead of maven 2. The current POMs will not build under maven 3 and deleting ~/.m2/repository will not help things. Regards, Alan On Mar 7, 2011, at 8:01 AM, Alan Condit wrote: > jimi, > > I deleted .m2 and tried it again, it looks like the same basic error

[il-antlr-interest: 32351] Re: [antlr-interest] grammar test

2011-05-01 Thread Alan D. Cabrera
As an alternative to gUnit I invite you to take a look at https://github.com/maguro/aunit Comments and suggestions are welcome. Regards, Alan On Apr 28, 2011, at 2:58 AM, jie lu wrote: > Hi, all > > is there any unit test for antlr grammar? > i write a long mysql grammar. it is parser ok bu

[il-antlr-interest: 32527] Re: [antlr-interest] gUnit: Test of a parser rule always fail

2011-05-24 Thread Alan D. Cabrera
I invite you to take a look at AUnit, an ANTLR v3 JUnit testing extension: https://github.com/maguro/aunit I would be interested in hearing your comments and suggestions. Regards, Alan On May 24, 2011, at 6:16 AM, Simon Marchi wrote: > Hmm that's true. > > I first tried adding this to remove

[il-antlr-interest: 34019] [antlr-interest] Should ANTLR 3.4 be backward compatible with 3.3?

2011-09-12 Thread Alan D. Cabrera
I got some free time to tinker around with an old project of mine https://github.com/maguro/lua4j so I updated the version to 3.4 of ANTLR and am now unable to compile it. The parser that gets generated is not valid Java code even though ANTLR does not print out any error or warning messages.

[il-antlr-interest: 34049] Re: [antlr-interest] Should ANTLR 3.4 be backward compatible with 3.3?

2011-09-14 Thread Alan D. Cabrera
On Sep 12, 2011, at 10:30 PM, Alan D. Cabrera wrote: > I got some free time to tinker around with an old project of mine > > https://github.com/maguro/lua4j > > so I updated the version to 3.4 of ANTLR and am now unable to compile it. > The parser that gets generated is n

[il-antlr-interest: 34055] Re: [antlr-interest] Should ANTLR 3.4 be backward compatible with 3.3?

2011-09-14 Thread Alan D. Cabrera
On Sep 14, 2011, at 10:48 AM, The Researcher wrote: > Hi Alan > >> >> On Sep 12, 2011, at 10:30 PM, Alan D. Cabrera wrote: >> The ANTLR file generates bad Java code. Is there something I should do to >> report this? I tried the Jira but there doesn'