W3C home > Mailing lists > Public > www-style@w3.org > March 2012

Re: [SAC] SAC C implementation

From: Vasily Stepanov <vasily.stepanov@gmail.com>
Date: Thu, 22 Mar 2012 09:02:57 +0400
Message-ID: <CAKO+nOdSiUwqyF5cKCBbuB6BSS3FhUN4diwkwwYF_ApHt1Posw@mail.gmail.com>
To: Simon Sapin <simon.sapin@kozea.fr>
Cc: www-style@w3.org
On 3/21/12, Simon Sapin <simon.sapin@kozea.fr> wrote:
> Le 21/03/2012 07:25, Vasily Stepanov a écrit :
>> Hi all!
>>
>> I've been working on CSS event based parser for the last several months.
>> The parser is written in C and follows SAC i nterfaces. Well... tries
>> to follow, because SAC specs looks a bit outdated.
>> So, now I'm looking for any useful feedback. It would be great if
>> anyone will find some time to do an api review, a code review, or even
>> join the project. ;)
>> Also, let me know, if someone are going to use this library. I guess
>> first release will be available in few months.
>>
>> https://github.com/VasilyStepanov/libsacc
>>
>> Cheers,
>> Vasily.
>>
>
>
> Hi,
>
> I’ve been working on my own CSS parser for about a month now:
>
> https://github.com/SimonSapin/tinycss/
>
> The goals are probably very different. It’s not SAC or CSSOM at all.
> It’s in python, meant to be used in WeasyPrint and CairoSVG. The
> priority is on code simplicity and extensibility (easy to add support
> for syntax for a new CSS module) rather than speed, although the speed
> is not too bad (better than cssutils.) A nice API and documentation are
> still missing. But you know, it’s work in progress. Oh, and it’s BSD
> licensed.
>
> http://weasyprint.org/
> http://cairosvg.org/
>
>
> Your project looks nice; it’s always good to have more options. Support
> for "recent" CSS3 module seemed to be lacking in previous/existing
> parsers. I’d like to look at the source code (and provide feedback or
> patches if I find something) but I’m hesitant to do so. What I see there
> would certainly influence me while working on my own parser, and I guess
> taking stuff from a LGPL project into a BSD project would be license
> violation.
>
> I don’t really have a suggestion on how to solve this, but what do you
> think?
>
> Regards,
> --
> Simon Sapin
>


Certainly you are free to read the code of my libsacc. I guess you can
even reuse any ideas, without dumb copypaste of course. For example,
you can try to look at PLY (python lex and yacc implementation) to
parse CSS in python.

Cheers,
Vasily
Received on Thursday, 22 March 2012 05:03:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 May 2012 03:48:53 GMT