X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=src%2Fedu%2Fberkeley%2Fsbp%2Fmeta%2FMetaGrammarBindings.java;h=0fc7c71599520e2f70e5a3ca4f4e9ad4d4bf8515;hp=2d46166d01b77f090ff29453e1bcf21279bea135;hb=f56263f0f1cf0c01dfbd8ea7bd1ba8a9c6bd8042;hpb=e9e8509741c9f1406defa18655315ad205faba1f diff --git a/src/edu/berkeley/sbp/meta/MetaGrammarBindings.java b/src/edu/berkeley/sbp/meta/MetaGrammarBindings.java index 2d46166..0fc7c71 100644 --- a/src/edu/berkeley/sbp/meta/MetaGrammarBindings.java +++ b/src/edu/berkeley/sbp/meta/MetaGrammarBindings.java @@ -172,14 +172,14 @@ public class MetaGrammarBindings { return ret; } } - public static @bind.as("&") Seq and(Seq s, El[] elements) { return s.and(seq(elements)); } - public static @bind.as("&~") Seq andnot(Seq s, El[] elements) { return s.andnot(seq(elements)); } + public static @bind.as("&") Seq and2(Seq s, Seq a) { return s.and(a); } + public static @bind.as("&~") Seq andnot2(Seq s, Seq a) { return s.andnot(a); } public static @bind.as("->") Seq arrow(Seq s, El e) { return s.follow(e); } public static @bind.as("::") Seq tag(String tagname, Seq s) { return s.tag(tagname); } public static @bind.as("/") Seq slash(Seq s, El e) { return s.separate(e); } - public static @bind.as("ps") Seq seq(El[] elements) { return new Seq(elements); } - // public static @bind.as("PreSequence") Seq seq2(El[] elements) { return new Seq(elements); } + public static Seq seq(El[] elements) { return new Seq(elements); } + public static @bind.as("Elements") Seq seq2(El[] elements) { return new Seq(elements); } public static @bind.as Seq psx(Seq s) { return s; } public static @bind.as(":") El colon(String s, El e) { return new Label(s, e); } public static @bind.as(")") void close(String foo) { throw new Error("not supported"); } @@ -270,7 +270,7 @@ public class MetaGrammarBindings { public static @bind.as("Word") String word(String s) { return s; } public static @bind.as("Quoted") String quoted(String s) { return s; } public static @bind.as("escaped") String c(char c) { return c+""; } - public static @bind.as("\"\"") String emptystring() { return ""; } + public static @bind.as("EmptyString") String emptystring() { return ""; } public static @bind.as("\n") String retur() { return "\n"; } public static @bind.as("\r") String lf() { return "\r"; }