[il-antlr-interest: 31450] [antlr-interest] R: Compile errors with CSharp2 Target

2011-02-15 Thread Massimiliano Donini
Can you attach source (generated) code? In C# target there are some differeneces from java Antrl runtime (e.g. Token interface is called IToken you can find others differences here: http://www.antlr.org/wiki/display/ANTLR3/Antlr+3+CSharp+Target?focusedCommen tId=25559049#comment-25559049) If you se

[il-antlr-interest: 31452] [antlr-interest] Fairly simple grammar question (Antlr 3.1)

2011-02-15 Thread Richard Druce
Hi, I'm sure this question has been answered before but I'm not sure how to phrase it well enough to find it in the archives. I want to match to inputs an INT such as ' 170 \n' and an AMOUNT such as ' $ 170.00 ' (unfortunately there is occasionally a space before the amount) The following gr

[il-antlr-interest: 31453] Re: [antlr-interest] Compile errors with CSharp2 Target

2011-02-15 Thread Johannes Luber
> Hello all, > > I'm trying to get the CSharp2 target to work. I followed the > instructions here: > > http://www.antlr.org/wiki/pages/viewpage.action?pageId=557075 > > except that I generated using the command line rather than using Antlrworks: > > java -classpath antlr-3.1.3.jar org.antlr.Too

[il-antlr-interest: 31454] [antlr-interest] I: Compile errors with CSharp2 Target

2011-02-15 Thread Massimiliano Donini
Hi simon don'you miss Language=CSharp2 in grammar's option section? And why in grammar there is package definition? (line 98 and line 104) But the erroneous code is defined above (line 107) private boolean allowShortOpenTag = false; // Handle the first token, which will always be a BodyStrin

[il-antlr-interest: 31456] Re: [antlr-interest] Compile errors with CSharp2 Target

2011-02-15 Thread Sam Harwell
Hi Simon, I assume you're using the grammar from this project: http://code.google.com/p/phpparser/ If so, you'll need to modify the grammar to work with any target other than the Java target. In the @header and @members blocks at the top, the contained code is written in Java and will need to be

[il-antlr-interest: 31457] Re: [antlr-interest] Fairly simple grammar question (Antlr 3.1)

2011-02-15 Thread shmuel siegel
On 2/15/2011 1:05 PM, Richard Druce wrote: > Hi, > > I'm sure this question has been answered before but I'm not sure how > to phrase it well enough to find it in the archives. > > I want to match to inputs an INT such as ' 170 \n' > and an AMOUNT such as ' $ 170.00 ' (unfortunately there is >

[il-antlr-interest: 31458] Re: [antlr-interest] Fairly simple grammar question (Antlr 3.1)

2011-02-15 Thread Justin Murray
Hi Richard, The answer is to use 2 lexer rules instead of one, and change the parser rule. It is generally not a good idea to mark whitespace as hidden (as you have done), and also use whitespace in your lexer rules. Here is what I would try: grammar testing; start : ( DOLLAR? I

[il-antlr-interest: 31459] Re: [antlr-interest] Compile errors with CSharp2 Target

2011-02-15 Thread Simon
Hi Johannes, > The problem lies in the fact the for current state of the CSharp2 target I > didn't release any binaries because of a bug which kills the execution of an > example grammar. I'm currently backporting the CSharp3 runtime to isolate if > the error is in the runtime or in the templat

[il-antlr-interest: 31460] [antlr-interest] what would ANTLR ref guide revised edition have?

2011-02-15 Thread Terence Parr
Howdy. I'm thinking about revising the ref guide for ANTLR 3 (ANTLR v4 might be awhile so I should update book). Any suggestions to improve? One obvious thing: discuss not just java target :) Ter List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mai

[il-antlr-interest: 31461] Re: [antlr-interest] what would ANTLR ref guide revised edition have?

2011-02-15 Thread Shane MacPhillamy
Absolutely, I'd like to see discussion and tutorials around the C target. On 16/02/2011, at 10:36 AM, Terence Parr wrote: > Howdy. I'm thinking about revising the ref guide for ANTLR 3 (ANTLR v4 might > be awhile so I should update book). Any suggestions to improve? One obvious > thing: discus

[il-antlr-interest: 31462] Re: [antlr-interest] Compile errors with CSharp2 Target

2011-02-15 Thread Johannes Luber
> > Hi Johannes, > > > The problem lies in the fact the for current state of the CSharp2 target I > > didn't release any binaries because of a bug which kills the execution of > > an example grammar. I'm currently backporting the CSharp3 runtime to > > isolate if the error is in the runtime or

[il-antlr-interest: 31463] Re: [antlr-interest] what would ANTLR ref guide revised edition have?

2011-02-15 Thread Terence Parr
ok. I will do full usage examples for each target. should book include FAQ type stuff? Ter On Feb 15, 2011, at 3:43 PM, Shane MacPhillamy wrote: > Absolutely, I'd like to see discussion and tutorials around the C target. > On 16/02/2011, at 10:36 AM, Terence Parr wrote: > >> Howdy. I'm thinking

[il-antlr-interest: 31464] Re: [antlr-interest] Compile errors with CSharp2 Target

2011-02-15 Thread David Daeschler
Just my two cents here I also had an issue until I manually compiled the latest version of the CSharp3 runtime to work with the current 3.3 ANTLR release. I had code generation issues when I tried to use the prebuilt DOT-NET-runtime-3.1.zip with the current ANTLR 3.3 release. Hope this helps. - D

[il-antlr-interest: 31465] Re: [antlr-interest] what would ANTLR ref guide revised edition have?

2011-02-15 Thread Shane MacPhillamy
I think some FAQ stuff would be helpful. There are a couple of things I've found a bit challenging so far. Some points; - Eclipse integration (Galileo, Helios etc) has provided me with a few unexpected surprises - Presently I'm using a combination of Emacs, make, ANTLRWorks and Xcode -- works f

[il-antlr-interest: 31466] Re: [antlr-interest] what would ANTLR ref guide revised edition have?

2011-02-15 Thread Raymond J. Schneider
An orderly sequence of structured examples of increasing difficulty illustrating the concepts covering all the bases would be nice. This is especially true as one enters the realm of trees and then string rewriting. I used the book for a class on writing language parsers and we had a good deal

[il-antlr-interest: 31467] Re: [antlr-interest] what would ANTLR ref guide revised edition have?

2011-02-15 Thread Terence Parr
Ah. Good point. I should talk about the eclipse plug-ins. on the targets, I will probably have to limit myself to some examples that demonstrate how to use that target. I will ask the authors of the targets to explain what works and what doesn't work. Ter On Feb 15, 2011, at 4:37 PM, Shane MacP

[il-antlr-interest: 31468] [antlr-interest] Updated C# port and CSharp3 target (C# build 3.3.1.7705)

2011-02-15 Thread Sam Harwell
Hello everyone, First of all, I have to make the following important note: due to a change in ANTLRCore.sti, this build of Antlr3.exe (the tool) only works properly with the included CSharp3 target. Likewise, the CSharp3 target only works properly with this version of the tool (the Java version

[il-antlr-interest: 31469] Re: [antlr-interest] what would ANTLR ref guide revised edition have?

2011-02-15 Thread Terence Parr
Hi Ray, Yeah, the language implementation patterns book is much more amenable to a class I would say. the reference guide is more of an accompanying text. do think that is working out for you this semester would be examples in the LIP book? I'm actually teaching a programming language is clas

[il-antlr-interest: 31470] Re: [antlr-interest] what would ANTLR ref guide revised edition have?

2011-02-15 Thread Kirby Bohling
On Tue, Feb 15, 2011 at 5:36 PM, Terence Parr wrote: > Howdy. I'm thinking about revising the ref guide for ANTLR 3 (ANTLR v4 might > be awhile so I should update book).  Any suggestions to improve?  One obvious > thing: discuss not just java target :) > > Ter > The thing I struggled with the m

[il-antlr-interest: 31471] Re: [antlr-interest] what would ANTLR ref guide revised edition have?

2011-02-15 Thread bill punch
Let me say that I really like ANTLR and have been using both books extensively. Thus I hope this is taken as constructive criticism. I think what Ray is saying is what I've been running into. I'm teaching the Compiler's class (for the first time) and using the ANTLR reference book. It has been a b

[il-antlr-interest: 31472] Re: [antlr-interest] what would ANTLR ref guide revised edition have?

2011-02-15 Thread Michael Bedward
My wish list would be: 1. Tree rewriting with pattern matching: the concept is wonderfully simple but the execution, or rather my execution, is harder. The examples dealing with variable scope in the LIP book are really good, and make it look obvious, but somehow I still find myself struggling to

[il-antlr-interest: 31474] Re: [antlr-interest] Compile errors with CSharp2 Target

2011-02-15 Thread Simon
On Wed, Feb 16, 2011 at 10:47 AM, Johannes Luber wrote: > Did you read the other emails stating you may have a grammar which is meant > to work with Java? If possible pls attach the grammar to the email, so we can > check this and any other errors. I forgot which ANTLR versions require what > r