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:
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
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:
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
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
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:
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
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,
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
|
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
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
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:
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
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
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
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
'|'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
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
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
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
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
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
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
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
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:
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
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
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:
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
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. =
30 matches
Mail list logo