lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Peter Hill wrote:
> 
> Next plan... a nice simple fully top-down approach. Which leaves one
> decision...
> 
> (a) Create a full parse-tree then use that to produce code. This gives a
> better picture of the structure, and is ammenable to optimisation (if any
> can apply)

Well, this may be less efficient for larger Lua programs. 
Such a parse tree can get quite large if you have a big
data file like Lua files. 

> 
> (b) Perform an on-the-fly code production. This requires a lex-lookahead but
> is how the Lua C-code current does it (I think) and doesn't require building
> a temporary tree.

This is prpbably the most efficient approach, though it might 
be a bit more difficult to program. Still, for efficiency,
I think this woul probably be the best approach.

-- 
"No one knows true heroes, for they speak not of their greatness." -- 
Daniel Remar.
Björn De Meyer 
bjorn.demeyer@pandora.be