Hacker News new | ask | show | jobs
by mananaysiempre 703 days ago
LuaJIT spends about 2000 lines[1] on its C parser which even includes a limited expression evaluator, though not a preprocessor. My experience suggests explicit memory management could add half again that (LuaJIT’s piggybacks on its GC), and writing one is something like a month of work even if you know exactly what you’re doing (I didn’t), but in any case it’s not a monumental task.

[1] https://repo.or.cz/luajit-2.0.git/blob/HEAD:/src/lj_cparse.c