At 00:29 14/01/2009, chain one wrote:
>I tried the lexer rule you gave me. But following error comes 
>out:
>
>Alternative 155: after matching input such as 
>'F''U''N''C''T''I''O''N''F''U''N''C''T''I''O''N''F''U''N''C''T''I''O''N''E''N''D''_''F''U''N''C''T''I''O''N'{'0'..'9',
> 
>'A'..'Z', '_', 
>'a'..'z'}'F''U''N''C''T''I''O''N''E''N''D''_''F''U''N''C''T''I''O''N'{'0'..'9',
> 
>'A'..'Z', '_', 'a'..'z'}'F''U''N''C''T''I''O'{'\u0000'..'/', 
>':'..'@', 'N', '['..'^', '`', '{'..'\uFFFF'} decision cannot 
>predict what comes next due to recursion overflow to 
>FUNCTION_DECL from FUNCTION_DECL

Hmm.  Well, another variation (that it might like better) would 
be:

FUNCTION_DECL
   : 'FUNCTION' { $channel = HIDDEN; }
     (FUNCTION_DECL | ~'E' | 'E' (~'N' | 'N' (~'D' | 'D'
       (~'_' | '_' (~'F' | 'F' (~'U' | 'U' (~'N' | 'N'
       (~'C' | 'C' (~'T' | 'T' (~'I' | 'I' (~'O' | 'O'
       (~'N' | 'N' ~SEMI))))))))))))*
     'END_FUNCTION' SEMI
   ;

Another thing that might help is to change the embedded reference 
to FUNCTION_DECL to ('FUNCTION') => FUNCTION_DECL; ie:

FUNCTION_DECL
   : 'FUNCTION' { $channel = HIDDEN; }
     ('FUNCTION') => FUNCTION_DECL | ~'E' | 'E' (~'N' | 'N'
       (~'D' | 'D' (~'_' | '_' (~'F' | 'F' (~'U' | 'U'
       (~'N' | 'N' (~'C' | 'C' (~'T' | 'T' (~'I' | 'I'
       (~'O' | 'O' (~'N' | 'N' ~SEMI))))))))))))*
     'END_FUNCTION' SEMI
   ;


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