summaryrefslogtreecommitdiff
path: root/src/parse/parse.c
Commit message (Collapse)AuthorAgeFilesLines
* Squash GCC7 -Wimplicit-fallthrough warnings.Michael Drake2017-10-221-2/+2
|
* Strip trailing whitespace.Michael Drake2017-09-041-103/+103
|
* Update for new lpu API.Michael Drake2013-12-141-6/+4
|
* Various changes which modify API and ABI:Michael Drake2013-12-131-36/+19
| | | | | | | | | - Remove client allocation function. - Change node_classes callback not to yield array ownership to libcss. - Node bloom filters now built by, during selection libcss. - Added selection callbacks to get and set data on document nodes. Test suite, example, and documentation updated to match.
* No. Just no.John Mark Bell2011-02-031-3/+0
| | | | svn path=/trunk/libcss/; revision=11606
* Rename all css_[^_] internal symbols to css__ so that they're nicely namespacedDaniel Silverstone2011-01-261-20/+20
| | | | svn path=/trunk/libcss/; revision=11492
* Fix renaming of css_parser_parse_chunk from css_parser_css__parse_chunk to ↵Daniel Silverstone2011-01-261-1/+1
| | | | | | css__parser_parse_chunk svn path=/trunk/libcss/; revision=11491
* Ensure there are zero global symbols without css_ or css__ in front of them. ↵Daniel Silverstone2011-01-201-1/+1
| | | | | | This helps prevent confusion if someone else wants a function called parse_background or similar svn path=/trunk/libcss/; revision=11416
* Ensure than trailing tokens are cleaned on completion of inline style parsingJohn Mark Bell2010-04-271-1/+3
| | | | svn path=/trunk/libcss/; revision=10501
* Fix libcss to use new libwapcaplet behaviour.Daniel Silverstone2010-03-271-17/+8
| | | | | | | TODO: update the tests to include a refcounting proof svn path=/trunk/libcss/; revision=10162
* Lose redundant assignments.John Mark Bell2009-11-221-0/+2
| | | | | | | | Drop some dead code. Avoid a potential NULL dereference. Add missing "break" in initial substate of block context parser svn path=/trunk/libcss/; revision=9678
* Avoid potential warning.John Mark Bell2009-08-021-1/+8
| | | | svn path=/trunk/libcss/; revision=8991
* Use unsigned int for bitfields. Apparently, using uint32_t confuses some ↵John Mark Bell2009-08-021-2/+2
| | | | | | compilers. svn path=/trunk/libcss/; revision=8990
* More rigorous handling of EOF.John Mark Bell2009-07-311-7/+75
| | | | | | Expand test data for this. svn path=/trunk/libcss/; revision=8931
* Don't intern lower-case versions of strings. Use ↵John Mark Bell2009-07-271-123/+70
| | | | | | lwc_context_string_caseless_isequal, instead. svn path=/trunk/libcss/; revision=8815
* Purge use of alloca()John Mark Bell2009-07-221-2/+10
| | | | svn path=/trunk/libcss/; revision=8715
* Fixup parsing of empty inline styles -- previously, it would emit the ↵John Mark Bell2009-07-011-5/+9
| | | | | | START_STYLESHEET and START_RULESET events twice. svn path=/trunk/libcss/; revision=8242
* Less pointless inliningJohn Mark Bell2009-06-271-37/+37
| | | | svn path=/trunk/libcss/; revision=8033
* It helps if you remember to disable debug againJohn Mark Bell2009-06-261-1/+1
| | | | svn path=/trunk/libcss/; revision=8025
* Support for parsing inline stylesJohn Mark Bell2009-06-261-85/+324
| | | | svn path=/trunk/libcss/; revision=8024
* Tidying codeJohn Mark Bell2009-06-261-42/+79
| | | | svn path=/trunk/libcss/; revision=8018
* Nested block support.John Mark Bell2009-06-261-2/+26
| | | | svn path=/trunk/libcss/; revision=8014
* Flag use of alloca -- these need to die.John Mark Bell2009-04-161-0/+4
| | | | | | Why are we interning lowercased versions of strings, anyway? svn path=/trunk/libcss/; revision=7102
* A bunch of c89.John Mark Bell2009-04-151-18/+17
| | | | | | | Lose trailing commas. GCC 2.95 compatibility. svn path=/trunk/libcss/; revision=7099
* Most of the interned string lifetimes are at least no shorter than we think ↵Daniel Silverstone2009-02-151-5/+37
| | | | | | they ought to be. svn path=/trunk/libcss/; revision=6532
* Tidy up handling of malformed selectorsJohn Mark Bell2009-02-151-38/+51
| | | | svn path=/trunk/libcss/; revision=6525
* Quirks mode parsingJohn Mark Bell2009-02-151-0/+11
| | | | svn path=/trunk/libcss/; revision=6519
* Port libcss to libwapcaplet.Daniel Silverstone2009-02-141-133/+108
| | | | | | | | | It passes the tests, perhaps we need more of them. Lifetimes of lwc_string objects really need attention before we can consider this finished. svn path=/trunk/libcss/; revision=6517
* Drop css_error_handler and rename css_alloc to css_allocator_fnDaniel Silverstone2009-02-141-2/+2
| | | | svn path=/trunk/libcss/; revision=6482
* Fix assertion failure when EOF is encountered in block-content.John Mark Bell2009-01-241-6/+23
| | | | | | Fix assertion failure when the first token within a ruleset isn't an IDENT. svn path=/trunk/libcss/; revision=6213
* Fix handling of EOF in property values John Mark Bell2009-01-221-0/+6
| | | | svn path=/trunk/libcss/; revision=6165
* Test data for EOF in strange places.John Mark Bell2009-01-221-2/+14
| | | | | | Fix EOF handling in the core parser. svn path=/trunk/libcss/; revision=6164
* Intern zero-length data, too. Otherwise, we'll explode later on. John Mark Bell2009-01-191-2/+1
| | | | | | Fixes content: "", for example. svn path=/trunk/libcss/; revision=6147
* Retain pointer to dictionary entries so we don't have to rediscover it later.John Mark Bell2008-12-011-110/+95
| | | | svn path=/trunk/libcss/; revision=5862
* Simplify decision as to whether to intern token data by inserting markers ↵John Mark Bell2008-12-011-22/+7
| | | | | | into the css_token_type enum. svn path=/trunk/libcss/; revision=5860
* Divorce css_string from whatever gets stored in lpu hashes.John Mark Bell2008-12-011-3/+4
| | | | | | | | | | | | | | | | | | Use pointers to parserutils_hash_entry directly in stylesheet datastructures. The upshot of this for allzengarden.css is: 5506 slots used (of 8192 => 67.211914%) Data: 8 full blocks: 32768 bytes 9 partial blocks: 35124 bytes (of 36864 => 95.279945%) Total: 69936 (4112) (32) Hash structures: 65584 i.e. a total string dictionary size of 135,520 bytes, which is some 74,056 bytes less than before. svn path=/trunk/libcss/; revision=5859
* Make getToken reduce consecutive whitespace tokens to a single whitespace token.John Mark Bell2008-11-301-9/+19
| | | | | | Update eatWS appropriately. This reduces the number of calls to getToken by a million or so. svn path=/trunk/libcss/; revision=5855
* Slightly clearer code. Marginally faster, too.John Mark Bell2008-11-301-42/+52
| | | | svn path=/trunk/libcss/; revision=5854
* Use parserutils_hash instead of parserutils_dict.John Mark Bell2008-11-301-9/+9
| | | | | | | | | | | | | | | | | | | | | | This approximately halves the size of the interned string table. We now have the following for allzengarden.css: 5507 slots used (of 8192 => 67.224121%) Data: 3 full blocks: 12288 bytes 10 partial blocks: 38946 bytes (of 40960 => 95.083008%) Total: 53488 (4112) (32) Entries: 21 full blocks: 86016 bytes 1 partial blocks: 2096 bytes (of 4096 => 51.171875%) Total: 90496 (4112) (32) Hash structures: 65592 Which gives a total dictionary size of 209,576 bytes. Note that 43% of this is parserutils_hash_entry structures (length-pointer pairs). It would be good, therefore, to be able to purge these. svn path=/trunk/libcss/; revision=5852
* Commentary on which tokens actually need string data interning.John Mark Bell2008-11-301-0/+12
| | | | svn path=/trunk/libcss/; revision=5848
* css_string is now the same as a parserutils_dict_entry. This allows us to ↵John Mark Bell2008-11-271-98/+88
| | | | | | | | | | use dict entries directly as strings. iChange the way in which selectors are represented. This significantly reduces memory requirements -- reducing the approximate usage count (excludes the string dictionary, which is about 360k) of allzengarden.css from 4,535,400 bytes to 2,414,312 bytes on a 64bit platform. The string dictionary is now created and owned by the stylesheet object. The parser is just given access to this so that it can store strings in it. svn path=/trunk/libcss/; revision=5809
* Don't intern strings for CSS_TOKEN_S tokens. This is pointless, as all we ↵John Mark Bell2008-11-271-1/+5
| | | | | | care about is the token type in this case. svn path=/trunk/libcss/; revision=5806
* Port libcss to new lpu API.John Mark Bell2008-11-091-72/+85
| | | | | | Make lexer, core parser, and css21 parser constructors&destructors return errors svn path=/trunk/libcss/; revision=5674
* Flag hideous todo thanks to CSSOMJohn Mark Bell2008-08-051-0/+3
| | | | svn path=/trunk/libcss/; revision=4924
* Make selector token vector be associated with the ruleset, rather than ↵John Mark Bell2008-08-051-33/+25
| | | | | | | | | having its own event type. Store details about the current construct on the context stack. Document block-content, selector, and declaration stuff. svn path=/trunk/libcss/; revision=4921
* Beginnings of a mechanism to intern known strings and compare pointers ↵John Mark Bell2008-08-041-0/+25
| | | | | | effectively. svn path=/trunk/libcss/; revision=4903
* For tokens where there's a possibility of case differences requiring case ↵John Mark Bell2008-08-041-89/+136
| | | | | | insensitive matching, intern lower cased versions of strings alongside the originals. svn path=/trunk/libcss/; revision=4902
* Change API of event callback to return css_error (this is more useful than bool)John Mark Bell2008-08-041-2/+3
| | | | | | Implement all the context-related event handlers in the stage 2 parser. svn path=/trunk/libcss/; revision=4898
* Only intern strings when we get a token from the lexer. Strings in tokens ↵John Mark Bell2008-08-011-14/+16
| | | | | | that have been pushed back have already been interned, so it's stupid to re-intern every time. This has required that the lexer permits its clients to modify the data members of the css_token object. That's fine, as it assumes nothing about them (they're basically just a window onto the internal lexer state, anyway). svn path=/trunk/libcss/; revision=4857
* Stub out a CSS 2.1 stage 2 parser.John Mark Bell2008-08-011-7/+3
| | | | | | Parser core doesn't need to know about css_stylesheet, so change its API. svn path=/trunk/libcss/; revision=4854