Юрушкин Михаил wrote:
> And additional question:
>
> "
> constant[BlockStatement *stmntBlock]
> returns [ExpressionBase *resultConstant]
>       : resultConstant = literal_constant    // this line is wrong. Name  
> conflict with result value //
>       | T_IDENT { resultConstant = action.constant($T_IDENT, stmntBlock); }
>       ;
> " - isn't parded :(
>
> : resultConstant = literal_constant    <-- this line is wrong. Name  
> conflict with result value
>
> what i do wrong?
>
>   
Change the name:

: rC=literal_constant { $resultConstant = $rC.whateverTheReturnNameIs; }

...etc

The labeled return values return a struct, from which you need to 
reference the name of the return element in returns declaration of the 
sub_rule.

Jim

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, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to