X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=tests%2Fmeta.g;h=c9d588d9f2962181bc1b7debfa8120a8b19a1726;hp=2779b7c8f6a618a4d0a879580376179b40c10cc1;hb=bc7ff8b63529e420f7caa244d3bf74471f55cb7b;hpb=5cf6851e385edfdec4955120e03bf7e282dc8a68 diff --git a/tests/meta.g b/tests/meta.g index 2779b7c..c9d588d 100644 --- a/tests/meta.g +++ b/tests/meta.g @@ -4,16 +4,17 @@ grammar ::= r +/ ws => "grammar" r ::= word ^"::=" alternatives /ws | word ^"!::=" alternatives /ws -alternatives ::= equiAlt +/ (ws ">" ws) -equiAlt ::= conjuncts +/ (ws "|" ws) +alternatives ::= (conjuncts +/ (ws "|" ws)) +/ (ws ">" ws) conjuncts ::= sequence | sequence ^"&" e*/ws /ws | sequence ^"&~" e*/ws /ws -sequence ::= e*/ws - (ws "/" e)? - (ws "=>" ws (word|quoted))? => "seq" +ps ::= e*/ws => "ps" +psx ::= ps + > ps ^"/" e /ws +sequence ::= psx + | psx ^"=>" (word|quoted) /ws ec ::= [~\-\]\\\~] | escaped @@ -21,14 +22,14 @@ ec ::= [~\-\]\\\~] range ::= ec => "range" | ec ^"-" ec -e ::= word => "nonTerminal" +e ::= word => "nonTerminal" | quoted => "literal" | ^"()" - | ^"{" alternatives "}" /ws + | ^"{" sequence "}" /ws | ^"[" (range*) "]" | ^"[~" (range*) "]" | ^"^" quoted /ws - | ^"!" e /ws +// | ^"!" e /ws | (e ws ^"**" > e ws ^"*") | e ^"*/" e /ws