[antlr-interest] read from socket

Kahina BOUARAB kahina.bouarab at etu.upmc.fr
Tue Jul 8 02:09:24 PDT 2008


First, excuse me for my bad english.
  I've a thread which reads commands from a socket. I would like these  
commands to be parsed by an ANTLR parser.
e.g: a part of grammar:
          DR()
          RQ()
          TQ()*
          FR()

the probleme is: i receive these commands separately from socket.
So if i parse DR, the parser tell me

BR.recoverFromMismatchedToken
line 0:-1 mismatched input '<EOF>' expecting 'RQ('

because the parser find EOF instead of RQ.

i can't accumulate these commands to give a complete block to the parser.
e.g      DR() RQ() TQ() FR()

How can i do to parse these commands properly?

thanks





More information about the antlr-interest mailing list