GoSuB Browser Progress, pt12
So i've got an arena which is part of a document (tree) so all the nodes are stored there, and we reference nodes through their node_id (which is a sequential node number).
I've also did some work on testing the tree with html5lib-tests. One of the issues I find is that the html5 spec outlines the tokenizer is great detail, including which error messages to throw, but lacks a bit with the parsing spec. For instance, it speaks a lot about throwing parser errors, but doesn't specify which error to throw. So probably this is not specified directly, but the html5lib-tests assumes certain errors at certain places. This means we should incorporate the html5lib error messages in our parser as well, in order to make sure we can test the system.
So, for now it will be a long way of tweaking the parser, getting rid of all the bugs, filling in some of the functionality (still: what the hell is foster parenting!?), and making sure we return the document-tree that we expect in the tests.
This is gonna take a while....
Oh, another thing that I'm struggling with: The html5parser struct instantiates a tokenizer struct which it uses. So far so good: as long as I have the parser, I have the tokenizer. Rust will take care of that. However, both should use a parse_error() method that will add parser AND tokenizer errors onto a single stack. This causes problems, as we can't really define the owner of the logger, and rust will get angry at us. So instead i create a separate error logger and attach them to both structs with Rc<RefCell<ErrorLogger>>. Is this the way?
About jaytaph
Codemuser extraordinaire
Joined: | March 24, 2023 |
Following: | 2 |
Followers: | 2 |
Posts: | 50 |
Comments: | 3 |
Upvotes: | 4 |
Previous musings
- (1) November 2024
- (1) October 2024
- (1) September 2024
- (1) July 2024
- (2) February 2024
- (3) January 2024
- (3) December 2023
- (4) November 2023
- (5) October 2023
- (10) September 2023
- (8) August 2023
- (1) June 2023
- (1) May 2023
- (4) April 2023
- (5) March 2023