bhyde / css-parser Goto Github PK
View Code? Open in Web Editor NEWcommon lisp, peg, css parser
common lisp, peg, css parser
This is a parser for cascading style sheets. The grammar rules and actions are are stated in css.peg. That is converted into parser.lisp using metapeg[2]. This is an ASDF system. In fact you must load it that way. CL-USER> (in-package "CSS-PARSER") #<Package "CSS-PARSER"> CSS-PARSER> (parse-string "DIV.example>LI{color:#333}") (STYLESHEET (CSS-RULE (CHILD (PATH (ELEMENT "DIV") (CLASS "example")) (ELEMENT "LI")) -> ("color" (COLOR "333")))) NIL CSS-PARSER> If you load fiveAM[3] prior to loading this then a bit-o-testing code will be included; which you can run as so: CSS-PARSER> (run! 'css-parser) ...................... Did 22 checks. Pass: 22 (100%) Skip: 0 ( 0%) Fail: 0 ( 0%) NIL CSS-PARSER> Those tests are in tests.lisp and provide examples. [1] A PEG parser is a recursive decent parser with memoization mixed in so the performance remains linear. [2] See <http://www.cliki.net/metapeg>, though I'm actually using <http://github.com/bhyde/metapeg>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.