Commit graph

4 commits

Author SHA1 Message Date
Siebrand Mazeland
79d5225c0e * remove end of line whitespace
* remove empty lines at end of file
* remove "?>" where still present
2008-04-14 07:45:50 +00:00
Tim Starling
6fb641cdfd * Added alternate preprocessor implementation "Preprocessor_Hash" which uses plain PHP hashtables for the underlying data structure. This removes the DOM dependence, avoids XML charset problems, and avoids the lack of memory accounting in DOM. It will hopefully serve as a better model for alternate language implementations than the DOM version. I haven't measured the preformance yet, but it should be comparable to Preprocessor_DOM. If the performance is good, this might be a better default than Preprocessor_DOM.
* Verified Preprocessor_Hash against Preprocessor_DOM with a differential fuzz test.
* Improved the utility of Parser_DiffTest by synchronising strip markers and allowing for loose object comparison. 
* Abstracted PPDStack to make it usable in Preprocessor_Hash.
2008-02-05 08:23:58 +00:00
Tim Starling
906e978e91 * Factored out PPD "part" handling into its own class. Verified with differential fuzz test.
* Stabilise timestamps generated by the parser to avoid diff test false positives
* Fixed msgnw bug. Use RECOVER_ORIG.
* Fixed editintro bug. Cloning the parser in MessageCache has some side-effects that need to be corrected.
* Fixed typo in Parser_DiffTest.php
* General improvements to preprocessorFuzzTest.php
* Fixed breakage of XML output feature in Special:ExpandTemplates
2008-01-24 04:29:56 +00:00
Tim Starling
b6dba5bcfd * Refactored the parser. See my huge entry in RELEASE-NOTES for details.
* Made it possible to configure the parser class being used, via $wgParserConf.
* Moved defines from the top of Parser.php to either class constants or Defines.php
* Added Parser_DiffTest, a differential parser class for regression testing
* Added Parser_OldPP, a parser class which operates like the parser before this commit. I made one breaking change: a bugfix to avoid losing whitespace when adding MWTEMPLATESECTION markers. 
* Made internal tidy work with PHP 5
* Added the ability to supply a hook for template fetching via ParserOptions. This is handy for testing.
* Updated parserTests.txt to account for the various breaking changes I made. Removed a few parser tests that no longer test for anything useful.
2007-11-20 10:55:08 +00:00