From: adam Date: Wed, 14 Dec 2005 07:09:37 +0000 (-0500) Subject: checkpoint X-Git-Tag: tag_for_25-Mar~541 X-Git-Url: http://git.megacz.com/?p=sbp.git;a=commitdiff_plain;h=3485f1c89ae352b5aa1b65cdfa5f628cd3859601;hp=ea6309dcafef2c5796be4c1d50c8295274dc31d6 checkpoint darcs-hash:20051214070937-5007d-02216af23f82897012b680aac4fc45132f721a4c.gz --- diff --git a/src/edu/berkeley/sbp/misc/MetaGrammar.java b/src/edu/berkeley/sbp/misc/MetaGrammar.java index d5fa65d..53aeff0 100644 --- a/src/edu/berkeley/sbp/misc/MetaGrammar.java +++ b/src/edu/berkeley/sbp/misc/MetaGrammar.java @@ -144,25 +144,6 @@ public class MetaGrammar extends ReflectiveWalker { public PreSequence(Object[] o, String tag) { this(o, tag, false); } public PreSequence(Object[] o, String tag, boolean keeper) { this.o = o; this.tag = tag; this.keeper = keeper; } boolean[] drops = null; - public Element[] expand(Union u, HashSet set) { - if (o==null) return new Element[0]; - Element[] o2 = new Element[o.length]; - drops = new boolean[o.length]; - int j = 0; - for(int i=0; i set = new HashSet(); - Element[] expansion = expand(u, set); + Element[] o2 = o==null ? new Element[0] : new Element[o.length]; + if (o != null) { + drops = new boolean[o.length]; + int j = 0; + for(int i=0; i