firefox parser/html/java/README.txt

AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story. The source provided limited text, so this summary is brief.

Why it matters

Very little changes for readers today; this is a TIL note explaining that Firefox's HTML5 parser is maintained as Java and translated to C++, trivia rather than news.

Read this as

Simon Willison describes a surprising detail about how Firefox works. Its HTML5 parser, the code that reads web page markup, is written in the Java programming language, then automatically converted into C++, the language Firefox actually ships. The conversion uses a script oddly housed in the W3C's HTML validator repository. It is a curiosity for programmers, not a change that affects anyone.

No product launch, pricing or risk implications here. Willison notes Firefox's HTML5 parser is maintained as Java in the Mozilla repository, then translated to C++ via a custom script, and that the translation tool lives in the Nu Html Checker repository powering W3C validation. The main value is historical context from John Resig's 2009 post on Henri Sivonen introducing the parser.

Firefox's parser/html/java directory holds the HTML5 parser as Java source (javasrc), converted to C++ by running 'make sync; make translate' after cloning the ~8GB mozilla-firefox/firefox repo. The cpptranslate tool, e.g. CppVisitor.java's startClassDeclaration(), emits #define and #include directives and lives in the validator/validator repo behind validator.w3.org/nu/. History: Henri Sivonen introduced the parser in 2009.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

Firefox HTML5 Parser Nu Html Checker W3C CppVisitor.java Mozilla

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading