lua-users home
lua-l archive

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


> I'm writting a parser in C (Lex & Yacc), to process a DSL similar to
> that:
> 
>     square square_name -x 20 -y 30 -height 20 -width 50
>     circle circle_name -x 50 -y 60 -radius 100

Have a look at my lcl: http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/#lcl

It'll turn these lines into the equivalent of 
	square("square_name","-x","20","-y","30","-height","20","-width","50")
	circle("circle_name","-x","50","-y","60","-radius","100")
except that there is not textual transformation: the evaluation is done
on the fly.