On 10/11/2022 3:10 AM, avi.e.gr...@gmail.com wrote:
I see resemblances to something like how a web page is loaded and operated.
I mean very different but at some level not so much.

I mean a typical web page is read in as HTML with various keyword regions
expected such as <BODY> ... </BODY> or <DIV ...> ... </DIV> with things
often cleanly nested in others. The browser makes nodes galore in some kind
of tree format with an assortment of objects whose attributes or methods
represent aspects of what it sees. The resulting treelike structure has
names like DOM.

To bring things back to the context of the original post, actual web browsers are extremely tolerant of HTML syntax errors (including incorrect nesting of tags) in the documents they receive. They usually recover silently from errors and are able to display the rest of the page. Usually they manage this correctly. The OP would like to have a parser or checker that could do the same, plus giving an output showing where each of the errors happened.

I can imagine such a parser also reporting which lines it had to skip before it was able to recover.
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to