[il-antlr-interest: 34175] Re: [antlr-interest] Fwd: ANTLRWorks bug: Remove Left Recursion with comments in grammar

2011-09-26 Thread Gary Miller
What version of are you using? I've tried with 3.2 and 3.4 and get very boring error messages. eg 3.2 gives 9:12: syntax error: antlr: notsaved:9:12: expecting RPAREN, found ';' List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe:

[il-antlr-interest: 34125] Re: [antlr-interest] How to stop automatic evaluation in Tree Grammar?

2011-09-22 Thread Gary Miller
Hey 轶凡, You might like to match the elseif_part and else_part with an any. Then continue the walk on the correct branch. ifs: ^(IF test a=. b=.) ; Have a look at a previous post that does something similar. http://www.antlr.org/pipermail/antlr-interest/2011-April/041307.html Regards Gary

[il-antlr-interest: 34029] Re: [antlr-interest] ANTLRWorks 2 (for ANTLR v4)

2011-09-13 Thread Gary Miller
After playing with ANTLRWorks the following seem to be issues * Doesn't support composite grammars * Interpreter only works with combined grammars * Can't use java packages Regards Gary List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe:

[il-antlr-interest: 33991] Re: [antlr-interest] ANTLRWorks 2 (for ANTLR v4)

2011-09-10 Thread Gary Miller
I've haven't used AW much so this is coming from a point of ignorance. I've been contemplating web based IDEs. From what I understand AW interprets the grammars instead of compiling and executes them. If this interpretor had a good API it could be integrated into other IDEs. With regards web IDEs

[il-antlr-interest: 33902] Re: [antlr-interest] Using Tree Interface not plain Object

2011-09-04 Thread Gary Miller
Good on you guys for looking at tiding up the confusing type hierarchies. One thing I tried to do was use a centralised tree structure for part of an AST and the default distributed one for the rest. Would your proposal make any difference to this issue? I haven't spend much time on it and

[il-antlr-interest: 33885] Re: [antlr-interest] mparser - a MATLAB grammar in ANTLR

2011-09-01 Thread Gary Miller
Hey David, The URL you supplied had substitution error, found the right one.   http://www.mit.edu/~wingated/code/mparser_0.1.tar.gz http://www.mit.edu/~wingated/code/mparser-0.1.tar.gz Regards Gary List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe:

[il-antlr-interest: 33847] [antlr-interest] Rob Pike on writing a lexer in Go for a template language

2011-08-30 Thread Gary Miller
Hey All, Slightly off topic post, I thought there might be some interest. Last night I went to a talk by Rob Pike of Google, you can watch the talk at https://www.youtube.com/watch?v=HxaD_trXwREfeature=player_embedded Before I went my thinking was that this could probably be knocked up in

[il-antlr-interest: 33829] Re: [antlr-interest] ANTLR IDE 2.1.2 is out!

2011-08-29 Thread Gary Miller
Much appreciated. Thanks. List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups il-antlr-interest group. To post to this group,

[il-antlr-interest: 33814] Re: [antlr-interest] Match token {n} times

2011-08-28 Thread Gary Miller
Hi Jonne, Take a look at The Definitive ANTLR Reference http://pragprog.com/book/tpantlr/the-definitive-antlr-reference Page 294 The Three Semantic Predicate Variations Consider the problem of matching an element at most four times. data: BYTE BYTE BYTE BYTE | BYTE BYTE BYTE | BYTE BYTE |

[il-antlr-interest: 33653] Re: [antlr-interest] JavaScript Target

2011-08-17 Thread Gary Miller
Hey Jeff, I can't talk to the JS target, but I get to JS via a round about root. ANTLR - Java - JS using the GWT compiler. There are some minor changes needed for the ANTLR runtime to be GWT compatible. For 3.2 I've put these online at http://code.google.com/p/gwtified/ There is a nice project

[il-antlr-interest: 33442] Re: [antlr-interest] Fwd: Any HTML editors for rich editing of documents conforming to an ANTLR grammar?

2011-07-31 Thread Gary Miller
Hey Colin, A possible answer is for you to use an ANTLR grammar with exception handling inside a browser. I don't have experience using ANTLR to do syntax (context free or in a semantic context) prompting, and understand that making this easier is one of the objectives of ANTLR 4. This is

[il-antlr-interest: 33401] [antlr-interest] Interest in a Go lang port

2011-07-28 Thread Gary Miller
Hey All, Would anyone be interested in collaborating on a port of ANTLR to the Go lanaguage http://golang.org/? Regards Gary warning: I'm a total n00b to porting ANTLR and Go. List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe:

[il-antlr-interest: 33403] Re: [antlr-interest] Interest in a Go lang port

2011-07-28 Thread Gary Miller
yep, Go is open source. Motivations - Neat language (imo). One of the few with currency primitives. Designed with orthogonality as a strong driving force. Love the separation of interface and implementation inheritance. - Is now a Google AppEngine supported language. The only compiled

[il-antlr-interest: 33405] Re: [antlr-interest] Interest in a Go lang port

2011-07-28 Thread Gary Miller
Sam, Exactly, thanks for the clarification and sorry about any confusion. Anyone interested? Gary On Fri, Jul 29, 2011 at 11:55 AM, Sam Harwell sharw...@pixelminegames.comwrote: Hi Parsiad, I believe he's referring to creating a new ANTLR target/runtime for Go (option language=Go), as

[il-antlr-interest: 33406] Re: [antlr-interest] Interest in a Go lang port

2011-07-28 Thread Gary Miller
Gary On Fri, Jul 29, 2011 at 12:01 PM, Gary Miller g...@sumwise.com wrote: Sam, Exactly, thanks for the clarification and sorry about any confusion. Anyone interested? Gary On Fri, Jul 29, 2011 at 11:55 AM, Sam Harwell sharw...@pixelminegames.com wrote: Hi Parsiad, I believe he's

[il-antlr-interest: 33341] Re: [antlr-interest] Incompatible type in subrules with OR

2011-07-26 Thread Gary Miller
feel like the right thing to do or a reason why things would start working. My grammar in the end is very simple and I really don't know how to proceed to fix this. Any suggestion about what I should read? On 7/26/11 1:16 AM, Gary Miller wrote: Hey Claudio, Please try to remember

[il-antlr-interest: 33332] Re: [antlr-interest] Incompatible type in subrules with OR

2011-07-25 Thread Gary Miller
'|'0'..'9')* ; INTVALUE: ('0'..'9')+ ; STRING: '\'' TEXTVALUE '\'' ; ID:('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'0'..'9'|'_')* ; WS: (' ' | '\t' | '\r' | '\n') {$channel=HIDDEN;}; On 7/22/11 2:10 AM, Gary Miller wrote: Try the following options. 1. locationStep: edge

[il-antlr-interest: 33272] Re: [antlr-interest] Deciphering the TreeWalker error message ...

2011-07-21 Thread Gary Miller
table1))) (where (CONDITION_LIST (between (COMPOUND_EXPR (SUB_EXPR 2)) (and (COMPOUND_EXPR (SUB_EXPR 3)) (COMPOUND_EXPR (SUB_EXPR 4 Thanks for spending your valuable time looking into this issue. Regards, Vasan On 7/21/2011 11:23 AM, Gary Miller wrote: Hey Vasan, Without seeing

[il-antlr-interest: 33304] Re: [antlr-interest] Incompatible type in subrules with OR

2011-07-21 Thread Gary Miller
Try the following options. 1. locationStep: edge condition? (repeat | shortestPath)? ('' locationStep)? - ^(LOCATIONSTEP condition? repeat? shortestPath? locationStep?); condition: ( filter | subquery ) condition? - ^(CONDITION filter? subquery? condition?); or 2. locationStep : edge

[il-antlr-interest: 33254] Re: [antlr-interest] Deciphering the TreeWalker error message ...

2011-07-20 Thread Gary Miller
I often find it usefully to print out the AST (toStringTree in Java) and walk through the tree grammar manually. Regards Gary On Thu, Jul 21, 2011 at 3:15 AM, Loring Craymer lgcray...@yahoo.com wrote: UP and DOWN tokens (start/end of child list for tree) do not have location information

[il-antlr-interest: 33269] Re: [antlr-interest] Deciphering the TreeWalker error message ...

2011-07-20 Thread Gary Miller
and create a nice graphic with graphviz. Much easier to see that way. Jim -Original Message- From: antlr-interest-boun...@antlr.org [mailto:antlr-interest- boun...@antlr.org] On Behalf Of Gary Miller Sent: Wednesday, July 20, 2011 3:44 PM To: antlr-interest@antlr.org Subject

[il-antlr-interest: 33148] Re: [antlr-interest] antlrv3ide question

2011-07-13 Thread Gary Miller
Hey Bill, It doesn't seem to be on the official wiki command line page (I though I remembered it there, but..) the -make options should do the trick. http://www.antlr.org/wiki/display/ANTLR3/Command+line+options http://www.antlr.org/wiki/display/ANTLR3/How+to+use+ant+with+ANTLR3 Regards Gary

[il-antlr-interest: 32164] Re: [antlr-interest] grammar for boolean expressions

2011-04-12 Thread Gary Miller
My two cents worth. I prefer rewrites as I can create virtual tokens. Regards Gary expr : or - ^(EXPR or) ; or : (and - and) ( OR b=and- ^( LOGICAL_OR $or $b ) )* ; and : (atom - atom) ( AND b=atom - ^(LOGICAL_AND $and $b) )* ; atom : id ; id

[il-antlr-interest: 31927] [antlr-interest] antlr v4 wish list

2011-03-23 Thread Gary Miller
Hey Jim, - The ability to have actions on the right side of an ast re-write operator. r: ( alt - ^(X alt) ) {action} ; Thanks, I don't recall seeing this anywhere else. Do you use it often? Or is a bad form? - A different rule @init that only executes during when not backtracking. - The

[il-antlr-interest: 31889] Re: [antlr-interest] antlr-interest Digest, Vol 76, Issue 21

2011-03-22 Thread Gary Miller
Terence, The ANTLR4 Wiki isn't publicly accessible. Regards Gary Date: Tue, 22 Mar 2011 10:45:48 -0700 From: Terence Parr pa...@cs.usfca.edu Subject: [antlr-interest] antlr v4 wish list To: antlr-interest Interest antlr-interest@antlr.org Message-ID:

[il-antlr-interest: 31904] [antlr-interest] antlr v4 wish list

2011-03-22 Thread Gary Miller
On Wed, Mar 23, 2011 at 8:21 AM, Gary Miller g...@sumwise.com wrote: Terence, The ANTLR4 Wiki isn't publicly accessible. Regards Gary Date: Tue, 22 Mar 2011 10:45:48 -0700 From: Terence Parr pa...@cs.usfca.edu Subject: [antlr-interest] antlr v4 wish list To: antlr-interest Interest antlr

[il-antlr-interest: 31814] Re: [antlr-interest] Composite Tree Grammars are things of beauty, but ...

2011-03-15 Thread Gary Miller
Hey Jim, Thanks for the wishes, the Sumwise is coming along nicely. I'm bashing my head against an optimization problem at the moment, maybe due to a monolithic code I wrote before I really knew what I was doing. I'll got a test project up and running using your archetype. As you know the 3.3

[il-antlr-interest: 31817] [antlr-interest] Grammar Imports and @rulecatch

2011-03-15 Thread Gary Miller
If parser or tree grammar A is imported by B, I would have expected generated B_A to use @rulecatch specified in B. It is currently using the @rulecatch (or lack on one) in A.g. Regards Gary List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe:

[il-antlr-interest: 31777] Re: [antlr-interest] Composite Tree Grammars are things of beauty, but ...

2011-03-09 Thread Gary Miller
Hey Terrance, tree grammar T; a : some horrible mess of a RECURSIVE rule; b : B ; tree grammar U; import T; a : {pre action} T.a {post action}; // -- wants to be able to refer to super rule It wouldn't be enough to just expose the super rule T.a. In the generated walker A_T the rule 'a' would

[il-antlr-interest: 31712] [antlr-interest] Grammar to parser a Tree syntax

2011-03-03 Thread Gary Miller
Hey All, I'm looking for some feedback on a grammar that creates an AST for a simple syntax representing a tree. Tr.g TrWalker.g http://pastie.org/1631538 See some examples string and tree string representations below. The question I have is A{B} 1. = (TREE A (NODE B)) better then 2. =