- A have a hardware board with a 80186 processor.
- I communicate with the board with telnet.
- The server is a delphi program
- I have developed a protocol for the communication so I can connect many hardware boards.

I send strings with telnet, The string need to be parsed at the hardware board, which is programmed in C.

I have never build a parser before, so i would like to know what's the best method for this? I new to C programming so I'm not very good with C.

I have an example with the strtok function. It works, but I don't know how to detect errors in the strings. The protocol string have the following lay-out:

command^comment|date|time|MAC|field|field|field|

the number of fields is variable.

Thanks