projects
/
sbp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
checkpoint
[sbp.git]
/
src
/
edu
/
berkeley
/
sbp
/
tib
/
TibDoc.java
diff --git
a/src/edu/berkeley/sbp/tib/TibDoc.java
b/src/edu/berkeley/sbp/tib/TibDoc.java
index
5901fcc
..
dae47a6
100644
(file)
--- a/
src/edu/berkeley/sbp/tib/TibDoc.java
+++ b/
src/edu/berkeley/sbp/tib/TibDoc.java
@@
-518,6
+518,7
@@
toContex ll = prefix ++ (concatMap tl ll) ++ suffix
public static @bind.as("tm") class Tm extends Glyph { public void toHTML(HTML h) { h.appendLiterally("&;"); } }
public static @bind.as("euro") class Euro extends Glyph { public void toHTML(HTML h) { h.appendLiterally("€"); } }
public static @bind.as("tm") class Tm extends Glyph { public void toHTML(HTML h) { h.appendLiterally("&;"); } }
public static @bind.as("euro") class Euro extends Glyph { public void toHTML(HTML h) { h.appendLiterally("€"); } }
+ public static @bind.as("#") Text comment() { return new Chars(""); }
public static class Entity extends Text implements ToHTML {
public int code;
public String name;
public static class Entity extends Text implements ToHTML {
public int code;
public String name;
@@
-684,7
+685,9
@@
toContex ll = prefix ++ (concatMap tl ll) ++ suffix
Tree<String> res = new CharParser(MetaGrammar.make()).parse(new FileInputStream(s[0])).expand1();
Tree<String> res = new CharParser(MetaGrammar.make()).parse(new FileInputStream(s[0])).expand1();
- Union tibgram = MetaGrammar.make(res, "s", new AnnotationGrammarBindingResolver(TD.class));
+ AnnotationGrammarBindingResolver resolver = new AnnotationGrammarBindingResolver(TD.class);
+ resolver.add(MetaGrammarBindings.class, "meta");
+ Union tibgram = MetaGrammar.make(res, "s", resolver);
System.err.println("parsing " + s[1]);
Tree t = new CharParser(tibgram).parse(new Tib(new FileInputStream(s[1]))).expand1();
System.err.println("parsing " + s[1]);
Tree t = new CharParser(tibgram).parse(new Tib(new FileInputStream(s[1]))).expand1();