[antlr-interest] Urgent help tree building

Nico nico123 at adinet.com.uy
Tue Sep 23 14:42:23 PDT 2003


Great! It worked. But now Antlr gives me:
Warning   did you forget to terminate previous rule?
Can we avoid it?

----- Original Message ----- 
From: <mzukowski at yci.com>
To: <antlr-interest at yahoogroups.com>
Sent: Tuesday, September 23, 2003 12:44 PM
Subject: RE: [antlr-interest] Urgent help tree building


Use manual tree building, so I turned off tree building for the rule.
Having null as the root below just means that the resulting tree will be all
siblings with no children.  In this case the second sibling is a tree with
EXTENDS as the root and a as the child.

name_def!:
a:IDENT "subclass" COLON SHARP c:IDENT
{##=#(null,c,#(#[EXTENDS,"EXTENDS"],a));}

Monty

-----Original Message-----
From: Nico [mailto:nico123 at adinet.com.uy]
Sent: Monday, September 22, 2003 4:10 PM
To: antlr-interest at yahoogroups.com
Subject: [antlr-interest] Urgent help tree building

Hi:

I have a question in building a tree with buildAST = true;
I am building a custom tree, from a partial Smalltalk-80 grammar.

When I have this Lexer rule:

name_def:
a:IDENT "subclass"! COLON! SHARP! c:IDENT

I want to create this tree:

- c:IDENT
- EXTENDS
- a:IDENT

c:IDENT and EXTENDS are in same level. - a:IDENT is EXTEND'S child
and "subclass"! COLON! SHARP! don't want to be in the tree.

The source is:

Object subclass: #AClasesPOS2

How do i do that?I apreciate the help!

regards

Nico


Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/



 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list