[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: lpeg C preprocessor
- From: David Manura <dm.lua@...>
- Date: Sat, 22 Sep 2007 14:43:45 -0400
I posted an ANSI C lexer in Lpeg here:
http://lua-users.org/wiki/LpegRecipes . This is currently without a C
preprocessor though. Feel free to improve it.
Johann Hibschman wrote:
> Would a useful intermediate step be using lua to run some kind
> of m4 substitute? And do you know of such a project anywhere?
http://lua-users.org/wiki/SlightlyLessSimpleLuaPreprocessor and also
http://lua-users.org/wiki/TextTemplate do. The latter cites its
inspiration from m1, a reduced version of m4.
> What cases can you think of where full parsing is useful?
Possible ideas include reflection, code analysis, syntax extension,
code transformation, and code documentation--some of the same
directions in C++, Metalua, and Luafish.
Here's another odd idea, turning this process inside-out: