lua-users home
lua-l archive

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


> Today I noticed that the CVS decoder example at
> http://www.inf.puc-rio.br/~roberto/lpeg/re.html is not correct.
> 
> [...]
> 
> A correct one looks like this:
> 
> record = re.compile[[
>   record <- ( <field> (',' <field>)* ) -> {} ( [%nl] / !.)
>   field <- <escaped> / <nonescaped>
>   nonescaped <- { [^,"%nl]* }
>   escaped <- '"' {~ ([^"] / '""' -> '"')* ~} '"'
> ]]

You are right. Thanks for the feedback.

-- Roberto