At 20:47 1/12/2008, chain one wrote:
>entity_id returns [String eid]
>@init{ eid=null; }
> : { isFirst }? id=IDENT { eid=id.getText();
> /*addId(eid,ENTITY_IDENT);*/ }-> ^(ENTITY_ID[] $id)
> | id2=ENTITY_IDENT {
> eid=id2.getText();$id2.setType(IDENT);} -> ^(ENTITY_IDENT[] $id
On Mon, 2008-12-01 at 20:30 +1300, Gavin Lambert wrote:
> At 18:56 1/12/2008, virg g wrote:
> >If the command is
> Step 3: notice how your 'literal' rule doesn't mention any of the
> other literal tokens mentioned in step 1, so it's not surprising
> that it doesn't match them.
>
> Step 4: re
On Nov 30, 2008, at 11:15 PM, Gavin Lambert wrote:
> At 09:29 1/12/2008, Terence Parr wrote:
> >not sure. I guess i left out as it's weird. When would you write:
> >
> >^(. ID). It's always the root that says what kind of thing it is,
> >
> >right?
>
> This is a completely fabricated example,
Here's a fictional example of why you might want to distinguish "any
node or tree" from "any node" in a tree parser.
Input: (3)+(2)
Resulting Tree: ^(+ ^(expr 3) ^(expr 2))
Goal: pattern rewrite in a filter tree parser to remove some nodes
resulting from unnecessary parentheses.
Pattern:
remove
2008/12/1 Terence Parr <[EMAIL PROTECTED]>:
>
> On Nov 30, 2008, at 11:15 PM, Gavin Lambert wrote:
>>
>> And then of course there's Oliver's example, where he just wanted to
>> traverse the (sub)tree regardless of structure (presumably to pretty-print
>> it or something).
>
> If you don't care abo
On Dec 1, 2008, at 10:16 AM, Oliver Zeigermann wrote:
> 2008/12/1 Terence Parr <[EMAIL PROTECTED]>:
>>
>> On Nov 30, 2008, at 11:15 PM, Gavin Lambert wrote:
>>>
>>> And then of course there's Oliver's example, where he just wanted to
>>> traverse the (sub)tree regardless of structure (presumably
On Dec 1, 2008, at 9:57 AM, Sam Harwell wrote:
> Here's a fictional example of why you might want to distinguish "any
> node or tree" from "any node" in a tree parser.
>
> Input: (3)+(2)
> Resulting Tree: ^(+ ^(expr 3) ^(expr 2))
> Goal: pattern rewrite in a filter tree parser to remove some nod
At 05:43 2/12/2008, Terence Parr wrote:
>'.' is great to avoid a subtree or any random operand node
>you don't care about. As a root, it can only be a node so
>it's pretty easy to give the set of valid roots if necessary.
"Easy" is a relative term, depending on how many of them there are
:)
On Dec 1, 2008, at 11:51 AM, Gavin Lambert wrote:
> If ID on its own can match a tree of ^(FOO ID), then that's a bug.
not in a tree pattern matching (filter=true) mode.
>> If you don't care about structure, one could argue why you're
> using
>> a grammar to do that ;)
>
> You might not care *s
Hi,
I'm a complete newbie to ANTLR and so I thought to start with the
simple 'Expression Evaluator Tutorial'. I downloaded the most recent
version of ANTLRworks for Mac OS X (I run the most recent version
10.5.5), pasted the grammar into the editor, picked 'prog', entered
'2+3*4' and pre
Hi. that error is what happens when you do what exactly?
You must say "debug" to get the dialog up to enter info. The debugger
pane is for seeing what the lexer is emitting; it's not an input
pane. though it is confusing.
Interpreter was just warning you that it can't handle those things..
Hello everyone,
I'm working on a grammar for a Java-like language and I'm stuck at this one
part. I'm looking to write the tree grammar from this parser grammar:
callExpression
:(primary -> primary) (s=selector -> ^(CALL $callExpression $s))*
;
The code would look like:
nodeObject.g
On Tue, 2008-12-02 at 00:27 +, Diligent Warrior wrote:
> Hello everyone,
>
> I'm working on a grammar for a Java-like language and I'm stuck at
> this one part. I'm looking to write the tree grammar from this parser
> grammar:
>
> callExpression
> :(primary -> primary) (s=selector ->
There is indeed a problem in ANTLRWorks. This will be fixed for the
next release. In the meantime, you can use the following workaround:
save the project to the disk and it will work fine.
Regards,
Jean
On Dec 1, 2008, at 2:46 PM, Philip Mötteli wrote:
> Hi,
>
>
> I'm a complete newbie to
Shouldn't this:
ANTLR3_API pANTLR3_INPUT_STREAM antlr3AsciiFileStreamNew(pANTLR3_UINT8
fileName);
Really be this:
ANTLR3_API pANTLR3_INPUT_STREAM antlr3AsciiFileStreamNew(const
pANTLR3_UINT8 fileName);
?
--
Gary R. Van Sickle
List: http://www.antlr.org:8080/mailman/listinfo/antlr-i
15 matches
Mail list logo