diff options
Diffstat (limited to 'grammars/html.bpeg')
| -rw-r--r-- | grammars/html.bpeg | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/grammars/html.bpeg b/grammars/html.bpeg index 5dd93cd..cea19c1 100644 --- a/grammars/html.bpeg +++ b/grammars/html.bpeg @@ -1,5 +1,5 @@ # HTML grammar -HTML: __ [doctype __] 0+html-element%__ __ +HTML: __ [doctype __] *html-element%__ __ doctype: "<!DOCTYPE" ..`> @@ -11,16 +11,16 @@ html-element: ( void-element: `< @tag=(id==match-tag) __attributes__ [`/] __ `> -template-element: `< @tag=(id==match-tag) __`> __ >match-body @body=0+(!`<$. / comment / html-element / !("</"tag__`>)$.) ("</"tag__`>) +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=0+(!`<$. / comment / html-element / !("</"tag__`>)$.) "</"tag__`> +normal-element: `< @tag=(id==match-tag) __attributes__ `> >match-body @body=*(!`<$. / comment / html-element / !("</"tag__`>)$.) "</"tag__`> comment: "<!--" ..."-->" -attributes: 0+attribute%__ -attribute: (1+id%`:)__`=__ (id / `" ..`" / `' ..`') -attribute: (1+id%`:)__`=__ (id / `" ..`" / `' ..`') +attributes: *attribute%__ +attribute: (+id%`:)__`=__ (id / `" ..`" / `' ..`') +attribute: (+id%`:)__`=__ (id / `" ..`" / `' ..`') match-tag: id match-body: '' |
