Coder Social home page Coder Social logo

css-parser's Introduction

CSS Parser

As the name suggests, this is a CSS Parser. Well, not quite yet. I just started on it but it soon will be. The SiteCheck project will need to be able to parse CSS in order to check it. It seems like a good idea for that to be a separate project.

See http://www.w3.org/TR/CSS21/syndata.html for a description of CSS 2.1 syntax, grammer and data types. This parser follows the more restrictive grammer found in http://www.w3.org/TR/CSS21/grammar.html. Many of the names used come directly from this document. Most parsers are a direct translation of this specification. Higher level parsers may differ a bit in order to account for additional CSS semantics not expressed in the grammer.

Building

To work with this project, use some combination of the following make commands:

make clean
make tests
make cov
make docs

If you would like to play with the existing parsers in ghci then try this:

$ ghci
> :l Text.CSS.CSSParser
> run unicode "\\00002B"
Right "\\00002B"
> run (unicode >> nonascii) "\\3B \o250"
Right "\168"
> run (num >> comment >> w >> unicode >> num) ".34/* hello */   \\00004F0.25"
Right "0.25"

TODO

Everything.

License

Copyright © 2011 Brenton Ashworth

Distributed under the BSD3 license. See the file LICENSE.

css-parser's People

Contributors

brentonashworth avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.