kolibrios/programs/network/netsurf/libcss/test/data/parse/README
Dmitry Pereverzev (SoUrcerer) 370da47fa0 Netsurf initial port (still needs native ui and cURL)
git-svn-id: svn://kolibrios.org@3584 a494cfbc-eb01-0410-851d-a64ba20cac60
2013-06-01 17:14:14 +00:00

49 lines
975 B
Plaintext

Parser testcases
================
Format
------
#data
<css source data>
#errors
<list of expected errors, with line/col offsets> (ignored at present)
#expected
<rule list, as below>
#reset
Format of rule list
-------------------
line ::= rule | bytecode
rule ::= '| ' type ' '+ name
name ::= .+
type ::= [0-9]+
bytecode ::= '| ' ' '* hexnum (' '+ (hexnum | ptr))*
hexnum ::= '0x' [0-9a-fA-F]+
ptr ::= 'PTR(' .* ')'
Type corresponds to css_rule_type. Consult the library sources for the values.
Bytecode may be split over multiple lines for readability. All bytecode is
associated with the most-recently-declared rule. Consult the bytecode
documentation for what the hexnums should be representing.
Example
-------
#data
* { color: #ff0000; background-image: url("foo.png"); }
#errors
#expected
| 1 *
| 0x0200000f 0xff000000
| 0x02000003 PTR(foo.png)
#reset
TODO
----
+ Permit nesting of rules (for nested block support)