public static final char left = (char)9998;
public static final char right = (char)9999;
- public static final Atom leftBrace = new CharRange(left,left) { public String toString() { return "{"; } };
- public static final Atom rightBrace = new CharRange(right,right) { public String toString() { return "}"; } };
+ public static final Atom leftBrace = new CharRange(left,left) { public String toString() { return "[{]"; } };
+ public static final Atom rightBrace = new CharRange(right,right) { public String toString() { return "[}]"; } };
+ public static final Atom braces = new CharRange(left,right) { public String toString() { return "[{}]"; } };
public static Atom set(Range.Set r) { return new CharRange(new CharTopology(r)); }
}
public Object repeatTag() {
return new Reducer() {
- public String toString() { return "[**]"; }
+ public String toString() { return ""; }
public Object reduce(Tree t) {
Object[] ret = new Object[t.numChildren()];
for(int i=0; i<t.numChildren(); i++) {
public MetaClause element;
public MetaInvert(Tree<String> t, Conjunct c) { this.element = makeMetaClause(t, c); }
public String toString() { return "~"+element; }
- public Element build(BuildContext bc) { return infer((Topology<Character>)Atom.toAtom(element.build(bc)).complement()); }
+ public Element build(BuildContext bc) {
+ return infer((Topology<Character>)Atom.toAtom(element.build(bc)).complement().minus(CharRange.braces));
+ }
}
}
Doc = head:{Header} body:Body /ws
Header = "header" attrs:{ KeyVal */ ws } /ws
Body = {Section}*/ws
-Section = SectionHeader Paragraph* /ws
+Section = SectionHeader Paragraphs /ws
SectionHeader = "==" SectionHeaderBody "=="
SectionHeaderBody = "=" SectionHeaderBody "="
> !ws alphanum++ !ws
KeyVal = key:word "=" val:text /ws
wp = w++
num = [0-9]++
-Paragraph = Blockquote:: { "\"\" " text }
- > HR:: { "---" "-"* }
- > P:: { text }
+Paragraphs = "[]":: { Blockquote:: "\"\" " text } Paragraphs
+ > "[]":: { HR:: "---" "-"* } Paragraphs
+ > "[]":: { P:: text } Paragraphs
+ > ()
onums = nums !(". "|") ")
any = ~[]*
> "[]":: "\"" text "\"" Itemx
// > "[]":: symbol Itemx
> "[]":: (Symbol:: sym++) Itemx
- > "[]":: Paragraph Itemx
+// > "[]":: Paragraph Itemx
blockquote = Blockquote:: "\"\"" text "\"\""
| Blockquote:: "\"\"" block