1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00

Refactor: Remove whitespace after final and remove @gplx.Virtual

This commit is contained in:
gnosygnu
2021-11-28 08:45:40 -05:00
parent b0082fd231
commit 231e10bc19
2362 changed files with 43007 additions and 42938 deletions

View File

@@ -1,22 +1,22 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012-2017 gnosygnu@gmail.com
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
or alternatively under the terms of the Apache License Version 2.0.
You may use XOWA according to either of these licenses as is most appropriate
for your project on a case-by-case basis.
The terms of each license can be found in the source code repository:
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
*/
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012-2017 gnosygnu@gmail.com
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
or alternatively under the terms of the Apache License Version 2.0.
You may use XOWA according to either of these licenses as is most appropriate
for your project on a case-by-case basis.
The terms of each license can be found in the source code repository:
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
*/
package gplx.gfml; import gplx.*;
import gplx.core.strings.*;
import gplx.core.texts.*; /*CharStream*/
public class GfmlLxr_ {
public class GfmlLxr_ {
public static GfmlLxr general_(String key, GfmlTkn protoTkn) {return GfmlLxr_general.new_(key, protoTkn);}
public static GfmlLxr solo_(String key, GfmlTkn singletonTkn) {return GfmlLxr_singleton.new_(key, singletonTkn.Raw(), singletonTkn);}
public static GfmlLxr range_(String key, String[] ary, GfmlTkn protoTkn, boolean ignoreOutput) {return GfmlLxr_group.new_(key, ary, protoTkn, ignoreOutput);}
@@ -26,12 +26,12 @@ 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 {
class GfmlLxr_null implements GfmlLxr {
public String Key() {return "gfml.nullLxr";}
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;}
@@ -41,7 +41,7 @@ class GfmlLxr_null implements GfmlLxr {
public void SubLxr_Add(GfmlLxr... lexer) {}
public GfmlLxr SubLxr() {return this;}
}
class GfmlLxr_singleton implements GfmlLxr, Gfo_evt_itm {
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;
@@ -71,7 +71,7 @@ class GfmlLxr_singleton implements GfmlLxr, Gfo_evt_itm {
this.singletonTkn = singletonTkn;
}
}
class GfmlLxr_group implements GfmlLxr {
class GfmlLxr_group implements GfmlLxr {
public String Key() {return key;} private String key;
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;}
@@ -104,7 +104,7 @@ class GfmlLxr_group implements GfmlLxr {
return rv;
} GfmlLxr_group() {}
}
class GfmlLxr_general implements GfmlLxr, Gfo_invk {
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;
@@ -165,14 +165,14 @@ class GfmlLxr_general implements GfmlLxr, Gfo_invk {
return this;
}
}
class GfmlLxr_general_txtBfr {
class GfmlLxr_general_txtBfr {
public int Bgn = NullPos;
public int Len;
public boolean Has() {return Bgn != NullPos;}
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;

View File

@@ -1,20 +1,20 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012-2017 gnosygnu@gmail.com
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
or alternatively under the terms of the Apache License Version 2.0.
You may use XOWA according to either of these licenses as is most appropriate
for your project on a case-by-case basis.
The terms of each license can be found in the source code repository:
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
*/
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012-2017 gnosygnu@gmail.com
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
or alternatively under the terms of the Apache License Version 2.0.
You may use XOWA according to either of these licenses as is most appropriate
for your project on a case-by-case basis.
The terms of each license can be found in the source code repository:
GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
*/
package gplx.gfml; import gplx.*;
public class GfmlTkn_ {
public class GfmlTkn_ {
@gplx.Internal protected static final String NullRaw = "", NullVal = ""; static final String Type_base = "gfml.baseTkn";
@gplx.Internal protected static final GfmlTkn
Null = new GfmlTkn_base().ctor_GfmlTkn_base("gfml.nullTkn", NullRaw, NullVal, GfmlBldrCmd_.Null)
@@ -35,23 +35,23 @@ public class GfmlTkn_ {
return GfmlTkn_.composite_(tknType, ary);
}
}
class GfmlTkn_base implements GfmlTkn {
class GfmlTkn_base implements GfmlTkn {
public int ObjType() {return GfmlObj_.Type_tkn;}
public String TknType() {return tknType;} private String tknType;
public String Raw() {return raw;} private String raw;
public String Val() {return val;} private String val;
public GfmlBldrCmd Cmd_of_Tkn() {return cmd;} GfmlBldrCmd cmd;
public GfmlTkn[] SubTkns() {return GfmlTknAry_.Empty;}
@gplx.Virtual public GfmlTkn MakeNew(String rawNew, String valNew) {return new GfmlTkn_base().ctor_GfmlTkn_base(tknType, rawNew, valNew, cmd);}
public GfmlTkn MakeNew(String rawNew, String valNew) {return new GfmlTkn_base().ctor_GfmlTkn_base(tknType, rawNew, valNew, cmd);}
@gplx.Internal protected GfmlTkn_base ctor_GfmlTkn_base(String tknType, String raw, String val, GfmlBldrCmd cmd) {this.tknType = tknType; this.raw = raw; this.val = val; this.cmd = cmd; return this;}
}
class GfmlTkn_valConst extends GfmlTkn_base {
class GfmlTkn_valConst extends GfmlTkn_base {
@Override public GfmlTkn MakeNew(String rawNew, String valNew) {return new GfmlTkn_base().ctor_GfmlTkn_base(this.TknType(), rawNew, this.Val(), this.Cmd_of_Tkn());}
}
class GfmlTkn_singleton extends GfmlTkn_base {
class GfmlTkn_singleton extends GfmlTkn_base {
@Override public GfmlTkn MakeNew(String rawNew, String valNew) {return this;}
}
class GfmlTkn_composite implements GfmlTkn {
class GfmlTkn_composite implements GfmlTkn {
public int ObjType() {return GfmlObj_.Type_tkn;}
public String TknType() {return tknType;} private String tknType;
public String Raw() {return GfmlTknAry_.XtoRaw(ary);}