The problem :
I have a large set of data (comparable to 10000+ records) which I enter by hand (copy/paste/change parameters) in a large file structured as a lua table/program.
Obviously I make mistakes now and then, which (when refreshing the data) result in a crashing program, not very helpful error messages, and trying to find the error in the last entered data (hunt and peck).
Was thinking of validating the data with LPeg and generating meaningful error messages, but I can't seem to find any references to such practices.
So the question(s) is(are) :
- is this at all doable with LPeg (the documentation says something about choosing a pattern matching path and not backtracking if matching is no longer possible, which in my case would have to result in some meaningful error message)
- are there other solutions (besides "roll your own" of course)
Wim