aboutsummaryrefslogtreecommitdiff
path: root/grammars/html.bpeg
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2020-12-12 16:31:53 -0800
committerBruce Hill <bruce@bruce-hill.com>2020-12-12 16:31:53 -0800
commiteb329bdac9fe56d67cb130fb6cdbb28743c6504b (patch)
tree8ba8bded07820519de06728618e4e32e80da3af4 /grammars/html.bpeg
parent6e1fd928148cc7e46015e06c27f824d4111f96ee (diff)
Bunch of changes, including some bpeg->bp renaming, and adding
visualizations
Diffstat (limited to 'grammars/html.bpeg')
-rw-r--r--grammars/html.bpeg26
1 files changed, 0 insertions, 26 deletions
diff --git a/grammars/html.bpeg b/grammars/html.bpeg
deleted file mode 100644
index cea19c1..0000000
--- a/grammars/html.bpeg
+++ /dev/null
@@ -1,26 +0,0 @@
-# HTML grammar
-HTML: __ [doctype __] *html-element%__ __
-
-doctype: "<!DOCTYPE" ..`>
-
-html-element: (
- >(`<("area"/"base"/"br"/"col"/"embed"/"hr"/"img"/"input"/"link"/"meta"/"param"/"source"/"track"/"wbr")) void-element
- / >(`<("script"/"style"/"textarea"/"title")) raw-element
- / >(`<("template")) template-element
- / normal-element)
-
-void-element: `< @tag=(id==match-tag) __attributes__ [`/] __ `>
-
-template-element: `< @tag=(id==match-tag) __`> __ >match-body @body=*(!`<$. / comment / html-element / !("</"tag__`>)$.) ("</"tag__`>)
-
-raw-element: `< @tag=(id==match-tag) __attributes__ `> >match-body @body=.. ("</"tag__`>)
-
-normal-element: `< @tag=(id==match-tag) __attributes__ `> >match-body @body=*(!`<$. / comment / html-element / !("</"tag__`>)$.) "</"tag__`>
-
-comment: "<!--" ..."-->"
-
-attributes: *attribute%__
-attribute: (+id%`:)__`=__ (id / `" ..`" / `' ..`')
-attribute: (+id%`:)__`=__ (id / `" ..`" / `' ..`')
-match-tag: id
-match-body: ''