lua-users home
lua-l archive

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


On 27.05.2014 09:44, steve donovan wrote:

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?

I would need something like a hierarchical table in which I could lookup the specified CSS attributes and their values, so that I can extract them for specific elements and apply them in a non-HTML environment. It's for a customizable canvas-like drawing area.

If there currently are no parsers out there, I might have to accept my losses and go with something more limited and simplistic, and implement CSS parsing later on.

--

Bas Groothedde
Imagine Programming