From 5caf9a56956f55b70d937cea7e135417bada7b25 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sat, 25 Oct 2008 01:24:03 +0000 Subject: A bunch of property parsers. Split out !important parsing into a separate function. Support for dumping bytecode to a file handle in some kind of human-readable format. Strings can be represented in the bytecode as a pointer, length pair rather than embedding the string data into the bytecode -- all strings are interned by the core syntax parser. Add todo relating to early destruction of parser object (it shouldn't be needed once parsing is complete). Note documented issue surrounding interned string dictionary, however. In general, it seems wasteful to create a new dictionary containing string representations of keywords for every single parser instance. It would be better to have one central (statically allocated?) dictionary for this and then each parser instance can have a smaller dictionary containing any unknown strings contained within the stylesheet being parsed (e.g. string constants or URLs). svn path=/trunk/libcss/; revision=5627 --- docs/Bytecode | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/Bytecode b/docs/Bytecode index d999c48..e7bb2fa 100644 --- a/docs/Bytecode +++ b/docs/Bytecode @@ -32,9 +32,9 @@ Floats are stored in their natural format. Integers wider than 32 bits are not supported. Doubles are not supported. -Strings are stored unterminated UTF8, preceded by 32bits of byte length, and -followed by 0-3 bytes of padding for alignment. The padding bytes must be -zero. The padding is not included in the byte length. +Strings are stored as pairs, as per css_string. +Pointer's width is the native width of a pointer on the platform. +Length's width is the native width of a size_t on the platform. CSS dimensions are stored as two 32bit values: . Length is a 32bit integer and unit is as follows: -- cgit v1.2.3