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
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:
>
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
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
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
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
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
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
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
" 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
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]
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
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
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
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
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
functioncall
: varOrExp nameAndArgs+ -> ^(FUNCALL varOrExp nameAndArgs+)
;
generates
(FUNCALL
varOrExp
nameAndArgs1
nameAndArgs2
nameAndArgs3
)
What I need it to do is generate
(FUNCALL
(FUNCALL
(FUNCALL
v
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
>>
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
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:
>
>
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
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
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
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
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
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
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.
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
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'
29 matches
Mail list logo