The simplest way will be using C interop and ragel code generator:

  * 
[http://thingsaaronmade.com/blog/a-simple-intro-to-writing-a-lexer-with-ragel.html](http://thingsaaronmade.com/blog/a-simple-intro-to-writing-a-lexer-with-ragel.html)
  * 
[http://www.colm.net/open-source/ragel](http://www.colm.net/open-source/ragel)/



I use ragel for parsers runs on microcontrollers as it gives very clean 
debuggable switch code with -G2 option, and don't use anything besides two 
pointers for parsing buffer reading. 

Reply via email to