summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Divorce css_string from whatever gets stored in lpu hashes.John Mark Bell2008-12-011-3/+3
| | | | | | | | | | | | | | | | | | 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
* More modifications to allow numerous iterations for profiling.John Mark Bell2008-11-303-73/+88
| | | | | | | | | | | Overall time breakdown for allzengarden.css is approximately: lex : 37% core : 43% lang : 20% svn path=/trunk/libcss/; revision=5857
* Modify to allow a configurable number of iterations for profiling.John Mark Bell2008-11-301-27/+43
| | | | svn path=/trunk/libcss/; revision=5856
* Use parserutils_hash instead of parserutils_dict.John Mark Bell2008-11-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | 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
* css_string is now the same as a parserutils_dict_entry. This allows us to ↵John Mark Bell2008-11-274-25/+31
| | | | | | | | | | 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
* Fix rounding when fractional part is close to 1.John Mark Bell2008-11-241-0/+6
| | | | | | Add testcase to exercise this. svn path=/trunk/libcss/; revision=5766
* Fix number parsing and make test code automatically determine correctness.John Mark Bell2008-11-242-12/+102
| | | | | | | More test data, which covers everything. Fix includes in libcss/types.h svn path=/trunk/libcss/; revision=5764
* Some kind of testsuite for number parsing.John Mark Bell2008-11-235-1/+177
| | | | | | It appears that negative values are broken, at least. svn path=/trunk/libcss/; revision=5763
* Port css21 frontend to new object APIJohn Mark Bell2008-11-091-3/+2
| | | | svn path=/trunk/libcss/; revision=5676
* Port libcss to new lpu API.John Mark Bell2008-11-093-13/+10
| | | | | | Make lexer, core parser, and css21 parser constructors&destructors return errors svn path=/trunk/libcss/; revision=5674
* Support signs on numbers, percentages, and dimensionsJohn Mark Bell2008-10-272-0/+49
| | | | svn path=/trunk/libcss/; revision=5648
* Provide an internal mechanism for dumping stylesheets to a file handle.John Mark Bell2008-10-191-1/+3
| | | | | | Make the css21 test driver call this so we can see if it's working. svn path=/trunk/libcss/; revision=5602
* Modify CSS2.1 frontend test driver to use the public stylesheet API.John Mark Bell2008-09-251-21/+9
| | | | | | Media type handling may need to change -- 32bits may not be large enough in the long term, and there's no sensible way of extending this without causing ABI breakage in the future. svn path=/trunk/libcss/; revision=5439
* Fix compilation of test drivers on 64bit platforms.John Mark Bell2008-09-053-17/+28
| | | | svn path=/trunk/libcss/; revision=5261
* Dependency trackingJohn Mark Bell2008-09-051-1/+19
| | | | svn path=/trunk/libcss/; revision=5258
* Fix testutils line readerJohn Mark Bell2008-09-051-1/+1
| | | | svn path=/trunk/libcss/; revision=5256
* Minor changes.John Mark Bell2008-09-051-1/+14
| | | | svn path=/trunk/libcss/; revision=5255
* Add test case for broken comment in rule on haiku-os site.Michael Drake2008-08-282-0/+32
| | | | svn path=/trunk/libcss/; revision=5215
* Make selector token vector be associated with the ruleset, rather than ↵John Mark Bell2008-08-051-1/+1
| | | | | | | | | 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
* Change API of event callback to return css_error (this is more useful than bool)John Mark Bell2008-08-041-3/+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-012-2/+2
| | | | | | 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-014-4/+96
| | | | | | Parser core doesn't need to know about css_stylesheet, so change its API. svn path=/trunk/libcss/; revision=4854
* Allow silencing of parser test driver.John Mark Bell2008-08-011-0/+6
| | | | svn path=/trunk/libcss/; revision=4852
* Fix handling of empty strings.John Mark Bell2008-08-013-0/+7
| | | | | | | | Parse errors in blocks are ignored -- it'll be up to the client to deal with this. Fix processing of malformed decl-list entries (e.g. foo: bar; !important;) Fix test driver to calculate remaining length correctly. svn path=/trunk/libcss/; revision=4849
* Fix at-rule processing.John Mark Bell2008-07-312-1/+9
| | | | | | Fix malformed selector input to actually result in a terminated block. svn path=/trunk/libcss/; revision=4848
* Something approximating recovery from malformed at-rules.John Mark Bell2008-07-311-0/+1
| | | | svn path=/trunk/libcss/; revision=4847
* Improve recovery from malformed declarationsJohn Mark Bell2008-07-311-0/+3
| | | | | | Implement recovery from malformed selectors svn path=/trunk/libcss/; revision=4846
* Generate and emit eventsJohn Mark Bell2008-07-301-0/+38
| | | | svn path=/trunk/libcss/; revision=4828
* Implement error recovery for malformed declarations.John Mark Bell2008-07-302-0/+9
| | | | svn path=/trunk/libcss/; revision=4826
* Implement the first-stage parser.John Mark Bell2008-07-305-1/+92
| | | | | | | | | | | Things missing: 1) Recovery after parse errors 2) Event emission (the locations of DEBUG_EVENTS are about right for this) 3) A second-stage parser 4) Any kind of testsuite svn path=/trunk/libcss/; revision=4825
* Whoops. Missed this when adding the invalid string stuff.John Mark Bell2008-07-151-0/+3
| | | | svn path=/trunk/libcss/; revision=4663
* Correctly process unterminated strings.John Mark Bell2008-06-262-1/+89
| | | | svn path=/trunk/libcss/; revision=4455
* A more complex test, taken from the CSS3 syntax moduleJohn Mark Bell2008-05-052-0/+30
| | | | svn path=/trunk/libcss/; revision=4126
* Match expected token data with that output by the lexer.John Mark Bell2008-05-052-4/+59
| | | | | | Fix test #44's expected token data. svn path=/trunk/libcss/; revision=4125
* Fix testdriver to accept # in inputJohn Mark Bell2008-05-032-5/+624
| | | | | | | Significantly more tests for the lexer -- this basically covers all the non-OOD/EOF cases Fix bug in lexing of "/x" -- the CHAR(/) was getting dropped by the "don't emit comment tokens" logic svn path=/trunk/libcss/; revision=4120
* Testdriver for automated lexer tests. This needs a little more work to ↵John Mark Bell2008-05-016-1/+302
| | | | | | | | verify that the data contained within emitted tokens is as expected. Very trivial testdata to exercise this. svn path=/trunk/libcss/; revision=4115
* Import beginnings of a CSS parsing library.John Mark Bell2008-05-0115-0/+54007
Currently comprises a lexer. svn path=/trunk/libcss/; revision=4112