lua-users home
lua-l archive

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


Le 27 mai 2014 à 09:44, steve donovan <steve.j.donovan@gmail.com> a écrit :

> On Tue, May 27, 2014 at 5:06 AM, Coda Highland <chighland@gmail.com> wrote:
>> The good news is that CSS syntax is very simple -- I think it may even
>> be a regular language. It should be pretty darn easy to write an lpeg
>> parser for it.
> 
> Yep, also thought this is a job for Captain LPeg - although it's more
> tricky than at first sight.
> 
> But, the question is, what parsed representation does the OP need, and
> for what purpose?

There is a PEG for CSS on github:
https://raw.githubusercontent.com/bhyde/css-parser/master/css.peg

I'd be interested in seeing the result of this being used with LPeg :)

Good luck,
--
Bertrand Mansion
Mamasam
http://mamas.am