From: adam Date: Wed, 14 Dec 2005 06:00:33 +0000 (-0500) Subject: checkpoint X-Git-Tag: tag_for_25-Mar~559 X-Git-Url: http://git.megacz.com/?p=sbp.git;a=commitdiff_plain;h=d79a5062fbe0211d0ad3459d6a545a5270f6efbd checkpoint darcs-hash:20051214060033-5007d-96349b0220f840e4714fae6a841e37f1a74ccd63.gz --- diff --git a/src/edu/berkeley/sbp/util/Reflection.java b/src/edu/berkeley/sbp/util/Reflection.java index cf683f0..fea79e3 100644 --- a/src/edu/berkeley/sbp/util/Reflection.java +++ b/src/edu/berkeley/sbp/util/Reflection.java @@ -23,10 +23,16 @@ public final class Reflection { } if (c == String.class) { boolean ok = true; - for(int i=0; i "gram" ws !::= w** -grammar ::= r +/ ws => "grammar" +grammar ::= r +/ ws => "grammar" r ::= word ^"::=" alternatives /ws | word ^"!::=" alternatives /ws alternatives ::= equiAlt +/ (ws ">" ws) -equiAlt ::= conjuncts +/ (ws "|" ws) => "alternatives" +equiAlt ::= conjuncts +/ (ws "|" ws) => "alternatives" sequence ::= es > es ws ^"/" e @@ -29,25 +29,24 @@ range ::= ec => "range" | ec ^"-" ec e ::= word => "nonTerminalY" - | [(][)] => "epsilon" + | [(][)] => "epsilon" | ^"{" alternatives "}" /ws | ^"[" (range*) "]" | ^"[~" (range*) "]" - | e ^"+/" e /ws - | e ^"*/" e /ws - | e ^"?" /ws + | ^"^" quoted /ws | e ^"~/~" /ws - - | e ^"-" e /ws - | ^"!" e /ws - | ^"^" quoted /ws + | ^"`" e /ws | e ^"#" /ws - | quoted => "literal" | (e ws ^"**" > e ws ^"*") + | e ^"*/" e /ws | (e ws ^"++" > e ws ^"+") + | e ^"+/" e /ws + | e ^"?" /ws + + | quoted => "literal" | "(" word ^")" /ws > ^"(" alternatives ")" /ws @@ -57,7 +56,7 @@ w !::= " " | "\n" | "\r" an ::= [a-zA-Z0-9_] -word ::= an++ => "sify" +word ::= an++ quoted ::= "\"" (([~\"\\] | escaped)*) "\"" => "sify" escaped ::= "\\n" => "\n" | "\\r" => "\r"