lua-users home
lua-l archive

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


> Another approach is to use a match-time capture on a pattern that only
> gets triggered when there's a parsing error and then use the character
> index that's passed in to calculate the line number.

LPeg itself uses a similar technique (in module 're'), except that
it extracts a substring with the vicinity of the error point instead
of the line number.

-- Roberto