When I debbugged at antlrworks, it made a "specification" leaf.
Besides, it does not reach this part, because it throws the exception
while making the tree at ID.
Maybe if I change ID to id and make
id returns [String value] : l=ID { $value = $l.text; } ;
and making a leaf node with id.value. Is it possible?
-- Rodrigo C. Lopes
-- Também em [EMAIL PROTECTED]
2008/11/17 shmuel siegel <[EMAIL PROTECTED]>:
> Jim Idle wrote:
>> On Mon, 2008-11-17 at 21:43 -0300, Rodrigo C. L. wrote:
>>> >>
>>> >> tokens {
>>> >> MODULE;
>>> >> SPECIFICATION;
>>> >> }
>>> >> compilation : specification EOF! ;
>>> >> specification : ( definition )* -> ^( SPECIFICATION definition* ) ;
>>> >> definition : module ';' ;
>>> >> module : 'module' ID '{' specification '}' -> ^(MODULE ID
>>> specification) ;
>>>
>>
>>
>> I suspect that your specification rule can return nothing. Try
>>
>> -> ^(MODULE ID specification*)
>>
>>
>> You don't need to try nant or anything, using .Net and VS is fine.
>>
>> Jim
>>
> Really? Why wouldn't it at least return the token SPECIFICATION. Maybe
> SPECIFICATION is undefined.
>
>
>
> List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address
>
>
List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org:8080/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
-~----------~----~----~----~------~----~------~--~---