mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
'v3.6.3.1'
This commit is contained in:
@@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.gfml; import gplx.*;
|
||||
import gplx.core.texts.*; /*CharStream*/
|
||||
public interface GfmlLxr extends GfoEvObj {
|
||||
public interface GfmlLxr extends Gfo_evt_itm {
|
||||
String Key();
|
||||
String[] Hooks();
|
||||
GfmlTkn CmdTkn();
|
||||
@@ -30,5 +30,5 @@ class GfmlLxrRegy {
|
||||
public int Count() {return hash.Count();}
|
||||
public void Add(GfmlLxr lxr) {hash.Add(lxr.Key(), lxr);}
|
||||
public GfmlLxr Get_by(String key) {return (GfmlLxr)hash.Get_by(key);}
|
||||
Hash_adp hash = Hash_adp_.new_();
|
||||
Hash_adp hash = Hash_adp_.New();
|
||||
}
|
||||
|
||||
@@ -28,31 +28,31 @@ public class GfmlLxr_ {
|
||||
return GfmlLxr_.solo_(key, tkn);
|
||||
}
|
||||
@gplx.Internal protected static GfmlLxr frame_(String key, GfmlFrame frame, String bgn, String end) {return GfmlLxr_frame.new_(key, frame, bgn, end, GfmlBldrCmd_pendingTkns_add.Instance, GfmlBldrCmd_frameEnd.data_());}
|
||||
public static final GfmlLxr Null = new GfmlLxr_null();
|
||||
public static final String CmdTknChanged_evt = "Changed";
|
||||
public static final GfmlLxr Null = new GfmlLxr_null();
|
||||
public static final String CmdTknChanged_evt = "Changed";
|
||||
public static GfmlLxr as_(Object obj) {return obj instanceof GfmlLxr ? (GfmlLxr)obj : null;}
|
||||
public static GfmlLxr cast(Object obj) {try {return (GfmlLxr)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, GfmlLxr.class, obj);}}
|
||||
}
|
||||
class GfmlLxr_null implements GfmlLxr {
|
||||
public String Key() {return "gfml.nullLxr";}
|
||||
public GfoEvMgr EvMgr() {if (evMgr == null) evMgr = GfoEvMgr.new_(this); return evMgr;} GfoEvMgr evMgr;
|
||||
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {return GfoInvkAble_.Rv_unhandled;}
|
||||
public Gfo_evt_mgr Evt_mgr() {if (evt_mgr == null) evt_mgr = new Gfo_evt_mgr(this); return evt_mgr;} Gfo_evt_mgr evt_mgr;
|
||||
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {return Gfo_invk_.Rv_unhandled;}
|
||||
public GfmlTkn CmdTkn() {return GfmlTkn_.Null;} public void CmdTkn_set(GfmlTkn val) {}
|
||||
public String[] Hooks() {return String_.Ary_empty;}
|
||||
public GfmlTkn MakeTkn(CharStream stream, int hookLength) {return GfmlTkn_.Null;}
|
||||
public void SubLxr_Add(GfmlLxr... lexer) {}
|
||||
public GfmlLxr SubLxr() {return this;}
|
||||
}
|
||||
class GfmlLxr_singleton implements GfmlLxr, GfoEvObj {
|
||||
public GfoEvMgr EvMgr() {if (evMgr == null) evMgr = GfoEvMgr.new_(this); return evMgr;} GfoEvMgr evMgr;
|
||||
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {return GfoInvkAble_.Rv_unhandled;}
|
||||
class GfmlLxr_singleton implements GfmlLxr, Gfo_evt_itm {
|
||||
public Gfo_evt_mgr Evt_mgr() {if (evt_mgr == null) evt_mgr = new Gfo_evt_mgr(this); return evt_mgr;} Gfo_evt_mgr evt_mgr;
|
||||
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {return Gfo_invk_.Rv_unhandled;}
|
||||
public String Key() {return key;} private String key;
|
||||
public GfmlTkn CmdTkn() {return singletonTkn;} GfmlTkn singletonTkn;
|
||||
public void CmdTkn_set(GfmlTkn val) {
|
||||
String oldRaw = singletonTkn.Raw();
|
||||
singletonTkn = val;
|
||||
hooks = String_.Ary(val.Raw());
|
||||
GfoEvMgr_.PubVals(this, GfmlLxr_.CmdTknChanged_evt, Keyval_.new_("old", oldRaw), Keyval_.new_("new", val.Raw()), Keyval_.new_("lxr", this));
|
||||
Gfo_evt_mgr_.Pub_vals(this, GfmlLxr_.CmdTknChanged_evt, Keyval_.new_("old", oldRaw), Keyval_.new_("new", val.Raw()), Keyval_.new_("lxr", this));
|
||||
}
|
||||
public String[] Hooks() {return hooks;} private String[] hooks;
|
||||
public GfmlTkn MakeTkn(CharStream stream, int hookLength) {
|
||||
@@ -75,8 +75,8 @@ class GfmlLxr_singleton implements GfmlLxr, GfoEvObj {
|
||||
}
|
||||
class GfmlLxr_group implements GfmlLxr {
|
||||
public String Key() {return key;} private String key;
|
||||
public GfoEvMgr EvMgr() {if (evMgr == null) evMgr = GfoEvMgr.new_(this); return evMgr;} GfoEvMgr evMgr;
|
||||
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {return GfoInvkAble_.Rv_unhandled;}
|
||||
public Gfo_evt_mgr Evt_mgr() {if (evt_mgr == null) evt_mgr = new Gfo_evt_mgr(this); return evt_mgr;} Gfo_evt_mgr evt_mgr;
|
||||
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {return Gfo_invk_.Rv_unhandled;}
|
||||
public GfmlTkn CmdTkn() {return outputTkn;} public void CmdTkn_set(GfmlTkn val) {} GfmlTkn outputTkn;
|
||||
public String[] Hooks() {return trie.Symbols();}
|
||||
public GfmlTkn MakeTkn(CharStream stream, int hookLength) {
|
||||
@@ -106,8 +106,8 @@ class GfmlLxr_group implements GfmlLxr {
|
||||
return rv;
|
||||
} GfmlLxr_group() {}
|
||||
}
|
||||
class GfmlLxr_general implements GfmlLxr, GfoInvkAble {
|
||||
public GfoEvMgr EvMgr() {if (evMgr == null) evMgr = GfoEvMgr.new_(this); return evMgr;} GfoEvMgr evMgr;
|
||||
class GfmlLxr_general implements GfmlLxr, Gfo_invk {
|
||||
public Gfo_evt_mgr Evt_mgr() {if (evt_mgr == null) evt_mgr = new Gfo_evt_mgr(this); return evt_mgr;} Gfo_evt_mgr evt_mgr;
|
||||
public String Key() {return key;} private String key;
|
||||
public GfmlTkn CmdTkn() {return txtTkn;} public void CmdTkn_set(GfmlTkn val) {} GfmlTkn txtTkn;
|
||||
public String[] Hooks() {return symTrie.Symbols();}
|
||||
@@ -143,7 +143,7 @@ class GfmlLxr_general implements GfmlLxr, GfoInvkAble {
|
||||
for (GfmlLxr lxr : lxrs) {
|
||||
for (String hook : lxr.Hooks())
|
||||
symTrie.Add(hook, lxr);
|
||||
GfoEvMgr_.SubSame(lxr, GfmlLxr_.CmdTknChanged_evt, this);
|
||||
Gfo_evt_mgr_.Sub_same(lxr, GfmlLxr_.CmdTknChanged_evt, this);
|
||||
}
|
||||
}
|
||||
public GfmlLxr SubLxr() {return this;}
|
||||
@@ -163,7 +163,7 @@ class GfmlLxr_general implements GfmlLxr, GfoInvkAble {
|
||||
symTrie.Del(m.ReadStr("old"));
|
||||
symTrie.Add(m.ReadStr("new"), m.CastObj("lxr"));
|
||||
}
|
||||
else return GfoInvkAble_.Rv_unhandled;
|
||||
else return Gfo_invk_.Rv_unhandled;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -174,7 +174,7 @@ class GfmlLxr_general_txtBfr {
|
||||
public void Add(CharStream stream) {
|
||||
if (Bgn == NullPos) Bgn = stream.Pos();
|
||||
Len++;
|
||||
} static final int NullPos = -1;
|
||||
} static final int NullPos = -1;
|
||||
public GfmlTkn MakeTkn(CharStream stream, GfmlTkn textTkn) {
|
||||
String raw = String_.new_charAry_(stream.Ary(), Bgn, Len);
|
||||
Bgn = -1; Len = 0;
|
||||
|
||||
@@ -23,7 +23,7 @@ class GfmlTypeHash {
|
||||
if (hash.Has(type.Key())) throw Err_.new_wo_type("type key already exists", "key", type.Key());
|
||||
hash.Add(type.Key(), type);
|
||||
}
|
||||
Hash_adp hash = Hash_adp_.new_();
|
||||
Hash_adp hash = Hash_adp_.New();
|
||||
public static GfmlTypeHash new_() {return new GfmlTypeHash();} GfmlTypeHash() {}
|
||||
}
|
||||
class GfmlTypRegy {
|
||||
|
||||
@@ -62,6 +62,6 @@ class GfmlTypeMakr {
|
||||
void AddSubFld_imp(GfmlType ownerType, GfmlFld subFld) {ownerType.SubFlds().Add(subFld);}
|
||||
|
||||
GfmlType owner;
|
||||
List_adp list = List_adp_.new_();
|
||||
List_adp list = List_adp_.New();
|
||||
public static GfmlTypeMakr new_() {return new GfmlTypeMakr();}
|
||||
}
|
||||
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
package gplx.gfml; import gplx.*;
|
||||
public class GfmlDoc {
|
||||
public GfmlNde RootNde() {return rootNde;} GfmlNde rootNde;
|
||||
@gplx.Internal protected List_adp UsrMsgs() {return usrMsgs;} List_adp usrMsgs = List_adp_.new_();
|
||||
@gplx.Internal protected List_adp UsrMsgs() {return usrMsgs;} List_adp usrMsgs = List_adp_.New();
|
||||
@gplx.Internal protected GfmlLxrRegy LxrRegy() {return lxrRegy;} GfmlLxrRegy lxrRegy = new GfmlLxrRegy();
|
||||
@gplx.Internal protected GfmlBldrCmdRegy CmdRegy() {return cmdRegy;} GfmlBldrCmdRegy cmdRegy = GfmlBldrCmdRegy.new_();
|
||||
@gplx.Internal protected GfmlPragmaMgr PragmaMgr() {return pragmaMgr;} GfmlPragmaMgr pragmaMgr = GfmlPragmaMgr.new_();
|
||||
@@ -41,5 +41,5 @@ public class GfmlDoc {
|
||||
// public GfmlTkn BgnBrace() {return bgnBrace;} public GfmlDocEditor BgnBrace_(GfmlTkn v) {bgnBrace = v; return this;} GfmlTkn bgnBrace = GfmlTkn_.new_("{", "");
|
||||
// public GfmlTkn EndBrace() {return endBrace;} public GfmlDocEditor EndBrace_(GfmlTkn v) {endBrace = v; return this;} GfmlTkn endBrace = GfmlTkn_.new_("}", "");
|
||||
// public GfmlTkn Hnd() {return hnd;} public GfmlDocEditor Hnd_(GfmlTkn v) {hnd = v; return this;} GfmlTkn hnd = GfmlTkn_.new_(":", "");
|
||||
// public static final GfmlDocEditor Instance = new GfmlDocEditor(); GfmlDocEditor() {}
|
||||
// public static final GfmlDocEditor Instance = new GfmlDocEditor(); GfmlDocEditor() {}
|
||||
// }
|
||||
|
||||
@@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.gfml; import gplx.*;
|
||||
public class GfmlItmHnds {
|
||||
public int Count() {return list.Count();} List_adp list = List_adp_.new_();
|
||||
public int Count() {return list.Count();} List_adp list = List_adp_.New();
|
||||
public GfmlNde Get_at(int idx) {return (GfmlNde)list.Get_at(idx);}
|
||||
public void Add(GfmlNde nde) {list.Add(nde);}
|
||||
public static GfmlItmHnds new_() {return new GfmlItmHnds();} GfmlItmHnds() {}
|
||||
|
||||
@@ -55,7 +55,7 @@ public class GfmlItmKeys {
|
||||
if (toDel != null) list.Del(toDel);
|
||||
}
|
||||
GfmlAtr FetchAtr(String key) {return GfmlAtr.as_(hash.Get_by(key));}
|
||||
List_adp list = List_adp_.new_(); Hash_adp hash = Hash_adp_.new_();
|
||||
List_adp list = List_adp_.New(); Hash_adp hash = Hash_adp_.New();
|
||||
public static GfmlItmKeys new_() {return new GfmlItmKeys();} GfmlItmKeys() {}
|
||||
@gplx.Internal protected static final String NullKey = "";
|
||||
@gplx.Internal protected static final String NullKey = "";
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ class GfmlScopeRegy {
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
Hash_adp hash = Hash_adp_.new_();
|
||||
Hash_adp hash = Hash_adp_.New();
|
||||
public static GfmlScopeRegy new_() {return new GfmlScopeRegy();}
|
||||
}
|
||||
class GfmlScopeList {
|
||||
@@ -66,7 +66,7 @@ class GfmlScopeList {
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
List_adp list = List_adp_.new_();
|
||||
List_adp list = List_adp_.New();
|
||||
public static GfmlScopeList new_(String key) {
|
||||
GfmlScopeList rv = new GfmlScopeList(); rv.key = key; return rv;
|
||||
} GfmlScopeList() {}
|
||||
|
||||
@@ -45,6 +45,6 @@ class GfmlPragmaMgr {
|
||||
cmd.Exec(bldr, GfmlTkn_.Null);
|
||||
}
|
||||
}
|
||||
Hash_adp pragmas = Hash_adp_.new_(); Hash_adp_list bgnCmds = Hash_adp_list.new_(), endCmds = Hash_adp_list.new_();
|
||||
Hash_adp pragmas = Hash_adp_.New(); Hash_adp_list bgnCmds = Hash_adp_list.new_(), endCmds = Hash_adp_list.new_();
|
||||
public static GfmlPragmaMgr new_() {return new GfmlPragmaMgr();} GfmlPragmaMgr() {}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ class GfmlPragmaDefault implements GfmlPragma {
|
||||
// bldr.PragmaMgr.EndCmds_add(GfmlDocPos_.up_(bldr.CurNdeFrame.DocPos), GfmlDefaultPragma_endCmd.new_(list));
|
||||
}
|
||||
@gplx.Internal protected List_adp Compile(GfmlNde pragmaNde) {
|
||||
List_adp list = List_adp_.new_();
|
||||
List_adp list = List_adp_.New();
|
||||
for (int i = 0; i < pragmaNde.SubHnds().Count(); i++) {
|
||||
GfmlNde subNde = (GfmlNde)pragmaNde.SubHnds().Get_at(i);
|
||||
CompileSubNde(subNde, list);
|
||||
@@ -51,7 +51,7 @@ class GfmlPragmaDefault implements GfmlPragma {
|
||||
return makr.Xto_bry();
|
||||
}
|
||||
public static GfmlPragmaDefault new_() {return new GfmlPragmaDefault();} GfmlPragmaDefault() {}
|
||||
public static final GfmlTkn Default_none = GfmlTkn_.raw_("DEFAULT NONE");
|
||||
public static final GfmlTkn Default_none = GfmlTkn_.raw_("DEFAULT NONE");
|
||||
}
|
||||
class GfmlDefaultItem {
|
||||
public String TypeKey() {return typeKey;} private String typeKey;
|
||||
|
||||
@@ -20,7 +20,7 @@ import gplx.core.lists.*;
|
||||
class GfmlPragmaType implements GfmlPragma {
|
||||
public String KeyOfPragma() {return pragmaKey;} private String pragmaKey = "_type";
|
||||
public void Exec(GfmlBldr bldr, GfmlNde pragmaNde) {
|
||||
Ordered_hash list = Ordered_hash_.New(); List_adp replaced = List_adp_.new_();
|
||||
Ordered_hash list = Ordered_hash_.New(); List_adp replaced = List_adp_.New();
|
||||
for (int i = 0 ; i < pragmaNde.SubHnds().Count(); i++) {
|
||||
GfmlNde typNde = pragmaNde.SubHnds().Get_at(i);
|
||||
GfmlType type = GfmlTypeCompiler.Compile(typNde, GfmlType_.Root, bldr.TypeMgr().TypeRegy(), list);
|
||||
@@ -47,7 +47,7 @@ class GfmlPragmaType implements GfmlPragma {
|
||||
makr.AddSubFld(GfmlFld.new_(false, "fld", "_type/type/fld"));
|
||||
return makr.Xto_bry();
|
||||
}
|
||||
public static final String CacheLog_key = "log:type";
|
||||
public static final String CacheLog_key = "log:type";
|
||||
@gplx.Internal protected static void ExecList(GfmlTypRegy regy, Ordered_hash list, List_adp replaced) {
|
||||
for (Object typeObj : list) {
|
||||
GfmlType type = (GfmlType)typeObj;
|
||||
|
||||
@@ -24,7 +24,7 @@ class GfmlPragmaVar implements GfmlPragma {
|
||||
bldr.Doc().PragmaMgr().EndCmds_add(bldr.CurNdeFrame().CurDocPos().NewUp(), GfmlPragmaVar_scopeEndCmd.new_(list));
|
||||
}
|
||||
@gplx.Internal protected List_adp Compile(GfmlNde pragmaNde) {
|
||||
List_adp list = List_adp_.new_();
|
||||
List_adp list = List_adp_.New();
|
||||
for (int i = 0; i < pragmaNde.SubHnds().Count(); i++) {
|
||||
GfmlNde subNde = (GfmlNde)pragmaNde.SubHnds().Get_at(i);
|
||||
GfmlVarItm itm = CompileItmNde(subNde);
|
||||
|
||||
@@ -24,7 +24,7 @@ class GfmlVarCtx {
|
||||
GfmlVarItm itm = (GfmlVarItm)hash.Get_by(key); if (itm == null) return null;
|
||||
return itm.TknVal();
|
||||
}
|
||||
Hash_adp hash = Hash_adp_.new_();
|
||||
Hash_adp hash = Hash_adp_.New();
|
||||
public static GfmlVarCtx new_(String key) {
|
||||
GfmlVarCtx rv = new GfmlVarCtx();
|
||||
rv.key = key;
|
||||
@@ -53,10 +53,10 @@ class GfmlVarCtx_ {
|
||||
String key = "gfml.cacheKeys.ctxRegy";
|
||||
Hash_adp rv = (Hash_adp)cache.Get_by(key);
|
||||
if (rv == null) {
|
||||
rv = Hash_adp_.new_();
|
||||
rv = Hash_adp_.New();
|
||||
cache.Add(key, rv);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
public static final String DefaultKey = "gfml.varKeys.default";
|
||||
public static final String DefaultKey = "gfml.varKeys.default";
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ public class GfmlBldr {
|
||||
@gplx.Internal protected GfmlFrame_nde CurNdeFrame() {return curNdeFrame;} GfmlFrame_nde curNdeFrame;
|
||||
@gplx.Internal protected GfmlNde CurNde() {return curNdeFrame.CurNde();}
|
||||
@gplx.Internal protected GfmlTypeMgr TypeMgr() {return typeMgr;} GfmlTypeMgr typeMgr = GfmlTypeMgr.new_();
|
||||
@gplx.Internal protected Hash_adp Vars() {return vars;} Hash_adp vars = Hash_adp_.new_();
|
||||
@gplx.Internal protected Hash_adp Vars() {return vars;} Hash_adp vars = Hash_adp_.New();
|
||||
@gplx.Internal protected int StreamPos() {return streamPos;} int streamPos;
|
||||
@gplx.Internal protected void ThrowErrors_set(boolean v) {throwErrors = v;} private boolean throwErrors = true;
|
||||
@gplx.Internal protected int PrvSymType() {return prvSymType;} @gplx.Internal protected void PrvSymType_set(int v) {prvSymType = v;} int prvSymType = GfmlNdeSymType.Null;
|
||||
|
||||
@@ -21,7 +21,7 @@ public interface GfmlBldrCmd {
|
||||
void Exec(GfmlBldr bldr, GfmlTkn tkn);
|
||||
}
|
||||
class GfmlBldrCmd_ {
|
||||
public static final GfmlBldrCmd Null = new GfmlBldrCmd_null();
|
||||
public static final GfmlBldrCmd Null = new GfmlBldrCmd_null();
|
||||
}
|
||||
class GfmlBldrCmd_null implements GfmlBldrCmd {
|
||||
public String Key() {return "gfml.nullCmd";}
|
||||
@@ -30,7 +30,7 @@ class GfmlBldrCmd_null implements GfmlBldrCmd {
|
||||
class GfmlBldrCmdRegy {
|
||||
public void Add(GfmlBldrCmd cmd) {hash.Add(cmd.Key(), cmd);}
|
||||
public GfmlBldrCmd GetOrFail(String key) {return (GfmlBldrCmd)hash.Get_by_or_fail(key);}
|
||||
Hash_adp hash = Hash_adp_.new_();
|
||||
Hash_adp hash = Hash_adp_.New();
|
||||
public static GfmlBldrCmdRegy new_() {
|
||||
GfmlBldrCmdRegy rv = new GfmlBldrCmdRegy();
|
||||
rv.Add(GfmlBldrCmd_elemKey_set.Instance);
|
||||
|
||||
@@ -31,7 +31,7 @@ class GfmlStringHighlighter {
|
||||
}
|
||||
public String[] Gen() {
|
||||
String_bldr posBfr = String_bldr_.new_(), rawBfr = String_bldr_.new_(), symBfr = String_bldr_.new_();
|
||||
List_adp symList = List_adp_.new_();
|
||||
List_adp symList = List_adp_.New();
|
||||
int bgnPos = 0, endPos = 0;
|
||||
int rawLen = String_.Len(raw); int rawLenDigits = Int_.DigitCount(rawLen);
|
||||
int rawBfrBgn = -1, marksLastIdx = marks.Idx_last();
|
||||
@@ -79,7 +79,7 @@ class GfmlStringHighlighter {
|
||||
rawBfr.Add_at(0, " ");
|
||||
symBfr.Add_at(0, " ");
|
||||
}
|
||||
List_adp rv = List_adp_.new_();
|
||||
List_adp rv = List_adp_.New();
|
||||
rv.Add(posBfr.To_str());
|
||||
rv.Add(rawBfr.To_str());
|
||||
rv.Add(symBfr.To_str());
|
||||
@@ -89,7 +89,7 @@ class GfmlStringHighlighter {
|
||||
rv.Add((String)symList.Get_at(i));
|
||||
return rv.To_str_ary();
|
||||
}
|
||||
List_adp marks = List_adp_.new_();
|
||||
List_adp marks = List_adp_.New();
|
||||
public static GfmlStringHighlighter new_() {
|
||||
GfmlStringHighlighter rv = new GfmlStringHighlighter();
|
||||
return rv;
|
||||
@@ -99,5 +99,5 @@ class GfmlStringHighlighterMarker {
|
||||
public int Pos() {return pos;} public GfmlStringHighlighterMarker Pos_(int v) {pos = v; return this;} int pos;
|
||||
public char Sym() {return sym;} public GfmlStringHighlighterMarker Sym_(char v) {sym = v; return this;} char sym;
|
||||
public String Msg() {return msg;} public GfmlStringHighlighterMarker Msg_(String v) {msg = v; return this;} private String msg;
|
||||
public static final GfmlStringHighlighterMarker Null = new GfmlStringHighlighterMarker().Pos_(-1);
|
||||
public static final GfmlStringHighlighterMarker Null = new GfmlStringHighlighterMarker().Pos_(-1);
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ class GfmlParse_fxt {
|
||||
public void tst_Err(String raw, UsrMsg_mok... expdErrs) {
|
||||
bldr.ThrowErrors_set(false);
|
||||
GfmlDoc actlDoc = bldr.XtoGfmlDoc(raw);
|
||||
List_adp expd = List_adp_.new_(), actl = actlDoc.UsrMsgs();
|
||||
List_adp expd = List_adp_.New(), actl = actlDoc.UsrMsgs();
|
||||
expd.Add_many((Object[])expdErrs);
|
||||
TfdsTstr_fxt tstr = TfdsTstr_fxt.new_();
|
||||
int max = tstr.List_Max(expd, actl);
|
||||
|
||||
@@ -33,7 +33,7 @@ class GfmlAtr_mok implements GfmlItm_mok {
|
||||
sb.Add_kv("key=", key).Add_kv("val=", val);
|
||||
return sb.To_str();
|
||||
}
|
||||
public static final GfmlAtr_mok Null = new GfmlAtr_mok().Key_(String_.Null_mark).Val_(String_.Null_mark);
|
||||
public static final GfmlAtr_mok Null = new GfmlAtr_mok().Key_(String_.Null_mark).Val_(String_.Null_mark);
|
||||
public static GfmlAtr_mok as_(Object obj) {return obj instanceof GfmlAtr_mok ? (GfmlAtr_mok)obj : null;}
|
||||
public static GfmlAtr_mok new_(String key, String val) {
|
||||
GfmlAtr_mok rv = new GfmlAtr_mok();
|
||||
@@ -60,7 +60,7 @@ class GfmlNde_mok implements GfmlItm_mok {
|
||||
for (GfmlItm_mok itm : ary)
|
||||
subs.Add(itm);
|
||||
return this;
|
||||
} List_adp subs = List_adp_.new_();
|
||||
} List_adp subs = List_adp_.New();
|
||||
|
||||
public GfmlNde_mok Atrk_(String k, String v) {subs.Add(GfmlAtr_mok.new_(k, v)); return this;}
|
||||
public GfmlNde_mok Atru_(String v) {subs.Add(GfmlAtr_mok.new_(GfmlTkn_.NullVal, v)); return this;}
|
||||
@@ -91,8 +91,8 @@ class GfmlNde_mok implements GfmlItm_mok {
|
||||
return rv;
|
||||
}
|
||||
public static GfmlNde_mok as_(Object obj) {return obj instanceof GfmlNde_mok ? (GfmlNde_mok)obj : null;}
|
||||
public static final GfmlNde_mok Null = new GfmlNde_mok().Hnd_(String_.Null_mark).Typ_(String_.Null_mark);
|
||||
public static final GfmlNde_mok ErrAtr = new GfmlNde_mok().Hnd_("<<ErrAtr>>").Typ_("<<ErrAtr>>");
|
||||
public static final GfmlNde_mok Null = new GfmlNde_mok().Hnd_(String_.Null_mark).Typ_(String_.Null_mark);
|
||||
public static final GfmlNde_mok ErrAtr = new GfmlNde_mok().Hnd_("<<ErrAtr>>").Typ_("<<ErrAtr>>");
|
||||
public static GfmlNde_mok new_() {return new GfmlNde_mok();} GfmlNde_mok() {}
|
||||
public static GfmlNde_mok gfmlNde_(GfmlNde nde) {return InitNde(nde);}
|
||||
static GfmlNde_mok InitNde(GfmlNde nde) {
|
||||
|
||||
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
package gplx.gfml; import gplx.*;
|
||||
class GfmlTkn_mok {
|
||||
public String Raw() {return raw;} public GfmlTkn_mok Raw_(String v) {raw = v; return this;} private String raw;
|
||||
public List_adp Subs() {return list;} List_adp list = List_adp_.new_();
|
||||
public List_adp Subs() {return list;} List_adp list = List_adp_.New();
|
||||
public GfmlTkn_mok Subs_(GfmlTkn_mok... ary) {
|
||||
for (GfmlTkn_mok itm : ary)
|
||||
list.Add(itm);
|
||||
|
||||
@@ -43,7 +43,7 @@ class GfmlFld_mok {
|
||||
class GfmlTyp_mok {
|
||||
public String Name() {return name;} public GfmlTyp_mok Name_(String v) {name = v; return this;} private String name;
|
||||
public String Key() {return key;} public GfmlTyp_mok Key_(String v) {key = v; return this;} private String key;
|
||||
public List_adp Subs() {return subFlds;} List_adp subFlds = List_adp_.new_();
|
||||
public List_adp Subs() {return subFlds;} List_adp subFlds = List_adp_.New();
|
||||
public GfmlTyp_mok Atrs_(String... ary) {
|
||||
for (String itm : ary)
|
||||
subFlds.Add(GfmlFld_mok.new_().ini_atr_(itm));
|
||||
|
||||
@@ -54,7 +54,7 @@ public class z091_GfmlLxr_basic_tst {
|
||||
}
|
||||
GfmlTkn tst_Fetch(String raw, String... expd) {
|
||||
CharStream stream = CharStream.pos0_(raw);
|
||||
List_adp list = List_adp_.new_();
|
||||
List_adp list = List_adp_.New();
|
||||
GfmlTkn tkn = null;
|
||||
while (true) {
|
||||
tkn = rootLxr.MakeTkn(stream, 0);
|
||||
|
||||
@@ -36,7 +36,7 @@ public class z451_dflts_compile_tst {
|
||||
( fx_typ.nde_().Atrs_("x", "10")
|
||||
, fx_typ.nde_().Atrs_("y", "20")
|
||||
));
|
||||
List_adp list = List_adp_.new_();
|
||||
List_adp list = List_adp_.New();
|
||||
pragma.CompileSubNde(gnde, list);
|
||||
fx.tst_List(list
|
||||
, fx.make_("point", "x", "10")
|
||||
|
||||
@@ -30,7 +30,7 @@ public class z455_dflts_scope_tst {
|
||||
tst_FetchOrNullByPos(regy, "point", rootPos, "point", "x", "y");
|
||||
tst_FetchOrNullByPos(regy, "point", currPos, "point", "x", "y");
|
||||
|
||||
List_adp list = List_adp_.new_();
|
||||
List_adp list = List_adp_.New();
|
||||
list.Add(GfmlDefaultItem.new_("point", "z", GfmlTkn_.raw_("0")));
|
||||
GfmlDefaultPragma_bgnCmd.ExecList(regy, currPos, list);
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ class GfmlUpdateFx {
|
||||
public GfmlUpdateCmd_atr atr_() {return GfmlUpdateCmd_atr.new_();}
|
||||
public GfmlUpdateCmd_nde nde_() {return GfmlUpdateCmd_nde.new_();}
|
||||
public String Raw() {return raw;} public GfmlUpdateFx Raw_(String v) {raw = v; return this;} private String raw;
|
||||
public GfmlUpdateFx Update_(GfmlUpdateCmd cmd) {cmds.Add(cmd); return this;} List_adp cmds = List_adp_.new_();
|
||||
public GfmlUpdateFx Update_(GfmlUpdateCmd cmd) {cmds.Add(cmd); return this;} List_adp cmds = List_adp_.New();
|
||||
public GfmlUpdateFx tst_(String expd) {
|
||||
GfmlDoc actlDoc = GfmlDataNde.new_any_eol_(raw).Doc();
|
||||
for (int i = 0; i < cmds.Count(); i++) {
|
||||
|
||||
@@ -39,7 +39,7 @@ public class z811_useCase_GfmlIoSql_tst {
|
||||
Tfds.Eq_ary_str(To_str(expd.Nde()), To_str(actl));
|
||||
}
|
||||
String[] To_str(GfmlNde nde) {
|
||||
List_adp list = List_adp_.new_();
|
||||
List_adp list = List_adp_.New();
|
||||
for (int i = 0; i < nde.SubObjs_Count(); i++) {
|
||||
GfmlAtr atr = (GfmlAtr)nde.SubObjs_GetAt(i);
|
||||
list.Add(atr.Key() + "=" + atr.DatTkn().Raw());
|
||||
|
||||
Reference in New Issue
Block a user