I'm guessing you've seen this page, but just in case you haven't: http://lua-users.org/wiki/LpegRecipes On it, there's a C lexer, which isn't too far away from becoming a C parser. At least all of the basic patterns have been figured out. wes