1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00
This commit is contained in:
gnosygnu
2015-09-13 21:54:44 -04:00
parent 2145f6382c
commit 5fe27b5b3b
649 changed files with 4726 additions and 3432 deletions

View File

@@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*;
import gplx.xowa.html.*;
import gplx.xowa.parsers.logs.*;
import gplx.xowa.parsers.*; import gplx.xowa.parsers.logs.*; import gplx.xowa.parsers.xndes.*;
public class Math_nde implements Xox_xnde, Xop_xnde_atr_parser {
public Xop_xnde_tkn Xnde() {throw Err_.new_unimplemented();}
public void Xatr_parse(Xowe_wiki wiki, byte[] src, Xop_xatr_itm xatr, Object xatr_obj) {}

View File

@@ -17,6 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*;
import gplx.xowa.html.*;
import gplx.xowa.parsers.*; import gplx.xowa.parsers.xndes.*;
public class Xof_math_html_wtr {
private Xof_math_itm tmp_math_itm = new Xof_math_itm();
private Bry_fmtr math_fmtr_latex = Bry_fmtr.new_("<img id='xowa_math_img_~{math_idx}' src='' width='' height=''/><span id='xowa_math_txt_~{math_idx}'>~{math_text}</span>", "math_idx", "math_text");

View File

@@ -1,124 +0,0 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*;
import gplx.core.primitives.*;
import gplx.core.btries.*;
class Math_func_itm {
private final Ordered_hash props = Ordered_hash_.new_(); private final Int_obj_ref props_key = Int_obj_ref.neg1_();
public Math_func_itm(byte[] key) {this.key = key;}
public byte[] Key() {return key;} private final byte[] key;
public byte[] Tex_bry() {return tex_bry;} public void Tex_bry_(byte[] v) {tex_bry = v;} private byte[] tex_bry;
public byte[] Html_bry() {return html_bry;} public void Html_bry_(byte[] v) {html_bry = v;} private byte[] html_bry;
public int Props__len() {return props.Count();}
public boolean Props__has(int v) {return props.Has(props_key.Val_(v));}
public void Props__add(int v) {
Int_obj_ref itm = Int_obj_ref.new_(v);
props.Add(itm, itm);
}
public int Get_at(int i) {
Int_obj_ref itm = (Int_obj_ref)props.Get_at(i);
return itm == null ? Int_.Min_value : itm.Val();
}
}
class Math_prop_itm {
public static final int
Int__LITERAL = 0
, Int__HTMLABLE = 1
, Int__HTMLABLE_BIG = 2
, Int__HTMLABLEC = 3
, Int__HTMLABLEM = 4
, Int__BIG = 5
, Int__FONT_UF = 6
, Int__FONT_UFH = 7
, Int__tex_use_ams = 8
, Int__tex_use_euro = 9
, Int__tex_use_teubner = 10
, Int__TEX_ONLY = 11
, Int__DELIMITER = 12
, Int__FUN_AR1 = 13
, Int__FUN_AR2 = 14
, Int__FUN_AR2h = 15
, Int__FUN_AR1hf = 16
, Int__FUN_AR1hl = 17
, Int__FUN_AR2nb = 18
, Int__FUN_INFIX = 19
, Int__FUN_INFIXh = 20
, Int__DECL = 21
, Int__DECLh = 22
, Int__FONTFORCE_IT = 23
, Int__FONTFORCE_RM = 24
, Int__sym_paren_bgn = 25
, Int__sym_paren_end = 26
, Int__sym_semic = 27
, Int__sym_quote = 28
;
public static final byte[]
Bry__LITERAL = Bry_.new_a7("LITERAL")
, Bry__HTMLABLE = Bry_.new_a7("HTMLABLE")
, Bry__HTMLABLE_BIG = Bry_.new_a7("HTMLABLE_BIG")
, Bry__HTMLABLEC = Bry_.new_a7("HTMLABLEC")
, Bry__HTMLABLEM = Bry_.new_a7("HTMLABLEM")
, Bry__BIG = Bry_.new_a7("BIG")
, Bry__FONT_UF = Bry_.new_a7("FONT_UF")
, Bry__FONT_UFH = Bry_.new_a7("FONT_UFH")
, Bry__tex_use_ams = Bry_.new_a7("tex_use_ams")
, Bry__tex_use_euro = Bry_.new_a7("tex_use_euro")
, Bry__tex_use_teubner = Bry_.new_a7("tex_use_teubner")
, Bry__TEX_ONLY = Bry_.new_a7("TEX_ONLY")
, Bry__DELIMITER = Bry_.new_a7("DELIMITER")
, Bry__FUN_AR1 = Bry_.new_a7("FUN_AR1")
, Bry__FUN_AR2 = Bry_.new_a7("FUN_AR2")
, Bry__FUN_AR2h = Bry_.new_a7("FUN_AR2h")
, Bry__FUN_AR1hf = Bry_.new_a7("FUN_AR1hf")
, Bry__FUN_AR1hl = Bry_.new_a7("FUN_AR1hl")
, Bry__FUN_AR2nb = Bry_.new_a7("FUN_AR2nb")
, Bry__FUN_INFIX = Bry_.new_a7("FUN_INFIX")
, Bry__FUN_INFIXh = Bry_.new_a7("FUN_INFIXh")
, Bry__DECL = Bry_.new_a7("DECL")
, Bry__DECLh = Bry_.new_a7("DECLh")
, Bry__FONTFORCE_IT = Bry_.new_a7("FONTFORCE_IT")
, Bry__FONTFORCE_RM = Bry_.new_a7("FONTFORCE_RM")
;
public static final Btrie_slim_mgr Trie = Btrie_slim_mgr.cs()
.Add_bry_int(Bry__LITERAL, Int__LITERAL)
.Add_bry_int(Bry__HTMLABLE, Int__HTMLABLE)
.Add_bry_int(Bry__HTMLABLE_BIG, Int__HTMLABLE_BIG)
.Add_bry_int(Bry__HTMLABLEC, Int__HTMLABLEC)
.Add_bry_int(Bry__HTMLABLEM, Int__HTMLABLEM)
.Add_bry_int(Bry__BIG, Int__BIG)
.Add_bry_int(Bry__FONT_UF, Int__FONT_UF)
.Add_bry_int(Bry__FONT_UFH, Int__FONT_UFH)
.Add_bry_int(Bry__tex_use_ams, Int__tex_use_ams)
.Add_bry_int(Bry__tex_use_euro, Int__tex_use_euro)
.Add_bry_int(Bry__tex_use_teubner, Int__tex_use_teubner)
.Add_bry_int(Bry__TEX_ONLY, Int__TEX_ONLY)
.Add_bry_int(Bry__DELIMITER, Int__DELIMITER)
.Add_bry_int(Bry__FUN_AR1, Int__FUN_AR1)
.Add_bry_int(Bry__FUN_AR2, Int__FUN_AR2)
.Add_bry_int(Bry__FUN_AR2h, Int__FUN_AR2h)
.Add_bry_int(Bry__FUN_AR1hf, Int__FUN_AR1hf)
.Add_bry_int(Bry__FUN_AR1hl, Int__FUN_AR1hl)
.Add_bry_int(Bry__FUN_AR2nb, Int__FUN_AR2nb)
.Add_bry_int(Bry__FUN_INFIX, Int__FUN_INFIX)
.Add_bry_int(Bry__FUN_INFIXh, Int__FUN_INFIXh)
.Add_bry_int(Bry__DECL, Int__DECL)
.Add_bry_int(Bry__DECLh, Int__DECLh)
.Add_bry_int(Bry__FONTFORCE_IT, Int__FONTFORCE_IT)
.Add_bry_int(Bry__FONTFORCE_RM, Int__FONTFORCE_RM)
;
}

View File

@@ -1,35 +0,0 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*;
class Mwm_lxr__brack_bgn implements Mwm_lxr {
public int Tid() {return Mwm_lxr_.Tid__brack_bgn;}
public int Make_tkn(Mwm_ctx ctx, Mwm_tkn__root root, byte[] src, int src_len, int bgn_pos, int cur_pos) {
int uid = root.Regy__add(Mwm_tkn_.Tid__brack, bgn_pos, cur_pos, new Mwm_tkn__node());
ctx.Stack().Add(uid);
return cur_pos;
}
}
class Mwm_lxr__brack_end implements Mwm_lxr {
public int Tid() {return Mwm_lxr_.Tid__brack_end;}
public int Make_tkn(Mwm_ctx ctx, Mwm_tkn__root root, byte[] src, int src_len, int bgn_pos, int cur_pos) {
int bgn_uid = ctx.Stack().Pop_or(-1);
root.Regy__move_to_end(bgn_uid, bgn_uid);
root.Regy__update_end(bgn_uid, cur_pos);
return cur_pos;
}
}

View File

@@ -1,35 +0,0 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*;
class Mwm_lxr__curly_bgn implements Mwm_lxr {
public int Tid() {return Mwm_lxr_.Tid__curly_bgn;}
public int Make_tkn(Mwm_ctx ctx, Mwm_tkn__root root, byte[] src, int src_len, int bgn_pos, int cur_pos) {
int uid = root.Regy__add(Mwm_tkn_.Tid__curly, bgn_pos, cur_pos, new Mwm_tkn__node());
ctx.Stack().Add(uid);
return cur_pos;
}
}
class Mwm_lxr__curly_end implements Mwm_lxr {
public int Tid() {return Mwm_lxr_.Tid__curly_end;}
public int Make_tkn(Mwm_ctx ctx, Mwm_tkn__root root, byte[] src, int src_len, int bgn_pos, int cur_pos) {
int bgn_uid = ctx.Stack().Pop_or(-1);
root.Regy__move_to_end(bgn_uid, bgn_uid);
root.Regy__update_end(bgn_uid, cur_pos);
return cur_pos;
}
}

View File

@@ -1,64 +0,0 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*;
import gplx.core.btries.*;
class Mwm_lxr_trie_bldr {
public static Btrie_fast_mgr new_(Mwm_tkn_mkr tkn_mkr) {// REF.MW:/Math/textvccheck/lexer.mll
tkn_mkr.Reg_leaf(Mwm_tkn_.Tid__text, new Mwm_tkn__leaf_raw());
Btrie_fast_mgr rv = Btrie_fast_mgr.cs();
Add_lxr (rv, tkn_mkr, new Mwm_lxr__backslash() , "\\");
Add_lxr (rv, tkn_mkr, new Mwm_lxr__curly_bgn() , "{");
Add_lxr (rv, tkn_mkr, new Mwm_lxr__curly_end() , "}");
Add_lxr (rv, tkn_mkr, new Mwm_lxr__brack_bgn() , "[");
Add_lxr (rv, tkn_mkr, new Mwm_lxr__brack_end() , "]");
Add_lxr_leaf (rv, tkn_mkr, new Mwm_lxr__ws(), Mwm_tkn_.Tid__ws , " ", "\t", "\n", "\r");
Add_lxr_leaf (rv, tkn_mkr, Mwm_tkn_.Tid__lit_basic , ">", "<", "~");
Add_lxr_leaf (rv, tkn_mkr, Mwm_tkn_.Tid__lit_uf_lt , ",", ":", ";", "?", "!", "'");
Add_lxr_leaf (rv, tkn_mkr, Mwm_tkn_.Tid__lit_uf_op , "+", "-", "*", "=");
Add_lxr_leaf (rv, tkn_mkr, Mwm_tkn_.Tid__dlm_uf_lt , "(", ")", ".");
Add_lxr_leaf_repl (rv, tkn_mkr, Mwm_tkn_.Tid__lit_basic , "%", "\\%");
Add_lxr_leaf_repl (rv, tkn_mkr, Mwm_tkn_.Tid__lit_basic , "$", "\\$");
Add_lxr_leaf (rv, tkn_mkr, Mwm_tkn_.Tid__lit_basic , "\\,", "\\ ", "\\;", "\\!");
Add_lxr_leaf (rv, tkn_mkr, Mwm_tkn_.Tid__dlm_basic , "\\{", "\\}", "\\|");
Add_lxr_leaf (rv, tkn_mkr, Mwm_tkn_.Tid__lit_basic , "\\_", "\\#", "\\%", "\\$", "\\&");
Add_lxr_leaf (rv, tkn_mkr, Mwm_tkn_.Tid__next_cell , "%");
Add_lxr_leaf (rv, tkn_mkr, Mwm_tkn_.Tid__next_row , "\\\\");
Add_lxr_leaf (rv, tkn_mkr, Mwm_tkn_.Tid__lit_basic , "~", ">", "<");
Add_lxr_leaf (rv, tkn_mkr, Mwm_tkn_.Tid__sup , "^");
Add_lxr_leaf (rv, tkn_mkr, Mwm_tkn_.Tid__sub , "_");
return rv;
}
private static void Add_lxr(Btrie_fast_mgr trie, Mwm_tkn_mkr tkn_mkr, Mwm_lxr lxr, String... ary) {
for (String itm : ary)
trie.Add(itm, lxr);
}
private static void Add_lxr_leaf(Btrie_fast_mgr trie, Mwm_tkn_mkr tkn_mkr, int tid, String... ary) {
Add_lxr_leaf(trie, tkn_mkr, new Mwm_lxr__leaf(tid), tid, new Mwm_tkn__leaf_raw(), ary);
}
private static void Add_lxr_leaf(Btrie_fast_mgr trie, Mwm_tkn_mkr tkn_mkr, Mwm_lxr lxr, int tkn_tid, String... ary) {
Add_lxr_leaf(trie, tkn_mkr, lxr, tkn_tid, new Mwm_tkn__leaf_raw(), ary);
}
private static void Add_lxr_leaf_repl(Btrie_fast_mgr trie, Mwm_tkn_mkr tkn_mkr, int tid, String src, String trg) {
Add_lxr_leaf(trie, tkn_mkr, new Mwm_lxr__leaf(tid), tid, new Mwm_tkn__leaf_repl(tid, Bry_.new_u8(trg)), src);
}
private static void Add_lxr_leaf(Btrie_fast_mgr trie, Mwm_tkn_mkr tkn_mkr, Mwm_lxr lxr, int tkn_tid, Mwm_tkn proto, String... ary) {
tkn_mkr.Reg_leaf(tkn_tid, proto);
for (String itm : ary)
trie.Add(itm, lxr);
}
}

View File

@@ -1,115 +0,0 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*;
import org.junit.*;
public class Mwm_parser_tst {
private final Mwm_parser_fxt fxt = new Mwm_parser_fxt();
@Before public void init() {fxt.Clear();}
@Test public void Text() {
fxt.Test_parse("abc"
, fxt.text(0, 3)
);
}
@Test public void Ws() {
fxt.Test_parse(" "
, fxt.ws(0, 3)
);
}
@Test public void Mix() {
fxt.Test_parse("a b c"
, fxt.text(0, 1)
, fxt.ws (1, 2)
, fxt.text(2, 3)
, fxt.ws (3, 4)
, fxt.text(4, 5)
);
}
@Test public void Func() {
fxt.Test_parse("\\abc \\def"
, fxt.func(0, 4)
, fxt.ws (4, 5)
, fxt.func(5, 9)
);
}
@Test public void Curly() {
fxt.Test_parse("{a}"
, fxt.curly(0, 3
, fxt.text(1, 2)
)
);
}
@Test public void Brack() {
fxt.Test_parse("[a]"
, fxt.brack(0, 3
, fxt.text(1, 2)
)
);
}
}
class Mwm_parser_fxt {
private final Bry_bfr tmp_bfr = Bry_bfr.reset_(255);
private final Mwm_parser parser = new Mwm_parser();
private final Mwm_tkn__root expd_root, actl_root;
public Mwm_parser_fxt() {
this.expd_root = new Mwm_tkn__root();
this.actl_root = new Mwm_tkn__root();
}
public void Clear() {
expd_root.Init_as_root(parser.Tkn_mkr(), 0, 8);
actl_root.Init_as_root(parser.Tkn_mkr(), 0, 8);
}
public void Test_parse(String src_str, Mwm_tkn... expd_tkns) {
byte[] src_bry = Bry_.new_u8(src_str);
parser.Parse(actl_root, src_bry);
int len = actl_root.Subs__len();
for (int i = 0; i < len; ++i) {
Mwm_tkn sub = actl_root.Subs__get_at(i);
sub.To_bry(tmp_bfr, 0);
}
String actl = tmp_bfr.Xto_str_and_clear();
len = expd_tkns.length;
for (int i = 0; i < len; ++i) {
Mwm_tkn sub = expd_tkns[i];
sub.To_bry(tmp_bfr, 0);
}
String expd = tmp_bfr.Xto_str_and_clear();
Tfds.Eq_str_lines(expd, actl, src_str);
}
private Mwm_tkn leaf(int tid, int bgn, int end) {
int uid = expd_root.Regy__add(tid, bgn, end, null);
return new Mwm_tkn__leaf_raw().Init(expd_root, tid, uid, bgn, end);
}
private Mwm_tkn node(int tid, int bgn, int end, Mwm_tkn tkn) {
int uid = expd_root.Regy__add(tid, bgn, end, tkn);
return new Mwm_tkn__node().Init(expd_root, tid, uid, bgn, end);
}
public Mwm_tkn text (int bgn, int end) {return leaf(Mwm_tkn_.Tid__text , bgn, end);}
public Mwm_tkn ws (int bgn, int end) {return leaf(Mwm_tkn_.Tid__ws , bgn, end);}
public Mwm_tkn func (int bgn, int end) {return node(Mwm_tkn_.Tid__fnc , bgn, end, new Mwm_tkn__node());}
public Mwm_tkn brack(int bgn, int end, Mwm_tkn... subs) {return node_w_subs(Mwm_tkn_.Tid__brack, bgn, end, subs);}
public Mwm_tkn curly(int bgn, int end, Mwm_tkn... subs) {return node_w_subs(Mwm_tkn_.Tid__curly, bgn, end, subs);}
private Mwm_tkn node_w_subs(int tid, int bgn, int end, Mwm_tkn... subs) {
Mwm_tkn rv = node(tid, bgn, end, new Mwm_tkn__node());
int len = subs.length;
for (int i = 0; i < len; ++i) {
Mwm_tkn sub = subs[i];
expd_root.Regy__move(rv.Uid(), sub.Uid());
}
return rv;
}
}

View File

@@ -1,88 +0,0 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*;
class Mwm_root_reg {
private int[] ary = Int_.Ary_empty; private int ary_len, ary_max; private int itms_len;
private final Mwm_tkn__root root;
public int Len() {return itms_len;}
public Mwm_root_reg(Mwm_tkn__root root) {
this.root = root;
}
public void Init(int expd_itms) {
int expd_max = expd_itms * Idx__slots;
if (expd_max > ary_max) {
this.ary = new int[expd_max];
this.ary_max = expd_max;
}
else {
for (int i = 0; i < ary_len; ++i)
ary[i] = 0;
}
this.ary_len = 0;
this.itms_len = 0;
}
public Mwm_tkn Get_at(Mwm_tkn_mkr tkn_mkr, int uid) {
int idx = uid * Idx__slots;
int tid = ary[idx];
return Mwm_tkn_.Tid_is_node(tid) ? null: tkn_mkr.Make_leaf(root, tid, uid, ary[idx + Idx__bgn], ary[idx + Idx__end]);
}
public int Get_owner_id(int uid) {
int idx = uid * Idx__slots;
return ary[idx + Idx__oid];
}
public int Add(int tid, int oid, int bgn, int end) {
int new_ary_len = ary_len + Idx__slots;
if (new_ary_len >= ary_max) {
int new_max = ary_max == 0 ? Idx__slots : ary_max * 2;
int[] new_ary = new int[new_max];
for (int i = 0; i < ary_len; ++i)
new_ary[i] = ary[i];
this.ary = new_ary;
this.ary_max = new_max;
}
int idx = ary_len;
int uid = idx / Idx__slots;
ary[idx ] = tid;
ary[idx + Idx__oid] = oid;
ary[idx + Idx__bgn] = bgn;
ary[idx + Idx__end] = end;
this.ary_len = new_ary_len;
++itms_len;
return uid;
}
public boolean Update_end(int uid, int end) {
int idx = uid * Idx__slots;
ary[idx + Idx__end] = end;
return Mwm_tkn_.Tid_is_node(ary[idx]);
}
public int Update_owner_id(int cur_uid, int new_owner_uid) { // return old owner_id
int cur_idx = cur_uid * Idx__slots;
int cur_owner_uid_idx = cur_idx + Idx__oid;
int old_owner_uid = ary[cur_owner_uid_idx];
ary[cur_owner_uid_idx] = new_owner_uid;
return old_owner_uid;
}
public void Change_owner(Mwm_tkn cur_owner, Mwm_tkn new_owner) {
}
private static final int
Idx__oid = 1
, Idx__bgn = 2
, Idx__end = 3
, Idx__slots = 4
;
}

View File

@@ -1,135 +0,0 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*;
class Mwm_tkn_ {
public static final Mwm_tkn Owner__null = null;
public static final Mwm_tkn[] Ary_empty = new Mwm_tkn[0];
public static final int Uid__root = 0;
public static final int
Tid__root = 0
, Tid__text = 1
, Tid__ws = 2
, Tid__curly = 3
, Tid__brack = 4
, Tid__lit_basic = 5
, Tid__lit_uf_lt = 6
, Tid__lit_uf_op = 7
, Tid__dlm_basic = 8
, Tid__dlm_uf_lt = 9
, Tid__dlm_uf_op = 10
, Tid__sub = 11
, Tid__sup = 12
, Tid__next_row = 13
, Tid__next_cell = 14
, Tid__fnc = 15
, Tid__fnc_latex = 16
, Tid__fnc_mw = 17
, Tid__matrix_bgn = 18
, Tid__matrix_end = 19
, Tid__pmatrix_bgn = 20
, Tid__pmatrix_end = 21
, Tid__bmatrix_bgn = 22
, Tid__bmatrix_end = 23
, Tid__Bmatrix_bgn = 24
, Tid__Bmatrix_end = 25
, Tid__vmatrix_bgn = 26
, Tid__vmatrix_end = 27
, Tid__Vmatrix_bgn = 28
, Tid__Vmatrix_end = 29
, Tid__array_bgn = 30
, Tid__array_end = 31
, Tid__align_bgn = 32
, Tid__align_end = 33
, Tid__alignat_bgn = 34
, Tid__alignat_end = 35
, Tid__smallmatrix_bgn = 36
, Tid__smallmatrix_end = 37
, Tid__cases_bgn = 38
, Tid__cases_end = 39
;
public static final int Tid_len = 40;
private static final byte[][] Bry__ary = Bry__ary__new();
private static byte[][] Bry__ary__new() {
byte[][] rv = new byte[Tid_len][];
Reg_itm(rv, Tid__root , "root");
Reg_itm(rv, Tid__text , "text");
Reg_itm(rv, Tid__ws , "ws");
Reg_itm(rv, Tid__fnc , "func");
Reg_itm(rv, Tid__curly , "curly");
Reg_itm(rv, Tid__brack , "brack");
Reg_itm(rv, Tid__lit_basic , "literal_basic");
Reg_itm(rv, Tid__lit_uf_lt , "literal_uf_lt");
Reg_itm(rv, Tid__lit_uf_op , "literal_uf_op");
Reg_itm(rv, Tid__dlm_basic , "delimiter_basic");
Reg_itm(rv, Tid__dlm_uf_lt , "delimiter_uf_lt");
Reg_itm(rv, Tid__dlm_uf_op , "delimiter_uf_op");
Reg_itm(rv, Tid__sub , "sub");
Reg_itm(rv, Tid__sup , "sup");
Reg_itm(rv, Tid__next_row , "next_row");
Reg_itm(rv, Tid__next_cell , "next_cell");
Reg_itm(rv, Tid__fnc_latex , "func_latex");
Reg_itm(rv, Tid__fnc_mw , "func_mediawiki");
Reg_itm(rv, Tid__matrix_bgn , "matrix_bgn");
Reg_itm(rv, Tid__matrix_end , "matrix_end");
Reg_itm(rv, Tid__pmatrix_bgn , "pmatrix_bgn");
Reg_itm(rv, Tid__pmatrix_end , "pmatrix_end");
Reg_itm(rv, Tid__bmatrix_bgn , "bmatrix_bgn");
Reg_itm(rv, Tid__bmatrix_end , "bmatrix_end");
Reg_itm(rv, Tid__Bmatrix_bgn , "Bmatrix_bgn");
Reg_itm(rv, Tid__Bmatrix_end , "Bmatrix_bgn");
Reg_itm(rv, Tid__vmatrix_bgn , "vmatrix_bgn");
Reg_itm(rv, Tid__vmatrix_end , "vmatrix_end");
Reg_itm(rv, Tid__Vmatrix_bgn , "Vmatrix_bgn");
Reg_itm(rv, Tid__Vmatrix_end , "Vmatrix_end");
Reg_itm(rv, Tid__array_bgn , "array_bgn");
Reg_itm(rv, Tid__array_end , "array_end");
Reg_itm(rv, Tid__align_bgn , "align_bgn");
Reg_itm(rv, Tid__align_end , "align_end");
Reg_itm(rv, Tid__alignat_bgn , "alignat_bgn");
Reg_itm(rv, Tid__alignat_end , "alignat_end");
Reg_itm(rv, Tid__smallmatrix_bgn , "smallmatrix_bgn");
Reg_itm(rv, Tid__smallmatrix_end , "smallmatrix_end");
Reg_itm(rv, Tid__cases_bgn , "cases_bgn");
Reg_itm(rv, Tid__cases_end , "cases_end");
return rv;
}
private static void Reg_itm(byte[][] ary, int id, String name) {ary[id] = Bry_.new_a7(name);}
public static byte[] Tid_to_bry(int tid) {return Bry__ary[tid];}
public static boolean Tid_is_node(int tid) {
switch (tid) {
case Mwm_tkn_.Tid__root:
case Mwm_tkn_.Tid__fnc:
case Mwm_tkn_.Tid__curly:
case Mwm_tkn_.Tid__brack:
return true;
default:
return false;
}
}
public static void Tkn_to_bry__bgn(Bry_bfr bfr, int indent, Mwm_tkn tkn) {
if (indent > 0) bfr.Add_byte_repeat(Byte_ascii.Space, indent);
bfr.Add(Mwm_tkn_.Tid_to_bry(tkn.Tid()));
bfr.Add_byte(Byte_ascii.Paren_bgn);
bfr.Add_int_variable(tkn.Src_bgn());
bfr.Add_byte_comma().Add_int_variable(tkn.Src_end());
}
public static void Tkn_to_bry__end_head(Bry_bfr bfr) {
bfr.Add_byte(Byte_ascii.Paren_end);
bfr.Add_byte_nl();
}
}

View File

@@ -1,41 +0,0 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*;
import gplx.core.btries.*;
class Mwm_tkn__func {
public Mwm_tkn__func(byte[] key) {
this.key = key;
}
public byte[] Key() {return key;} private final byte[] key;
public byte[] Manual() {return manual;} public Mwm_tkn__func Manual_(String v) {manual = Bry_.new_a7(v); return this;} private byte[] manual;
public boolean Literal() {return literal;} public Mwm_tkn__func Literal_() {this.literal = true; return this;} private boolean literal;
public boolean Big() {return big;} public Mwm_tkn__func Big_() {this.big = true; return this;} private boolean big;
public boolean Delimiter() {return delimiter;} public Mwm_tkn__func Delimiter_() {this.delimiter = true; return this;} private boolean delimiter;
public boolean Tex_only() {return tex_only;} public Mwm_tkn__func Tex_only_() {this.tex_only = true; return this;} private boolean tex_only;
public boolean Fun_ar1() {return fun_ar1;} public Mwm_tkn__func Fun_ar1_() {this.fun_ar1 = true; return this;} private boolean fun_ar1;
public boolean Fun_ar2() {return fun_ar2;} public Mwm_tkn__func Fun_ar2_() {this.fun_ar2 = true; return this;} private boolean fun_ar2;
public boolean Fun_ar2nb() {return fun_ar2nb;} public Mwm_tkn__func Fun_ar2nb_() {this.fun_ar2nb = true; return this;} private boolean fun_ar2nb;
public boolean Fun_infix() {return fun_infix;} public Mwm_tkn__func Fun_infix_() {this.fun_infix = true; return this;} private boolean fun_infix;
public boolean Declh() {return declh;} public Mwm_tkn__func Declh_() {this.declh = true; return this;} private boolean declh;
public boolean Fontforce_rm() {return fontforce_rm;} public Mwm_tkn__func Fontforce_rm_() {this.fontforce_rm = true; return this;} private boolean fontforce_rm;
public boolean Left() {return left;} public Mwm_tkn__func Left_() {this.left = true; return this;} private boolean left;
public boolean Right() {return right;} public Mwm_tkn__func Right_() {this.right = true; return this;} private boolean right;
public boolean Fail() {return fail;} public Mwm_tkn__func Fail_() {this.fail = true; return this;} private boolean fail;
public boolean Type_latex() {return type_latex;} public Mwm_tkn__func Type_latex_() {this.type_latex = true; return this;} private boolean type_latex;
public boolean Type_mw() {return type_mw;} public Mwm_tkn__func Type_mw_() {this.type_mw = true; return this;} private boolean type_mw;
}

View File

@@ -1,52 +0,0 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*;
import gplx.core.btries.*;
class Mwm_tkn__func_ {
public static final int
Tid__space = 0
, Tid__lit_uf_lt = 1
, Tid__dlm_uf_lt = 2
, Tid__lit_uf_op = 3
, Tid__dlm_uf_op = 4
, Tid__fnc_latex = 5
, Tid__fnc_mw = 6
;
public Btrie_slim_mgr Make_trie() {
Btrie_slim_mgr rv = Btrie_slim_mgr.ci_a7(); // NOTE: texvc tkns are ascii
Make_itm(rv, Tid__space , " ", "\t", "\n", "\r");
Make_itm(rv, Tid__lit_uf_lt , ",", ":", ";", "?", "!", "'");
Make_itm(rv, Tid__dlm_uf_lt , "(", ")", ".");
Make_itm(rv, Tid__lit_uf_op , "+", "-", "*", "=");
Make_itm(rv, Tid__dlm_uf_op , "/", "|");
Make_itm(rv, Tid__fnc_latex , "arccos", "arcsin", "arctan", "arg", "cos", "cosh", "cot", "coth", "csc"
, "deg", "det", "dim", "exp", "gcd", "hom", "inf", "ker", "lg", "lim", "liminf", "limsup", "ln", "log"
, "max", "min", "Pr", "sec", "sin", "sinh", "sup", "tan", "tanh");
Make_itm(rv, Tid__fnc_mw , "arccot", "arcsec", "arccsc", "sgn", "sen");
return rv;
}
private void Make_itm(Btrie_slim_mgr trie, int tid, String... ary) {
for (String itm : ary)
trie.Add_bry_int(Bry_.new_a7(itm), tid);
}
//let alpha = ['a'-'z' 'A'-'Z']
//let literal_id = ['a'-'z' 'A'-'Z']
//let literal_mn = ['0'-'9']
//let boxchars = ['0'-'9' 'a'-'z' 'A'-'Z' '+' '-' '*' ',' '=' '(' ')' ':' '/' ';' '?' '.' '!' '\'' '`' ' ' '\128'-'\255']
//let aboxchars = ['0'-'9' 'a'-'z' 'A'-'Z' '+' '-' '*' ',' '=' '(' ')' ':' '/' ';' '?' '.' '!' '\'' '`' ' ']
}

View File

@@ -1,705 +0,0 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*;
import gplx.core.btries.*;
class Mwm_tkn__func_trie {
public Btrie_slim_mgr Make() {
Btrie_slim_mgr trie = Btrie_slim_mgr.ci_a7();
Add(trie, Make("\\AA").Literal_().Tex_only_());
Add(trie, Make("\\aleph").Literal_().Tex_only_());
Add(trie, Make("\\alpha").Literal_().Tex_only_());
Add(trie, Make("\\amalg").Literal_().Tex_only_());
Add(trie, Make("\\And").Literal_().Tex_only_());
Add(trie, Make("\\angle").Literal_().Tex_only_());
Add(trie, Make("\\approx").Literal_().Tex_only_());
Add(trie, Make("\\approxeq").Literal_().Tex_only_());
Add(trie, Make("\\ast").Literal_().Tex_only_());
Add(trie, Make("\\asymp").Literal_().Tex_only_());
Add(trie, Make("\\backepsilon").Literal_().Tex_only_());
Add(trie, Make("\\backprime").Literal_().Tex_only_());
Add(trie, Make("\\backsim").Literal_().Tex_only_());
Add(trie, Make("\\backsimeq").Literal_().Tex_only_());
Add(trie, Make("\\barwedge").Literal_().Tex_only_());
Add(trie, Make("\\Bbbk").Literal_().Tex_only_());
Add(trie, Make("\\because").Literal_().Tex_only_());
Add(trie, Make("\\beta").Literal_().Tex_only_());
Add(trie, Make("\\beth").Literal_().Tex_only_());
Add(trie, Make("\\between").Literal_().Tex_only_());
Add(trie, Make("\\bigcap").Literal_().Tex_only_());
Add(trie, Make("\\bigcirc").Literal_().Tex_only_());
Add(trie, Make("\\bigcup").Literal_().Tex_only_());
Add(trie, Make("\\bigodot").Literal_().Tex_only_());
Add(trie, Make("\\bigoplus").Literal_().Tex_only_());
Add(trie, Make("\\bigotimes").Literal_().Tex_only_());
Add(trie, Make("\\bigsqcup").Literal_().Tex_only_());
Add(trie, Make("\\bigstar").Literal_().Tex_only_());
Add(trie, Make("\\bigtriangledown").Literal_().Tex_only_());
Add(trie, Make("\\bigtriangleup").Literal_().Tex_only_());
Add(trie, Make("\\biguplus").Literal_().Tex_only_());
Add(trie, Make("\\bigvee").Literal_().Tex_only_());
Add(trie, Make("\\bigwedge").Literal_().Tex_only_());
Add(trie, Make("\\blacklozenge").Literal_().Tex_only_());
Add(trie, Make("\\blacksquare").Literal_().Tex_only_());
Add(trie, Make("\\blacktriangle").Literal_().Tex_only_());
Add(trie, Make("\\blacktriangledown").Literal_().Tex_only_());
Add(trie, Make("\\blacktriangleleft").Literal_().Tex_only_());
Add(trie, Make("\\blacktriangleright").Literal_().Tex_only_());
Add(trie, Make("\\bot").Literal_().Tex_only_());
Add(trie, Make("\\bowtie").Literal_().Tex_only_());
Add(trie, Make("\\Box").Literal_().Tex_only_());
Add(trie, Make("\\boxdot").Literal_().Tex_only_());
Add(trie, Make("\\boxminus").Literal_().Tex_only_());
Add(trie, Make("\\boxplus").Literal_().Tex_only_());
Add(trie, Make("\\boxtimes").Literal_().Tex_only_());
Add(trie, Make("\\bullet").Literal_().Tex_only_());
Add(trie, Make("\\bumpeq").Literal_().Tex_only_());
Add(trie, Make("\\Bumpeq").Literal_().Tex_only_());
Add(trie, Make("\\cap").Literal_().Tex_only_());
Add(trie, Make("\\Cap").Literal_().Tex_only_());
Add(trie, Make("\\cdot").Literal_().Tex_only_());
Add(trie, Make("\\cdots").Literal_().Tex_only_());
Add(trie, Make("\\centerdot").Literal_().Tex_only_());
Add(trie, Make("\\checkmark").Literal_().Tex_only_());
Add(trie, Make("\\chi").Literal_().Tex_only_());
Add(trie, Make("\\circ").Literal_().Tex_only_());
Add(trie, Make("\\circeq").Literal_().Tex_only_());
Add(trie, Make("\\circlearrowleft").Literal_().Tex_only_());
Add(trie, Make("\\circlearrowright").Literal_().Tex_only_());
Add(trie, Make("\\circledast").Literal_().Tex_only_());
Add(trie, Make("\\circledcirc").Literal_().Tex_only_());
Add(trie, Make("\\circleddash").Literal_().Tex_only_());
Add(trie, Make("\\circledS").Literal_().Tex_only_());
Add(trie, Make("\\clubsuit").Literal_().Tex_only_());
Add(trie, Make("\\colon").Literal_().Tex_only_());
Add(trie, Make("\\color").Literal_().Tex_only_());
Add(trie, Make("\\complement").Literal_().Tex_only_());
Add(trie, Make("\\cong").Literal_().Tex_only_());
Add(trie, Make("\\coprod").Literal_().Tex_only_());
Add(trie, Make("\\cup").Literal_().Tex_only_());
Add(trie, Make("\\Cup").Literal_().Tex_only_());
Add(trie, Make("\\curlyeqprec").Literal_().Tex_only_());
Add(trie, Make("\\curlyeqsucc").Literal_().Tex_only_());
Add(trie, Make("\\curlyvee").Literal_().Tex_only_());
Add(trie, Make("\\curlywedge").Literal_().Tex_only_());
Add(trie, Make("\\curvearrowleft").Literal_().Tex_only_());
Add(trie, Make("\\curvearrowright").Literal_().Tex_only_());
Add(trie, Make("\\dagger").Literal_().Tex_only_());
Add(trie, Make("\\daleth").Literal_().Tex_only_());
Add(trie, Make("\\dashv").Literal_().Tex_only_());
Add(trie, Make("\\ddagger").Literal_().Tex_only_());
Add(trie, Make("\\ddots").Literal_().Tex_only_());
Add(trie, Make("\\definecolor").Literal_().Tex_only_());
Add(trie, Make("\\delta").Literal_().Tex_only_());
Add(trie, Make("\\Delta").Literal_().Tex_only_());
Add(trie, Make("\\diagdown").Literal_().Tex_only_());
Add(trie, Make("\\diagup").Literal_().Tex_only_());
Add(trie, Make("\\diamond").Literal_().Tex_only_());
Add(trie, Make("\\Diamond").Literal_().Tex_only_());
Add(trie, Make("\\diamondsuit").Literal_().Tex_only_());
Add(trie, Make("\\digamma").Literal_().Tex_only_());
Add(trie, Make("\\displaystyle").Literal_().Tex_only_());
Add(trie, Make("\\div").Literal_().Tex_only_());
Add(trie, Make("\\divideontimes").Literal_().Tex_only_());
Add(trie, Make("\\doteq").Literal_().Tex_only_());
Add(trie, Make("\\doteqdot").Literal_().Tex_only_());
Add(trie, Make("\\dotplus").Literal_().Tex_only_());
Add(trie, Make("\\dots").Literal_().Tex_only_());
Add(trie, Make("\\dotsb").Literal_().Tex_only_());
Add(trie, Make("\\dotsc").Literal_().Tex_only_());
Add(trie, Make("\\dotsi").Literal_().Tex_only_());
Add(trie, Make("\\dotsm").Literal_().Tex_only_());
Add(trie, Make("\\dotso").Literal_().Tex_only_());
Add(trie, Make("\\doublebarwedge").Literal_().Tex_only_());
Add(trie, Make("\\downdownarrows").Literal_().Tex_only_());
Add(trie, Make("\\downharpoonleft").Literal_().Tex_only_());
Add(trie, Make("\\downharpoonright").Literal_().Tex_only_());
Add(trie, Make("\\ell").Literal_().Tex_only_());
Add(trie, Make("\\emptyset").Literal_().Tex_only_());
Add(trie, Make("\\epsilon").Literal_().Tex_only_());
Add(trie, Make("\\eqcirc").Literal_().Tex_only_());
Add(trie, Make("\\eqsim").Literal_().Tex_only_());
Add(trie, Make("\\eqslantgtr").Literal_().Tex_only_());
Add(trie, Make("\\eqslantless").Literal_().Tex_only_());
Add(trie, Make("\\equiv").Literal_().Tex_only_());
Add(trie, Make("\\eta").Literal_().Tex_only_());
Add(trie, Make("\\eth").Literal_().Tex_only_());
Add(trie, Make("\\exists").Literal_().Tex_only_());
Add(trie, Make("\\fallingdotseq").Literal_().Tex_only_());
Add(trie, Make("\\Finv").Literal_().Tex_only_());
Add(trie, Make("\\flat").Literal_().Tex_only_());
Add(trie, Make("\\forall").Literal_().Tex_only_());
Add(trie, Make("\\frown").Literal_().Tex_only_());
Add(trie, Make("\\Game").Literal_().Tex_only_());
Add(trie, Make("\\gamma").Literal_().Tex_only_());
Add(trie, Make("\\Gamma").Literal_().Tex_only_());
Add(trie, Make("\\geq").Literal_().Tex_only_());
Add(trie, Make("\\geqq").Literal_().Tex_only_());
Add(trie, Make("\\geqslant").Literal_().Tex_only_());
Add(trie, Make("\\gets").Literal_().Tex_only_());
Add(trie, Make("\\gg").Literal_().Tex_only_());
Add(trie, Make("\\ggg").Literal_().Tex_only_());
Add(trie, Make("\\gimel").Literal_().Tex_only_());
Add(trie, Make("\\gnapprox").Literal_().Tex_only_());
Add(trie, Make("\\gneq").Literal_().Tex_only_());
Add(trie, Make("\\gneqq").Literal_().Tex_only_());
Add(trie, Make("\\gnsim").Literal_().Tex_only_());
Add(trie, Make("\\gtrapprox").Literal_().Tex_only_());
Add(trie, Make("\\gtrdot").Literal_().Tex_only_());
Add(trie, Make("\\gtreqless").Literal_().Tex_only_());
Add(trie, Make("\\gtreqqless").Literal_().Tex_only_());
Add(trie, Make("\\gtrless").Literal_().Tex_only_());
Add(trie, Make("\\gtrsim").Literal_().Tex_only_());
Add(trie, Make("\\gvertneqq").Literal_().Tex_only_());
Add(trie, Make("\\hbar").Literal_().Tex_only_());
Add(trie, Make("\\heartsuit").Literal_().Tex_only_());
Add(trie, Make("\\hline").Literal_().Tex_only_());
Add(trie, Make("\\hookleftarrow").Literal_().Tex_only_());
Add(trie, Make("\\hookrightarrow").Literal_().Tex_only_());
Add(trie, Make("\\hslash").Literal_().Tex_only_());
Add(trie, Make("\\iff").Literal_().Tex_only_());
Add(trie, Make("\\iiiint").Literal_().Tex_only_());
Add(trie, Make("\\iiint").Literal_().Tex_only_());
Add(trie, Make("\\iint").Literal_().Tex_only_());
Add(trie, Make("\\Im").Literal_().Tex_only_());
Add(trie, Make("\\imath").Literal_().Tex_only_());
Add(trie, Make("\\implies").Literal_().Tex_only_());
Add(trie, Make("\\in").Literal_().Tex_only_());
Add(trie, Make("\\infty").Literal_().Tex_only_());
Add(trie, Make("\\injlim").Literal_().Tex_only_());
Add(trie, Make("\\int").Literal_().Tex_only_());
Add(trie, Make("\\intercal").Literal_().Tex_only_());
Add(trie, Make("\\iota").Literal_().Tex_only_());
Add(trie, Make("\\jmath").Literal_().Tex_only_());
Add(trie, Make("\\kappa").Literal_().Tex_only_());
Add(trie, Make("\\lambda").Literal_().Tex_only_());
Add(trie, Make("\\Lambda").Literal_().Tex_only_());
Add(trie, Make("\\land").Literal_().Tex_only_());
Add(trie, Make("\\ldots").Literal_().Tex_only_());
Add(trie, Make("\\leftarrow").Literal_().Tex_only_());
Add(trie, Make("\\Leftarrow").Literal_().Tex_only_());
Add(trie, Make("\\leftarrowtail").Literal_().Tex_only_());
Add(trie, Make("\\leftharpoondown").Literal_().Tex_only_());
Add(trie, Make("\\leftharpoonup").Literal_().Tex_only_());
Add(trie, Make("\\leftleftarrows").Literal_().Tex_only_());
Add(trie, Make("\\leftrightarrow").Literal_().Tex_only_());
Add(trie, Make("\\Leftrightarrow").Literal_().Tex_only_());
Add(trie, Make("\\leftrightarrows").Literal_().Tex_only_());
Add(trie, Make("\\leftrightharpoons").Literal_().Tex_only_());
Add(trie, Make("\\leftrightsquigarrow").Literal_().Tex_only_());
Add(trie, Make("\\leftthreetimes").Literal_().Tex_only_());
Add(trie, Make("\\leq").Literal_().Tex_only_());
Add(trie, Make("\\leqq").Literal_().Tex_only_());
Add(trie, Make("\\leqslant").Literal_().Tex_only_());
Add(trie, Make("\\lessapprox").Literal_().Tex_only_());
Add(trie, Make("\\lessdot").Literal_().Tex_only_());
Add(trie, Make("\\lesseqgtr").Literal_().Tex_only_());
Add(trie, Make("\\lesseqqgtr").Literal_().Tex_only_());
Add(trie, Make("\\lessgtr").Literal_().Tex_only_());
Add(trie, Make("\\lesssim").Literal_().Tex_only_());
Add(trie, Make("\\limits").Literal_().Tex_only_());
Add(trie, Make("\\ll").Literal_().Tex_only_());
Add(trie, Make("\\Lleftarrow").Literal_().Tex_only_());
Add(trie, Make("\\lll").Literal_().Tex_only_());
Add(trie, Make("\\lnapprox").Literal_().Tex_only_());
Add(trie, Make("\\lneq").Literal_().Tex_only_());
Add(trie, Make("\\lneqq").Literal_().Tex_only_());
Add(trie, Make("\\lnot").Literal_().Tex_only_());
Add(trie, Make("\\lnsim").Literal_().Tex_only_());
Add(trie, Make("\\longleftarrow").Literal_().Tex_only_());
Add(trie, Make("\\Longleftarrow").Literal_().Tex_only_());
Add(trie, Make("\\longleftrightarrow").Literal_().Tex_only_());
Add(trie, Make("\\Longleftrightarrow").Literal_().Tex_only_());
Add(trie, Make("\\longmapsto").Literal_().Tex_only_());
Add(trie, Make("\\longrightarrow").Literal_().Tex_only_());
Add(trie, Make("\\Longrightarrow").Literal_().Tex_only_());
Add(trie, Make("\\looparrowleft").Literal_().Tex_only_());
Add(trie, Make("\\looparrowright").Literal_().Tex_only_());
Add(trie, Make("\\lor").Literal_().Tex_only_());
Add(trie, Make("\\lozenge").Literal_().Tex_only_());
Add(trie, Make("\\Lsh").Literal_().Tex_only_());
Add(trie, Make("\\ltimes").Literal_().Tex_only_());
Add(trie, Make("\\lVert").Literal_().Tex_only_());
Add(trie, Make("\\lvertneqq").Literal_().Tex_only_());
Add(trie, Make("\\mapsto").Literal_().Tex_only_());
Add(trie, Make("\\measuredangle").Literal_().Tex_only_());
Add(trie, Make("\\mho").Literal_().Tex_only_());
Add(trie, Make("\\mid").Literal_().Tex_only_());
Add(trie, Make("\\mod").Literal_().Tex_only_());
Add(trie, Make("\\models").Literal_().Tex_only_());
Add(trie, Make("\\mp").Literal_().Tex_only_());
Add(trie, Make("\\mu").Literal_().Tex_only_());
Add(trie, Make("\\multimap").Literal_().Tex_only_());
Add(trie, Make("\\nabla").Literal_().Tex_only_());
Add(trie, Make("\\natural").Literal_().Tex_only_());
Add(trie, Make("\\ncong").Literal_().Tex_only_());
Add(trie, Make("\\nearrow").Literal_().Tex_only_());
Add(trie, Make("\\neg").Literal_().Tex_only_());
Add(trie, Make("\\neq").Literal_().Tex_only_());
Add(trie, Make("\\nexists").Literal_().Tex_only_());
Add(trie, Make("\\ngeq").Literal_().Tex_only_());
Add(trie, Make("\\ngeqq").Literal_().Tex_only_());
Add(trie, Make("\\ngeqslant").Literal_().Tex_only_());
Add(trie, Make("\\ngtr").Literal_().Tex_only_());
Add(trie, Make("\\ni").Literal_().Tex_only_());
Add(trie, Make("\\nleftarrow").Literal_().Tex_only_());
Add(trie, Make("\\nLeftarrow").Literal_().Tex_only_());
Add(trie, Make("\\nleftrightarrow").Literal_().Tex_only_());
Add(trie, Make("\\nLeftrightarrow").Literal_().Tex_only_());
Add(trie, Make("\\nleq").Literal_().Tex_only_());
Add(trie, Make("\\nleqq").Literal_().Tex_only_());
Add(trie, Make("\\nleqslant").Literal_().Tex_only_());
Add(trie, Make("\\nless").Literal_().Tex_only_());
Add(trie, Make("\\nmid").Literal_().Tex_only_());
Add(trie, Make("\\nolimits").Literal_().Tex_only_());
Add(trie, Make("\\not").Literal_().Tex_only_());
Add(trie, Make("\\notin").Literal_().Tex_only_());
Add(trie, Make("\\nparallel").Literal_().Tex_only_());
Add(trie, Make("\\nprec").Literal_().Tex_only_());
Add(trie, Make("\\npreceq").Literal_().Tex_only_());
Add(trie, Make("\\nrightarrow").Literal_().Tex_only_());
Add(trie, Make("\\nRightarrow").Literal_().Tex_only_());
Add(trie, Make("\\nshortmid").Literal_().Tex_only_());
Add(trie, Make("\\nshortparallel").Literal_().Tex_only_());
Add(trie, Make("\\nsim").Literal_().Tex_only_());
Add(trie, Make("\\nsubseteq").Literal_().Tex_only_());
Add(trie, Make("\\nsubseteqq").Literal_().Tex_only_());
Add(trie, Make("\\nsucc").Literal_().Tex_only_());
Add(trie, Make("\\nsucceq").Literal_().Tex_only_());
Add(trie, Make("\\nsupseteq").Literal_().Tex_only_());
Add(trie, Make("\\nsupseteqq").Literal_().Tex_only_());
Add(trie, Make("\\ntriangleleft").Literal_().Tex_only_());
Add(trie, Make("\\ntrianglelefteq").Literal_().Tex_only_());
Add(trie, Make("\\ntriangleright").Literal_().Tex_only_());
Add(trie, Make("\\ntrianglerighteq").Literal_().Tex_only_());
Add(trie, Make("\\nu").Literal_().Tex_only_());
Add(trie, Make("\\nvdash").Literal_().Tex_only_());
Add(trie, Make("\\nVdash").Literal_().Tex_only_());
Add(trie, Make("\\nvDash").Literal_().Tex_only_());
Add(trie, Make("\\nVDash").Literal_().Tex_only_());
Add(trie, Make("\\nwarrow").Literal_().Tex_only_());
Add(trie, Make("\\odot").Literal_().Tex_only_());
Add(trie, Make("\\oint").Literal_().Tex_only_());
Add(trie, Make("\\omega").Literal_().Tex_only_());
Add(trie, Make("\\Omega").Literal_().Tex_only_());
Add(trie, Make("\\ominus").Literal_().Tex_only_());
Add(trie, Make("\\oplus").Literal_().Tex_only_());
Add(trie, Make("\\oslash").Literal_().Tex_only_());
Add(trie, Make("\\otimes").Literal_().Tex_only_());
Add(trie, Make("\\overbrace").Literal_().Tex_only_());
Add(trie, Make("\\overleftarrow").Literal_().Tex_only_());
Add(trie, Make("\\overleftrightarrow").Literal_().Tex_only_());
Add(trie, Make("\\overline").Literal_().Tex_only_());
Add(trie, Make("\\overrightarrow").Literal_().Tex_only_());
Add(trie, Make("\\P").Literal_().Tex_only_());
Add(trie, Make("\\pagecolor").Literal_().Tex_only_());
Add(trie, Make("\\parallel").Literal_().Tex_only_());
Add(trie, Make("\\partial").Literal_().Tex_only_());
Add(trie, Make("\\perp").Literal_().Tex_only_());
Add(trie, Make("\\phi").Literal_().Tex_only_());
Add(trie, Make("\\Phi").Literal_().Tex_only_());
Add(trie, Make("\\pi").Literal_().Tex_only_());
Add(trie, Make("\\Pi").Literal_().Tex_only_());
Add(trie, Make("\\pitchfork").Literal_().Tex_only_());
Add(trie, Make("\\pm").Literal_().Tex_only_());
Add(trie, Make("\\prec").Literal_().Tex_only_());
Add(trie, Make("\\precapprox").Literal_().Tex_only_());
Add(trie, Make("\\preccurlyeq").Literal_().Tex_only_());
Add(trie, Make("\\preceq").Literal_().Tex_only_());
Add(trie, Make("\\precnapprox").Literal_().Tex_only_());
Add(trie, Make("\\precneqq").Literal_().Tex_only_());
Add(trie, Make("\\precnsim").Literal_().Tex_only_());
Add(trie, Make("\\precsim").Literal_().Tex_only_());
Add(trie, Make("\\prime").Literal_().Tex_only_());
Add(trie, Make("\\prod").Literal_().Tex_only_());
Add(trie, Make("\\projlim").Literal_().Tex_only_());
Add(trie, Make("\\propto").Literal_().Tex_only_());
Add(trie, Make("\\psi").Literal_().Tex_only_());
Add(trie, Make("\\Psi").Literal_().Tex_only_());
Add(trie, Make("\\qquad").Literal_().Tex_only_());
Add(trie, Make("\\quad").Literal_().Tex_only_());
Add(trie, Make("\\Re").Literal_().Tex_only_());
Add(trie, Make("\\rho").Literal_().Tex_only_());
Add(trie, Make("\\rightarrow").Literal_().Tex_only_());
Add(trie, Make("\\Rightarrow").Literal_().Tex_only_());
Add(trie, Make("\\rightarrowtail").Literal_().Tex_only_());
Add(trie, Make("\\rightharpoondown").Literal_().Tex_only_());
Add(trie, Make("\\rightharpoonup").Literal_().Tex_only_());
Add(trie, Make("\\rightleftarrows").Literal_().Tex_only_());
Add(trie, Make("\\rightrightarrows").Literal_().Tex_only_());
Add(trie, Make("\\rightsquigarrow").Literal_().Tex_only_());
Add(trie, Make("\\rightthreetimes").Literal_().Tex_only_());
Add(trie, Make("\\risingdotseq").Literal_().Tex_only_());
Add(trie, Make("\\Rrightarrow").Literal_().Tex_only_());
Add(trie, Make("\\Rsh").Literal_().Tex_only_());
Add(trie, Make("\\rtimes").Literal_().Tex_only_());
Add(trie, Make("\\rVert").Literal_().Tex_only_());
Add(trie, Make("\\S").Literal_().Tex_only_());
Add(trie, Make("\\scriptscriptstyle").Literal_().Tex_only_());
Add(trie, Make("\\scriptstyle").Literal_().Tex_only_());
Add(trie, Make("\\searrow").Literal_().Tex_only_());
Add(trie, Make("\\setminus").Literal_().Tex_only_());
Add(trie, Make("\\sharp").Literal_().Tex_only_());
Add(trie, Make("\\shortmid").Literal_().Tex_only_());
Add(trie, Make("\\shortparallel").Literal_().Tex_only_());
Add(trie, Make("\\sigma").Literal_().Tex_only_());
Add(trie, Make("\\Sigma").Literal_().Tex_only_());
Add(trie, Make("\\sim").Literal_().Tex_only_());
Add(trie, Make("\\simeq").Literal_().Tex_only_());
Add(trie, Make("\\smallfrown").Literal_().Tex_only_());
Add(trie, Make("\\smallsetminus").Literal_().Tex_only_());
Add(trie, Make("\\smallsmile").Literal_().Tex_only_());
Add(trie, Make("\\smile").Literal_().Tex_only_());
Add(trie, Make("\\spadesuit").Literal_().Tex_only_());
Add(trie, Make("\\sphericalangle").Literal_().Tex_only_());
Add(trie, Make("\\sqcap").Literal_().Tex_only_());
Add(trie, Make("\\sqcup").Literal_().Tex_only_());
Add(trie, Make("\\sqsubset").Literal_().Tex_only_());
Add(trie, Make("\\sqsubseteq").Literal_().Tex_only_());
Add(trie, Make("\\sqsupset").Literal_().Tex_only_());
Add(trie, Make("\\sqsupseteq").Literal_().Tex_only_());
Add(trie, Make("\\square").Literal_().Tex_only_());
Add(trie, Make("\\star").Literal_().Tex_only_());
Add(trie, Make("\\subset").Literal_().Tex_only_());
Add(trie, Make("\\Subset").Literal_().Tex_only_());
Add(trie, Make("\\subseteq").Literal_().Tex_only_());
Add(trie, Make("\\subseteqq").Literal_().Tex_only_());
Add(trie, Make("\\subsetneq").Literal_().Tex_only_());
Add(trie, Make("\\subsetneqq").Literal_().Tex_only_());
Add(trie, Make("\\succ").Literal_().Tex_only_());
Add(trie, Make("\\succapprox").Literal_().Tex_only_());
Add(trie, Make("\\succcurlyeq").Literal_().Tex_only_());
Add(trie, Make("\\succeq").Literal_().Tex_only_());
Add(trie, Make("\\succnapprox").Literal_().Tex_only_());
Add(trie, Make("\\succneqq").Literal_().Tex_only_());
Add(trie, Make("\\succnsim").Literal_().Tex_only_());
Add(trie, Make("\\succsim").Literal_().Tex_only_());
Add(trie, Make("\\sum").Literal_().Tex_only_());
Add(trie, Make("\\supset").Literal_().Tex_only_());
Add(trie, Make("\\Supset").Literal_().Tex_only_());
Add(trie, Make("\\supseteq").Literal_().Tex_only_());
Add(trie, Make("\\supseteqq").Literal_().Tex_only_());
Add(trie, Make("\\supsetneq").Literal_().Tex_only_());
Add(trie, Make("\\supsetneqq").Literal_().Tex_only_());
Add(trie, Make("\\surd").Literal_().Tex_only_());
Add(trie, Make("\\swarrow").Literal_().Tex_only_());
Add(trie, Make("\\tau").Literal_().Tex_only_());
Add(trie, Make("\\textstyle").Literal_().Tex_only_());
Add(trie, Make("\\textvisiblespace").Literal_().Tex_only_());
Add(trie, Make("\\therefore").Literal_().Tex_only_());
Add(trie, Make("\\theta").Literal_().Tex_only_());
Add(trie, Make("\\Theta").Literal_().Tex_only_());
Add(trie, Make("\\thickapprox").Literal_().Tex_only_());
Add(trie, Make("\\thicksim").Literal_().Tex_only_());
Add(trie, Make("\\times").Literal_().Tex_only_());
Add(trie, Make("\\to").Literal_().Tex_only_());
Add(trie, Make("\\top").Literal_().Tex_only_());
Add(trie, Make("\\triangle").Literal_().Tex_only_());
Add(trie, Make("\\triangledown").Literal_().Tex_only_());
Add(trie, Make("\\triangleleft").Literal_().Tex_only_());
Add(trie, Make("\\trianglelefteq").Literal_().Tex_only_());
Add(trie, Make("\\triangleq").Literal_().Tex_only_());
Add(trie, Make("\\triangleright").Literal_().Tex_only_());
Add(trie, Make("\\trianglerighteq").Literal_().Tex_only_());
Add(trie, Make("\\underbrace").Literal_().Tex_only_());
Add(trie, Make("\\underline").Literal_().Tex_only_());
Add(trie, Make("\\upharpoonleft").Literal_().Tex_only_());
Add(trie, Make("\\upharpoonright").Literal_().Tex_only_());
Add(trie, Make("\\uplus").Literal_().Tex_only_());
Add(trie, Make("\\upsilon").Literal_().Tex_only_());
Add(trie, Make("\\Upsilon").Literal_().Tex_only_());
Add(trie, Make("\\upuparrows").Literal_().Tex_only_());
Add(trie, Make("\\varepsilon").Literal_().Tex_only_());
Add(trie, Make("\\varinjlim").Literal_().Tex_only_());
Add(trie, Make("\\varkappa").Literal_().Tex_only_());
Add(trie, Make("\\varliminf").Literal_().Tex_only_());
Add(trie, Make("\\varlimsup").Literal_().Tex_only_());
Add(trie, Make("\\varnothing").Literal_().Tex_only_());
Add(trie, Make("\\varphi").Literal_().Tex_only_());
Add(trie, Make("\\varpi").Literal_().Tex_only_());
Add(trie, Make("\\varprojlim").Literal_().Tex_only_());
Add(trie, Make("\\varpropto").Literal_().Tex_only_());
Add(trie, Make("\\varrho").Literal_().Tex_only_());
Add(trie, Make("\\varsigma").Literal_().Tex_only_());
Add(trie, Make("\\varsubsetneq").Literal_().Tex_only_());
Add(trie, Make("\\varsubsetneqq").Literal_().Tex_only_());
Add(trie, Make("\\varsupsetneq").Literal_().Tex_only_());
Add(trie, Make("\\varsupsetneqq").Literal_().Tex_only_());
Add(trie, Make("\\vartheta").Literal_().Tex_only_());
Add(trie, Make("\\vartriangle").Literal_().Tex_only_());
Add(trie, Make("\\vartriangleleft").Literal_().Tex_only_());
Add(trie, Make("\\vartriangleright").Literal_().Tex_only_());
Add(trie, Make("\\vdash").Literal_().Tex_only_());
Add(trie, Make("\\Vdash").Literal_().Tex_only_());
Add(trie, Make("\\vDash").Literal_().Tex_only_());
Add(trie, Make("\\vdots").Literal_().Tex_only_());
Add(trie, Make("\\vee").Literal_().Tex_only_());
Add(trie, Make("\\veebar").Literal_().Tex_only_());
Add(trie, Make("\\vline").Literal_().Tex_only_());
Add(trie, Make("\\Vvdash").Literal_().Tex_only_());
Add(trie, Make("\\wedge").Literal_().Tex_only_());
Add(trie, Make("\\widehat").Literal_().Tex_only_());
Add(trie, Make("\\widetilde").Literal_().Tex_only_());
Add(trie, Make("\\wp").Literal_().Tex_only_());
Add(trie, Make("\\wr").Literal_().Tex_only_());
Add(trie, Make("\\xi").Literal_().Tex_only_());
Add(trie, Make("\\Xi").Literal_().Tex_only_());
Add(trie, Make("\\zeta").Literal_().Tex_only_());
Add(trie, Make("\\big").Big_());
Add(trie, Make("\\Big").Big_());
Add(trie, Make("\\bigg").Big_());
Add(trie, Make("\\Bigg").Big_());
Add(trie, Make("\\biggl").Big_());
Add(trie, Make("\\Biggl").Big_());
Add(trie, Make("\\biggr").Big_());
Add(trie, Make("\\Biggr").Big_());
Add(trie, Make("\\bigl").Big_());
Add(trie, Make("\\Bigl").Big_());
Add(trie, Make("\\bigr").Big_());
Add(trie, Make("\\Bigr").Big_());
Add(trie, Make("\\backslash").Delimiter_().Tex_only_());
Add(trie, Make("\\downarrow").Delimiter_().Tex_only_());
Add(trie, Make("\\Downarrow").Delimiter_().Tex_only_());
Add(trie, Make("\\langle").Delimiter_().Tex_only_());
Add(trie, Make("\\lbrace").Delimiter_().Tex_only_());
Add(trie, Make("\\lceil").Delimiter_().Tex_only_());
Add(trie, Make("\\lfloor").Delimiter_().Tex_only_());
Add(trie, Make("\\llcorner").Delimiter_().Tex_only_());
Add(trie, Make("\\lrcorner").Delimiter_().Tex_only_());
Add(trie, Make("\\rangle").Delimiter_().Tex_only_());
Add(trie, Make("\\rbrace").Delimiter_().Tex_only_());
Add(trie, Make("\\rceil").Delimiter_().Tex_only_());
Add(trie, Make("\\rfloor").Delimiter_().Tex_only_());
Add(trie, Make("\\rightleftharpoons").Delimiter_().Tex_only_());
Add(trie, Make("\\twoheadleftarrow").Delimiter_().Tex_only_());
Add(trie, Make("\\twoheadrightarrow").Delimiter_().Tex_only_());
Add(trie, Make("\\ulcorner").Delimiter_().Tex_only_());
Add(trie, Make("\\uparrow").Delimiter_().Tex_only_());
Add(trie, Make("\\Uparrow").Delimiter_().Tex_only_());
Add(trie, Make("\\updownarrow").Delimiter_().Tex_only_());
Add(trie, Make("\\Updownarrow").Delimiter_().Tex_only_());
Add(trie, Make("\\urcorner").Delimiter_().Tex_only_());
Add(trie, Make("\\Vert").Delimiter_().Tex_only_());
Add(trie, Make("\\vert").Delimiter_().Tex_only_());
Add(trie, Make("\\lbrack").Delimiter_().Tex_only_());
Add(trie, Make("\\rbrack").Delimiter_().Tex_only_());
Add(trie, Make("\\acute").Fun_ar1_());
Add(trie, Make("\\bar").Fun_ar1_());
Add(trie, Make("\\bcancel").Fun_ar1_());
Add(trie, Make("\\bmod").Fun_ar1_());
Add(trie, Make("\\boldsymbol").Fun_ar1_());
Add(trie, Make("\\breve").Fun_ar1_());
Add(trie, Make("\\cancel").Fun_ar1_());
Add(trie, Make("\\check").Fun_ar1_());
Add(trie, Make("\\ddot").Fun_ar1_());
Add(trie, Make("\\dot").Fun_ar1_());
Add(trie, Make("\\emph").Fun_ar1_());
Add(trie, Make("\\grave").Fun_ar1_());
Add(trie, Make("\\hat").Fun_ar1_());
Add(trie, Make("\\mathbb").Fun_ar1_());
Add(trie, Make("\\mathbf").Fun_ar1_());
Add(trie, Make("\\mathbin").Fun_ar1_());
Add(trie, Make("\\mathcal").Fun_ar1_());
Add(trie, Make("\\mathclose").Fun_ar1_());
Add(trie, Make("\\mathfrak").Fun_ar1_());
Add(trie, Make("\\mathit").Fun_ar1_());
Add(trie, Make("\\mathop").Fun_ar1_());
Add(trie, Make("\\mathopen").Fun_ar1_());
Add(trie, Make("\\mathord").Fun_ar1_());
Add(trie, Make("\\mathpunct").Fun_ar1_());
Add(trie, Make("\\mathrel").Fun_ar1_());
Add(trie, Make("\\mathrm").Fun_ar1_());
Add(trie, Make("\\mathsf").Fun_ar1_());
Add(trie, Make("\\mathtt").Fun_ar1_());
Add(trie, Make("\\operatorname").Fun_ar1_());
Add(trie, Make("\\pmod").Fun_ar1_());
Add(trie, Make("\\sqrt").Fun_ar1_());
Add(trie, Make("\\textbf").Fun_ar1_());
Add(trie, Make("\\textit").Fun_ar1_());
Add(trie, Make("\\textrm").Fun_ar1_());
Add(trie, Make("\\textsf").Fun_ar1_());
Add(trie, Make("\\texttt").Fun_ar1_());
Add(trie, Make("\\tilde").Fun_ar1_());
Add(trie, Make("\\vec").Fun_ar1_());
Add(trie, Make("\\xcancel").Fun_ar1_());
Add(trie, Make("\\xleftarrow").Fun_ar1_());
Add(trie, Make("\\xrightarrow").Fun_ar1_());
Add(trie, Make("\\binom").Fun_ar2_());
Add(trie, Make("\\cancelto").Fun_ar2_());
Add(trie, Make("\\cfrac").Fun_ar2_());
Add(trie, Make("\\dbinom").Fun_ar2_());
Add(trie, Make("\\dfrac").Fun_ar2_());
Add(trie, Make("\\frac").Fun_ar2_());
Add(trie, Make("\\overset").Fun_ar2_());
Add(trie, Make("\\stackrel").Fun_ar2_());
Add(trie, Make("\\tbinom").Fun_ar2_());
Add(trie, Make("\\tfrac").Fun_ar2_());
Add(trie, Make("\\underset").Fun_ar2_());
Add(trie, Make("\\atop").Fun_infix_());
Add(trie, Make("\\choose").Fun_infix_());
Add(trie, Make("\\over").Fun_infix_());
Add(trie, Make("\\Coppa").Literal_().Tex_only_().Manual_("\\mbox{~0}"));
Add(trie, Make("\\coppa").Literal_().Tex_only_().Manual_("\\mbox{~0}"));
Add(trie, Make("\\Digamma").Literal_().Tex_only_().Manual_("\\mbox{~0}"));
Add(trie, Make("\\euro").Literal_().Tex_only_().Manual_("\\mbox{~0}"));
Add(trie, Make("\\geneuro").Literal_().Tex_only_().Manual_("\\mbox{~0}"));
Add(trie, Make("\\geneuronarrow").Literal_().Tex_only_().Manual_("\\mbox{~0}"));
Add(trie, Make("\\geneurowide").Literal_().Tex_only_().Manual_("\\mbox{~0}"));
Add(trie, Make("\\Koppa").Literal_().Tex_only_().Manual_("\\mbox{~0}"));
Add(trie, Make("\\koppa").Literal_().Tex_only_().Manual_("\\mbox{~0}"));
Add(trie, Make("\\officialeuro").Literal_().Tex_only_().Manual_("\\mbox{~0}"));
Add(trie, Make("\\Sampi").Literal_().Tex_only_().Manual_("\\mbox{~0}"));
Add(trie, Make("\\sampi").Literal_().Tex_only_().Manual_("\\mbox{~0}"));
Add(trie, Make("\\Stigma").Literal_().Tex_only_().Manual_("\\mbox{~0}"));
Add(trie, Make("\\stigma").Literal_().Tex_only_().Manual_("\\mbox{~0}"));
Add(trie, Make("\\varstigma").Literal_().Tex_only_().Manual_("\\mbox{~0}"));
Add(trie, Make("\\C").Literal_().Tex_only_().Manual_("\\mathbb{C}"));
Add(trie, Make("\\H").Literal_().Tex_only_().Manual_("\\mathbb{H}"));
Add(trie, Make("\\N").Literal_().Tex_only_().Manual_("\\mathbb{N}"));
Add(trie, Make("\\Q").Literal_().Tex_only_().Manual_("\\mathbb{Q}"));
Add(trie, Make("\\R").Literal_().Tex_only_().Manual_("\\mathbb{R}"));
Add(trie, Make("\\Z").Literal_().Tex_only_().Manual_("\\mathbb{Z}"));
Add(trie, Make("\\darr").Delimiter_().Tex_only_().Manual_("\\downarrow"));
Add(trie, Make("\\dArr").Delimiter_().Tex_only_().Manual_("\\Downarrow"));
Add(trie, Make("\\Darr").Delimiter_().Tex_only_().Manual_("\\Downarrow"));
Add(trie, Make("\\lang").Delimiter_().Tex_only_().Manual_("\\langle"));
Add(trie, Make("\\rang").Delimiter_().Tex_only_().Manual_("\\rangle"));
Add(trie, Make("\\uarr").Delimiter_().Tex_only_().Manual_("\\uparrow"));
Add(trie, Make("\\uArr").Delimiter_().Tex_only_().Manual_("\\Uparrow"));
Add(trie, Make("\\Uarr").Delimiter_().Tex_only_().Manual_("\\Uparrow"));
Add(trie, Make("\\Bbb").Fun_ar1_().Manual_("\\mathbb"));
Add(trie, Make("\\bold").Fun_ar1_().Manual_("\\mathbf"));
Add(trie, Make("\\alef").Literal_().Tex_only_().Manual_("\\aleph"));
Add(trie, Make("\\alefsym").Literal_().Tex_only_().Manual_("\\aleph"));
Add(trie, Make("\\Alpha").Literal_().Tex_only_().Manual_("\\mathrm{A}"));
Add(trie, Make("\\and").Literal_().Tex_only_().Manual_("\\land"));
Add(trie, Make("\\ang").Literal_().Tex_only_().Manual_("\\angle"));
Add(trie, Make("\\Beta").Literal_().Tex_only_().Manual_("\\mathrm{B}"));
Add(trie, Make("\\bull").Literal_().Tex_only_().Manual_("\\bullet"));
Add(trie, Make("\\Chi").Literal_().Tex_only_().Manual_("\\mathrm{X}"));
Add(trie, Make("\\clubs").Literal_().Tex_only_().Manual_("\\clubsuit"));
Add(trie, Make("\\cnums").Literal_().Tex_only_().Manual_("\\mathbb{C}"));
Add(trie, Make("\\Complex").Literal_().Tex_only_().Manual_("\\mathbb{C}"));
Add(trie, Make("\\Dagger").Literal_().Tex_only_().Manual_("\\ddagger"));
Add(trie, Make("\\diamonds").Literal_().Tex_only_().Manual_("\\diamondsuit"));
Add(trie, Make("\\Doteq").Literal_().Tex_only_().Manual_("\\doteqdot"));
Add(trie, Make("\\doublecap").Literal_().Tex_only_().Manual_("\\Cap"));
Add(trie, Make("\\doublecup").Literal_().Tex_only_().Manual_("\\Cup"));
Add(trie, Make("\\empty").Literal_().Tex_only_().Manual_("\\emptyset"));
Add(trie, Make("\\Epsilon").Literal_().Tex_only_().Manual_("\\mathrm{E}"));
Add(trie, Make("\\Eta").Literal_().Tex_only_().Manual_("\\mathrm{H}"));
Add(trie, Make("\\exist").Literal_().Tex_only_().Manual_("\\exists"));
Add(trie, Make("\\ge").Literal_().Tex_only_().Manual_("\\geq"));
Add(trie, Make("\\gggtr").Literal_().Tex_only_().Manual_("\\ggg"));
Add(trie, Make("\\hAar").Literal_().Tex_only_().Manual_("\\Leftrightarrow"));
Add(trie, Make("\\harr").Literal_().Tex_only_().Manual_("\\leftrightarrow"));
Add(trie, Make("\\Harr").Literal_().Tex_only_().Manual_("\\Leftrightarrow"));
Add(trie, Make("\\hearts").Literal_().Tex_only_().Manual_("\\heartsuit"));
Add(trie, Make("\\image").Literal_().Tex_only_().Manual_("\\Im"));
Add(trie, Make("\\infin").Literal_().Tex_only_().Manual_("\\infty"));
Add(trie, Make("\\Iota").Literal_().Tex_only_().Manual_("\\mathrm{I}"));
Add(trie, Make("\\isin").Literal_().Tex_only_().Manual_("\\in"));
Add(trie, Make("\\Kappa").Literal_().Tex_only_().Manual_("\\mathrm{K}"));
Add(trie, Make("\\larr").Literal_().Tex_only_().Manual_("\\leftarrow"));
Add(trie, Make("\\Larr").Literal_().Tex_only_().Manual_("\\Leftarrow"));
Add(trie, Make("\\lArr").Literal_().Tex_only_().Manual_("\\Leftarrow"));
Add(trie, Make("\\le").Literal_().Tex_only_().Manual_("\\leq"));
Add(trie, Make("\\lrarr").Literal_().Tex_only_().Manual_("\\leftrightarrow"));
Add(trie, Make("\\Lrarr").Literal_().Tex_only_().Manual_("\\Leftrightarrow"));
Add(trie, Make("\\lrArr").Literal_().Tex_only_().Manual_("\\Leftrightarrow"));
Add(trie, Make("\\Mu").Literal_().Tex_only_().Manual_("\\mathrm{M}"));
Add(trie, Make("\\natnums").Literal_().Tex_only_().Manual_("\\mathbb{N}"));
Add(trie, Make("\\ne").Literal_().Tex_only_().Manual_("\\neq"));
Add(trie, Make("\\Nu").Literal_().Tex_only_().Manual_("\\mathrm{N}"));
Add(trie, Make("\\O").Literal_().Tex_only_().Manual_("\\emptyset"));
Add(trie, Make("\\omicron").Literal_().Tex_only_().Manual_("\\mathrm{o}"));
Add(trie, Make("\\Omicron").Literal_().Tex_only_().Manual_("\\mathrm{O}"));
Add(trie, Make("\\or").Literal_().Tex_only_().Manual_("\\lor"));
Add(trie, Make("\\part").Literal_().Tex_only_().Manual_("\\partial"));
Add(trie, Make("\\plusmn").Literal_().Tex_only_().Manual_("\\pm"));
Add(trie, Make("\\rarr").Literal_().Tex_only_().Manual_("\\rightarrow"));
Add(trie, Make("\\Rarr").Literal_().Tex_only_().Manual_("\\Rightarrow"));
Add(trie, Make("\\rArr").Literal_().Tex_only_().Manual_("\\Rightarrow"));
Add(trie, Make("\\real").Literal_().Tex_only_().Manual_("\\Re"));
Add(trie, Make("\\reals").Literal_().Tex_only_().Manual_("\\mathbb{R}"));
Add(trie, Make("\\Reals").Literal_().Tex_only_().Manual_("\\mathbb{R}"));
Add(trie, Make("\\restriction").Literal_().Tex_only_().Manual_("\\upharpoonright"));
Add(trie, Make("\\Rho").Literal_().Tex_only_().Manual_("\\mathrm{P}"));
Add(trie, Make("\\sdot").Literal_().Tex_only_().Manual_("\\cdot"));
Add(trie, Make("\\sect").Literal_().Tex_only_().Manual_("\\S"));
Add(trie, Make("\\spades").Literal_().Tex_only_().Manual_("\\spadesuit"));
Add(trie, Make("\\sub").Literal_().Tex_only_().Manual_("\\subset"));
Add(trie, Make("\\sube").Literal_().Tex_only_().Manual_("\\subseteq"));
Add(trie, Make("\\supe").Literal_().Tex_only_().Manual_("\\supseteq"));
Add(trie, Make("\\Tau").Literal_().Tex_only_().Manual_("\\mathrm{T}"));
Add(trie, Make("\\thetasym").Literal_().Tex_only_().Manual_("\\vartheta"));
Add(trie, Make("\\varcoppa").Literal_().Tex_only_().Manual_("\\mbox{coppa}"));
Add(trie, Make("\\weierp").Literal_().Tex_only_().Manual_("\\wp"));
Add(trie, Make("\\Zeta").Literal_().Tex_only_().Manual_("\\mathrm{Z}"));
Add(trie, Make("\\rm").Declh_().Fontforce_rm_());
Add(trie, Make("\\it").Declh_().Fontforce_rm_());
Add(trie, Make("\\cal").Declh_().Fontforce_rm_());
Add(trie, Make("\\bf").Declh_().Fontforce_rm_());
Add(trie, Make("\\sideset").Fun_ar2nb_().Manual_("\\sideset "));
Add(trie, Make("\\left").Left_());
Add(trie, Make("\\right").Right_());
Add(trie, Make("\\text").Fail_());
Add(trie, Make("\\mbox").Fail_());
Add(trie, Make("\\vbox").Fail_());
Add(trie, Make("\\hbox").Fail_());
Add(trie, Make("\\arccos").Type_latex_());
Add(trie, Make("\\arcsin").Type_latex_());
Add(trie, Make("\\arctan").Type_latex_());
Add(trie, Make("\\arg").Type_latex_());
Add(trie, Make("\\cos").Type_latex_());
Add(trie, Make("\\cosh").Type_latex_());
Add(trie, Make("\\cot").Type_latex_());
Add(trie, Make("\\coth").Type_latex_());
Add(trie, Make("\\csc").Type_latex_());
Add(trie, Make("\\deg").Type_latex_());
Add(trie, Make("\\det").Type_latex_());
Add(trie, Make("\\dim").Type_latex_());
Add(trie, Make("\\exp").Type_latex_());
Add(trie, Make("\\gcd").Type_latex_());
Add(trie, Make("\\hom").Type_latex_());
Add(trie, Make("\\inf").Type_latex_());
Add(trie, Make("\\ker").Type_latex_());
Add(trie, Make("\\lg").Type_latex_());
Add(trie, Make("\\lim").Type_latex_());
Add(trie, Make("\\liminf").Type_latex_());
Add(trie, Make("\\limsup").Type_latex_());
Add(trie, Make("\\ln").Type_latex_());
Add(trie, Make("\\log").Type_latex_());
Add(trie, Make("\\max").Type_latex_());
Add(trie, Make("\\min").Type_latex_());
Add(trie, Make("\\Pr").Type_latex_());
Add(trie, Make("\\sec").Type_latex_());
Add(trie, Make("\\sin").Type_latex_());
Add(trie, Make("\\sinh").Type_latex_());
Add(trie, Make("\\sup").Type_latex_());
Add(trie, Make("\\tan").Type_latex_());
Add(trie, Make("\\tanh").Type_latex_());
Add(trie, Make("\\arccot").Type_mw_());
Add(trie, Make("\\arcsec").Type_mw_());
Add(trie, Make("\\arccsc").Type_mw_());
Add(trie, Make("\\sgn").Type_mw_());
Add(trie, Make("\\sen").Type_mw_());
return trie;
}
private Mwm_tkn__func Make(String key) {return new Mwm_tkn__func(Bry_.new_a7(key));} // NOTE: TEX func names are ASCII
private void Add(Btrie_slim_mgr trie, Mwm_tkn__func tkn) {trie.Add_obj(tkn.Key(), tkn);}
}

View File

@@ -1,45 +0,0 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*;
class Mwm_tkn__node implements Mwm_tkn {
public Mwm_tkn__root Root() {return root;} private Mwm_tkn__root root;
public int Tid() {return tid;} private int tid;
public int Uid() {return uid;} private int uid;
public int Src_bgn() {return src_bgn;} private int src_bgn;
public int Src_end() {return src_end;} private int src_end;
public void Src_end_(int v) {this.src_end = v;}
public Mwm_tkn Init(Mwm_tkn__root root, int tid, int uid, int src_bgn, int src_end) {
this.root = root;
this.tid = tid;
this.uid = uid;
this.src_bgn = src_bgn;
this.src_end = src_end;
return this;
}
public int Subs__len() {return root.Regy__get_subs_len(uid);}
public Mwm_tkn Subs__get_at(int i) {return root.Regy__get_subs_tkn(uid, i);}
public void To_bry(Bry_bfr bfr, int indent) {
Mwm_tkn_.Tkn_to_bry__bgn(bfr, indent, this);
Mwm_tkn_.Tkn_to_bry__end_head(bfr);
int subs_len = this.Subs__len();
for (int i = 0; i < subs_len; ++i) {
Mwm_tkn sub_tkn = Subs__get_at(i);
sub_tkn.To_bry(bfr, indent + 1);
}
}
}

View File

@@ -1,86 +0,0 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*;
class Mwm_tkn__root implements Mwm_tkn {
private final Mwm_root_reg root_reg;
private final Mwm_root_ary root_ary = new Mwm_root_ary();
private final Mwm_root_sub root_sub = new Mwm_root_sub();
private Mwm_tkn_mkr tkn_mkr;
public Mwm_tkn__root() {
this.root_reg = new Mwm_root_reg(this);
}
public Mwm_tkn__root Root() {return this;}
public int Tid() {return Mwm_tkn_.Tid__root;}
public int Uid() {return Mwm_tkn_.Uid__root;}
public int Src_bgn() {return src_bgn;} private int src_bgn;
public int Src_end() {return src_end;} private int src_end;
public void Src_end_(int v) {this.src_end = v;}
public Mwm_tkn Init(Mwm_tkn__root root, int tid, int uid, int src_bgn, int src_end) {throw Err_.new_unsupported();}
public Mwm_tkn Init_as_root(Mwm_tkn_mkr tkn_mkr, int src_bgn, int src_end) {
this.tkn_mkr = tkn_mkr;
this.src_bgn = src_bgn; this.src_end = src_end;
int expd_len = (src_end - src_bgn) / 5;
root_reg.Init(expd_len);
root_ary.Init(expd_len);
root_sub.Init(expd_len);
root_reg.Add(Mwm_tkn_.Tid__root, Mwm_tkn_.Uid__root, src_bgn, src_end);
// this.Regy__add(Mwm_tkn_.Tid__root, src_bgn, src_end, this);
return this;
}
public int Subs__len() {return Regy__get_subs_len(Mwm_tkn_.Uid__root);}
public Mwm_tkn Subs__get_at(int i) {return Regy__get_subs_tkn(Mwm_tkn_.Uid__root, i);}
public void To_bry(Bry_bfr bfr, int indent) {
Mwm_tkn_.Tkn_to_bry__bgn(bfr, indent, this);
Mwm_tkn_.Tkn_to_bry__end_head(bfr);
}
public int Regy__add(int tid, int bgn, int end, Mwm_tkn tkn) {
int uid = root_reg.Add(tid, Mwm_tkn_.Uid__root, bgn, end);
if (tkn != null) {
tkn.Init(this, tid, uid, bgn, end);
root_ary.Add(uid, tkn);
}
root_sub.Add(Mwm_tkn_.Uid__root, uid);
return uid;
}
public int Regy__get_subs_len(int uid) {return root_sub.Get_subs_len(uid);}
public Mwm_tkn Regy__get_subs_tkn(int owner_uid, int sub_idx) {
return Regy__get_tkn(root_sub.Get_at(owner_uid).Get_at(sub_idx));
}
public Mwm_tkn Regy__get_tkn(int uid) {
Mwm_tkn rv = root_reg.Get_at(tkn_mkr, uid);
return rv == null ? root_ary.Get_at(uid) : rv;
}
public void Regy__move(int new_owner_uid, int cur_uid) {
int old_owner_uid = root_reg.Update_owner_id(cur_uid, new_owner_uid);
if (!root_sub.Del_by_key_from_end(old_owner_uid, cur_uid)) throw Err_.new_("mwm.parse", "unable to find sub in owner", "old_owner_uid", old_owner_uid, "new_owner_uid", new_owner_uid, "cur_uid", cur_uid);
root_sub.Add(new_owner_uid, cur_uid);
}
public void Regy__move_to_end(int src_uid, int trg_uid) {
Int_ary subs_ary = root_sub.Get_at(Mwm_tkn_.Uid__root);
int bgn_idx = subs_ary.Idx_of(src_uid);
int subs_len = subs_ary.Len();
for (int i = bgn_idx + 1; i < subs_len; ++i) {
int sub_uid = subs_ary.Get_at(i);
Regy__move(trg_uid, sub_uid);
}
}
public void Regy__update_end(int uid, int end) {
if (root_reg.Update_end(uid, end))
root_ary.Update_end(uid, end);
}
}

View File

@@ -1,38 +0,0 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*;
class Mwm_tkn_mkr {
private final Mwm_tkn[] leaf_protos = new Mwm_tkn[Mwm_tkn_.Tid_len];
public void Reg_leaf(int tid, Mwm_tkn tkn) {
leaf_protos[tid] = tkn;
}
public Mwm_tkn Make_leaf(Mwm_tkn__root root, int tid, int uid, int bgn, int end) {
Mwm_tkn proto = leaf_protos[tid];
return proto == null ? null : proto.Init(root, tid, uid, bgn, end);
}
public Mwm_tkn Make_func(Mwm_tkn__root root, int uid, int bgn, int end) {
Mwm_tkn__node rv = new Mwm_tkn__node();
rv.Init(root, Mwm_tkn_.Tid__fnc, uid, bgn, end);
return rv;
}
public Mwm_tkn Make_curly(Mwm_tkn__root root, int uid, int bgn, int end) {
Mwm_tkn__node rv = new Mwm_tkn__node();
rv.Init(root, Mwm_tkn_.Tid__curly, uid, bgn, end);
return rv;
}
}

View File

@@ -0,0 +1,65 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.texvcs; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*;
import gplx.xowa.xtns.math.texvcs.tkns.*; import gplx.xowa.xtns.math.texvcs.funcs.*;
class Texvc_checker {
private final List_adp func_stack = List_adp_.new_();
private Texvc_root root; private int root_idx, root_len;
private boolean fail;
public void Check(byte[] src, Texvc_root root) {
func_stack.Clear();
this.root = root;
this.root_len = root.Subs__len();
this.root_idx = 0;
this.fail = false;
while (root_idx < root_len) {
if (fail) break;
Texvc_tkn tkn = root.Subs__get_at(root_idx);
if (tkn.Tid() == Texvc_tkn_.Tid__func) {
Check_func(tkn);
}
++root_idx;
}
}
private void Check_func(Texvc_tkn tkn) {
Texvc_tkn__func func_tkn = (Texvc_tkn__func)tkn;
Texvc_func_itm func_itm = func_tkn.Func_itm();
int arg_len = func_itm.Args(); if (arg_len == 0) return; // arg-less funcs don't need to be checked;
func_stack.Add(func_tkn);
int arg_idx = 0;
while (arg_idx < arg_len) {
++root_idx;
Texvc_tkn arg_tkn = root.Subs__get_at(root_idx);
// skip ws, dlm, lit
int arg_tid = arg_tkn.Tid();
switch (arg_tid) {
case Texvc_tkn_.Tid__func:
case Texvc_tkn_.Tid__curly:
root.Regy__move(arg_tkn.Uid(), func_tkn.Uid());
--root_len;
--root_idx;
++arg_idx;
if (arg_tid == Texvc_tkn_.Tid__func) {
Check_func(arg_tkn);
}
break;
}
}
List_adp_.Pop_last(func_stack);
}
}

View File

@@ -0,0 +1,56 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.texvcs; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*;
import org.junit.*; import gplx.xowa.xtns.math.texvcs.tkns.*; import gplx.xowa.xtns.math.texvcs.funcs.*;
public class Texvc_checker_tst {
private final Texvc_checker_fxt fxt = new Texvc_checker_fxt();
@Before public void init() {fxt.Clear();}
@Test public void Mathrm_tkns() {
fxt.Test_check("\\mathrm\\frac{a}{b}"
, fxt.Mkr().func(0, 7, Texvc_func_itm_.Id__mathrm
, fxt.Mkr().func(7, 12, Texvc_func_itm_.Id__frac
, fxt.Mkr().curly(12, 15
, fxt.Mkr().text(13, 14)
)
, fxt.Mkr().curly(15, 18
, fxt.Mkr().text(16, 17)
)
)
)
);
}
@Test public void Mathrm() {
// fxt.Test_check("\\mathrm\\frac{a}{b}" , "\\mathrm{\\frac{a}{b}}");
// fxt.Test_check("\\mathrm\\frac a b}" , "\\mathrm{\\frac{a}{b}}");
// fxt.Test_check("\\mathrm{\\frac{a}{b}}" , "\\mathrm{\\frac{a}{b}}");
}
}
class Texvc_checker_fxt extends Texvc_parser_fxt { private final Texvc_checker checker = new Texvc_checker();
public void Test_check(String src_str, Texvc_tkn... expd_tkns) {
byte[] src_bry = Bry_.new_u8(src_str);
Texvc_root actl_root = this.Exec_parse(src_bry);
checker.Check(src_bry, actl_root);
Tfds.Eq_str_lines(Texvc_tkn_.Print_dbg_str(tmp_bfr, expd_tkns), actl_root.Print_dbg_str(tmp_bfr), src_str);
}
public void Test_check(String src_str, String expd) {
byte[] src_bry = Bry_.new_u8(src_str);
Texvc_root actl_root = this.Exec_parse(src_bry);
checker.Check(src_bry, actl_root);
Tfds.Eq_str_lines(expd, actl_root.Print_tex_str(tmp_bfr));
}
}

View File

@@ -0,0 +1,35 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.texvcs; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*;
import gplx.core.primitives.*; import gplx.core.btries.*;
import gplx.xowa.xtns.math.texvcs.lxrs.*; import gplx.xowa.xtns.math.texvcs.tkns.*; import gplx.xowa.xtns.math.texvcs.funcs.*;
public class Texvc_ctx {
public Texvc_ctx() {
this.lxr_trie = Texvc_lxr_trie_bldr.new_(tkn_mkr);
this.func_regy = Texvc_func_regy.new_(tkn_mkr);
this.scope_regy = Texvc_scope_regy.new_();
}
public Btrie_fast_mgr Lxr_trie() {return lxr_trie;} private final Btrie_fast_mgr lxr_trie;
public Texvc_tkn_mkr Tkn_mkr() {return tkn_mkr;} private final Texvc_tkn_mkr tkn_mkr = new Texvc_tkn_mkr();
public Texvc_func_regy Func_regy() {return func_regy;} private final Texvc_func_regy func_regy;
public Texvc_scope_regy Scope_regy() {return scope_regy;} private final Texvc_scope_regy scope_regy;
public Int_ary Stack() {return stack;} private final Int_ary stack = new Int_ary(4);
public void Clear() {
stack.Clear();
}
}

View File

@@ -15,33 +15,28 @@ GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*;
package gplx.xowa.xtns.math.texvcs; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*;
import gplx.core.btries.*;
class Mwm_parser {
private final Mwm_ctx ctx = new Mwm_ctx();
private final Btrie_fast_mgr trie;
public Mwm_tkn_mkr Tkn_mkr() {return tkn_mkr;} private final Mwm_tkn_mkr tkn_mkr = new Mwm_tkn_mkr();
public Mwm_parser() {
this.trie = Mwm_lxr_trie_bldr.new_(tkn_mkr);
}
public void Parse(Mwm_tkn__root root, byte[] src) {
import gplx.xowa.xtns.math.texvcs.lxrs.*; import gplx.xowa.xtns.math.texvcs.tkns.*;
class Texvc_parser {
public void Parse(Texvc_ctx ctx, Texvc_root root, byte[] src) {
int src_len = src.length;
ctx.Clear();
root.Init_as_root(tkn_mkr, 0, src.length);
Parse(root, ctx, src, src_len, 0, src_len);
root.Init_as_root(ctx.Tkn_mkr(), src, 0, src.length);
Parse(root, ctx, ctx.Lxr_trie(), src, src_len, 0, src_len);
}
private int Parse(Mwm_tkn__root root, Mwm_ctx ctx, byte[] src, int src_len, int bgn_pos, int end_pos) {
private int Parse(Texvc_root root, Texvc_ctx ctx, Btrie_fast_mgr lxr_trie, byte[] src, int src_len, int bgn_pos, int end_pos) {
int pos = bgn_pos;
int txt_bgn = pos, txt_uid = -1;
byte b = src[pos];
while (true) {
Object o = trie.Match_bgn_w_byte(b, src, pos, src_len);
Object o = lxr_trie.Match_bgn_w_byte(b, src, pos, src_len);
if (o == null) // no lxr found; char is txt; increment pos
pos++;
else { // lxr found
Mwm_lxr lxr = (Mwm_lxr)o;
Texvc_lxr lxr = (Texvc_lxr)o;
if (txt_bgn != pos) txt_uid = Txt_calc(ctx, root, src, src_len, pos, txt_bgn, txt_uid);// chars exist between pos and txt_bgn; make txt_tkn;
pos = lxr.Make_tkn(ctx, root, src, src_len, pos, trie.Match_pos());
pos = lxr.Make_tkn(ctx, root, src, src_len, pos, lxr_trie.Match_pos());
if (pos > 0) {txt_bgn = pos; txt_uid = -1;} // reset txt_tkn
}
if (pos == end_pos) break;
@@ -50,9 +45,9 @@ class Mwm_parser {
if (txt_bgn != pos) txt_uid = Txt_calc(ctx, root, src, src_len, src_len, txt_bgn, txt_uid);
return pos;
}
private static int Txt_calc(Mwm_ctx ctx, Mwm_tkn__root root, byte[] src, int src_len, int bgn_pos, int txt_bgn, int txt_uid) {
private static int Txt_calc(Texvc_ctx ctx, Texvc_root root, byte[] src, int src_len, int bgn_pos, int txt_bgn, int txt_uid) {
if (txt_uid == -1) // no existing txt_tkn; create new one
txt_uid = root.Regy__add(Mwm_tkn_.Tid__text, txt_bgn, bgn_pos, null);
txt_uid = root.Regy__add(Texvc_tkn_.Tid__text, Texvc_tkn_.Tid__text, txt_bgn, bgn_pos, null);
else // existing txt_tkn; happens for false matches; EX: abc[[\nef[[a]]; see NOTE_1
root.Regy__update_end(txt_uid, bgn_pos);
return txt_uid;

View File

@@ -0,0 +1,141 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.texvcs; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*;
import org.junit.*; import gplx.xowa.xtns.math.texvcs.tkns.*; import gplx.xowa.xtns.math.texvcs.funcs.*;
public class Texvc_parser_tst {
private final Texvc_parser_fxt fxt = new Texvc_parser_fxt();
@Before public void init() {fxt.Clear();}
@Test public void Text() {
fxt.Test_parse("abc"
, fxt.Mkr().text(0, 3)
);
}
@Test public void Ws() {
fxt.Test_parse(" "
, fxt.Mkr().ws(0, 3)
);
}
@Test public void Mix() {
fxt.Test_parse("a b c"
, fxt.Mkr().text(0, 1)
, fxt.Mkr().ws (1, 2)
, fxt.Mkr().text(2, 3)
, fxt.Mkr().ws (3, 4)
, fxt.Mkr().text(4, 5)
);
}
@Test public void Curly() {
fxt.Test_parse("{a}"
, fxt.Mkr().curly(0, 3
, fxt.Mkr().text(1, 2)
)
);
}
@Test public void Curly_2() {
fxt.Test_parse("{a{b}c}"
, fxt.Mkr().curly(0, 7
, fxt.Mkr().text (1, 2)
, fxt.Mkr().curly (2, 5
, fxt.Mkr().text (3, 4)
)
, fxt.Mkr().text (5, 6)
)
);
}
@Test public void Func() {
fxt.Test_parse("\\abc \\def"
, fxt.Mkr().func(0, 4, Texvc_func_itm_.Id__xowa_unknown)
, fxt.Mkr().ws (4, 5)
, fxt.Mkr().func(5, 9, Texvc_func_itm_.Id__xowa_unknown)
);
}
@Test public void Mathrm() {
fxt.Test_parse("\\mathrm\\frac{a}{b}"
, fxt.Mkr().func ( 0, 7, Texvc_func_itm_.Id__mathrm)
, fxt.Mkr().func ( 7, 12, Texvc_func_itm_.Id__frac)
, fxt.Mkr().curly (12, 15
, fxt.Mkr().text (13, 14)
)
, fxt.Mkr().curly (15, 18
, fxt.Mkr().text (16, 17)
)
);
}
}
class Texvc_tkn_mkr_fxt {
private final Texvc_ctx ctx;
private final Texvc_root root;
public Texvc_tkn_mkr_fxt(Texvc_ctx ctx) {
this.ctx = ctx;
this.root = new Texvc_root();
}
public void Clear() {
root.Init_as_root(ctx.Tkn_mkr(), Bry_.Empty, 0, 8);
}
private Texvc_tkn leaf(int tid, int bgn, int end) {
int uid = root.Regy__add(tid, tid, bgn, end, null);
return new Texvc_tkn__leaf_raw().Init(root, tid, uid, bgn, end);
}
public Texvc_tkn text (int bgn, int end) {return leaf(Texvc_tkn_.Tid__text , bgn, end);}
public Texvc_tkn ws (int bgn, int end) {return leaf(Texvc_tkn_.Tid__ws , bgn, end);}
public Texvc_tkn func (int bgn, int end, int func_tid, Texvc_tkn... subs) {
Texvc_func_itm itm = ctx.Func_regy().Get_at(func_tid);
Texvc_tkn tkn = itm.Tkn(); if (tkn == null) tkn = new Texvc_tkn__func(Texvc_func_itm_.Itm__unknown);
node(Texvc_tkn_.Tid__func, itm.Singleton_id(), tkn, bgn, end, subs);
return tkn;
}
public Texvc_tkn curly(int bgn, int end, Texvc_tkn... subs) {
int tid = Texvc_tkn_.Tid__curly;
Texvc_tkn tkn = new Texvc_tkn__func(Texvc_func_itm_.Itm__arg);
node(tid, Texvc_tkn_mkr.Singleton_id__null, tkn, bgn, end, subs);
return tkn;
}
private void node(int tid, int singleton_id, Texvc_tkn tkn, int bgn, int end, Texvc_tkn... subs) {
root.Regy__add(tid, singleton_id, bgn, end, tkn);
int len = subs.length;
for (int i = 0; i < len; ++i) {
Texvc_tkn sub = subs[i];
root.Regy__move(sub.Uid(), tkn.Uid());
}
}
}
class Texvc_parser_fxt {
protected final Bry_bfr tmp_bfr = Bry_bfr.reset_(255);
private final Texvc_parser parser = new Texvc_parser();
private final Texvc_root actl_root;
private final Texvc_ctx ctx;
public Texvc_parser_fxt() {
this.actl_root = new Texvc_root();
this.ctx = new Texvc_ctx();
this.mkr_fxt = new Texvc_tkn_mkr_fxt(ctx);
}
public Texvc_tkn_mkr_fxt Mkr() {return mkr_fxt;} private final Texvc_tkn_mkr_fxt mkr_fxt;
public void Clear() {
mkr_fxt.Clear();
actl_root.Init_as_root(ctx.Tkn_mkr(), Bry_.Empty, 0, 8);
}
public Texvc_root Exec_parse(byte[] src_bry) {
parser.Parse(ctx, actl_root, src_bry);
return actl_root;
}
public void Test_parse(String src_str, Texvc_tkn... expd_tkns) {
byte[] src_bry = Bry_.new_u8(src_str);
Exec_parse(src_bry);
Tfds.Eq_str_lines(Texvc_tkn_.Print_dbg_str(tmp_bfr, expd_tkns), actl_root.Print_dbg_str(tmp_bfr), src_str);
}
}

View File

@@ -0,0 +1,52 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.texvcs.funcs; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*; import gplx.xowa.xtns.math.texvcs.*;
import gplx.core.btries.*;
import gplx.xowa.xtns.math.texvcs.tkns.*;
public class Texvc_func_itm {
private Texvc_tkn tkn; private boolean tkn_check = true;
public Texvc_func_itm(int id, byte[] key) {this.id = id; this.key = key;}
public int Id() {return id;} private final int id;
public byte[] Key() {return key;} private final byte[] key;
public Texvc_tkn Tkn() {
if (tkn_check) {
tkn_check = false;
if (literal || delimiter) this.tkn = new Texvc_tkn__func(this);
}
return tkn;
}
public int Singleton_id() {return id + Texvc_tkn_.Tid_len;}
public byte[] Manual() {return manual;} public Texvc_func_itm Manual_(String v) {manual = Bry_.new_a7(v); return this;} private byte[] manual;
public boolean Literal() {return literal;} public Texvc_func_itm Literal_() {this.literal = true; return this;} private boolean literal;
public boolean Big() {return big;} public Texvc_func_itm Big_() {this.big = true; return this;} private boolean big;
public boolean Delimiter() {return delimiter;} public Texvc_func_itm Delimiter_() {this.delimiter = true; return this;} private boolean delimiter;
public boolean Tex_only() {return tex_only;} public Texvc_func_itm Tex_only_() {this.tex_only = true; return this;} private boolean tex_only;
public boolean Fun_ar1() {return fun_ar1;} public Texvc_func_itm Fun_ar1_() {this.fun_ar1 = true; return this;} private boolean fun_ar1;
public boolean Fun_ar2() {return fun_ar2;} public Texvc_func_itm Fun_ar2_() {this.fun_ar2 = true; return this;} private boolean fun_ar2;
public boolean Fun_ar2nb() {return fun_ar2nb;} public Texvc_func_itm Fun_ar2nb_() {this.fun_ar2nb = true; return this;} private boolean fun_ar2nb;
public boolean Fun_infix() {return fun_infix;} public Texvc_func_itm Fun_infix_() {this.fun_infix = true; return this;} private boolean fun_infix;
public boolean Declh() {return declh;} public Texvc_func_itm Declh_() {this.declh = true; return this;} private boolean declh;
public boolean Fontforce_rm() {return fontforce_rm;} public Texvc_func_itm Fontforce_rm_() {this.fontforce_rm = true; return this;} private boolean fontforce_rm;
public boolean Left() {return left;} public Texvc_func_itm Left_() {this.left = true; return this;} private boolean left;
public boolean Right() {return right;} public Texvc_func_itm Right_() {this.right = true; return this;} private boolean right;
public boolean Fail() {return fail;} public Texvc_func_itm Fail_() {this.fail = true; return this;} private boolean fail;
public boolean Type_latex() {return type_latex;} public Texvc_func_itm Type_latex_() {this.type_latex = true; return this;} private boolean type_latex;
public boolean Type_mw() {return type_mw;} public Texvc_func_itm Type_mw_() {this.type_mw = true; return this;} private boolean type_mw;
public int Args() {return args;} public Texvc_func_itm Args_(int v) {args = v; return this;} private int args;
public String Tag() {return tag;} public Texvc_func_itm Tag_(String v) {tag = v; return this;} private String tag;
}

View File

@@ -0,0 +1,709 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.texvcs.funcs; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*; import gplx.xowa.xtns.math.texvcs.*;
public class Texvc_func_itm_ {
public static final int
Id__xowa_arg = 0
, Id__xowa_unknown = 1
, Id__AA = 2
, Id__aleph = 3
, Id__alpha = 4
, Id__amalg = 5
, Id__And = 6
, Id__angle = 7
, Id__approx = 8
, Id__approxeq = 9
, Id__ast = 10
, Id__asymp = 11
, Id__backepsilon = 12
, Id__backprime = 13
, Id__backsim = 14
, Id__backsimeq = 15
, Id__barwedge = 16
, Id__Bbbk = 17
, Id__because = 18
, Id__beta = 19
, Id__beth = 20
, Id__between = 21
, Id__bigcap = 22
, Id__bigcirc = 23
, Id__bigcup = 24
, Id__bigodot = 25
, Id__bigoplus = 26
, Id__bigotimes = 27
, Id__bigsqcup = 28
, Id__bigstar = 29
, Id__bigtriangledown = 30
, Id__bigtriangleup = 31
, Id__biguplus = 32
, Id__bigvee = 33
, Id__bigwedge = 34
, Id__blacklozenge = 35
, Id__blacksquare = 36
, Id__blacktriangle = 37
, Id__blacktriangledown = 38
, Id__blacktriangleleft = 39
, Id__blacktriangleright = 40
, Id__bot = 41
, Id__bowtie = 42
, Id__Box = 43
, Id__boxdot = 44
, Id__boxminus = 45
, Id__boxplus = 46
, Id__boxtimes = 47
, Id__bullet = 48
, Id__bumpeq = 49
, Id__Bumpeq = 50
, Id__cap = 51
, Id__Cap = 52
, Id__cdot = 53
, Id__cdots = 54
, Id__centerdot = 55
, Id__checkmark = 56
, Id__chi = 57
, Id__circ = 58
, Id__circeq = 59
, Id__circlearrowleft = 60
, Id__circlearrowright = 61
, Id__circledast = 62
, Id__circledcirc = 63
, Id__circleddash = 64
, Id__circledS = 65
, Id__clubsuit = 66
, Id__colon = 67
, Id__color = 68
, Id__complement = 69
, Id__cong = 70
, Id__coprod = 71
, Id__cup = 72
, Id__Cup = 73
, Id__curlyeqprec = 74
, Id__curlyeqsucc = 75
, Id__curlyvee = 76
, Id__curlywedge = 77
, Id__curvearrowleft = 78
, Id__curvearrowright = 79
, Id__dagger = 80
, Id__daleth = 81
, Id__dashv = 82
, Id__ddagger = 83
, Id__ddots = 84
, Id__definecolor = 85
, Id__delta = 86
, Id__Delta = 87
, Id__diagdown = 88
, Id__diagup = 89
, Id__diamond = 90
, Id__Diamond = 91
, Id__diamondsuit = 92
, Id__digamma = 93
, Id__displaystyle = 94
, Id__div = 95
, Id__divideontimes = 96
, Id__doteq = 97
, Id__doteqdot = 98
, Id__dotplus = 99
, Id__dots = 100
, Id__dotsb = 101
, Id__dotsc = 102
, Id__dotsi = 103
, Id__dotsm = 104
, Id__dotso = 105
, Id__doublebarwedge = 106
, Id__downdownarrows = 107
, Id__downharpoonleft = 108
, Id__downharpoonright = 109
, Id__ell = 110
, Id__emptyset = 111
, Id__epsilon = 112
, Id__eqcirc = 113
, Id__eqsim = 114
, Id__eqslantgtr = 115
, Id__eqslantless = 116
, Id__equiv = 117
, Id__eta = 118
, Id__eth = 119
, Id__exists = 120
, Id__fallingdotseq = 121
, Id__Finv = 122
, Id__flat = 123
, Id__forall = 124
, Id__frown = 125
, Id__Game = 126
, Id__gamma = 127
, Id__Gamma = 128
, Id__geq = 129
, Id__geqq = 130
, Id__geqslant = 131
, Id__gets = 132
, Id__gg = 133
, Id__ggg = 134
, Id__gimel = 135
, Id__gnapprox = 136
, Id__gneq = 137
, Id__gneqq = 138
, Id__gnsim = 139
, Id__gtrapprox = 140
, Id__gtrdot = 141
, Id__gtreqless = 142
, Id__gtreqqless = 143
, Id__gtrless = 144
, Id__gtrsim = 145
, Id__gvertneqq = 146
, Id__hbar = 147
, Id__heartsuit = 148
, Id__hline = 149
, Id__hookleftarrow = 150
, Id__hookrightarrow = 151
, Id__hslash = 152
, Id__iff = 153
, Id__iiiint = 154
, Id__iiint = 155
, Id__iint = 156
, Id__Im = 157
, Id__imath = 158
, Id__implies = 159
, Id__in = 160
, Id__infty = 161
, Id__injlim = 162
, Id__int = 163
, Id__intercal = 164
, Id__iota = 165
, Id__jmath = 166
, Id__kappa = 167
, Id__lambda = 168
, Id__Lambda = 169
, Id__land = 170
, Id__ldots = 171
, Id__leftarrow = 172
, Id__Leftarrow = 173
, Id__leftarrowtail = 174
, Id__leftharpoondown = 175
, Id__leftharpoonup = 176
, Id__leftleftarrows = 177
, Id__leftrightarrow = 178
, Id__Leftrightarrow = 179
, Id__leftrightarrows = 180
, Id__leftrightharpoons = 181
, Id__leftrightsquigarrow = 182
, Id__leftthreetimes = 183
, Id__leq = 184
, Id__leqq = 185
, Id__leqslant = 186
, Id__lessapprox = 187
, Id__lessdot = 188
, Id__lesseqgtr = 189
, Id__lesseqqgtr = 190
, Id__lessgtr = 191
, Id__lesssim = 192
, Id__limits = 193
, Id__ll = 194
, Id__Lleftarrow = 195
, Id__lll = 196
, Id__lnapprox = 197
, Id__lneq = 198
, Id__lneqq = 199
, Id__lnot = 200
, Id__lnsim = 201
, Id__longleftarrow = 202
, Id__Longleftarrow = 203
, Id__longleftrightarrow = 204
, Id__Longleftrightarrow = 205
, Id__longmapsto = 206
, Id__longrightarrow = 207
, Id__Longrightarrow = 208
, Id__looparrowleft = 209
, Id__looparrowright = 210
, Id__lor = 211
, Id__lozenge = 212
, Id__Lsh = 213
, Id__ltimes = 214
, Id__lVert = 215
, Id__lvertneqq = 216
, Id__mapsto = 217
, Id__measuredangle = 218
, Id__mho = 219
, Id__mid = 220
, Id__mod = 221
, Id__models = 222
, Id__mp = 223
, Id__mu = 224
, Id__multimap = 225
, Id__nabla = 226
, Id__natural = 227
, Id__ncong = 228
, Id__nearrow = 229
, Id__neg = 230
, Id__neq = 231
, Id__nexists = 232
, Id__ngeq = 233
, Id__ngeqq = 234
, Id__ngeqslant = 235
, Id__ngtr = 236
, Id__ni = 237
, Id__nleftarrow = 238
, Id__nLeftarrow = 239
, Id__nleftrightarrow = 240
, Id__nLeftrightarrow = 241
, Id__nleq = 242
, Id__nleqq = 243
, Id__nleqslant = 244
, Id__nless = 245
, Id__nmid = 246
, Id__nolimits = 247
, Id__not = 248
, Id__notin = 249
, Id__nparallel = 250
, Id__nprec = 251
, Id__npreceq = 252
, Id__nrightarrow = 253
, Id__nRightarrow = 254
, Id__nshortmid = 255
, Id__nshortparallel = 256
, Id__nsim = 257
, Id__nsubseteq = 258
, Id__nsubseteqq = 259
, Id__nsucc = 260
, Id__nsucceq = 261
, Id__nsupseteq = 262
, Id__nsupseteqq = 263
, Id__ntriangleleft = 264
, Id__ntrianglelefteq = 265
, Id__ntriangleright = 266
, Id__ntrianglerighteq = 267
, Id__nu = 268
, Id__nvdash = 269
, Id__nVdash = 270
, Id__nvDash = 271
, Id__nVDash = 272
, Id__nwarrow = 273
, Id__odot = 274
, Id__oint = 275
, Id__omega = 276
, Id__Omega = 277
, Id__ominus = 278
, Id__oplus = 279
, Id__oslash = 280
, Id__otimes = 281
, Id__overbrace = 282
, Id__overleftarrow = 283
, Id__overleftrightarrow = 284
, Id__overline = 285
, Id__overrightarrow = 286
, Id__P = 287
, Id__pagecolor = 288
, Id__parallel = 289
, Id__partial = 290
, Id__perp = 291
, Id__phi = 292
, Id__Phi = 293
, Id__pi = 294
, Id__Pi = 295
, Id__pitchfork = 296
, Id__pm = 297
, Id__prec = 298
, Id__precapprox = 299
, Id__preccurlyeq = 300
, Id__preceq = 301
, Id__precnapprox = 302
, Id__precneqq = 303
, Id__precnsim = 304
, Id__precsim = 305
, Id__prime = 306
, Id__prod = 307
, Id__projlim = 308
, Id__propto = 309
, Id__psi = 310
, Id__Psi = 311
, Id__qquad = 312
, Id__quad = 313
, Id__Re = 314
, Id__rho = 315
, Id__rightarrow = 316
, Id__Rightarrow = 317
, Id__rightarrowtail = 318
, Id__rightharpoondown = 319
, Id__rightharpoonup = 320
, Id__rightleftarrows = 321
, Id__rightrightarrows = 322
, Id__rightsquigarrow = 323
, Id__rightthreetimes = 324
, Id__risingdotseq = 325
, Id__Rrightarrow = 326
, Id__Rsh = 327
, Id__rtimes = 328
, Id__rVert = 329
, Id__S = 330
, Id__scriptscriptstyle = 331
, Id__scriptstyle = 332
, Id__searrow = 333
, Id__setminus = 334
, Id__sharp = 335
, Id__shortmid = 336
, Id__shortparallel = 337
, Id__sigma = 338
, Id__Sigma = 339
, Id__sim = 340
, Id__simeq = 341
, Id__smallfrown = 342
, Id__smallsetminus = 343
, Id__smallsmile = 344
, Id__smile = 345
, Id__spadesuit = 346
, Id__sphericalangle = 347
, Id__sqcap = 348
, Id__sqcup = 349
, Id__sqsubset = 350
, Id__sqsubseteq = 351
, Id__sqsupset = 352
, Id__sqsupseteq = 353
, Id__square = 354
, Id__star = 355
, Id__subset = 356
, Id__Subset = 357
, Id__subseteq = 358
, Id__subseteqq = 359
, Id__subsetneq = 360
, Id__subsetneqq = 361
, Id__succ = 362
, Id__succapprox = 363
, Id__succcurlyeq = 364
, Id__succeq = 365
, Id__succnapprox = 366
, Id__succneqq = 367
, Id__succnsim = 368
, Id__succsim = 369
, Id__sum = 370
, Id__supset = 371
, Id__Supset = 372
, Id__supseteq = 373
, Id__supseteqq = 374
, Id__supsetneq = 375
, Id__supsetneqq = 376
, Id__surd = 377
, Id__swarrow = 378
, Id__tau = 379
, Id__textstyle = 380
, Id__textvisiblespace = 381
, Id__therefore = 382
, Id__theta = 383
, Id__Theta = 384
, Id__thickapprox = 385
, Id__thicksim = 386
, Id__times = 387
, Id__to = 388
, Id__top = 389
, Id__triangle = 390
, Id__triangledown = 391
, Id__triangleleft = 392
, Id__trianglelefteq = 393
, Id__triangleq = 394
, Id__triangleright = 395
, Id__trianglerighteq = 396
, Id__underbrace = 397
, Id__underline = 398
, Id__upharpoonleft = 399
, Id__upharpoonright = 400
, Id__uplus = 401
, Id__upsilon = 402
, Id__Upsilon = 403
, Id__upuparrows = 404
, Id__varepsilon = 405
, Id__varinjlim = 406
, Id__varkappa = 407
, Id__varliminf = 408
, Id__varlimsup = 409
, Id__varnothing = 410
, Id__varphi = 411
, Id__varpi = 412
, Id__varprojlim = 413
, Id__varpropto = 414
, Id__varrho = 415
, Id__varsigma = 416
, Id__varsubsetneq = 417
, Id__varsubsetneqq = 418
, Id__varsupsetneq = 419
, Id__varsupsetneqq = 420
, Id__vartheta = 421
, Id__vartriangle = 422
, Id__vartriangleleft = 423
, Id__vartriangleright = 424
, Id__vdash = 425
, Id__Vdash = 426
, Id__vDash = 427
, Id__vdots = 428
, Id__vee = 429
, Id__veebar = 430
, Id__vline = 431
, Id__Vvdash = 432
, Id__wedge = 433
, Id__widehat = 434
, Id__widetilde = 435
, Id__wp = 436
, Id__wr = 437
, Id__xi = 438
, Id__Xi = 439
, Id__zeta = 440
, Id__big = 441
, Id__Big = 442
, Id__bigg = 443
, Id__Bigg = 444
, Id__biggl = 445
, Id__Biggl = 446
, Id__biggr = 447
, Id__Biggr = 448
, Id__bigl = 449
, Id__Bigl = 450
, Id__bigr = 451
, Id__Bigr = 452
, Id__backslash = 453
, Id__downarrow = 454
, Id__Downarrow = 455
, Id__langle = 456
, Id__lbrace = 457
, Id__lceil = 458
, Id__lfloor = 459
, Id__llcorner = 460
, Id__lrcorner = 461
, Id__rangle = 462
, Id__rbrace = 463
, Id__rceil = 464
, Id__rfloor = 465
, Id__rightleftharpoons = 466
, Id__twoheadleftarrow = 467
, Id__twoheadrightarrow = 468
, Id__ulcorner = 469
, Id__uparrow = 470
, Id__Uparrow = 471
, Id__updownarrow = 472
, Id__Updownarrow = 473
, Id__urcorner = 474
, Id__Vert = 475
, Id__vert = 476
, Id__lbrack = 477
, Id__rbrack = 478
, Id__acute = 479
, Id__bar = 480
, Id__bcancel = 481
, Id__bmod = 482
, Id__boldsymbol = 483
, Id__breve = 484
, Id__cancel = 485
, Id__check = 486
, Id__ddot = 487
, Id__dot = 488
, Id__emph = 489
, Id__grave = 490
, Id__hat = 491
, Id__mathbb = 492
, Id__mathbf = 493
, Id__mathbin = 494
, Id__mathcal = 495
, Id__mathclose = 496
, Id__mathfrak = 497
, Id__mathit = 498
, Id__mathop = 499
, Id__mathopen = 500
, Id__mathord = 501
, Id__mathpunct = 502
, Id__mathrel = 503
, Id__mathrm = 504
, Id__mathsf = 505
, Id__mathtt = 506
, Id__operatorname = 507
, Id__pmod = 508
, Id__sqrt = 509
, Id__textbf = 510
, Id__textit = 511
, Id__textrm = 512
, Id__textsf = 513
, Id__texttt = 514
, Id__tilde = 515
, Id__vec = 516
, Id__xcancel = 517
, Id__xleftarrow = 518
, Id__xrightarrow = 519
, Id__binom = 520
, Id__cancelto = 521
, Id__cfrac = 522
, Id__dbinom = 523
, Id__dfrac = 524
, Id__frac = 525
, Id__overset = 526
, Id__stackrel = 527
, Id__tbinom = 528
, Id__tfrac = 529
, Id__underset = 530
, Id__atop = 531
, Id__choose = 532
, Id__over = 533
, Id__Coppa = 534
, Id__coppa = 535
, Id__Digamma = 536
, Id__euro = 537
, Id__geneuro = 538
, Id__geneuronarrow = 539
, Id__geneurowide = 540
, Id__Koppa = 541
, Id__koppa = 542
, Id__officialeuro = 543
, Id__Sampi = 544
, Id__sampi = 545
, Id__Stigma = 546
, Id__stigma = 547
, Id__varstigma = 548
, Id__C = 549
, Id__H = 550
, Id__N = 551
, Id__Q = 552
, Id__R = 553
, Id__Z = 554
, Id__darr = 555
, Id__dArr = 556
, Id__Darr = 557
, Id__lang = 558
, Id__rang = 559
, Id__uarr = 560
, Id__uArr = 561
, Id__Uarr = 562
, Id__Bbb = 563
, Id__bold = 564
, Id__alef = 565
, Id__alefsym = 566
, Id__Alpha = 567
, Id__and = 568
, Id__ang = 569
, Id__Beta = 570
, Id__bull = 571
, Id__Chi = 572
, Id__clubs = 573
, Id__cnums = 574
, Id__Complex = 575
, Id__Dagger = 576
, Id__diamonds = 577
, Id__Doteq = 578
, Id__doublecap = 579
, Id__doublecup = 580
, Id__empty = 581
, Id__Epsilon = 582
, Id__Eta = 583
, Id__exist = 584
, Id__ge = 585
, Id__gggtr = 586
, Id__hAar = 587
, Id__harr = 588
, Id__Harr = 589
, Id__hearts = 590
, Id__image = 591
, Id__infin = 592
, Id__Iota = 593
, Id__isin = 594
, Id__Kappa = 595
, Id__larr = 596
, Id__Larr = 597
, Id__lArr = 598
, Id__le = 599
, Id__lrarr = 600
, Id__Lrarr = 601
, Id__lrArr = 602
, Id__Mu = 603
, Id__natnums = 604
, Id__ne = 605
, Id__Nu = 606
, Id__O = 607
, Id__omicron = 608
, Id__Omicron = 609
, Id__or = 610
, Id__part = 611
, Id__plusmn = 612
, Id__rarr = 613
, Id__Rarr = 614
, Id__rArr = 615
, Id__real = 616
, Id__reals = 617
, Id__Reals = 618
, Id__restriction = 619
, Id__Rho = 620
, Id__sdot = 621
, Id__sect = 622
, Id__spades = 623
, Id__sub = 624
, Id__sube = 625
, Id__supe = 626
, Id__Tau = 627
, Id__thetasym = 628
, Id__varcoppa = 629
, Id__weierp = 630
, Id__Zeta = 631
, Id__rm = 632
, Id__it = 633
, Id__cal = 634
, Id__bf = 635
, Id__sideset = 636
, Id__left = 637
, Id__right = 638
, Id__text = 639
, Id__mbox = 640
, Id__vbox = 641
, Id__hbox = 642
, Id__arccos = 643
, Id__arcsin = 644
, Id__arctan = 645
, Id__arg = 646
, Id__cos = 647
, Id__cosh = 648
, Id__cot = 649
, Id__coth = 650
, Id__csc = 651
, Id__deg = 652
, Id__det = 653
, Id__dim = 654
, Id__exp = 655
, Id__gcd = 656
, Id__hom = 657
, Id__inf = 658
, Id__ker = 659
, Id__lg = 660
, Id__lim = 661
, Id__liminf = 662
, Id__limsup = 663
, Id__ln = 664
, Id__log = 665
, Id__max = 666
, Id__min = 667
, Id__Pr = 668
, Id__sec = 669
, Id__sin = 670
, Id__sinh = 671
, Id__sup = 672
, Id__tan = 673
, Id__tanh = 674
, Id__arccot = 675
, Id__arcsec = 676
, Id__arccsc = 677
, Id__sgn = 678
, Id__sen = 679
, Id__begin = 680
, Id__end = 681
;
public static final int Id_len = 682;
public static final Texvc_func_itm
Itm__arg = new Texvc_func_itm(Texvc_func_itm_.Id__xowa_arg , null)
, Itm__unknown = new Texvc_func_itm(Texvc_func_itm_.Id__xowa_unknown , null)
;
}

View File

@@ -0,0 +1,721 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.texvcs.funcs; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*; import gplx.xowa.xtns.math.texvcs.*;
import gplx.xowa.xtns.math.texvcs.tkns.*;
public class Texvc_func_regy {
private final Texvc_func_itm[] ary = new Texvc_func_itm[Texvc_func_itm_.Id_len];
private final Hash_adp_bry hash = Hash_adp_bry.cs();
public Texvc_func_itm Get_at(int id) {return ary[id];}
public Texvc_func_itm Get_by_mid(byte[] src, int bgn, int end) {return (Texvc_func_itm)hash.Get_by_mid(src, bgn, end);}
private void Add(Texvc_tkn_mkr tkn_mkr, Texvc_func_itm itm) {
int itm_id = itm.Id();
ary[itm_id] = itm;
if (itm_id > Texvc_func_itm_.Id__xowa_unknown)
hash.Add(itm.Key(), itm);
Texvc_tkn func_prototype = itm.Tkn();
if (func_prototype != null)
tkn_mkr.Reg_singleton(itm.Singleton_id(), func_prototype);
}
public static Texvc_func_regy new_(Texvc_tkn_mkr tkn_mkr) {
Texvc_func_regy rv = new Texvc_func_regy();
rv.Add(tkn_mkr, Texvc_func_itm_.Itm__arg);
rv.Add(tkn_mkr, Texvc_func_itm_.Itm__unknown);
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__AA, "AA").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__aleph, "aleph").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__alpha, "alpha").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__amalg, "amalg").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__And, "And").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__angle, "angle").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__approx, "approx").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__approxeq, "approxeq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__ast, "ast").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__asymp, "asymp").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__backepsilon, "backepsilon").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__backprime, "backprime").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__backsim, "backsim").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__backsimeq, "backsimeq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__barwedge, "barwedge").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Bbbk, "Bbbk").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__because, "because").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__beta, "beta").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__beth, "beth").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__between, "between").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__bigcap, "bigcap").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__bigcirc, "bigcirc").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__bigcup, "bigcup").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__bigodot, "bigodot").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__bigoplus, "bigoplus").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__bigotimes, "bigotimes").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__bigsqcup, "bigsqcup").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__bigstar, "bigstar").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__bigtriangledown, "bigtriangledown").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__bigtriangleup, "bigtriangleup").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__biguplus, "biguplus").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__bigvee, "bigvee").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__bigwedge, "bigwedge").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__blacklozenge, "blacklozenge").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__blacksquare, "blacksquare").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__blacktriangle, "blacktriangle").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__blacktriangledown, "blacktriangledown").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__blacktriangleleft, "blacktriangleleft").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__blacktriangleright, "blacktriangleright").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__bot, "bot").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__bowtie, "bowtie").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Box, "Box").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__boxdot, "boxdot").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__boxminus, "boxminus").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__boxplus, "boxplus").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__boxtimes, "boxtimes").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__bullet, "bullet").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__bumpeq, "bumpeq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Bumpeq, "Bumpeq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__cap, "cap").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Cap, "Cap").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__cdot, "cdot").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__cdots, "cdots").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__centerdot, "centerdot").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__checkmark, "checkmark").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__chi, "chi").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__circ, "circ").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__circeq, "circeq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__circlearrowleft, "circlearrowleft").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__circlearrowright, "circlearrowright").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__circledast, "circledast").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__circledcirc, "circledcirc").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__circleddash, "circleddash").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__circledS, "circledS").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__clubsuit, "clubsuit").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__colon, "colon").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__color, "color").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__complement, "complement").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__cong, "cong").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__coprod, "coprod").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__cup, "cup").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Cup, "Cup").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__curlyeqprec, "curlyeqprec").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__curlyeqsucc, "curlyeqsucc").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__curlyvee, "curlyvee").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__curlywedge, "curlywedge").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__curvearrowleft, "curvearrowleft").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__curvearrowright, "curvearrowright").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__dagger, "dagger").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__daleth, "daleth").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__dashv, "dashv").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__ddagger, "ddagger").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__ddots, "ddots").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__definecolor, "definecolor").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__delta, "delta").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Delta, "Delta").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__diagdown, "diagdown").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__diagup, "diagup").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__diamond, "diamond").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Diamond, "Diamond").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__diamondsuit, "diamondsuit").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__digamma, "digamma").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__displaystyle, "displaystyle").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__div, "div").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__divideontimes, "divideontimes").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__doteq, "doteq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__doteqdot, "doteqdot").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__dotplus, "dotplus").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__dots, "dots").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__dotsb, "dotsb").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__dotsc, "dotsc").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__dotsi, "dotsi").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__dotsm, "dotsm").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__dotso, "dotso").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__doublebarwedge, "doublebarwedge").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__downdownarrows, "downdownarrows").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__downharpoonleft, "downharpoonleft").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__downharpoonright, "downharpoonright").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__ell, "ell").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__emptyset, "emptyset").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__epsilon, "epsilon").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__eqcirc, "eqcirc").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__eqsim, "eqsim").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__eqslantgtr, "eqslantgtr").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__eqslantless, "eqslantless").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__equiv, "equiv").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__eta, "eta").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__eth, "eth").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__exists, "exists").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__fallingdotseq, "fallingdotseq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Finv, "Finv").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__flat, "flat").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__forall, "forall").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__frown, "frown").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Game, "Game").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__gamma, "gamma").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Gamma, "Gamma").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__geq, "geq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__geqq, "geqq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__geqslant, "geqslant").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__gets, "gets").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__gg, "gg").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__ggg, "ggg").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__gimel, "gimel").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__gnapprox, "gnapprox").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__gneq, "gneq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__gneqq, "gneqq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__gnsim, "gnsim").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__gtrapprox, "gtrapprox").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__gtrdot, "gtrdot").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__gtreqless, "gtreqless").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__gtreqqless, "gtreqqless").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__gtrless, "gtrless").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__gtrsim, "gtrsim").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__gvertneqq, "gvertneqq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__hbar, "hbar").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__heartsuit, "heartsuit").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__hline, "hline").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__hookleftarrow, "hookleftarrow").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__hookrightarrow, "hookrightarrow").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__hslash, "hslash").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__iff, "iff").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__iiiint, "iiiint").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__iiint, "iiint").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__iint, "iint").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Im, "Im").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__imath, "imath").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__implies, "implies").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__in, "in").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__infty, "infty").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__injlim, "injlim").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__int, "int").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__intercal, "intercal").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__iota, "iota").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__jmath, "jmath").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__kappa, "kappa").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__lambda, "lambda").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Lambda, "Lambda").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__land, "land").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__ldots, "ldots").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__leftarrow, "leftarrow").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Leftarrow, "Leftarrow").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__leftarrowtail, "leftarrowtail").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__leftharpoondown, "leftharpoondown").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__leftharpoonup, "leftharpoonup").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__leftleftarrows, "leftleftarrows").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__leftrightarrow, "leftrightarrow").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Leftrightarrow, "Leftrightarrow").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__leftrightarrows, "leftrightarrows").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__leftrightharpoons, "leftrightharpoons").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__leftrightsquigarrow, "leftrightsquigarrow").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__leftthreetimes, "leftthreetimes").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__leq, "leq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__leqq, "leqq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__leqslant, "leqslant").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__lessapprox, "lessapprox").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__lessdot, "lessdot").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__lesseqgtr, "lesseqgtr").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__lesseqqgtr, "lesseqqgtr").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__lessgtr, "lessgtr").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__lesssim, "lesssim").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__limits, "limits").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__ll, "ll").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Lleftarrow, "Lleftarrow").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__lll, "lll").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__lnapprox, "lnapprox").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__lneq, "lneq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__lneqq, "lneqq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__lnot, "lnot").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__lnsim, "lnsim").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__longleftarrow, "longleftarrow").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Longleftarrow, "Longleftarrow").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__longleftrightarrow, "longleftrightarrow").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Longleftrightarrow, "Longleftrightarrow").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__longmapsto, "longmapsto").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__longrightarrow, "longrightarrow").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Longrightarrow, "Longrightarrow").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__looparrowleft, "looparrowleft").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__looparrowright, "looparrowright").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__lor, "lor").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__lozenge, "lozenge").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Lsh, "Lsh").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__ltimes, "ltimes").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__lVert, "lVert").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__lvertneqq, "lvertneqq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__mapsto, "mapsto").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__measuredangle, "measuredangle").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__mho, "mho").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__mid, "mid").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__mod, "mod").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__models, "models").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__mp, "mp").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__mu, "mu").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__multimap, "multimap").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__nabla, "nabla").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__natural, "natural").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__ncong, "ncong").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__nearrow, "nearrow").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__neg, "neg").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__neq, "neq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__nexists, "nexists").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__ngeq, "ngeq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__ngeqq, "ngeqq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__ngeqslant, "ngeqslant").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__ngtr, "ngtr").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__ni, "ni").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__nleftarrow, "nleftarrow").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__nLeftarrow, "nLeftarrow").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__nleftrightarrow, "nleftrightarrow").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__nLeftrightarrow, "nLeftrightarrow").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__nleq, "nleq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__nleqq, "nleqq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__nleqslant, "nleqslant").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__nless, "nless").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__nmid, "nmid").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__nolimits, "nolimits").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__not, "not").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__notin, "notin").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__nparallel, "nparallel").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__nprec, "nprec").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__npreceq, "npreceq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__nrightarrow, "nrightarrow").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__nRightarrow, "nRightarrow").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__nshortmid, "nshortmid").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__nshortparallel, "nshortparallel").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__nsim, "nsim").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__nsubseteq, "nsubseteq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__nsubseteqq, "nsubseteqq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__nsucc, "nsucc").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__nsucceq, "nsucceq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__nsupseteq, "nsupseteq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__nsupseteqq, "nsupseteqq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__ntriangleleft, "ntriangleleft").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__ntrianglelefteq, "ntrianglelefteq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__ntriangleright, "ntriangleright").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__ntrianglerighteq, "ntrianglerighteq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__nu, "nu").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__nvdash, "nvdash").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__nVdash, "nVdash").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__nvDash, "nvDash").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__nVDash, "nVDash").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__nwarrow, "nwarrow").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__odot, "odot").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__oint, "oint").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__omega, "omega").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Omega, "Omega").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__ominus, "ominus").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__oplus, "oplus").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__oslash, "oslash").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__otimes, "otimes").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__overbrace, "overbrace").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__overleftarrow, "overleftarrow").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__overleftrightarrow, "overleftrightarrow").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__overline, "overline").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__overrightarrow, "overrightarrow").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__P, "P").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__pagecolor, "pagecolor").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__parallel, "parallel").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__partial, "partial").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__perp, "perp").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__phi, "phi").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Phi, "Phi").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__pi, "pi").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Pi, "Pi").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__pitchfork, "pitchfork").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__pm, "pm").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__prec, "prec").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__precapprox, "precapprox").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__preccurlyeq, "preccurlyeq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__preceq, "preceq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__precnapprox, "precnapprox").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__precneqq, "precneqq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__precnsim, "precnsim").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__precsim, "precsim").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__prime, "prime").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__prod, "prod").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__projlim, "projlim").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__propto, "propto").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__psi, "psi").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Psi, "Psi").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__qquad, "qquad").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__quad, "quad").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Re, "Re").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__rho, "rho").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__rightarrow, "rightarrow").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Rightarrow, "Rightarrow").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__rightarrowtail, "rightarrowtail").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__rightharpoondown, "rightharpoondown").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__rightharpoonup, "rightharpoonup").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__rightleftarrows, "rightleftarrows").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__rightrightarrows, "rightrightarrows").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__rightsquigarrow, "rightsquigarrow").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__rightthreetimes, "rightthreetimes").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__risingdotseq, "risingdotseq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Rrightarrow, "Rrightarrow").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Rsh, "Rsh").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__rtimes, "rtimes").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__rVert, "rVert").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__S, "S").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__scriptscriptstyle, "scriptscriptstyle").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__scriptstyle, "scriptstyle").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__searrow, "searrow").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__setminus, "setminus").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__sharp, "sharp").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__shortmid, "shortmid").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__shortparallel, "shortparallel").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__sigma, "sigma").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Sigma, "Sigma").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__sim, "sim").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__simeq, "simeq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__smallfrown, "smallfrown").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__smallsetminus, "smallsetminus").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__smallsmile, "smallsmile").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__smile, "smile").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__spadesuit, "spadesuit").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__sphericalangle, "sphericalangle").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__sqcap, "sqcap").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__sqcup, "sqcup").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__sqsubset, "sqsubset").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__sqsubseteq, "sqsubseteq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__sqsupset, "sqsupset").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__sqsupseteq, "sqsupseteq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__square, "square").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__star, "star").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__subset, "subset").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Subset, "Subset").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__subseteq, "subseteq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__subseteqq, "subseteqq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__subsetneq, "subsetneq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__subsetneqq, "subsetneqq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__succ, "succ").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__succapprox, "succapprox").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__succcurlyeq, "succcurlyeq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__succeq, "succeq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__succnapprox, "succnapprox").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__succneqq, "succneqq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__succnsim, "succnsim").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__succsim, "succsim").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__sum, "sum").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__supset, "supset").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Supset, "Supset").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__supseteq, "supseteq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__supseteqq, "supseteqq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__supsetneq, "supsetneq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__supsetneqq, "supsetneqq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__surd, "surd").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__swarrow, "swarrow").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__tau, "tau").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__textstyle, "textstyle").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__textvisiblespace, "textvisiblespace").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__therefore, "therefore").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__theta, "theta").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Theta, "Theta").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__thickapprox, "thickapprox").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__thicksim, "thicksim").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__times, "times").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__to, "to").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__top, "top").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__triangle, "triangle").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__triangledown, "triangledown").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__triangleleft, "triangleleft").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__trianglelefteq, "trianglelefteq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__triangleq, "triangleq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__triangleright, "triangleright").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__trianglerighteq, "trianglerighteq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__underbrace, "underbrace").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__underline, "underline").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__upharpoonleft, "upharpoonleft").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__upharpoonright, "upharpoonright").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__uplus, "uplus").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__upsilon, "upsilon").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Upsilon, "Upsilon").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__upuparrows, "upuparrows").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__varepsilon, "varepsilon").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__varinjlim, "varinjlim").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__varkappa, "varkappa").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__varliminf, "varliminf").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__varlimsup, "varlimsup").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__varnothing, "varnothing").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__varphi, "varphi").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__varpi, "varpi").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__varprojlim, "varprojlim").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__varpropto, "varpropto").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__varrho, "varrho").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__varsigma, "varsigma").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__varsubsetneq, "varsubsetneq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__varsubsetneqq, "varsubsetneqq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__varsupsetneq, "varsupsetneq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__varsupsetneqq, "varsupsetneqq").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__vartheta, "vartheta").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__vartriangle, "vartriangle").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__vartriangleleft, "vartriangleleft").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__vartriangleright, "vartriangleright").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__vdash, "vdash").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Vdash, "Vdash").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__vDash, "vDash").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__vdots, "vdots").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__vee, "vee").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__veebar, "veebar").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__vline, "vline").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Vvdash, "Vvdash").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__wedge, "wedge").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__widehat, "widehat").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__widetilde, "widetilde").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__wp, "wp").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__wr, "wr").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__xi, "xi").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Xi, "Xi").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__zeta, "zeta").Literal_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__big, "big").Big_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Big, "Big").Big_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__bigg, "bigg").Big_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Bigg, "Bigg").Big_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__biggl, "biggl").Big_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Biggl, "Biggl").Big_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__biggr, "biggr").Big_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Biggr, "Biggr").Big_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__bigl, "bigl").Big_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Bigl, "Bigl").Big_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__bigr, "bigr").Big_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Bigr, "Bigr").Big_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__backslash, "backslash").Delimiter_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__downarrow, "downarrow").Delimiter_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Downarrow, "Downarrow").Delimiter_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__langle, "langle").Delimiter_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__lbrace, "lbrace").Delimiter_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__lceil, "lceil").Delimiter_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__lfloor, "lfloor").Delimiter_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__llcorner, "llcorner").Delimiter_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__lrcorner, "lrcorner").Delimiter_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__rangle, "rangle").Delimiter_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__rbrace, "rbrace").Delimiter_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__rceil, "rceil").Delimiter_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__rfloor, "rfloor").Delimiter_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__rightleftharpoons, "rightleftharpoons").Delimiter_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__twoheadleftarrow, "twoheadleftarrow").Delimiter_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__twoheadrightarrow, "twoheadrightarrow").Delimiter_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__ulcorner, "ulcorner").Delimiter_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__uparrow, "uparrow").Delimiter_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Uparrow, "Uparrow").Delimiter_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__updownarrow, "updownarrow").Delimiter_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Updownarrow, "Updownarrow").Delimiter_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__urcorner, "urcorner").Delimiter_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Vert, "Vert").Delimiter_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__vert, "vert").Delimiter_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__lbrack, "lbrack").Delimiter_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__rbrack, "rbrack").Delimiter_().Tex_only_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__acute, "acute").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__bar, "bar").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__bcancel, "bcancel").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__bmod, "bmod").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__boldsymbol, "boldsymbol").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__breve, "breve").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__cancel, "cancel").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__check, "check").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__ddot, "ddot").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__dot, "dot").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__emph, "emph").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__grave, "grave").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__hat, "hat").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__mathbb, "mathbb").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__mathbf, "mathbf").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__mathbin, "mathbin").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__mathcal, "mathcal").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__mathclose, "mathclose").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__mathfrak, "mathfrak").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__mathit, "mathit").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__mathop, "mathop").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__mathopen, "mathopen").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__mathord, "mathord").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__mathpunct, "mathpunct").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__mathrel, "mathrel").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__mathrm, "mathrm").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__mathsf, "mathsf").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__mathtt, "mathtt").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__operatorname, "operatorname").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__pmod, "pmod").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__sqrt, "sqrt").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__textbf, "textbf").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__textit, "textit").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__textrm, "textrm").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__textsf, "textsf").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__texttt, "texttt").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__tilde, "tilde").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__vec, "vec").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__xcancel, "xcancel").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__xleftarrow, "xleftarrow").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__xrightarrow, "xrightarrow").Args_(1).Fun_ar1_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__binom, "binom").Args_(2).Fun_ar2_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__cancelto, "cancelto").Args_(2).Fun_ar2_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__cfrac, "cfrac").Args_(2).Fun_ar2_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__dbinom, "dbinom").Args_(2).Fun_ar2_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__dfrac, "dfrac").Args_(2).Fun_ar2_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__frac, "frac").Args_(2).Fun_ar2_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__overset, "overset").Args_(2).Fun_ar2_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__stackrel, "stackrel").Args_(2).Fun_ar2_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__tbinom, "tbinom").Args_(2).Fun_ar2_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__tfrac, "tfrac").Args_(2).Fun_ar2_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__underset, "underset").Args_(2).Fun_ar2_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__atop, "atop").Fun_infix_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__choose, "choose").Fun_infix_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__over, "over").Fun_infix_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Coppa, "Coppa").Literal_().Tex_only_().Manual_("\\mbox{~0}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__coppa, "coppa").Literal_().Tex_only_().Manual_("\\mbox{~0}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Digamma, "Digamma").Literal_().Tex_only_().Manual_("\\mbox{~0}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__euro, "euro").Literal_().Tex_only_().Manual_("\\mbox{~0}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__geneuro, "geneuro").Literal_().Tex_only_().Manual_("\\mbox{~0}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__geneuronarrow, "geneuronarrow").Literal_().Tex_only_().Manual_("\\mbox{~0}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__geneurowide, "geneurowide").Literal_().Tex_only_().Manual_("\\mbox{~0}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Koppa, "Koppa").Literal_().Tex_only_().Manual_("\\mbox{~0}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__koppa, "koppa").Literal_().Tex_only_().Manual_("\\mbox{~0}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__officialeuro, "officialeuro").Literal_().Tex_only_().Manual_("\\mbox{~0}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Sampi, "Sampi").Literal_().Tex_only_().Manual_("\\mbox{~0}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__sampi, "sampi").Literal_().Tex_only_().Manual_("\\mbox{~0}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Stigma, "Stigma").Literal_().Tex_only_().Manual_("\\mbox{~0}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__stigma, "stigma").Literal_().Tex_only_().Manual_("\\mbox{~0}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__varstigma, "varstigma").Literal_().Tex_only_().Manual_("\\mbox{~0}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__C, "C").Literal_().Tex_only_().Manual_("\\mathbb{C}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__H, "H").Literal_().Tex_only_().Manual_("\\mathbb{H}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__N, "N").Literal_().Tex_only_().Manual_("\\mathbb{N}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Q, "Q").Literal_().Tex_only_().Manual_("\\mathbb{Q}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__R, "R").Literal_().Tex_only_().Manual_("\\mathbb{R}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Z, "Z").Literal_().Tex_only_().Manual_("\\mathbb{Z}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__darr, "darr").Delimiter_().Tex_only_().Manual_("\\downarrow"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__dArr, "dArr").Delimiter_().Tex_only_().Manual_("\\Downarrow"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Darr, "Darr").Delimiter_().Tex_only_().Manual_("\\Downarrow"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__lang, "lang").Delimiter_().Tex_only_().Manual_("\\langle"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__rang, "rang").Delimiter_().Tex_only_().Manual_("\\rangle"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__uarr, "uarr").Delimiter_().Tex_only_().Manual_("\\uparrow"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__uArr, "uArr").Delimiter_().Tex_only_().Manual_("\\Uparrow"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Uarr, "Uarr").Delimiter_().Tex_only_().Manual_("\\Uparrow"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Bbb, "Bbb").Args_(1).Fun_ar1_().Manual_("\\mathbb"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__bold, "bold").Args_(1).Fun_ar1_().Manual_("\\mathbf"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__alef, "alef").Literal_().Tex_only_().Manual_("\\aleph"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__alefsym, "alefsym").Literal_().Tex_only_().Manual_("\\aleph"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Alpha, "Alpha").Literal_().Tex_only_().Manual_("\\mathrm{A}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__and, "and").Literal_().Tex_only_().Manual_("\\land"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__ang, "ang").Literal_().Tex_only_().Manual_("\\angle"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Beta, "Beta").Literal_().Tex_only_().Manual_("\\mathrm{B}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__bull, "bull").Literal_().Tex_only_().Manual_("\\bullet"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Chi, "Chi").Literal_().Tex_only_().Manual_("\\mathrm{X}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__clubs, "clubs").Literal_().Tex_only_().Manual_("\\clubsuit"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__cnums, "cnums").Literal_().Tex_only_().Manual_("\\mathbb{C}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Complex, "Complex").Literal_().Tex_only_().Manual_("\\mathbb{C}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Dagger, "Dagger").Literal_().Tex_only_().Manual_("\\ddagger"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__diamonds, "diamonds").Literal_().Tex_only_().Manual_("\\diamondsuit"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Doteq, "Doteq").Literal_().Tex_only_().Manual_("\\doteqdot"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__doublecap, "doublecap").Literal_().Tex_only_().Manual_("\\Cap"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__doublecup, "doublecup").Literal_().Tex_only_().Manual_("\\Cup"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__empty, "empty").Literal_().Tex_only_().Manual_("\\emptyset"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Epsilon, "Epsilon").Literal_().Tex_only_().Manual_("\\mathrm{E}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Eta, "Eta").Literal_().Tex_only_().Manual_("\\mathrm{H}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__exist, "exist").Literal_().Tex_only_().Manual_("\\exists"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__ge, "ge").Literal_().Tex_only_().Manual_("\\geq"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__gggtr, "gggtr").Literal_().Tex_only_().Manual_("\\ggg"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__hAar, "hAar").Literal_().Tex_only_().Manual_("\\Leftrightarrow"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__harr, "harr").Literal_().Tex_only_().Manual_("\\leftrightarrow"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Harr, "Harr").Literal_().Tex_only_().Manual_("\\Leftrightarrow"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__hearts, "hearts").Literal_().Tex_only_().Manual_("\\heartsuit"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__image, "image").Literal_().Tex_only_().Manual_("\\Im"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__infin, "infin").Literal_().Tex_only_().Manual_("\\infty"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Iota, "Iota").Literal_().Tex_only_().Manual_("\\mathrm{I}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__isin, "isin").Literal_().Tex_only_().Manual_("\\in"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Kappa, "Kappa").Literal_().Tex_only_().Manual_("\\mathrm{K}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__larr, "larr").Literal_().Tex_only_().Manual_("\\leftarrow"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Larr, "Larr").Literal_().Tex_only_().Manual_("\\Leftarrow"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__lArr, "lArr").Literal_().Tex_only_().Manual_("\\Leftarrow"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__le, "le").Literal_().Tex_only_().Manual_("\\leq"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__lrarr, "lrarr").Literal_().Tex_only_().Manual_("\\leftrightarrow"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Lrarr, "Lrarr").Literal_().Tex_only_().Manual_("\\Leftrightarrow"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__lrArr, "lrArr").Literal_().Tex_only_().Manual_("\\Leftrightarrow"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Mu, "Mu").Literal_().Tex_only_().Manual_("\\mathrm{M}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__natnums, "natnums").Literal_().Tex_only_().Manual_("\\mathbb{N}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__ne, "ne").Literal_().Tex_only_().Manual_("\\neq"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Nu, "Nu").Literal_().Tex_only_().Manual_("\\mathrm{N}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__O, "O").Literal_().Tex_only_().Manual_("\\emptyset"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__omicron, "omicron").Literal_().Tex_only_().Manual_("\\mathrm{o}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Omicron, "Omicron").Literal_().Tex_only_().Manual_("\\mathrm{O}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__or, "or").Literal_().Tex_only_().Manual_("\\lor"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__part, "part").Literal_().Tex_only_().Manual_("\\partial"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__plusmn, "plusmn").Literal_().Tex_only_().Manual_("\\pm"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__rarr, "rarr").Literal_().Tex_only_().Manual_("\\rightarrow"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Rarr, "Rarr").Literal_().Tex_only_().Manual_("\\Rightarrow"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__rArr, "rArr").Literal_().Tex_only_().Manual_("\\Rightarrow"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__real, "real").Literal_().Tex_only_().Manual_("\\Re"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__reals, "reals").Literal_().Tex_only_().Manual_("\\mathbb{R}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Reals, "Reals").Literal_().Tex_only_().Manual_("\\mathbb{R}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__restriction, "restriction").Literal_().Tex_only_().Manual_("\\upharpoonright"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Rho, "Rho").Literal_().Tex_only_().Manual_("\\mathrm{P}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__sdot, "sdot").Literal_().Tex_only_().Manual_("\\cdot"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__sect, "sect").Literal_().Tex_only_().Manual_("\\S"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__spades, "spades").Literal_().Tex_only_().Manual_("\\spadesuit"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__sub, "sub").Literal_().Tex_only_().Manual_("\\subset"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__sube, "sube").Literal_().Tex_only_().Manual_("\\subseteq"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__supe, "supe").Literal_().Tex_only_().Manual_("\\supseteq"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Tau, "Tau").Literal_().Tex_only_().Manual_("\\mathrm{T}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__thetasym, "thetasym").Literal_().Tex_only_().Manual_("\\vartheta"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__varcoppa, "varcoppa").Literal_().Tex_only_().Manual_("\\mbox{coppa}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__weierp, "weierp").Literal_().Tex_only_().Manual_("\\wp"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Zeta, "Zeta").Literal_().Tex_only_().Manual_("\\mathrm{Z}"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__rm, "rm").Declh_().Fontforce_rm_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__it, "it").Declh_().Fontforce_rm_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__cal, "cal").Declh_().Fontforce_rm_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__bf, "bf").Declh_().Fontforce_rm_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__sideset, "sideset").Args_(2).Fun_ar2nb_().Manual_("\\sideset "));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__left, "left").Left_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__right, "right").Right_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__text, "text").Fail_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__mbox, "mbox").Fail_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__vbox, "vbox").Fail_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__hbox, "hbox").Fail_());
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__arccos, "arccos").Tag_("latex_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__arcsin, "arcsin").Tag_("latex_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__arctan, "arctan").Tag_("latex_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__arg, "arg").Tag_("latex_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__cos, "cos").Tag_("latex_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__cosh, "cosh").Tag_("latex_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__cot, "cot").Tag_("latex_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__coth, "coth").Tag_("latex_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__csc, "csc").Tag_("latex_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__deg, "deg").Tag_("latex_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__det, "det").Tag_("latex_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__dim, "dim").Tag_("latex_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__exp, "exp").Tag_("latex_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__gcd, "gcd").Tag_("latex_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__hom, "hom").Tag_("latex_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__inf, "inf").Tag_("latex_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__ker, "ker").Tag_("latex_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__lg, "lg").Tag_("latex_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__lim, "lim").Tag_("latex_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__liminf, "liminf").Tag_("latex_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__limsup, "limsup").Tag_("latex_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__ln, "ln").Tag_("latex_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__log, "log").Tag_("latex_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__max, "max").Tag_("latex_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__min, "min").Tag_("latex_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__Pr, "Pr").Tag_("latex_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__sec, "sec").Tag_("latex_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__sin, "sin").Tag_("latex_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__sinh, "sinh").Tag_("latex_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__sup, "sup").Tag_("latex_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__tan, "tan").Tag_("latex_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__tanh, "tanh").Tag_("latex_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__arccot, "arccot").Tag_("mediawiki_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__arcsec, "arcsec").Tag_("mediawiki_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__arccsc, "arccsc").Tag_("mediawiki_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__sgn, "sgn").Tag_("mediawiki_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__sen, "sen").Tag_("mediawiki_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__begin, "begin").Args_(1).Tag_("scope_func"));
rv.Add(tkn_mkr, Make(Texvc_func_itm_.Id__end, "end").Args_(1).Tag_("scope_func"));
return rv;
}
private static Texvc_func_itm Make(int id, String key) {return new Texvc_func_itm(id, Bry_.new_a7(key));} // NOTE: TEX func names are ASCII
}

View File

@@ -15,16 +15,9 @@ GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*;
interface Mwm_tkn {
int Tid();
Mwm_tkn__root Root();
int Uid();
int Src_bgn();
int Src_end();
void Src_end_(int v);
Mwm_tkn Init(Mwm_tkn__root root, int tid, int uid, int src_bgn, int src_end);
int Subs__len();
Mwm_tkn Subs__get_at(int i);
void To_bry(Bry_bfr bfr, int indent);
package gplx.xowa.xtns.math.texvcs.funcs; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*; import gplx.xowa.xtns.math.texvcs.*;
public class Texvc_scope_itm {
public Texvc_scope_itm(int id, byte[] key) {this.id = id; this.key = key;}
public int Id() {return id;} private final int id;
public byte[] Key() {return key;} private final byte[] key;
}

View File

@@ -15,12 +15,20 @@ GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*;
class Mwm_lxr__leaf implements Mwm_lxr {
public Mwm_lxr__leaf(int tkn_tid) {this.tkn_tid = tkn_tid;} private final int tkn_tid;
public int Tid() {return Mwm_lxr_.Tid__raw;}
public int Make_tkn(Mwm_ctx ctx, Mwm_tkn__root root, byte[] src, int src_len, int bgn_pos, int cur_pos) {
root.Regy__add(tkn_tid, bgn_pos, cur_pos, null);
return cur_pos;
}
package gplx.xowa.xtns.math.texvcs.funcs; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*; import gplx.xowa.xtns.math.texvcs.*;
public class Texvc_scope_itm_ {
public static final int
Id__matrix = 0
, Id__pmatrix = 1
, Id__bmatrix = 2
, Id__Bmatrix = 3
, Id__vmatrix = 4
, Id__Vmatrix = 5
, Id__array = 6
, Id__align = 7
, Id__alignat = 8
, Id__smallmatrix = 9
, Id__cases = 10
, Id_len = 11
;
}

View File

@@ -0,0 +1,45 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.texvcs.funcs; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*; import gplx.xowa.xtns.math.texvcs.*;
import gplx.xowa.xtns.math.texvcs.tkns.*;
public class Texvc_scope_regy {
private final Texvc_scope_itm[] ary = new Texvc_scope_itm[Texvc_scope_itm_.Id_len];
private final Hash_adp_bry hash = Hash_adp_bry.cs();
public Texvc_scope_itm Get_at(int id) {return ary[id];}
public Texvc_scope_itm Get_by_mid(byte[] src, int bgn, int end) {return (Texvc_scope_itm)hash.Get_by_mid(src, bgn, end);}
private void Add(Texvc_scope_itm itm) {
ary[itm.Id()] = itm;
hash.Add(itm.Key(), itm);
}
public static Texvc_scope_regy new_() {
Texvc_scope_regy rv = new Texvc_scope_regy();
rv.Add(Make(Texvc_scope_itm_.Id__matrix, "matrix"));
rv.Add(Make(Texvc_scope_itm_.Id__pmatrix, "pmatrix"));
rv.Add(Make(Texvc_scope_itm_.Id__bmatrix, "bmatrix"));
rv.Add(Make(Texvc_scope_itm_.Id__Bmatrix, "Bmatrix"));
rv.Add(Make(Texvc_scope_itm_.Id__vmatrix, "vmatrix"));
rv.Add(Make(Texvc_scope_itm_.Id__Vmatrix, "Vmatrix"));
rv.Add(Make(Texvc_scope_itm_.Id__array, "array"));
rv.Add(Make(Texvc_scope_itm_.Id__align, "align"));
rv.Add(Make(Texvc_scope_itm_.Id__alignat, "alignat"));
rv.Add(Make(Texvc_scope_itm_.Id__smallmatrix, "smallmatrix"));
rv.Add(Make(Texvc_scope_itm_.Id__cases, "cases"));
return rv;
}
private static Texvc_scope_itm Make(int id, String key) {return new Texvc_scope_itm(id, Bry_.new_a7(key));} // NOTE: TEX func names are ASCII
}

View File

@@ -15,10 +15,9 @@ GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*;
class Mwm_ctx {
public Int_ary Stack() {return stack;} private final Int_ary stack = new Int_ary(4);
public void Clear() {
stack.Clear();
}
package gplx.xowa.xtns.math.texvcs.lxrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*; import gplx.xowa.xtns.math.texvcs.*;
import gplx.xowa.xtns.math.texvcs.tkns.*;
public interface Texvc_lxr {
int Tid();
int Make_tkn(Texvc_ctx ctx, Texvc_root root, byte[] src, int src_len, int bgn_pos, int cur_pos);
}

View File

@@ -15,19 +15,13 @@ GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*;
interface Mwm_lxr {
int Tid();
int Make_tkn(Mwm_ctx ctx, Mwm_tkn__root root, byte[] src, int src_len, int bgn_pos, int cur_pos);
}
class Mwm_lxr_ {
package gplx.xowa.xtns.math.texvcs.lxrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*; import gplx.xowa.xtns.math.texvcs.*;
public class Texvc_lxr_ {
public static final int
Tid__ws = 0
, Tid__raw = 1
, Tid__backslash = 2
, Tid__curly_bgn = 3
, Tid__curly_end = 4
, Tid__brack_bgn = 5
, Tid__brack_end = 6
;
}
}

View File

@@ -15,10 +15,11 @@ GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*;
class Mwm_lxr__backslash implements Mwm_lxr {
public int Tid() {return Mwm_lxr_.Tid__backslash;}
public int Make_tkn(Mwm_ctx ctx, Mwm_tkn__root root, byte[] src, int src_len, int bgn_pos, int cur_pos) {
package gplx.xowa.xtns.math.texvcs.lxrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*; import gplx.xowa.xtns.math.texvcs.*;
import gplx.xowa.xtns.math.texvcs.tkns.*; import gplx.xowa.xtns.math.texvcs.funcs.*;
class Texvc_lxr__backslash implements Texvc_lxr {
public int Tid() {return Texvc_lxr_.Tid__backslash;}
public int Make_tkn(Texvc_ctx ctx, Texvc_root root, byte[] src, int src_len, int bgn_pos, int cur_pos) {
boolean loop = true;
while (loop) {
if (cur_pos == src_len) break;
@@ -44,7 +45,9 @@ class Mwm_lxr__backslash implements Mwm_lxr {
break;
}
}
root.Regy__add(Mwm_tkn_.Tid__fnc, bgn_pos, cur_pos, new Mwm_tkn__node());
Texvc_func_itm func_itm = ctx.Func_regy().Get_by_mid(src, bgn_pos + 1, cur_pos); if (func_itm == null) func_itm = Texvc_func_itm_.Itm__unknown;
Texvc_tkn func_tkn = func_itm.Tkn(); if (func_tkn == null) func_tkn = new Texvc_tkn__func(func_itm);
root.Regy__add(Texvc_tkn_.Tid__func, func_itm.Singleton_id(), bgn_pos, cur_pos, func_tkn);
return cur_pos;
}
}

View File

@@ -0,0 +1,36 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.texvcs.lxrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*; import gplx.xowa.xtns.math.texvcs.*;
import gplx.xowa.xtns.math.texvcs.tkns.*; import gplx.xowa.xtns.math.texvcs.funcs.*;
class Texvc_lxr__curly_bgn implements Texvc_lxr {
public int Tid() {return Texvc_lxr_.Tid__curly_bgn;}
public int Make_tkn(Texvc_ctx ctx, Texvc_root root, byte[] src, int src_len, int bgn_pos, int cur_pos) {
int uid = root.Regy__add(Texvc_tkn_.Tid__curly, Texvc_tkn_mkr.Singleton_id__null, bgn_pos, cur_pos, new Texvc_tkn__func(Texvc_func_itm_.Itm__arg));
ctx.Stack().Add(uid);
return cur_pos;
}
}
class Texvc_lxr__curly_end implements Texvc_lxr {
public int Tid() {return Texvc_lxr_.Tid__curly_end;}
public int Make_tkn(Texvc_ctx ctx, Texvc_root root, byte[] src, int src_len, int bgn_pos, int cur_pos) {
int bgn_uid = ctx.Stack().Pop_or(-1);
root.Regy__take_from_root_end(bgn_uid);
root.Regy__update_end(bgn_uid, cur_pos);
return cur_pos;
}
}

View File

@@ -0,0 +1,27 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.texvcs.lxrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*; import gplx.xowa.xtns.math.texvcs.*;
import gplx.xowa.xtns.math.texvcs.tkns.*;
class Texvc_lxr__leaf implements Texvc_lxr {
public Texvc_lxr__leaf(int tkn_tid) {this.tkn_tid = tkn_tid;} private final int tkn_tid;
public int Tid() {return Texvc_lxr_.Tid__raw;}
public int Make_tkn(Texvc_ctx ctx, Texvc_root root, byte[] src, int src_len, int bgn_pos, int cur_pos) {
root.Regy__add(tkn_tid, tkn_tid, bgn_pos, cur_pos, null);
return cur_pos;
}
}

View File

@@ -15,17 +15,18 @@ GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*;
class Mwm_lxr__ws implements Mwm_lxr {
public int Tid() {return Mwm_lxr_.Tid__ws;}
public int Make_tkn(Mwm_ctx ctx, Mwm_tkn__root root, byte[] src, int src_len, int bgn_pos, int cur_pos) {
package gplx.xowa.xtns.math.texvcs.lxrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*; import gplx.xowa.xtns.math.texvcs.*;
import gplx.xowa.xtns.math.texvcs.tkns.*;
class Texvc_lxr__ws implements Texvc_lxr {
public int Tid() {return Texvc_lxr_.Tid__ws;}
public int Make_tkn(Texvc_ctx ctx, Texvc_root root, byte[] src, int src_len, int bgn_pos, int cur_pos) {
while (true) {
if (cur_pos == src_len) break;
if (src[cur_pos] != Byte_ascii.Space)
break;
++cur_pos;
}
root.Regy__add(Mwm_tkn_.Tid__ws, bgn_pos, cur_pos, null);
root.Regy__add(Texvc_tkn_.Tid__ws, Texvc_tkn_.Tid__ws, bgn_pos, cur_pos, null);
return cur_pos;
}
}

View File

@@ -0,0 +1,64 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.texvcs.lxrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*; import gplx.xowa.xtns.math.texvcs.*;
import gplx.core.btries.*; import gplx.xowa.xtns.math.texvcs.tkns.*;
public class Texvc_lxr_trie_bldr {
public static Btrie_fast_mgr new_(Texvc_tkn_mkr tkn_mkr) {// REF.MW:/Math/textvccheck/lexer.mll
tkn_mkr.Reg_singleton(Texvc_tkn_.Tid__text, new Texvc_tkn__leaf_raw());
Btrie_fast_mgr rv = Btrie_fast_mgr.cs();
Add_lxr (rv, tkn_mkr, new Texvc_lxr__backslash() , "\\");
Add_lxr (rv, tkn_mkr, new Texvc_lxr__curly_bgn() , "{");
Add_lxr (rv, tkn_mkr, new Texvc_lxr__curly_end() , "}");
Add_lxr_leaf (rv, tkn_mkr, Texvc_tkn_.Tid__brack_bgn , "[");
Add_lxr_leaf (rv, tkn_mkr, Texvc_tkn_.Tid__brack_end , "]");
Add_lxr_leaf (rv, tkn_mkr, new Texvc_lxr__ws(), Texvc_tkn_.Tid__ws , " ", "\t", "\n", "\r");
Add_lxr_leaf (rv, tkn_mkr, Texvc_tkn_.Tid__literal , ">", "<", "~");
Add_lxr_leaf (rv, tkn_mkr, Texvc_tkn_.Tid__literal , ",", ":", ";", "?", "!", "'"); // literal_uf_lt
Add_lxr_leaf (rv, tkn_mkr, Texvc_tkn_.Tid__literal , "+", "-", "*", "="); // literal_uf_op
Add_lxr_leaf (rv, tkn_mkr, Texvc_tkn_.Tid__delimiter , "(", ")", "."); // delimiter_uf_lt
Add_lxr_leaf_repl (rv, tkn_mkr, Texvc_tkn_.Tid__literal , "%", "\\%");
Add_lxr_leaf_repl (rv, tkn_mkr, Texvc_tkn_.Tid__literal , "$", "\\$");
Add_lxr_leaf (rv, tkn_mkr, Texvc_tkn_.Tid__literal , "\\,", "\\ ", "\\;", "\\!");
Add_lxr_leaf (rv, tkn_mkr, Texvc_tkn_.Tid__delimiter , "\\{", "\\}", "\\|");
Add_lxr_leaf (rv, tkn_mkr, Texvc_tkn_.Tid__literal , "\\_", "\\#", "\\%", "\\$", "\\&");
Add_lxr_leaf (rv, tkn_mkr, Texvc_tkn_.Tid__next_cell , "%");
Add_lxr_leaf (rv, tkn_mkr, Texvc_tkn_.Tid__next_row , "\\\\");
Add_lxr_leaf (rv, tkn_mkr, Texvc_tkn_.Tid__literal , "~", ">", "<");
Add_lxr_leaf (rv, tkn_mkr, Texvc_tkn_.Tid__sup , "^");
Add_lxr_leaf (rv, tkn_mkr, Texvc_tkn_.Tid__sub , "_");
return rv;
}
private static void Add_lxr(Btrie_fast_mgr trie, Texvc_tkn_mkr tkn_mkr, Texvc_lxr lxr, String... ary) {
for (String itm : ary)
trie.Add(itm, lxr);
}
private static void Add_lxr_leaf(Btrie_fast_mgr trie, Texvc_tkn_mkr tkn_mkr, int tid, String... ary) {
Add_lxr_leaf(trie, tkn_mkr, new Texvc_lxr__leaf(tid), tid, new Texvc_tkn__leaf_raw(), ary);
}
private static void Add_lxr_leaf(Btrie_fast_mgr trie, Texvc_tkn_mkr tkn_mkr, Texvc_lxr lxr, int tkn_tid, String... ary) {
Add_lxr_leaf(trie, tkn_mkr, lxr, tkn_tid, new Texvc_tkn__leaf_raw(), ary);
}
private static void Add_lxr_leaf_repl(Btrie_fast_mgr trie, Texvc_tkn_mkr tkn_mkr, int tid, String src, String trg) {
Add_lxr_leaf(trie, tkn_mkr, new Texvc_lxr__leaf(tid), tid, new Texvc_tkn__leaf_repl(tid, Bry_.new_u8(trg)), src);
}
private static void Add_lxr_leaf(Btrie_fast_mgr trie, Texvc_tkn_mkr tkn_mkr, Texvc_lxr lxr, int tkn_tid, Texvc_tkn proto, String... ary) {
tkn_mkr.Reg_singleton(tkn_tid, proto);
for (String itm : ary)
trie.Add(itm, lxr);
}
}

View File

@@ -15,24 +15,29 @@ GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*;
class Mwm_root_ary {
private Mwm_tkn[] ary = Mwm_tkn_.Ary_empty; private int ary_max;
public Mwm_tkn Get_at(int i) {return i < ary_max ? ary[i] : null;}
package gplx.xowa.xtns.math.texvcs.tkns; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*; import gplx.xowa.xtns.math.texvcs.*;
public class Texvc_regy_nde {
private Texvc_tkn[] ary = Texvc_tkn_.Ary_empty; private int ary_max;
public Texvc_tkn Get_at_or_fail(int uid) {
Texvc_tkn rv = null;
if (uid > - 1 && uid < ary_max) rv = ary[uid];
if (rv == null) throw Err_.new_("math.texvc", "node token does not exist", "uid", uid);
return rv;
}
public void Init(int expd_itms) {
if (expd_itms > ary_max) {
this.ary_max = expd_itms;
this.ary = new Mwm_tkn[ary_max];
this.ary = new Texvc_tkn[ary_max];
}
else {
for (int i = 0; i < ary_max; ++i)
ary[i] = null;
}
}
public void Add(int idx, Mwm_tkn tkn) {
public void Add(int idx, Texvc_tkn tkn) {
if (idx >= ary_max) {
int new_max = idx == 0 ? 2 : idx * 2;
Mwm_tkn[] new_ary = new Mwm_tkn[new_max];
Texvc_tkn[] new_ary = new Texvc_tkn[new_max];
for (int i = 0; i < ary_max; ++i)
new_ary[i] = ary[i];
this.ary = new_ary;
@@ -40,7 +45,5 @@ class Mwm_root_ary {
}
ary[idx] = tkn;
}
public void Update_end(int uid, int end) {
Get_at(uid).Src_end_(end);
}
public void Update_end(int uid, int end) {Get_at_or_fail(uid).Src_end_(end);}
}

View File

@@ -15,14 +15,10 @@ GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*;
class Mwm_root_sub {
package gplx.xowa.xtns.math.texvcs.tkns; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*; import gplx.xowa.xtns.math.texvcs.*;
import gplx.core.primitives.*;
public class Texvc_regy_sub {
private Int_ary[] ary = new Int_ary[0]; private int ary_max;
public Int_ary Get_at(int i) {return i < ary_max ? ary[i] : null;}
public int Get_subs_len(int uid) {
Int_ary subs_ary = uid < ary_max ? ary[uid] : null;
return subs_ary == null ? 0 : subs_ary.Len();
}
public void Init(int expd_itms) {
if (expd_itms > ary_max) {
this.ary_max = expd_itms;
@@ -33,24 +29,39 @@ class Mwm_root_sub {
ary[i] = null;
}
}
public void Add(int owner_uid, int sub_uid) {
if (owner_uid >= ary_max) {
int new_max = owner_uid == 0 ? 2 : owner_uid * 2;
public Int_ary Get_subs_or_fail(int uid) {
Int_ary rv = Get_subs_or_null(uid); if (rv == null) throw Err_.new_("math.texvc", "token does not have any subs", "uid", uid);
return rv;
}
private Int_ary Get_subs_or_null(int uid) {
return uid > -1 && uid < ary_max ? ary[uid] : null; // NOTE: do not fail on bad bounds check; can pass "uid" larger than "ary_max"; occurs when estimate of "/ 5" is wrong and many leaf tokesn created at end;
}
public int Get_subs_at(int uid, int sub_idx) {
Int_ary subs_ary = Get_subs_or_fail(uid);
return subs_ary.Get_at_or_fail(sub_idx);
}
public int Get_subs_len(int uid) {
Int_ary subs_ary = Get_subs_or_null(uid);
return subs_ary == null ? 0 : subs_ary.Len();
}
public void Add(int uid, int sub_uid) {
if (uid >= ary_max) {
int new_max = uid == 0 ? 2 : uid * 2;
Int_ary[] new_ary = new Int_ary[new_max];
for (int i = 0; i < ary_max; ++i)
new_ary[i] = ary[i];
this.ary = new_ary;
this.ary_max = new_max;
}
Int_ary subs_ary = ary[owner_uid];
Int_ary subs_ary = ary[uid];
if (subs_ary == null) {
subs_ary = new Int_ary(2);
ary[owner_uid] = subs_ary;
ary[uid] = subs_ary;
}
subs_ary.Add(sub_uid);
}
public boolean Del_by_key_from_end(int owner_uid, int sub_uid) {
Int_ary subs_ary = Get_at(owner_uid);
return subs_ary.Del_by_key_from_end(sub_uid);
public void Del(int uid, int sub_uid) {
Int_ary subs_ary = Get_subs_or_fail(uid);
if (!subs_ary.Del_from_end(sub_uid)) throw Err_.new_("math.texvc", "sub_uid does not exist", "uid", uid, "sub_uid", sub_uid);
}
}

View File

@@ -0,0 +1,87 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.texvcs.tkns; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*; import gplx.xowa.xtns.math.texvcs.*;
public class Texvc_regy_tkn {
private int[] ary = Int_.Ary_empty; private int ary_max; private int itms_len;
private final Texvc_root root; private Texvc_tkn_mkr tkn_mkr;
public int Len() {return itms_len;}
public Texvc_regy_tkn(Texvc_root root) {
this.root = root;
}
public void Init(int expd_itms, Texvc_tkn_mkr tkn_mkr) {
this.tkn_mkr = tkn_mkr;
int expd_max = expd_itms * Idx__slots;
if (expd_max > ary_max) {
this.ary = new int[expd_max];
this.ary_max = expd_max;
}
else {
for (int i = 0; i < ary_max; ++i)
ary[i] = 0;
}
this.itms_len = 0;
}
public int Add(int type_id, int owner_id, int singleton_id, int src_bgn, int src_end) {
int idx = itms_len * Idx__slots;
if (idx >= ary_max) {
int new_max = ary_max == 0 ? Idx__slots * 4 : ary_max * 2; // "* 4": if empty, allocate 4 items; applies to root
int[] new_ary = new int[new_max];
for (int i = 0; i < ary_max; ++i)
new_ary[i] = ary[i];
this.ary = new_ary;
this.ary_max = new_max;
}
int uid = itms_len;
ary[idx] = type_id;
ary[idx + Idx__owner_id] = owner_id;
ary[idx + Idx__singleton_id] = singleton_id;
ary[idx + Idx__src_bgn] = src_bgn;
ary[idx + Idx__src_end] = src_end;
++itms_len;
return uid;
}
public Texvc_tkn Get_singleton_or_null(int uid) {
int idx = uid * Idx__slots; if (idx >= ary_max) throw Make_err_invalid_uid(uid);
int singleton_id = ary[idx + Idx__singleton_id];
return singleton_id == Texvc_tkn_mkr.Singleton_id__null ? null : tkn_mkr.Get_singleton(root, ary[idx], singleton_id, uid, ary[idx + Idx__src_bgn], ary[idx + Idx__src_end]);
}
public int Get_owner_id(int uid) {
int idx = uid * Idx__slots; if (idx >= ary_max) throw Make_err_invalid_uid(uid);
return ary[idx + Idx__owner_id];
}
public boolean Update_end(int uid, int end) { // return if tkn is node
int idx = uid * Idx__slots; if (idx >= ary_max) throw Make_err_invalid_uid(uid);
ary[idx + Idx__src_end] = end;
return Texvc_tkn_.Tid_is_node(ary[idx]);
}
public int Update_owner_id(int cur_uid, int new_owner_uid) { // return old owner_id
int cur_idx = cur_uid * Idx__slots;
int cur_owner_uid_idx = cur_idx + Idx__owner_id;
int old_owner_uid = ary[cur_owner_uid_idx];
ary[cur_owner_uid_idx] = new_owner_uid;
return old_owner_uid;
}
private Err Make_err_invalid_uid(int uid) {return Err_.new_("math.texvc", "invalid uid", "uid", uid, "max", ary_max);}
private static final int
Idx__owner_id = 1
, Idx__singleton_id = 2
, Idx__src_bgn = 3
, Idx__src_end = 4
, Idx__slots = 5
;
}

View File

@@ -0,0 +1,97 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.texvcs.tkns; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*; import gplx.xowa.xtns.math.texvcs.*;
import gplx.core.primitives.*;
public class Texvc_root implements Texvc_tkn {
private final Texvc_regy_tkn regy_tkn;
private final Texvc_regy_nde regy_nde = new Texvc_regy_nde();
private final Texvc_regy_sub regy_sub = new Texvc_regy_sub();
public Texvc_root() {
this.regy_tkn = new Texvc_regy_tkn(this);
}
public Texvc_root Root() {return this;}
public int Tid() {return Texvc_tkn_.Tid__root;}
public int Uid() {return Uid__root;}
public byte[] Src() {return src;} private byte[] src;
public int Src_bgn() {return src_bgn;} private int src_bgn;
public int Src_end() {return src_end;} private int src_end;
public void Src_end_(int v) {this.src_end = v;}
public Texvc_tkn Init(Texvc_root root, int tid, int uid, int src_bgn, int src_end) {throw Err_.new_unsupported();}
public Texvc_tkn Init_as_root(Texvc_tkn_mkr tkn_mkr, byte[] src, int src_bgn, int src_end) {
this.src = src; this.src_bgn = src_bgn; this.src_end = src_end;
int expd_len = (src_end - src_bgn) / 5; // estimate # of tkns by dividing src_len by 5
regy_tkn.Init(expd_len, tkn_mkr);
regy_nde.Init(expd_len);
regy_sub.Init(expd_len);
regy_tkn.Add(Texvc_tkn_.Tid__root, Uid__root, Texvc_tkn_mkr.Singleton_id__null, src_bgn, src_end);
return this;
}
public int Subs__len() {return Regy__get_subs_len(Uid__root);}
public Texvc_tkn Subs__get_at(int i) {return Regy__get_subs_tkn(Uid__root, i);}
public int Regy__add(int tid, int singleton_id, int bgn, int end, Texvc_tkn nde_tkn) {
int uid = regy_tkn.Add(tid, Uid__root, singleton_id, bgn, end);
if (nde_tkn != null) {
nde_tkn.Init(this, tid, uid, bgn, end);
regy_nde.Add(uid, nde_tkn);
}
regy_sub.Add(Uid__root, uid);
return uid;
}
public int Regy__get_subs_len(int uid) {return regy_sub.Get_subs_len(uid);}
public Texvc_tkn Regy__get_subs_tkn(int uid, int sub_idx) {return Regy__get_tkn(regy_sub.Get_subs_at(uid, sub_idx));}
public Texvc_tkn Regy__get_tkn(int uid) {
Texvc_tkn rv = regy_tkn.Get_singleton_or_null(uid);
return rv == null ? regy_nde.Get_at_or_fail(uid) : rv;
}
public void Regy__move(int uid, int new_owner_uid) {
int old_owner_uid = regy_tkn.Update_owner_id(uid, new_owner_uid);
regy_sub.Del(old_owner_uid, uid);
regy_sub.Add(new_owner_uid, uid);
}
public void Regy__take_from_root_end(int uid) {
Int_ary root_subs = regy_sub.Get_subs_or_fail(Uid__root);
int uid_idx = root_subs.Idx_of(uid); if (uid_idx == Int_ary.Not_found) throw Err_.new_("math.texvc", "unable to find tkn in root", "uid", uid);
int subs_len = root_subs.Len();
int bgn_idx = uid_idx + 1; // +1 to skip current uid_idx
for (int i = bgn_idx; i < subs_len; ++i) {
int sub_uid = root_subs.Get_at_or_fail(bgn_idx); // NOTE: use bgn_idx, not i, b/c move will shorten subs
Regy__move(sub_uid, uid);
}
}
public void Regy__update_end(int uid, int end) {
if (regy_tkn.Update_end(uid, end))
regy_nde.Update_end(uid, end);
}
public String Print_tex_str(Bry_bfr bfr) {Print_tex_bry(bfr, src, 0); return bfr.Xto_str_and_clear();}
public void Print_tex_bry(Bry_bfr bfr, byte[] src, int indent) {
int subs_len = Subs__len();
for (int i = 0; i < subs_len; ++i) {
Texvc_tkn sub_tkn = Subs__get_at(i);
sub_tkn.Print_tex_bry(bfr, src, indent + 1);
}
}
public String Print_dbg_str(Bry_bfr bfr) {Print_dbg_bry(bfr, 0); return bfr.Xto_str_and_clear();}
public void Print_dbg_bry(Bry_bfr bfr, int indent) {
int len = this.Subs__len();
for (int i = 0; i < len; ++i) {
Texvc_tkn sub = this.Subs__get_at(i);
sub.Print_dbg_bry(bfr, 0);
}
}
private static final int Uid__root = 0;
}

View File

@@ -0,0 +1,31 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.texvcs.tkns; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*; import gplx.xowa.xtns.math.texvcs.*;
public interface Texvc_tkn {
int Tid();
Texvc_root Root();
int Uid();
int Src_bgn();
int Src_end();
void Src_end_(int v);
Texvc_tkn Init(Texvc_root root, int tid, int uid, int src_bgn, int src_end);
int Subs__len();
Texvc_tkn Subs__get_at(int i);
void Print_dbg_bry(Bry_bfr bfr, int indent);
void Print_tex_bry(Bry_bfr bfr, byte[] src, int indent);
}

View File

@@ -0,0 +1,65 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.texvcs.tkns; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*; import gplx.xowa.xtns.math.texvcs.*;
public class Texvc_tkn_ {
public static final int
Tid__root = 0
, Tid__func = 1 // '\alpha', '\frac', '\begin', ...
, Tid__curly = 2 // '{'
, Tid__ws = 3 // '\s', '\n', '\r', '\t'
, Tid__text = 4 // 'abc', '123', ...
, Tid__literal = 5 // '+', '<', ...
, Tid__delimiter = 6 // '(', ')', ...
, Tid__sub = 7 // '_'
, Tid__sup = 8 // '^'
, Tid__next_row = 9 // '\\'
, Tid__next_cell = 10 // '%'
, Tid__brack_bgn = 11 // '['
, Tid__brack_end = 12 // '['
;
public static final int Tid_len = 13;
public static final byte[][] Bry__ary = Bry_.Ary
( "root", "func", "curly"
, "ws", "text", "literal", "delimiter"
, "sub", "sup", "next_row", "next_cell", "brack_bgn", "brack_end"
);
public static final Texvc_tkn[] Ary_empty = new Texvc_tkn[0];
public static boolean Tid_is_node(int tid) {
switch (tid) {
case Texvc_tkn_.Tid__root: case Texvc_tkn_.Tid__func: case Texvc_tkn_.Tid__curly: return true;
default: return false;
}
}
public static String Print_dbg_str(Bry_bfr bfr, Texvc_tkn[] ary) {
int len = ary.length;
for (int i = 0; i < len; ++i)
ary[i].Print_dbg_bry(bfr, 0);
return bfr.Xto_str_and_clear();
}
public static void Print_dbg_str__bgn(Bry_bfr bfr, int indent, Texvc_tkn tkn) {
if (indent > 0) bfr.Add_byte_repeat(Byte_ascii.Space, indent * 2);
bfr.Add(Bry__ary[tkn.Tid()]);
bfr.Add_byte(Byte_ascii.Paren_bgn);
bfr.Add_int_variable(tkn.Src_bgn());
bfr.Add_byte_comma().Add_int_variable(tkn.Src_end());
}
public static void Print_dbg_str__end_head(Bry_bfr bfr) {
bfr.Add_byte(Byte_ascii.Paren_end);
bfr.Add_byte_nl();
}
}

View File

@@ -0,0 +1,57 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.texvcs.tkns; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*; import gplx.xowa.xtns.math.texvcs.*;
import gplx.xowa.xtns.math.texvcs.funcs.*;
public class Texvc_tkn__func implements Texvc_tkn {
public Texvc_tkn__func(Texvc_func_itm func_itm) {this.func_itm = func_itm;}
public Texvc_func_itm Func_itm() {return func_itm;} private final Texvc_func_itm func_itm;
public Texvc_root Root() {return root;} private Texvc_root root;
public int Tid() {return tid;} private int tid;
public int Uid() {return uid;} private int uid;
public int Src_bgn() {return src_bgn;} private int src_bgn;
public int Src_end() {return src_end;} private int src_end;
public void Src_end_(int v) {this.src_end = v;}
public Texvc_tkn Init(Texvc_root root, int tid, int uid, int src_bgn, int src_end) {
this.root = root;
this.tid = tid;
this.uid = uid;
this.src_bgn = src_bgn;
this.src_end = src_end;
return this;
}
public int Subs__len() {return root.Regy__get_subs_len(uid);}
public Texvc_tkn Subs__get_at(int i) {return root.Regy__get_subs_tkn(uid, i);}
public void Print_tex_bry(Bry_bfr bfr, byte[] src, int indent) {
if (tid != Texvc_func_itm_.Id__xowa_arg) // do not add func name if arg; EX: "{a}" vs "\alpha{a}"
bfr.Add_byte_backslash().Add(func_itm.Key()); // funcs have pattern of "\key"; EX: "\alpha"
int subs_len = Subs__len();
for (int i = 0; i < subs_len; ++i) {
Texvc_tkn sub_tkn = Subs__get_at(i);
sub_tkn.Print_tex_bry(bfr, src, indent + 1);
}
}
public void Print_dbg_bry(Bry_bfr bfr, int indent) {
Texvc_tkn_.Print_dbg_str__bgn(bfr, indent, this);
Texvc_tkn_.Print_dbg_str__end_head(bfr);
int subs_len = Subs__len();
for (int i = 0; i < subs_len; ++i) {
Texvc_tkn sub_tkn = Subs__get_at(i);
sub_tkn.Print_dbg_bry(bfr, indent + 1);
}
}
}

View File

@@ -15,9 +15,9 @@ GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*;
class Mwm_tkn__leaf_raw implements Mwm_tkn {
public Mwm_tkn Init(Mwm_tkn__root root, int tid, int uid, int src_bgn, int src_end) {
package gplx.xowa.xtns.math.texvcs.tkns; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*; import gplx.xowa.xtns.math.texvcs.*;
public class Texvc_tkn__leaf_raw implements Texvc_tkn {
public Texvc_tkn Init(Texvc_root root, int tid, int uid, int src_bgn, int src_end) {
this.root = root;
this.tid = tid;
this.uid = uid;
@@ -25,16 +25,17 @@ class Mwm_tkn__leaf_raw implements Mwm_tkn {
this.src_end = src_end;
return this;
}
public Mwm_tkn__root Root() {return root;} private Mwm_tkn__root root;
public Texvc_root Root() {return root;} private Texvc_root root;
@gplx.Virtual public int Tid() {return tid;} private int tid;
public int Uid() {return uid;} private int uid;
public int Src_bgn() {return src_bgn;} private int src_bgn;
public int Src_end() {return src_end;} private int src_end;
public void Src_end_(int v) {this.src_end = v;}
public int Subs__len() {return 0;}
public Mwm_tkn Subs__get_at(int i) {throw Err_.new_unsupported();}
public void To_bry(Bry_bfr bfr, int indent) {
Mwm_tkn_.Tkn_to_bry__bgn(bfr, indent, this);
Mwm_tkn_.Tkn_to_bry__end_head(bfr);
public Texvc_tkn Subs__get_at(int i) {throw Err_.new_unsupported();}
public void Print_tex_bry(Bry_bfr bfr, byte[] src, int indent) {bfr.Add_mid(src, src_bgn, src_end);}
public void Print_dbg_bry(Bry_bfr bfr, int indent) {
Texvc_tkn_.Print_dbg_str__bgn(bfr, indent, this);
Texvc_tkn_.Print_dbg_str__end_head(bfr);
}
}

View File

@@ -15,30 +15,31 @@ GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*;
class Mwm_tkn__leaf_repl implements Mwm_tkn {
package gplx.xowa.xtns.math.texvcs.tkns; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*; import gplx.xowa.xtns.math.texvcs.*;
public class Texvc_tkn__leaf_repl implements Texvc_tkn {
private final byte[] repl;
public Mwm_tkn__leaf_repl(int tid, byte[] repl) {
public Texvc_tkn__leaf_repl(int tid, byte[] repl) {
this.tid = tid;
this.repl = repl;
}
public Mwm_tkn Init(Mwm_tkn__root root, int tid, int uid, int src_bgn, int src_end) {
public Texvc_tkn Init(Texvc_root root, int tid, int uid, int src_bgn, int src_end) {
this.root = root;
this.uid = uid;
this.src_bgn = src_bgn;
this.src_end = src_end;
return this;
}
public Mwm_tkn__root Root() {return root;} private Mwm_tkn__root root;
public Texvc_root Root() {return root;} private Texvc_root root;
public int Tid() {return tid;} private final int tid;
public int Uid() {return uid;} private int uid;
public int Src_bgn() {return src_bgn;} private int src_bgn;
public int Src_end() {return src_end;} private int src_end;
public void Src_end_(int v) {this.src_end = v;}
public int Subs__len() {return 0;}
public Mwm_tkn Subs__get_at(int i) {throw Err_.new_unsupported();}
public void To_bry(Bry_bfr bfr, int indent) {
Mwm_tkn_.Tkn_to_bry__bgn(bfr, indent, this);
Mwm_tkn_.Tkn_to_bry__end_head(bfr);
public Texvc_tkn Subs__get_at(int i) {throw Err_.new_unsupported();}
public void Print_tex_bry(Bry_bfr bfr, byte[] src, int indent) {bfr.Add(repl);}
public void Print_dbg_bry(Bry_bfr bfr, int indent) {
Texvc_tkn_.Print_dbg_str__bgn(bfr, indent, this);
Texvc_tkn_.Print_dbg_str__end_head(bfr);
}
}

View File

@@ -0,0 +1,30 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.texvcs.tkns; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*; import gplx.xowa.xtns.math.texvcs.*;
import gplx.xowa.xtns.math.texvcs.funcs.*;
public class Texvc_tkn_mkr {
private final Texvc_tkn[] regy = new Texvc_tkn[Texvc_tkn_.Tid_len + Texvc_func_itm_.Id_len];
public void Reg_singleton(int tid, Texvc_tkn tkn) {
regy[tid] = tkn;
}
public Texvc_tkn Get_singleton(Texvc_root root, int tid, int leaf_id, int uid, int bgn, int end) {
Texvc_tkn singleton = regy[leaf_id];
return singleton == null ? null : singleton.Init(root, tid, uid, bgn, end);
}
public static final int Singleton_id__null = -1;
}

View File

@@ -15,21 +15,21 @@ GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.parsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*;
class Mwm_tkn_stack {
private Mwm_tkn[] ary; private int ary_len, ary_max;
public Mwm_tkn_stack() {this.Clear();}
package gplx.xowa.xtns.math.texvcs.tkns; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*; import gplx.xowa.xtns.math.texvcs.*;
public class Texvc_tkn_stack {
private Texvc_tkn[] ary; private int ary_len, ary_max;
public Texvc_tkn_stack() {this.Clear();}
public int Len() {return ary_len;}
public void Clear() {
this.ary = Mwm_tkn_.Ary_empty;
this.ary = Texvc_tkn_.Ary_empty;
this.ary_len = 0;
this.ary_max = 0;
}
public void Add(Mwm_tkn tkn) {
public void Add(Texvc_tkn tkn) {
int new_ary_len = ary_len + 1;
if (new_ary_len >= ary_max) {
int new_max = ary_max == 0 ? 2 : ary_max * 2;
Mwm_tkn[] new_ary = new Mwm_tkn[new_max];
Texvc_tkn[] new_ary = new Texvc_tkn[new_max];
for (int i = 0; i < ary_len; ++i)
new_ary[i] = ary[i];
this.ary = new_ary;
@@ -38,9 +38,9 @@ class Mwm_tkn_stack {
ary[ary_len] = tkn;
this.ary_len = new_ary_len;
}
public Mwm_tkn Pop() {
public Texvc_tkn Pop() {
int new_ary_len = ary_len - 1;
Mwm_tkn rv = ary[new_ary_len];
Texvc_tkn rv = ary[new_ary_len];
this.ary_len = new_ary_len;
return rv;
}