You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
452 B
Racket
20 lines
452 B
Racket
7 years ago
|
#lang brag
|
||
|
|
||
|
top : @content
|
||
|
content : (tagged-element | /comment | string | sp)*
|
||
|
|
||
|
tagged-element : /"<" /sp? identifier attrs /sp? (short | full)
|
||
|
@short : /"/>"
|
||
|
@full : /">" content /"</" /sp? identifier /sp? /">"
|
||
|
|
||
|
attrs : [attr] (/sp attr)*
|
||
|
attr : identifier /sp? /"=" /sp? /"\"" string /"\""
|
||
|
|
||
|
comment : "<!--" (string | sp)* "-->"
|
||
|
|
||
|
string : char+
|
||
|
identifier : ALPHANUMERIC [@string]
|
||
|
|
||
|
@sp : SP
|
||
|
@char : ALPHANUMERIC | OTHER | AMP | LT | GT | "=" | "\""
|