On Thu, May 10, 2012 at 4:59 PM, Baruch Burstein <bmburst...@gmail.com>wrote:

> Can anyone suggest a lexical scanner generator that:
> a) Works well with Lemon?
> b) Is also thread-safe (like Lemon)?
>
> Does Flex work well with Lemon? (I think it is not thread-safe, but it is
> very popular and has plenty of examples around, which is also a plus for
> me)
>
> I am trying to learn a little about writing tokenizers/parsers, and thought
> a */Lemon combo would be better to learn if I don't have any previous
> experience anyway than Flex/Bison.
>

In my experience, lexical scanner generator programs like Flex are more
trouble than they are worth.  I find it far easier to write the lexer by
hand.  And you get a much smaller and faster lexer if you do it that way
too.

Example hand-written lexer code:
http://www.sqlite.org/src/artifact/1e86210d397?ln=107-378


>
> --
> Programming today is a race between software engineers striving to build
> bigger and better idiot-proof programs, and the Universe trying to produce
> bigger and better idiots. So far, the Universe is winning.  - Rich Cook
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to