From: adam Date: Wed, 14 Dec 2005 05:09:01 +0000 (-0500) Subject: checkpoint X-Git-Tag: tag_for_25-Mar~565 X-Git-Url: http://git.megacz.com/?p=sbp.git;a=commitdiff_plain;h=b9da5584ad66f98290fa46dae32622aae8f7cf5c checkpoint darcs-hash:20051214050901-5007d-11130e4399d03d87dad2c8eb7e498f7bbd3faf6b.gz --- diff --git a/src/edu/berkeley/sbp/misc/MetaGrammar.java b/src/edu/berkeley/sbp/misc/MetaGrammar.java index 0b70878..a4ee08f 100644 --- a/src/edu/berkeley/sbp/misc/MetaGrammar.java +++ b/src/edu/berkeley/sbp/misc/MetaGrammar.java @@ -78,14 +78,8 @@ public class MetaGrammar extends ReflectiveWalker { } return ret; } - public Object _plus__slash_(final Element r, Object s) { - if (s instanceof String) s = CharToken.string((String)s); - return new Rep(r, (Element)s, false, false); - } - public Object _star__slash_(final Element r, Object s) { - if (s instanceof String) s = CharToken.string((String)s); - return new Rep(r, (Element)s, false, true); - } + public Object _plus__slash_(final Element r, Object s) { return new Rep(r, (Element)s, false, false); } + public Object _star__slash_(final Element r, Object s) { return new Rep(r, (Element)s, false, true); } public Object _star__star_(final Element r) { return new Rep(r, null, true, true); } public Object _plus__plus_(final Element r) { return new Rep(r, null, true, false); } public Element _question_(final Element r) { return Repeat.maybe(r); } @@ -254,7 +248,6 @@ public class MetaGrammar extends ReflectiveWalker { if (oi instanceof PreSequence) o2[j] = ((PreSequence)oi).buildUnion(); else if (oi==SELF) o2[j] = u.new Subset("(("+u+"))", set); else if (oi instanceof MyLift) { o2[j] = CharToken.string(tag = ((MyLift)oi).s); drops[j] = true; } - else if (oi instanceof String) { o2[j] = CharToken.string( ((String)oi) ); drops[j] = true; } else if (oi instanceof Rep) o2[j] = ((Rep)oi).build(); else o2[j] = (Element)oi; @@ -369,6 +362,7 @@ public class MetaGrammar extends ReflectiveWalker { + // DO NOT EDIT STUFF BELOW: IT IS AUTOMATICALLY GENERATED new Tree(null, "gram", new Tree[] { new Tree(null, null, new Tree[] { }), new Tree(null, "grammar", new Tree[] { new Tree(null, null, new Tree[] { new Tree(null, "::=", new Tree[] { new Tree(null, "sify", new Tree[] { new Tree(null, null, new Tree[] { new Tree(null, "s", new Tree[] { })})}), @@ -956,3 +950,4 @@ new Tree(null, "gram", new Tree[] { new Tree(null, null, new Tree[] { }), +