From 9617baf699aeff816fae50841e11123ebd9c9366 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 14 Dec 2020 18:39:56 -0800 Subject: Updated grammars --- grammars/html.bp | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'grammars/html.bp') diff --git a/grammars/html.bp b/grammars/html.bp index cea19c1..1f6553c 100644 --- a/grammars/html.bp +++ b/grammars/html.bp @@ -3,24 +3,20 @@ HTML: __ [doctype __] *html-element%__ __ 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) +html-element: void-element / raw-element / template-element / normal-element -void-element: `< @tag=(id==match-tag) __attributes__ [`/] __ `> +void-element: `< ("area"/"base"/"br"/"col"/"embed"/"hr"/"img"/"input"/"link"/"meta"/"param"/"source"/"track"/"wbr") __attributes__ [`/] __ `> -template-element: `< @tag=(id==match-tag) __`> __ >match-body @body=*(!`<$. / comment / html-element / !(")$.) (") +template-element: "") % (comment / html-element) -raw-element: `< @tag=(id==match-tag) __attributes__ `> >match-body @body=.. (") +raw-element: `< @tag=("script"/"style"/"textarea"/"title") __attributes__ `>...(") -normal-element: `< @tag=(id==match-tag) __attributes__ `> >match-body @body=*(!`<$. / comment / html-element / !(")$.) " +normal-element: `< @tag=( + "area"/"base"/"br"/"col"/"embed"/"hr"/"img"/"input"/"link"/"meta"/"param"/"source"/"track"/"wbr") + __attributes__ `>...(") % (comment / html-element) comment: "" attributes: *attribute%__ attribute: (+id%`:)__`=__ (id / `" ..`" / `' ..`') attribute: (+id%`:)__`=__ (id / `" ..`" / `' ..`') -match-tag: id -match-body: '' -- cgit v1.2.3