[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: LPeg and data validation ?
- From: Wim Langers <wim.langers@...>
- Date: Mon, 27 Dec 2010 10:58:09 +0100
More or less solved, I found a "LPeg error handling" thread in the Lua list
On Mon, Dec 27, 2010 at 8:55 AM, Wim Langers <email@example.com>
No because this is DSL territory, and I can make 3 kinds of mistakes :-)
On Mon, Dec 27, 2010 at 8:38 AM, steve donovan <firstname.lastname@example.org>
So you don't get good errors when loading with dofile()? I'm assuming
On Sun, Dec 26, 2010 at 9:45 PM, Wim Langers <email@example.com
> hand (copy/paste/change parameters) in a large file structured as a lua
that if it's structured as Lua, then it is read using Lua.
- 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 !!