[antlr-interest] general Poblem , please help

Martin Kohl martin.kohl at gmail.com
Sat Sep 8 15:36:12 PDT 2007


I think you need to use a different delimiter around the message. AntLR
can't determine where you want the message to stop. If the " Character is a
legal character for the message, you can't use that same character to
surround the message and expect AntLR to know where the message ends.

Regards,
Martin

On 9/8/07, Mohammed Ibrahim <snouto at gmail.com> wrote:
>
>  hello professors ,
>
> actually , i am building a network application layer protocol where two
> clients will talk together , actually the administrator needs to write any
> any any characters in a message and this message is delivered through the
> network , the real problem is , ANTLR finds some errors in treating some
> characters whether they are part of the message itself that the
> administrator sent or from the command syntax itself , here is the syntax
>
> BODY: " Message " ;
>
> Message : (('a..'z'|'A'..'Z')|CHUNKS|INT)+;
>
> CHUNKS: ('$'|'^'|'~'|'@'|'#'|';'|DOT|','|'*'|'&'|RIGHTPAR|LEFTPAR|'?'|']'
>  | '['|'{'|'}'|'`'|'!'|'%'|'('|')'|'='|'+'|'\\'|SLASH|'"');
>
> INT:'0'..'9'+;
>
>
> ANLTR can't recognize between the first double qoutes of the command
> itself or the double qoutes in the command Message itself .
>
>
> any ideas to make it distinguishes that Please.
>
> it is very important professors .
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070909/b1a8c06a/attachment.html 


More information about the antlr-interest mailing list