>> the DSL I want to parse is just a subset of lua language,
>> and the goal is to implement a source-to-source translator.
> From Lua to what?
From 'lua'(DSL) to lua honestly :p
The reason of that first sight may peculiar goal is because:
This DSL which I want to implement has the totally different
computation model with lua's original one. I have to manipulate
and reconstruct the AST(such as insert some codes at each
function call and some other more complex transformations) and
regenerate the new AST's corresponding lua codes.