Using own tree generation (3)
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   frigot_eric
Posted On:   Thursday, October 25, 2001 02:29 AM

yet another exemple : I've got this rule : comment_statement : SlComment | MlComment ; i want something like this : comment_statement[CommentStatement commentstat] : comment:(SlComment | MlComment) {commentstat = new CommentStatement (comment); } ; i don't know if i can attribe a varname (comment) at two rules ??? Another one : break_statement : BREAK (Identifier)? ; I want something like : break_statement[BreakStatement breakstat] : BREAK identifier:(Identifier)? {breakstat = new BreakStatement (identifier); }; I don't know if identifier is at null when ther   More>>

yet another exemple :


I've got this rule :


comment_statement : SlComment | MlComment ;


i want something like this :


comment_statement[CommentStatement commentstat] : comment:(SlComment | MlComment) {commentstat = new CommentStatement (comment); } ;


i don't know if i can attribe a varname (comment) at two rules ???


Another one :


break_statement : BREAK (Identifier)? ;


I want something like :


break_statement[BreakStatement breakstat] : BREAK identifier:(Identifier)? {breakstat = new BreakStatement (identifier); };


I don't know if identifier is at null when there is no Identifier ???


Thank you for your answer.

   <<Less
About | Sitemap | Contact