Skip to content

New and old parse errors #107

Open
Open
@stevecheckoway

Description

@stevecheckoway

I'm trying to test that an HTML parser produces the correct errors but some of the tests list #errors and #new-errors where the new errors seem to be the new standard names for old errors. For example,

#data
<?COM--MENT?>
#errors
(1,1): expected-tag-name-but-got-question-mark
(1,13): expected-doctype-but-got-eof
#new-errors
(1:2) unexpected-question-mark-instead-of-tag-name
#document
| <!-- ?COM--MENT? -->
| <html>
|   <head>
|   <body>

I'm not sure why the first error is there, but I assume an older version of the standard had something like a look ahead on the <. As I read the standard, there should be an unexpected-question-mark-instead-of-tag-name and a (currently unnamed in the standard) parse error for the missing DOCTYPE.

Is it always the case that if there's a new error that it replaces exactly one of the old errors? If not, how should these be handled?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions