This one is easy with the ^ annotation:
opRule
:
term
(
OP^
term
(
OP!
term
)*
)?
;
--Loring
- Original Message
> From: Randall R
I just looked at the generated T.g file and that one looks like this:
grammar T;
options {output=AST;}
s : x+=a x+=b {System.out.println($x);} ;a : 'a';
b : 'b';
WS : (' '|'
') {skip();};
Which means that the problem shows up in the generated test grammar file.
Does the actual test generation h
Definitely such a kind of problem. One of the cases I am looking at is the
following:
...
public void testRuleLabelOnTwoDifferentRulesAST() throws Exception {
String grammar =
"grammar T;\n"+
"options {output=AST;}\n"+
"s : x+=a x+=b {System.out.println($x);} ;" +
"a : 'a';\n"+
"b : 'b';\n"+
"WS
On Thursday 02 October 2008 09:43:44 pm Randall R Schulz wrote:
> Hi,
>
> Sorry for shouting, but I really would like a definitive answer to this
> question. ("Steamroller" referring to creating a flat AST.)
>
> If one is to parse an infix operator notation, exemplified by this
> input:
>
> 1
On Thursday 02 October 2008 09:34:11 pm Randall R Schulz wrote:
> On Thursday 02 October 2008 17:54, you wrote:
> > Mr. Schulz :-
>
> I'm sorry. My father isn't here right now...
I happen to believe that everyone deserves respect...
> > Sorry for this disconnected reply to your last message to m
Hi,
Sorry for shouting, but I really would like a definitive answer to this
question. ("Steamroller" referring to creating a flat AST.)
If one is to parse an infix operator notation, exemplified by this
input:
1 OP 2 OP 3 OP 4 OP 5
and produce from it this AST:
(OP 1 2 3 4 5)
On Thursday 02 October 2008 17:54, you wrote:
> Mr. Schulz :-
I'm sorry. My father isn't here right now...
> Sorry for this disconnected reply to your last message to me.
It's OK. I hope you don't mind my sending the reply back to the list.
I'm surprised this seems so difficult (not yet conce
Hi,
I've noticed that if I've reduced the scale of parse tree or AST
depiction using the the scale / zoom slider and export an image, it is
improperly clipped. Specifically, the bounding box of the exported
image is too small and portions at the lower and right edge are lost.
It doesn't happe
On Thursday 02 October 2008 16:15, you wrote:
> ...
>
> yes the second (non-recursion form) acts as you report
>
>
> however the former, recursive, form generates (for me)
>
> (Or p (Or q (Or r s)))
>
> for your input string. I can't remember anymore, is that what you
> wanted?
Nope. I can get th
On Thursday 02 October 2008 15:23, Jim Idle wrote:
> On Thu, 2008-10-02 at 15:01 -0700, Randall R Schulz wrote:
> > On Thursday 02 October 2008 14:29, Jim Idle wrote:
> > > Have you tried:
> > >
> > >
> > > o : v1=nextrule
> > > (
> > > (Or v2+=nextrule )+ ->^(OR $v1 $v2+)
On Thursday 02 October 2008 14:29, Jim Idle wrote:
> On Thu, 2008-10-02 at 14:23 -0700, Randall R Schulz wrote:
> > Hi,
> >
> > Next question.
> >
> > (I've been spoiled by working mostly with strictly prefix languages
> > in the past...)
> >
> >
> > How might I alter a rule such as this one:
> >
On Thu, 2008-10-02 at 15:01 -0700, Randall R Schulz wrote:
> On Thursday 02 October 2008 14:29, Jim Idle wrote:
> > Have you tried:
> >
> >
> > o : v1=nextrule
> > (
> > (Or v2+=nextrule )+ ->^(OR $v1 $v2+)
> >
> > | // No OR's, default tree
> >
> >
Greetings!
On Thursday 02 October 2008 05:23:09 pm Randall R Schulz wrote:
> How might I alter a rule such as this one:
>
> op790Formula
> : (op780Formula -> op780Formula)
> (
> Or rDisjunct = op790Formula
> -> ^(Or $op790Formula $rDisjunct)
> ) ?
>
On Thursday 02 October 2008 15:01, Randall R Schulz wrote:
> ...
>
> Whether you include an empty alternative (as you showed) or make the
> entire sub-rule optional, as I'd tried earlier:
>
> op790FormulaFlat
> : (op780FormulaFlat -> op780FormulaFlat)
> ( Or rDisjuncts = op790Formula
On Thu, 2008-10-02 at 14:48 -0700, Randall R Schulz wrote:
> On Thursday 02 October 2008 14:33, Jim Idle wrote:
> > ...
> >
> > I should add that this won't be as useful a tree for processing
> > unless this is a translator and you want to spit this stuff out in
> > that kind of arrangement.
> >
>
On Thursday 02 October 2008 14:33, Jim Idle wrote:
> ...
>
> I should add that this won't be as useful a tree for processing
> unless this is a translator and you want to spit this stuff out in
> that kind of arrangement.
>
> Jim
Well, in fact I am just writing a transliterator, and since AND and
Hi,
Next question.
(I've been spoiled by working mostly with strictly prefix languages in
the past...)
How might I alter a rule such as this one:
op790Formula
: (op780Formula -> op780Formula)
(
Or rDisjunct = op790Formula
-> ^(Or $op790Formula $rDisjunct)
On Thu, 2008-10-02 at 14:23 -0700, Randall R Schulz wrote:
> Hi,
>
> Next question.
>
> (I've been spoiled by working mostly with strictly prefix languages in
> the past...)
>
>
> How might I alter a rule such as this one:
>
> op790Formula
> : (op780Formula -> op780Formula)
> (
On Thursday 02 October 2008 12:31, Jim Idle wrote:
> On Thu, 2008-10-02 at 12:24 -0700, Randall R Schulz wrote:
> > Hi,
> >
> > I have a couple of productions that use a prefix operator that may
> > be repeated arbitrarily. One of them (negation) just has the
> > operator symbol. The other has a k
On Thu, 2008-10-02 at 12:24 -0700, Randall R Schulz wrote:
> Hi,
>
> I have a couple of productions that use a prefix operator that may be
> repeated arbitrarily. One of them (negation) just has the operator
> symbol. The other has a keyword (two different keywords, actually)
> followed by an ide
At 08:24 3/10/2008, Randall R Schulz wrote:
>op350Formula
>: (
>Not -> ^(Not $op350Formula)
>) *
>(primitiveFormula -> primitiveFormula)
>;
The reason why you're getting the RewriteEmptyStreamException
there is that on the first pass through you're tr
Hi,
I have a couple of productions that use a prefix operator that may be
repeated arbitrarily. One of them (negation) just has the operator
symbol. The other has a keyword (two different keywords, actually)
followed by an identifier.
For example, with the negation operator, this:
---p
On Oct 2, 2008, at 11:02 AM, Hartmuth Gutsche wrote:
> I am trying to run the tests under “org.antlr.test” and get 503
> failures
> out of 1095 tests. Are they supposed to pass without failure?
>
> I see this in two different Windows environments.
Mostly likely \n and \r issue.
T
List: http
I am trying to run the tests under “org.antlr.test” and get 503 failures
out of 1095 tests. Are they supposed to pass without failure?
I see this in two different Windows environments.
Thanks!
Hartmuth
List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest
Unsubscribe:
http://
On Thursday 02 October 2008 10:06, Randall R Schulz wrote:
> On Thursday 02 October 2008 09:57, Terence Parr wrote:
> > On Oct 2, 2008, at 7:08 AM, Randall R Schulz wrote:
> > > On Thursday 02 October 2008 06:48, Randall R Schulz wrote:
> > >> On Wednesday 01 October 2008 14:36, Terence Parr wrote
On Oct 2, 2008, at 7:08 AM, Randall R Schulz wrote:
> On Thursday 02 October 2008 06:48, Randall R Schulz wrote:
>> On Wednesday 01 October 2008 14:36, Terence Parr wrote:
>>> 3.1.1 released:
>>
>> I'm starting a new parser and upgraded (to 3.1, yesterday and then to
>> 3.1.1, later yesterday...
On Thursday 02 October 2008 09:57, Terence Parr wrote:
> On Oct 2, 2008, at 7:08 AM, Randall R Schulz wrote:
> > On Thursday 02 October 2008 06:48, Randall R Schulz wrote:
> >> On Wednesday 01 October 2008 14:36, Terence Parr wrote:
> >>> 3.1.1 released:
> >>
> >> I'm starting a new parser and upg
FREE Home Based Online Job Offer for Indians
Dear Friend, Do you want to earn extra income in your spare time working from
home?
To Join Click the link below
1.
http://bestways-makemoneyonline.50webs.com/
<<>>
2.
http://bestways-makemoneyonline.50webs.com/earn
On Thursday 02 October 2008 06:48, Randall R Schulz wrote:
> On Wednesday 01 October 2008 14:36, Terence Parr wrote:
> > 3.1.1 released:
>
> I'm starting a new parser and upgraded (to 3.1, yesterday and then to
> 3.1.1, later yesterday...). Anyway, I was wondering if the ANTLR
> command-line inter
On Wednesday 01 October 2008 14:36, Terence Parr wrote:
> 3.1.1 released:
I'm starting a new parser and upgraded (to 3.1, yesterday and then to
3.1.1, later yesterday...). Anyway, I was wondering if the ANTLR
command-line interface (org.antlr.Tool#main(), i.e.) gives a non-zero
exit code when
3.1.1 didn't fix the below problem. I can't get into Jira; but I think the
below is really a bug.
On Wed, Sep 24, 2008 at 2:03 PM, Tim Halloran <[EMAIL PROTECTED]> wrote:
> I'm using the standard Tree implementations (extending BaseTree) in
> combination with a custom implementation of Tree. Th
31 matches
Mail list logo