5 ms·
“Parsers are easy!” - sorry, couldn’t resist. ;) Have a nice day folks!
by _the_inflator 5y ago
“Parsers are easy!” - sorry, couldn’t resist. ;)
Have a nice day folks!
- dmitriid 5y agoIt is easy. Unless you have an ambiguous system which: - has to produce valid output in the presence of invalid input - apparently has to take external scripting such as `document.write` and `document.innerHtml` into account - has decades of legacy and conflicting standards thrown in And, undoubtedly, it's still the easiest part of a browser.
- sanxiyn 5y agoIt was NOT the easiest part before HTML5. Thanks to HTML5 effort, it now is. This is the great accomplishment of HTML5.
- dmitriid 5y agoCompared to layout, paint, keeping track of live objects in the DOM etc. it was probably still the easiest part :) HTML5 did bring more order to the chaos, but I doubt it reduced it that much.
- sanxiyn 5y agoI think HTML used to be harder than HTTP. I think now it is easier.
- benibela 5y agoIt became harder In the past you could write a straightforward parser for the pages you had. When it did not work on some other pages, you could say, that page has invalid HTML, it is not expected to be parseable. Now you have to spend a lot of time to implement everything in HTML5
- goto11 5y agoHTML still have a definition of valid HTML which is reasonably simple to parse. Now it also have exact specifications for how to parse invalid HTML which is of course much a more complex task.
- cookiengineer 5y ago5 years later: "Parsers are easy, but I had to invent a meta language parser first to be able to describe the parsing process of the actual parser"
- goto11 5y agoParsing is a solved problem. The same way solo-climbing the Mount Everest without supplemental oxygen is a solved problem.