[antlr-interest] A challenging question

Lorenz Pretterhofer krysole at internode.on.net
Tue May 8 03:58:11 PDT 2007


Its not really the responsibility of a lexer or scanner to combine  
packets. This should be handled by your networking layer, either by  
hand if your using UDP or it will automatically occur when using TCP  
socket streams. Once you have a complete stream simply feed it into  
the lexer as you normally would.

When you think about it... The scanner can't really do anything with  
an incomplete packet anyway since its still incomplete;)

Cheers,
Lorenz

On 08/05/2007, at 13:20, 丘成桐 wrote:

> Hi ,I have a challenging question to ask you .  There are ten binary
> data packets A,B,C,D,E,F.......
>         packet A: "this  is a te"
>         packet B: "st !"
>         ......
> I can not  put packets A and B together,what could I do to ask  
> scanner
> to find the "test" coming from packet A and B?
>
> I am looking froward to your early reply.



More information about the antlr-interest mailing list