[il-antlr-interest: 26299] [antlr-interest] SEEMS NOBODY HERE LIKE TO HELP OTHERS

2009-10-16 Thread antlr_bill
I DONT HAVE ANY WORDS ANYMORE, YEAH I REALLY WANNA GET SOME HELP FROM HERE BUT SEEMS IT'S IMPOSSIBLE SURE ANTLR IS A GREAT PROJECT , BUT ... ANYWAY ,SORRY THAT I DONT KNOW HOW TO UNSUBSCRIBE FROM THIS MAILIST --~--~-~--~~~---~--~~ You received this message because

[il-antlr-interest: 26300] Re: [antlr-interest] Example code-generation target that outputs a state machine

2009-10-16 Thread David-Sarah Hopwood
Mike Samuel wrote: > I'd like to derive a state machine that recognizes a combined lexical > grammar of JS/HTML/CSS (hacked so that JS has a regular lexical > grammar) and a mapping from states to the production they're part of. > I need to keep the number of states small. > > I saw something tant

[il-antlr-interest: 26301] Re: [antlr-interest] SEEMS NOBODY HERE LIKE TO HELP OTHERS

2009-10-16 Thread David Minor
I wouldn't shout about it, but I also have received scant (or no help) on this forum. I'm not a parasite, I purchased the book, but... well... I'm using Gold now and so far so good. I check back every now and then to see if I got and answer. The unsubscribe link is at the bottom of this message.

[il-antlr-interest: 26302] Re: [antlr-interest] SEEMS NOBODY HERE LIKE TO HELP OTHERS

2009-10-16 Thread Graham Wideman
David: > I also have received scant (or no help) on this forum I see that you started two threads. In one, Jim Idle gave you a thoughtful response, and suggested some questions to pursue. You did post some more, and nobody answered so far as I can see. That could be because the subject line on

[il-antlr-interest: 26303] Re: [antlr-interest] SEEMS NOBODY HERE LIKE TO HELP OTHERS

2009-10-16 Thread Joseph Areeda
I wouldn't want to get in the way of a good pity party but my experience has been the opposite. I'm new to antlr, purchased the book, downloaded free software and got my project working in record time (for me). I had help along the way and have watched others get helpful responses to their que

[il-antlr-interest: 26304] [antlr-interest] [Antlr + ST] Huge output string - OutOfMemoryError

2009-10-16 Thread Hieu Phung
Hi all, I am writing a program using Antlr and StringTemplate to translate an input file to an XML file. Input is small but output is huge: 720KB input file will generate about 100MB output file. When my input reached 7608KB, I got OOM error time taken in second: 18 - file size in KB: 4804 time t

[il-antlr-interest: 26305] [antlr-interest] How do I output an alert box or something in the console in ANTLRWorks, in grammar actions?

2009-10-16 Thread Naveen Chawla
System.out.println("a string") doesn't seem to output anything, and Window.alert("a string") doesn't work. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email t

[il-antlr-interest: 26306] Re: [antlr-interest] How to do "not" in a syntactic predicate?

2009-10-16 Thread Naveen Chawla
So, does anybody have a way of doing "Take *a* IF not followed by *b* (both syntactic constructs)" ? i.e. q: (a !b)=> a;//("!" or "not" doesn't exist in ANTLR) I have unsuccessfully tried the following: q: (a b?)=> {mark = input.mark();} a {bFoundYet=false; i=input.index(

[il-antlr-interest: 26307] Re: [antlr-interest] How do I output an alert box or something in the console in ANTLRWorks , in grammar actions?

2009-10-16 Thread Indhu Bharathi
Sustem.out.println will print in the output tab. From: antlr-interest-boun...@antlr.org [mailto:antlr-interest-boun...@antlr.org] On Behalf Of Naveen Chawla Sent: Friday, October 16, 2009 4:21 PM To: antlr-inter...@antlr.org Subject: [antlr-interest] How do I output an alert box or something in

[il-antlr-interest: 26308] Re: [antlr-interest] Example code-generation target that outputs a state machine

2009-10-16 Thread Todd Stout
Take a look at Ragel http://www.complang.org/ragel/, perhaps it can help you. On Fri, Oct 16, 2009 at 2:50 AM, David-Sarah Hopwood < david-sa...@jacaranda.org> wrote: > Mike Samuel wrote: > > I'd like to derive a state machine that recognizes a combined lexical > > grammar of JS/HTML/CSS (hacked

[il-antlr-interest: 26310] Re: [antlr-interest] How do I output an alert box or something in the console in ANTLRWorks, in grammar actions?

2009-10-16 Thread Naveen Chawla
Thanks Indhu! This might help me a lot now. 2009/10/16 Indhu Bharathi > Sustem.out.println will print in the output tab. > > > > *From:* antlr-interest-boun...@antlr.org [mailto: > antlr-interest-boun...@antlr.org] *On Behalf Of *Naveen Chawla > *Sent:* Friday, October 16, 2009 4:21 PM > *To:*

[il-antlr-interest: 26311] [antlr-interest] Which version do I need for a CSharp target and VS 2008

2009-10-16 Thread Robert van der Hulst
I am using Antlr 2.7.6 (CPP target) at this moment for our Language project. I need to do make some serious changes, so I am considering to move the project to Antlr 3 and a CSharp Which version do people recommend that I should use. I looked at the Antlr website and found two options: - CS

[il-antlr-interest: 26312] [antlr-interest] Semantic predicates

2009-10-16 Thread Robert Wentworth
There appears to be something fundamental that I am not "getting" about the way semantic predicates work. In the grammar below, the input "cat" is recognized using the rule "cat" but in not recognized by either the rule "expr" or the rule "pexpr". Could someone explain to me why this is so

[il-antlr-interest: 26314] [antlr-interest] Bug or misunderstanding?: missing attribute access on rule scope

2009-10-16 Thread Kaleb Pederson
I'm getting an error that doesn't make any sense, either because I've missed something fundamental or I've stumbled across a bug. I'm doing some type checking within a tree parser. I have a plusMinusExpression which can either be a negation or a subtraction expression. In order to to check to se

[il-antlr-interest: 26315] Re: [antlr-interest] Semantic predicates

2009-10-16 Thread Kaleb Pederson
On Fri, Oct 16, 2009 at 10:39 AM, Robert Wentworth wrote: > There appears to be something fundamental that I am not "getting" > about the way semantic predicates work. In the grammar below, the > input "cat" is recognized using the rule "cat" but in not recognized > by either the rule "expr" or th

[il-antlr-interest: 26316] Re: [antlr-interest] How to do "not" in a syntactic predicate?

2009-10-16 Thread Kaleb Pederson
On Fri, Oct 16, 2009 at 4:39 AM, Naveen Chawla wrote: > So, does anybody have a way of doing "Take *a* IF not followed by *b* (both > syntactic constructs)" ? > > i.e. > q: (a !b)=> a;    //("!" or "not" doesn't exist in > ANTLR) I think that would be a nice syntax for ANTLR t

[il-antlr-interest: 26317] Re: [antlr-interest] SEEMS NOBODY HERE LIKE TO HELP OTHERS

2009-10-16 Thread Bill Andersen
To those complaining about the ANTLR list... I've heard this complaint before and have even felt the same way from time to time. But I'm still here. No matter what anyone says and even if you have the book, if you don't live and breathe language design, starting out with ANTLR isn't really

[il-antlr-interest: 26318] Re: [antlr-interest] Semantic predicates

2009-10-16 Thread Robert Wentworth
Kaleb, Thanks for your response. Although I've read the web page you referenced and the ANTLR book chapter on semantic predicates, I remain with just as many questions as I started out with. Note that the point of my example is to understand how semantic predicates can be used in this sort

[il-antlr-interest: 26319] Re: [antlr-interest] Semantic predicates

2009-10-16 Thread Andreas Meyer
Robert Wentworth schrieb: > There appears to be something fundamental that I am not "getting" > about the way semantic predicates work. In the grammar below, the > input "cat" is recognized using the rule "cat" but in not recognized > by either the rule "expr" or the rule "pexpr". Could some

[il-antlr-interest: 26320] Re: [antlr-interest] Bug or m isunderstanding?: missing attribute access on rule scope

2009-10-16 Thread David-Sarah Hopwood
Kaleb Pederson wrote: > I'm getting an error that doesn't make any sense, either because I've > missed something fundamental or I've stumbled across a bug. I'm doing > some type checking within a tree parser. I have a plusMinusExpression > which can either be a negation or a subtraction expression

[il-antlr-interest: 26321] [antlr-interest] "No Past Experience Required"

2009-10-16 Thread Peter Boughton
Hi all, I'm looking to figure out ANTLR and so I'm reading this page: http://www.antlr.org/wiki/display/ANTLR3/Quick+Starter+on+Parser+Grammars+-+No+Past+Experience+Required But there are a number of things I'm stuck on - and so I'm asking here for both a good explanation and so that someone wit

[il-antlr-interest: 26322] Re: [antlr-interest] Bug or misunderstanding?: missing attribute access on rule scope

2009-10-16 Thread Kaleb Pederson
On Fri, Oct 16, 2009 at 2:15 PM, David-Sarah Hopwood wrote: > Kaleb Pederson wrote: >> I'm getting an error that doesn't make any sense, either because I've >> missed something fundamental or I've stumbled across a bug. I'm doing >> some type checking within a tree parser.  I have a plusMinusExpre

[il-antlr-interest: 26323] Re: [antlr-interest] Semantic predicates

2009-10-16 Thread Andreas Meyer
Andreas Meyer schrieb: > Robert Wentworth schrieb: > >> There appears to be something fundamental that I am not "getting" >> [...] >> > > I think the generated code is wrong. [...] > btw, when changing the gated semantic predicates: > > cat : {input.LT(1).getText().equals("cat")}

[il-antlr-interest: 26324] Re: [antlr-interest] Bug or misunderstanding?: missing attribute access on rule scope

2009-10-16 Thread David-Sarah Hopwood
Kaleb Pederson wrote: > On Fri, Oct 16, 2009 at 2:15 PM, David-Sarah Hopwood > wrote: >> Kaleb Pederson wrote: >>> I'm getting an error that doesn't make any sense, either because I've >>> missed something fundamental or I've stumbled across a bug. I'm doing >>> some type checking within a tree pa

[il-antlr-interest: 26325] Re: [antlr-interest] Semantic predicates

2009-10-16 Thread David-Sarah Hopwood
Andreas Meyer wrote: > Andreas Meyer schrieb: >> Robert Wentworth schrieb: >> >>> There appears to be something fundamental that I am not "getting" >>> [...] >>> >> I think the generated code is wrong. [...] >> > btw, when changing the gated semantic predicates: >>> cat : {input.L

[il-antlr-interest: 26326] Re: [antlr-interest] Bug or misunderstanding?: missing attribute access on rule scope

2009-10-16 Thread Kaleb Pederson
On Fri, Oct 16, 2009 at 3:58 PM, David-Sarah Hopwood wrote: > Kaleb Pederson wrote: >> To pose my next question, isn't what I had >> perfectly legal? I.e. Isn't it pefectly legal to reference $labelName >> without referencing an attribute, such as in my null check? > > The syntax $labelName can b

[il-antlr-interest: 26327] Re: [antlr-interest] How to do "not" in a syntactic predicate?

2009-10-16 Thread Gavin Lambert
At 00:39 17/10/2009, Naveen Chawla wrote: >So, does anybody have a way of doing "Take *a* IF not followed by >*b* (both syntactic constructs)" ? > >i.e. >q: (a !b)=> a;//("!" or "not" doesn't >exist in ANTLR) Actually there is a negation operator, ~ -- but this operates

[il-antlr-interest: 26328] Re: [antlr-interest] "No Past Experience Required"

2009-10-16 Thread Horst Dehmer
Hello Peter, i myself am not too familiar with ANTLR 3 (and parser generators in general) and for that reason i feel tempted to try to give some answers. A symbol is a 'word' in a grammar, like a word in a natural language. A symbol can be a terminal (symbol) which can no further be 'reduced', l

[il-antlr-interest: 26330] free software

2009-10-16 Thread free software
download free software click here http://www.banatmsr.com/a7a http://www.banatmsr.com/a7a http://www.banatmsr.com/a7a http://www.banatmsr.com/a7a http://www.banatmsr.com/a7a http://www.banatmsr.com/a7a === download new vedios 2009 click here http://www.banatmsr.co

[il-antlr-interest: 26331] Re: [antlr-interest] Bug or misunderstanding?: missing attribute access on rule scope

2009-10-16 Thread John B. Brodie
Greetings! Sorry about this message, I think I have broken any threading to the original message. I am replying from the mail-list archive and seem to be unable to figure out how to graft my reply into its proper thread. Sorry. On Fri Oct 16 12:21:33 PDT 2009, Kaleb Pederson asked: > I'm getting

[il-antlr-interest: 26332] Re: [antlr-interest] accepting nested code blocks

2009-10-16 Thread Jim Idle
Yes you can do it - you probably need to keep state flags and either trigger lexer rules based upon them or perhaps better would be to trigger an external lexer. The main problem is error recovery - what does your lexer do if the Javascript does not have perfectly matched '{' '}' and so the lex

[il-antlr-interest: 26333] Re: [antlr-interest] Example code-generation target that outputs a state machine

2009-10-16 Thread Mike Samuel
> Mike Samuel wrote: > > I'd like to derive a state machine that recognizes a combined lexical > > grammar of JS/HTML/CSS (hacked so that JS has a regular lexical > > grammar) and a mapping from states to the production they're part of. > > I need to keep the number of states small. > > > > I saw

[il-antlr-interest: 26334] Re: [antlr-interest] Example code-generation target that outputs a state machine

2009-10-16 Thread David-Sarah Hopwood
Mike Samuel wrote: >> Mike Samuel wrote: >>> For background, my end goal is to bolt string interpolation onto >>> javascript, but in a way that doesn't introduce XSS problems as >>> described at >>> http://google-caja.googlecode.com/svn/changes/mikesamuel/string-interpolation-29-Jan-2008/trunk/src/

[il-antlr-interest: 26335] Re: [antlr-interest] ANTLR C: Question regarding the portability of generated lexer C code

2009-10-16 Thread Jim Idle
However, I am pretty sure that all the C compilers on such systems allow specification of ASCII assumptions rather than the stupid EBCDIC (designed by committee to be stupid). For instance I know that the zOS compiler allows this. EBCDIC is a ridiculous encoding, which I won’t be supporting dire

[il-antlr-interest: 26336] Re: [antlr-interest] ANTLR C: Question regarding the portability of generated lexer C code

2009-10-16 Thread Jim Idle
Well, you could pay me to make an EBCDIC version ;) However, there is in practice no problem with mixing this – I have done it before on zOS. I think that you need to look at this in the opposite light in that it isn’t that ANTLR code isn’t portable, but your lexer specification (and the fact

[il-antlr-interest: 26338] Re: [antlr-interest] SEEMS NOBODY HERE LIKE TO HELP OTHERS

2009-10-16 Thread Jim Idle
Perhaps you guys are not asking the right questions. There is a tendency for some people to jump straight in to huge grammars without the appropriate practicing on smaller examples (which are provided). I try to answer everyone if I can but I am travelling at the moment and don't have lots of sp

[il-antlr-interest: 26337] Re: [antlr-interest] String template return val propagation

2009-10-16 Thread Jim Idle
> -Original Message- > From: antlr-interest-boun...@antlr.org [mailto:antlr-interest- > boun...@antlr.org] On Behalf Of Bill Andersen > Sent: Friday, October 16, 2009 1:22 AM > To: antlr-inter...@antlr.org > Subject: [antlr-interest] String template return val propagation > > Thanks in

[il-antlr-interest: 26339] Re: [antlr-interest] [Antlr + ST] Huge output string - OutOfMemoryError

2009-10-16 Thread Jim Idle
Run Java with - Xmx1500M Or some other option that increases available memory size. However this could point to something that can be better organized in terms of recursion or whatever. You may also consider running Java with a better garbage collector such as: -Xincgc JIm

[il-antlr-interest: 26340] Re: [antlr-interest] Which version do I need for a CSharp target and VS 2008

2009-10-16 Thread Jim Idle
Not sure if the Csharp3 target is ready for production yet - I wanted to ask this myself as I would like to switch to it if it is ;-) But I use Csharp2 as the target, and the runtime is on the download pages. Jim > -Original Message- > From: antlr-interest-boun...@antlr.org [mailto:ant

[il-antlr-interest: 26341] Re: [antlr-interest] Bug or misunderstanding?: missing attribute access on rule scope

2009-10-16 Thread Jim Idle
You need to rewrite the unary operators with imaginary tokens in your parser, which then means your tree parser need not care: unary: PLUS unary -> ^(UPLUS unary) | primary ; Jim > -Original Message- > From: antlr-interest-boun...@antlr.org [mailto:antlr-interest- > boun...@

[il-antlr-interest: 26342] Re: [antlr-interest] ANTLR C: Question regarding the portability of generated lexer C code

2009-10-16 Thread David-Sarah Hopwood
Jim Idle wrote: [...] > Change the ranges to: > > ID: ‘a’..’k’ | ‘l’..’t’ … I doubt that will work. The generated code sometimes uses character literals, sometimes string literals, and sometimes Unicode code point values. The code can't be compiled as EBCDIC because the code point values are not