Hi,

   I have a fairly simple grammar which give me an error I cannot resolve.
Could you please look at it? What does it mean and how to fix it?

Thanks a lot.


[14:20:29] warning(200): C:\tools\verilog\verilog_params\Test.g:4:43:
Decision can match input such as "IDENT..ESCAPED_IDENT" using multiple
alternatives: 1, 2
As a result, alternative(s) 2 were disabled for that input
[14:20:29] error(201): C:\tools\verilog\verilog_params\Test.g:4:43: The
following alternatives can never be matched: 2


grammar Test;


hierarchical_identifier
    : (identifier '.') => hierarchical_identifier2
    | identifier
    ;


hierarchical_identifier2
    : identifier '.' (hierarchical_identifier)+
;

identifier
    : IDENT
    | ESCAPED_IDENT
    ;

IDENT
    : ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'$'|'0'..'9')*
    ;

ESCAPED_IDENT
    : '\\' (~ (' '|'\r'|'\t'|'\n'))+
        ;

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to il-antlr-interest@googlegroups.com
To unsubscribe from this group, send email to 
il-antlr-interest+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

Reply via email to