lua-users home
lua-l archive

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


More or less solved, I found a "LPeg error handling" thread in the Lua list

cheers ,

Wim

On Mon, Dec 27, 2010 at 8:55 AM, Wim Langers <wim.langers@adrias.biz> wrote:
On Mon, Dec 27, 2010 at 8:38 AM, steve donovan <steve.j.donovan@gmail.com> wrote:
On Sun, Dec 26, 2010 at 9:45 PM, Wim Langers <wim.langers@adrias.biz> wrote:
> hand (copy/paste/change parameters) in a large file structured as a lua
> table/program.

So you don't get good errors when loading with dofile()? I'm assuming
that if it's structured as Lua, then it is read using Lua.

steve d.
 
No because this is DSL territory, and I can make 3 kinds of mistakes :-)
- against Lua syntax : which is reported but isn't very helpful (in view of the DSL-ness of the data)
- (the majority of mistakes) against DSL syntax : which isn't reported (or just crashes the program)
- against use of DSL variables : of which I get a visual feedback and which suffices for the time being

To elaborate a bit more on the application itself :
I'm reverse engineering some 20 PLC's and have to present the results in charts (after one year I have some 1100 charts).
I didn't feel like drawing (and correcting/maintaining) them by hand so I wrote a Lua program which can "generate" charts starting from a textual representation of it's contents (variables, shapes, connections).  The program also generates cross references and some other collateral data.
So this textual representation resides in a Lua program/data file separate from the actual program.  All would be fine if I would generate the DSL data from within my application, but this is to tedious.  It's much faster to copy/paste (but error prone)...

Any ideas/pointers appreciated !!

cheers ,

Wim