public String toString() { return "~"+a; }
}
+ public static class Hack<T extends Token> extends Atom<T> {
+ private final Atom<T> a;
+ static final Topology leftright =
+ edu.berkeley.sbp.misc.CharToken.rightBrace.union(edu.berkeley.sbp.misc.CharToken.leftBrace);
+ public Hack(Atom<T> a) { this.a = a; }
+ public Topology<T> top() { return ((Topology<T>)a.top()).minus(leftright); }
+ public String toString() { return "~"+a; }
+ }
+
}
else if ("psylr".equals(head)) throw new Error("not supported");
else if ("/".equals(head)) return ((PreSequence)walk(tree, 0)).sparse((Element)walk(tree, 1));
else if ("~".equals(head))
- return new Atom.Invert(new Atom.Infer((Element)walk(tree, 0)));
+ return new Atom.Hack(new Atom.Invert(new Atom.Infer((Element)walk(tree, 0))));
else if ("ps".equals(head)) return new PreSequence((Element[])walk(tree, 0));
else if ("ps".equals(head)) return new PreSequence((Element[])walk(tree, 0));
else if ("qprod".equals(head)) {
date = published \today, yep!
== Introduction ==
+
this is the body adam@megacz.com text
You can visit {my website}->adam@megacz.com with a !hyperlink to it!
+
The following demonstrates verbatim stuff [Knu68], as
well as a footnote ((like )) because are
coool in an O(n^^3) way.
- "" this is a test of
- the blockquote mechanism
+ "" this is a test of \sc{paragraph of fun}
+ the blockquote mechanism they,,{yer mom}
Furthermore, we can try things like
* this
* this
- 1 and
- 2 this
+
> { "---" "-"* } => "hr"
> { text } => "p"
-text ::= item => "t"
-itemx ::= ws item => "w" | ()
-item ::= blockquote => "b"
- > pre itemx => "a"
- > structured itemx => "1"
- > structuredx itemx => "2"
- > styled itemx => "3"
- > qtext itemx => "4"
- > alphanum++ itemx => "5"
- > symbol itemx => "6"
+text ::= item
+itemx ::= ws item | ()
+item ::= blockquote
+ > pre itemx => []
+ > structured itemx => []
+ > structuredx itemx => []
+ > styled itemx => []
+ > qtext itemx => []
+ > alphanum++ itemx => []
+ > symbol itemx => []
// > sym++ itemx => []
- > Paragraph itemx => "7"
+ > Paragraph itemx => []
symbol ::= sym++