public static Tree help0(String grammarFile, String targetFile) throws Throwable {
try {
Tree<String> res = new CharParser(MetaGrammar.newInstance()).parse(new FileInputStream(grammarFile)).expand1();
- Union meta = Grammar.create(res, "s",
+ Union meta = Grammar.create(res, "s" /*,
new Grammar.Bindings() {
-
public Sequence createSequence(Production p) {
Element[] els = p.elements;
if (p.tag != null)
if (idx==-1) idx = i;
else return Sequence.create(p.nonTerminal, p.elements, p.drops, false);
if (idx != -1) return Sequence.create(els, idx);
- else return Sequence.create(els, null);
+ else return Sequence.create(els, "");
}
- });
+ }*/);
System.out.println();
System.out.println();
CharInput input = new CharInput(new FileInputStream(targetFile), "", true);
public static Tree help(String grammarFile, String targetFile) throws Throwable {
try {
Tree<String> res = new CharParser(MetaGrammar.newInstance()).parse(new FileInputStream(grammarFile)).expand1();
- Union meta = Grammar.create(res, "s",
+ Union meta = Grammar.create(res, "s" /*,
new Grammar.Bindings() {
-
public Sequence createSequence(Production p) {
Element[] els = p.elements;
if (p.tag != null && !"".equals(p.tag))
if (idx==-1) idx = i;
else return Sequence.create(p.nonTerminal, p.elements, p.drops, false);
if (idx != -1) return Sequence.create(els, idx);
- else return Sequence.create(els, null);
+ else return Sequence.create(els, "");
}
- });
+ }*/);
System.out.println();
System.out.println();
//CharInput input = new CharInput(new FileInputStream(targetFile), "", true);