leroux / hackdb

A little KV store.
1 stars 0 forks source link

Implement a lexer #24

Open JosephMoniz opened 11 years ago

JosephMoniz commented 11 years ago

Lexical analysis is one of the most important phases of a decent parser/compiler pipeline.

Implementing one with flex for parsing commands could be a good exercise. It would also be more efficient then the chained strcmps currently being done.

JosephMoniz commented 11 years ago

If you find flex fairly undocumented (which it is) you could also use re2c or ragel. I've personally never used ragel but have heard good things about it.