Goodmorning Jim, Well that is fast! It seems I have something to do this weekend. Indeed this is exactly what I was looking for, without a dependency on external lexers - good. I'll dive into it right now, together with the code you previously suggested for Trim_String (sorry I did not do that earlier, but my days have been quite busy lately). Regards Peter Citeren Jim Bailey <sleepydgym@xxxxxxxxx>: > Greetings, > > > (gtk_func "gtk_text_buffer_insert" buffer iter > > "Hello world" -1) > > That's an s-expression, I like s-expressions. So much > so that I have just put together this parser: > http://dgym.homeunix.net/dumb-parser.c > > it is capable of being given the input in chunks, so > doesn't have any limitations on size. as it reads > through the expression, it builds up a list of every > form inside it, e.g. > ["gtk_func" "gtk_text_buffer_insert" "buffer" "iter" > "Hello world" "-1"] > and when it gets to the end, it currently just prints > them out, but you know what to do with them. > > anything in " quotes can take literal characters > (other than '"' and '\') and it also expands the > following: > \" -> " > \n -> newline > \r -> return > \\ -> \ > \t -> tab > > does that cover everything needed for client -> server > messages? apart from the escaping, all the languages > should be fine with that format, and it still looks > natural (to a lisp programmer). > > please forgive the shoddy code, i'm a bit rusty when > it comes to C, but it compiles and the tests run, so > what could possibly go wrong :) > > good night, > > from the not so cold UK. > > Jim -- http://www.gtk-server.org