browser/docs/html_grammar.txt
2023-10-04 13:02:36 -04:00

16 lines
429 B
Plaintext

Defined Tokens
<str> => any text in quotes ex: "Hello World!"
<ident> => text not inside of quotes ex: h3
---
<doc> ::= [<doctype>] (<elem> | <inner>)*
<doctype> ::= "<" "!" "doctype" "html" ">"
<elem> ::=
| "<" <ident> <attr>* ">" (<elem> | <inner>)* "<" "/" <ident> ">"
| "<" <ident> <attr>* "/" ">"
<attr> ::= <ident> "=" (<str> | <ident>)
<inner> ::= (<ident> | <dot> | <at> | <hash> | <num> | <comma> | <semi>)+