[il-antlr-interest: 26802] [antlr-interest] Equivalent of TOKEN{x,y}

2009-11-11 Thread Kaleb Pederson
check during semantic analysis, but in this case I'd prefer to do so at the grammar level. Thanks. -- Kaleb Pederson Blog - http://kalebpederson.com Twitter - http://twitter.com/kalebpederson List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/ma

[il-antlr-interest: 26753] Re: [antlr-interest] Bug: CommonTreeNodeStream not passing adaptor to TreeIterator

2009-11-09 Thread Kaleb Pederson
or after calling the superclass constructor: it = new TreeIterator(adaptor, root); it.eof = this.eof; -- Kaleb Pederson Blog - http://kalebpederson.com Twitter - http://twitter.com/kalebpederson List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://w

[il-antlr-interest: 26749] [antlr-interest] Bug: CommonTreeNodeStream not passing adaptor to TreeIterator

2009-11-09 Thread Kaleb Pederson
ueue(); down = adaptor.create(Token.DOWN, "DOWN"); up = adaptor.create(Token.UP, "UP"); eof = adaptor.create(Token.EOF, "EOF"); } Thanks. -- Kaleb Pederson Blog - http://kalebpederson.com Twitter - http://twitter.com/kalebpederson List: http://www.ant

[il-antlr-interest: 26605] Re: [antlr-interest] Cannot launch the debugger Time-out waiting to connect to the remote parser

2009-11-02 Thread Kaleb Pederson
to connect to the remote parser on my own computer?) So you went into preferences and set the port to 49100? Yes, localhost implies the local computer, which doesn't usually have ports blocked. I'm not sure what OS you're on, but what port(s) does netstat show ANTLRWorks is using?

[il-antlr-interest: 26556] Re: [antlr-interest] Exception with gunit and custom tree adaptors

2009-10-28 Thread Kaleb Pederson
There's a number of other fixes related to custom tree adaptors, including making the generated JUnit code contain the necessary imports and passing the tree adaptor to the CommonTreeNodeStream. I'm sure upgrading to the latest gunit will fix the problem. Thanks for pointing me in the right

[il-antlr-interest: 26549] Re: [antlr-interest] Exception with gunit and custom tree adaptors

2009-10-28 Thread Kaleb Pederson
g I tried with the following: options{TreeAdaptor = org.antlr.runtime.tree.CommonTreeAdaptor;} I still receive the exact same exception. I'm curious if it's a JIT problem and will investigate more soon, although I'm hoping somebody will be able to save me some of that time. Thanks.

[il-antlr-interest: 26542] [antlr-interest] Exception with gunit and custom tree adaptors

2009-10-27 Thread Kaleb Pederson
a:136) ... My first thought is that I messed up the class name, but that's not the case because I verified the name and it fails in exactly the same way with a fully qualified class name. Additionally, I tried ANTLR's CommonTreeAdaptor and I still receive the same error. I'm using Sun

[il-antlr-interest: 26528] Re: [antlr-interest] How to access member of CommonTree subclass

2009-10-26 Thread Kaleb Pederson
tree value? That thought crossed my mind, but it seemed like it should be unnecessary. I gather then that it's not possible to set it directly? >id : resolveID { $resovleID.tree.setElementType($resolveID.type); } ; > >resolveId >returns [ xxx type] > >: ^AST_ID tok+=ID

[il-antlr-interest: 26525] [antlr-interest] How to access member of CommonTree subclass

2009-10-26 Thread Kaleb Pederson
n other contexts). Thanks for the suggestions. -- Kaleb Pederson Twitter - http://twitter.com/kalebpederson Blog - http://kalebpederson.com List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/option

[il-antlr-interest: 26425] Re: [antlr-interest] [Antlr3 grammar] how to specify alpha token, numeric token and mix of both

2009-10-21 Thread Kaleb Pederson
s it special or different than 03MAR? -- Kaleb Pederson Twitter - http://twitter.com/kalebpederson Blog - http://kalebpederson.com List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/ant

[il-antlr-interest: 26388] [antlr-interest] ANTLR Wiki Down

2009-10-19 Thread Kaleb Pederson
fatal cluster Database is being updated by an instance which is not part of the current cluster. You should check network connections between cluster nodes, especially multicast traffic. Your server id is: AXNJ-EP6X-JPOZ-ZMCT. ** Hoping to expedite the fix. Thanks. -- Kaleb Ped

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

2009-10-19 Thread Kaleb Pederson
On Fri, Oct 16, 2009 at 7:08 PM, John B. Brodie wrote: > On Fri Oct 16 12:21:33 PDT 2009, Kaleb Pederson asked: >> 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 d

[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

[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

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

2009-10-16 Thread Kaleb Pederson
t; ANTLR) I think that would be a nice syntax for ANTLR to support. I would guess that you could generally accomplish the same thing by placing the "opposite" syntactic predicate on your other alternative(s) in your production. In other words: (a b)=> alternative_1 | alternative_

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

2009-10-16 Thread Kaleb Pederson
> expr    :       cat >                | cat WHEN dog >                | dog You could do: expr: cat (WHEN dog)? | dog; You should also be able to use a syntactic predicate: expr: (cat WHEN)=> cat WHEN dog | cat | dog; HTH, -- Kaleb Pederson Twitter - http://twitter

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

2009-10-16 Thread Kaleb Pederson
changing rhs to something unique throughout the application, but the error persists. I see the exact same behavior on both ANTLR-3.1 and 3.2. Thanks. -- Kaleb Pederson Twitter - http://twitter.com/kalebpederson Blog - http://kalebpederson.com List: http://www.antlr.org/mailman/listinfo/antlr-in

[il-antlr-interest: 26291] [antlr-interest] Customizing the GUnit test rig

2009-10-15 Thread Kaleb Pederson
Unit tests. Thanks. -- Kaleb Pederson Twitter - http://twitter.com/kalebpederson Blog - http://kalebpederson.com List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-ema

[il-antlr-interest: 26138] [antlr-interest] Best practices for AST building

2009-10-07 Thread Kaleb Pederson
Can anybody recommend some good links to best practices for AST building? In the past, I've manually built heterogeneous trees via the actions associated with various productions. This works, but I'm hoping to find something better. I've been looking at the ANTLR examples and how they generate

[il-antlr-interest: 26118] Re: [antlr-interest] Why BANG after rule id ?

2009-10-06 Thread Kaleb Pederson
On Tue, Oct 6, 2009 at 2:57 PM, Kirby Bohling wrote: > Kaleb, > > Neither of your example sites talk about what he is discussing.  It > isn't applied to a node, it is applied to a rule > definition/declaration, not to a rule invoked as part of the > production of a rule. Yeah, thanks for gently p

[il-antlr-interest: 26116] Re: [antlr-interest] Why BANG after rule id ?

2009-10-06 Thread Kaleb Pederson
up? EOR["EOR"] ) ; Sorry I can't be of more help. --Kaleb http://twitter.com/kalebpederson http://kalebpederson.com On Tuesday 06 October 2009 02:18:55 pm Kaleb Pederson wrote: > On Tuesday 06 October 2009 03:15:05 am Graham Wideman wrote: > > Hi fo

[il-antlr-interest: 26113] Re: [antlr-interest] Why BANG after rule id ?

2009-10-06 Thread Kaleb Pederson
On Tuesday 06 October 2009 03:15:05 am Graham Wideman wrote: > Hi folks: > > I see in the ANTLR grammar that you can place a BANG (exclamation point) > after the initial rule id in a rule. Indeed it's used in the ANTLR v3 grammar > itself: > > > range! > : c1=CH

[il-antlr-interest: 26111] Re: [antlr-interest] Unit testing grammar productions and injecting EOF

2009-10-06 Thread Kaleb Pederson
On Tue, Oct 6, 2009 at 7:13 AM, Daniels, Troy (US SSA) wrote: > >> As a workaround, I changed my production, adding EOF as an >> optional terminal as follows: >> >> objectMember : functionExpression EOF? | ID EOF?; >> >> Everything now works but I'm curious if a better solution for >> testing indi

[il-antlr-interest: 26095] [antlr-interest] Unit testing grammar productions and injecting EOF

2009-10-05 Thread Kaleb Pederson
I have a grammar that contains the following production: objectMember : functionExpression | ID; The unit tests for the above production, however, sometimes passed and sometimes failed. After some investigation, I found that the reason for the failure was that EOF wasn't in the expected follow

[il-antlr-interest: 26049] Re: [antlr-interest] Disambiguating Decimal and Integer '.'

2009-10-01 Thread Kaleb Pederson
ime+specs > > This grammar also caters for 999.toString() type things as it comes from > JavaFX. > > Jim > > > -Original Message- > > From: antlr-interest-boun...@antlr.org [mailto:antlr-interest- > > boun...@antlr.org] On Behalf Of Kaleb Pederson

[il-antlr-interest: 26046] Re: [antlr-interest] Disambiguating Decimal and Integer '.'

2009-10-01 Thread Kaleb Pederson
On Thursday 01 October 2009 01:06:54 pm Gavin Lambert wrote: > At 08:12 2/10/2009, Kaleb Pederson wrote: > >INTEGER > >: NUMBER+; > > > >DECIMAL > >: INTEGER '.' INTEGER; > > You should have a look at the wiki and the mailing l

[il-antlr-interest: 26041] [antlr-interest] Disambiguating Decimal and Integer '.'

2009-10-01 Thread Kaleb Pederson
Everything is an object in the language I'm creating. Thus, I allow: "string".someFunction(), and 1234.equals(1234) I'm using the latter as a testcase. It's being parsed as follows: 1234. => 1. Take object production 2. Take alt2 3. Consume 1234 4. See '.' 4. Try DECIMAL p

[il-antlr-interest: 26027] [antlr-interest] maven-gunit-plugin not working correctly with cobertura

2009-09-30 Thread Kaleb Pederson
I have maven-gunit-plugin setup and running gunit tests for my grammar. The tests run successfully and well, covering most of the grammar. The coverage resulting from the tests, however, does not show up in Cobertura and I'm not sure why. Here's some details from my cobertura:cobertura run # #

[il-antlr-interest: 26002] Re: [antlr-interest] How to generate JUnit sources using maven-gunit-plugin?

2009-09-29 Thread Kaleb Pederson
class. --Kaleb On Mon, Sep 28, 2009 at 4:18 PM, Kaleb Pederson wrote: > I currently have the maven-gunit-plugin configured to run in interpreter mode: > >   >    org.antlr >    maven-gunit-plugin >    3.1.3 >     >         >            maven-gunit-plugin >        

[il-antlr-interest: 25983] [antlr-interest] How to generate JUnit sources using maven-gunit-plugin?

2009-09-28 Thread Kaleb Pederson
I currently have the maven-gunit-plugin configured to run in interpreter mode: org.antlr maven-gunit-plugin 3.1.3 maven-gunit-plugin test gunit Is a different directive present that I

[il-antlr-interest: 22144] Re: [antlr-interest] Java Parser to analyze C++ language syntax

2009-02-27 Thread Kaleb Pederson
On Fri, Feb 27, 2009 at 1:27 PM, Andy Tripp wrote: > But it looks like your parser needs to be written in C++ to use LLVM, no? > And the wikipedia entry only mentions a front-end for parsing Java byte > code, > with no mention of parsing Java source code (other than saying one could > be develope

[il-antlr-interest: 22142] Re: [antlr-interest] Java Parser to analyze C++ language syntax

2009-02-27 Thread Kaleb Pederson
On Thu, Feb 26, 2009 at 8:06 PM, SSG JJV wrote: > Yes. But David's parser outputs C++ parser. I need a Java Parser to validate > C++ language syntax. > Thanks It looks as if LLVM now has capable and stable C++ support: LLVM includes "Front-ends for C and C++ based on the GCC 3.4 and 4.0.1 parse

[il-antlr-interest: 20013] Re: [antlr-interest] Need Antlr Grammar on Action script

2008-10-17 Thread Kaleb Pederson
On Thursday 16 October 2008 09:47:02 pm vasanthi a wrote: > Hi All > > I need Antlr Gramamr on Action script. Can someone mail me if you have. I'm not sure exactly what you need. Do you need: - An Grammar for the ANTLR grammar with ActionScript actions? - A Grammar for ActionScript in the ANTLR