iska
ccc355d80e
Replace unconsuming with a location mark in the current character in After DOCTYPE Name state to avoid consuming the character twice
...
Otherwise the parse error would be emitted multiple times if it is an invalid or unexpected character
2014-11-01 22:24:32 +01:00
iska
0ea6eb2b4e
Fix Attribute Name state for NULL character
...
The attribute should not be finalised here, since its value wasn't reached yet
2014-11-01 22:22:38 +01:00
iska
477af1f4ab
Change parse error message to 0x format instead of U+
2014-11-01 22:06:01 +01:00
iska
97df7c5dd8
Fix Attribute Name state to prevent finalising a pending attribute name before it's finished
2014-11-01 22:05:22 +01:00
iska
e8c74da8e2
Fix Bogus Comment state for nil-characters
2014-11-01 22:04:23 +01:00
iska
244021072c
Remove erroneous parse-error emit in Comment End state
2014-11-01 22:03:34 +01:00
iska
0835e3d120
Add a "reconsume" method for current character to avoid scanning the Stream repeatedly
...
Reconsume differs from the Unconsume method, since it doesn't rewind the scan location to the previous characters, but instead sets a flag to return the last consumed character on the next acess
2014-11-01 22:02:36 +01:00
iska
622e22737b
Fix emitted Token in Before Attribute Name state
2014-11-01 15:49:42 +01:00
iska
8fd6e89854
Fix scan location after reading Named Entity
2014-11-01 15:19:46 +01:00
iska
58220a464c
Add missing break statement to prevent fall-through in End Tag Open state
...
.. and change parse error to look like the others
2014-11-01 15:19:20 +01:00
iska
b3ee713e9b
Fix DOCTYPE Token's public and system identifier initialisation issue
...
On first access these must be inited before use
2014-11-01 15:12:58 +01:00
iska
a23e1a13c9
Fix surrogate pair handling and remove Input Stream's separate error-reporting class
...
Upon reading a surrogate pair the scan location should be advanced by two characters instead of one
2014-10-31 22:32:34 +01:00
iska
bc8abb116f
Fix UTF32Char to String conversion for invalid unicode characters
...
Invalid, isolated surrogate pairs, UTF32 characters should handled specially and converted to UniChars first
2014-10-31 21:46:54 +01:00
iska
a7892a2edf
Cleanup some parse error messages in Tokenizer for overall consistency
2014-10-31 18:26:34 +01:00
iska
2fa0e793e0
Replace dictionary with two arrays for Named Entity replacement
...
Currently the entity name is binary-searched and its replacement-value is accessed via found index
2014-10-31 18:25:54 +01:00
iska
c04d4a35f3
Set performance baseline for tokenizing step
2014-10-31 18:07:18 +01:00
iska
aaec5971b8
Add performance test for tokenizing step
2014-10-31 18:06:59 +01:00
iska
bc3a7165ec
Fix logic for Named Entity replacement
...
This will be improved further later on
2014-10-31 18:06:15 +01:00
iska
8a2422426e
Fix several state switches for Attribute states
...
Question Mark character was use instead of Quotation Mark
2014-10-31 00:11:31 +01:00
iska
d5ff28b1de
Fix parsing numeric entities
...
Numbers > UINT_MAX should be handled correctly now
2014-10-31 00:10:41 +01:00
iska
d45ebb611e
Fix state switch in Attribute Name state
2014-10-30 21:28:08 +01:00
iska
a28580b258
Fix initialisation of HTML5 Lib tests
...
Checks for nil values and inits accordingly
2014-10-30 21:18:56 +01:00
iska
e2e4940100
Add implementation for finalising the current attribute of the current Tag Token
2014-10-30 21:18:15 +01:00
iska
1e4fe4ae45
Fix state switch in Tag Name state
...
Otherwise it's an infinite loop
2014-10-30 21:17:34 +01:00
iska
44fb192e22
Add helper methods for appending to attribute name/value
...
Initialises lazily on first access
2014-10-30 21:17:00 +01:00
iska
e896c1fe0b
Fix initial values for HTML Tokens and handle nil-parameter
2014-10-30 21:15:12 +01:00
iska
dd95a639c3
Add nil checks for DOCTYPE identifiers when initing HTML5 Lib tests
2014-10-26 23:43:52 +01:00
iska
9d2664fce0
Fix regex match range index in Process Double Escaped method
2014-10-26 23:43:29 +01:00
iska
f2993181a8
Change method names in HTML5 Lib test class
...
Change Fixture to Dctionary
2014-10-26 23:43:21 +01:00
iska
a00c3a27d7
Fix several bugs in Named Entity Character Reference method
2014-10-26 23:21:07 +01:00
iska
8509cb1955
Remove faulty statement in Char Ref Attribute Value state
...
Current char should not be unconsumed here, otherwise we land in an infinite loop
2014-10-26 22:49:15 +01:00
iska
f04abf6236
Fix numeric entity replacement bug where wrong variable and valid-range were used
2014-10-26 22:29:23 +01:00
iska
d5a00713ad
Fix equality methods in HTML token classes for the nil-cases
2014-10-26 22:27:58 +01:00
iska
6cfb6cd65f
Fix tokenizer for Bogus Comment state
...
Last character must be unconsumed: "emit a comment token whose data is the concatenation of all the characters starting from and including the character that caused the state machine to switch into the bogus comment state"
https://html.spec.whatwg.org/multipage/syntax.html#bogus-comment-state
2014-10-26 19:03:23 +01:00
iska
e7126a720f
Add category to overwrite isEqual method in Parse Error tokens for testing
...
All parse error are treated as equal
2014-10-26 18:12:25 +01:00
iska
e43d7c21d1
Change tokenzing to concatenate all adjacent character tokens into one
2014-10-26 18:11:21 +01:00
iska
a3358dd8b0
Fix HTML5 Lib test to correctly handle ParseError token
...
JSON structure is not strong with this one
2014-10-26 18:10:32 +01:00
iska
e73a8dc512
Revert "Adapt HTML5 Lib test class to break output into multiple character tokens"
...
This reverts commit 79da32ed72 .
2014-10-26 18:02:47 +01:00
iska
f45c9d33a6
Fix bug in named entity method
...
initial character should be the next instead of current in the stream
2014-10-26 16:37:48 +01:00
iska
971f7b3cf0
Add methods to access tokens in the Tokenizer class
2014-10-26 02:03:37 +02:00
iska
79da32ed72
Adapt HTML5 Lib test class to break output into multiple character tokens
2014-10-26 02:02:58 +02:00
iska
7d9b66ff8d
Add "HTML Standarad" html file to tests resource for benchmarking
...
As of the latest update (2014/10/23) the test file is 8.1MB
2014-10-26 02:01:48 +02:00
iska
8088d239df
Add common test case class
2014-10-26 01:59:52 +02:00
iska
f96c69c6f7
Remove fast enumeration protocol and its method implementation from Tokenizer class
2014-10-26 01:55:12 +02:00
iska
141310f910
Add equality and hash method for HTML Token classes
2014-10-26 01:54:30 +02:00
iska
65bd4c15f1
Remove EOF token and replace it with a boolean
2014-10-26 01:53:46 +02:00
iska
b7039aba1d
Add html5lib tests folder to tests target supporting files
2014-10-26 01:52:05 +02:00
iska
5c28638be6
Add html5lib-tests as git submodule
2014-10-25 17:37:47 +02:00
iska
0910290ef2
Add generic HTML5LibTest class for performing HTML5lib tests
...
https://github.com/html5lib/html5lib-tests
2014-10-25 17:35:58 +02:00
iska
779fcf0a73
Improve parse error reason messages in Tokenizer class
2014-10-25 01:07:51 +02:00