lua-users home
lua-l archive

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


Hi all,


I am thinking about developing some kind of development environment for Lua.
The main component of it should be source code editor with syntax
highlighting,
automatic statement completion, some kind of realtime error checking etc.
To implement all of these I need to be able to parse the source code into
some
kind of data structure (parse tree?). There are two ways to do it: create
new
parser (probably using some kind of attribute grammar) or find some way
to use Lua's parser. The second way would be definitely better solution,
but I am not sure if it is possible. From what I've seen in the source code,
it seem like the parser is very tightly interconnected with the bytecode
interpreter,
which makes it almost impossible to use it for other purposes.
Or am I wrong? Does anybody know about some way to reuse Lua's parser?
Or do you think it would be better to write new parser just for the editor?

Thanks very much for any opinion.

Martin