From cac536251dd42ae2dc33ddbbe0517ae1ab4729b6 Mon Sep 17 00:00:00 2001 From: Willem Date: Mon, 18 Aug 2025 15:45:47 +0200 Subject: [PATCH] FC18: Made XML4 space larger and improved some cake slice names --- .../mais/fc18/print/FCDocPageWriterNCR.java | 2 +- .../java/org/x4o/fc18/FourCornerRecipe.java | 8 +- .../org/x4o/fc18/cake2/FourCornerDotCake.java | 32 +- .../cake2/flag4/FCDotF4SID0064DashXN.java | 105 ---- .../cake2/flag4/FCDotF4SID0512DashXA.java | 553 ------------------ .../cake2/flag4/FCDotF4SID0512DashXE.java | 553 ------------------ .../zion7/FourCornerZionStenoGrapher.java | 27 +- .../fc18/zion7/FourCornerZionStenoLexer.java | 20 +- .../x4o/fc18/cake2/pie9/FCDotPIE9Test.java | 83 ++- .../java/org/x4o/fc18/zion7/LexerNCRTest.java | 44 +- 10 files changed, 149 insertions(+), 1278 deletions(-) delete mode 100644 nx01-x4o-fc18/src/main/java/org/x4o/fc18/cake2/flag4/FCDotF4SID0064DashXN.java delete mode 100644 nx01-x4o-fc18/src/main/java/org/x4o/fc18/cake2/flag4/FCDotF4SID0512DashXA.java delete mode 100644 nx01-x4o-fc18/src/main/java/org/x4o/fc18/cake2/flag4/FCDotF4SID0512DashXE.java diff --git a/nx01-mushroom-mais-fc18/src/main/java/love/distributedrebirth/nx01/mushroom/mais/fc18/print/FCDocPageWriterNCR.java b/nx01-mushroom-mais-fc18/src/main/java/love/distributedrebirth/nx01/mushroom/mais/fc18/print/FCDocPageWriterNCR.java index efa0aa1..2da7677 100644 --- a/nx01-mushroom-mais-fc18/src/main/java/love/distributedrebirth/nx01/mushroom/mais/fc18/print/FCDocPageWriterNCR.java +++ b/nx01-mushroom-mais-fc18/src/main/java/love/distributedrebirth/nx01/mushroom/mais/fc18/print/FCDocPageWriterNCR.java @@ -56,7 +56,7 @@ public class FCDocPageWriterNCR implements MaisDocPageWriter, FCDocSegmentWriter public void writePageContent(MaisDocWriteEvent e) throws IOException { MaisDocContentWriter writer = e.getWriter(); try (ContentCloseable content = writer.docPageContent()) { - try (ContentCloseable table = writer.docTable(FourCornerDotCake.FC_NCR1632_XD.nameSpec().replaceAll("XD", "baklava"), null, MaisDocContentCss.overviewSummary)) { + try (ContentCloseable table = writer.docTable(FourCornerDotCake.FC_NCR1632_DEN.nameSpec().replaceAll("XD", "baklava"), null, MaisDocContentCss.overviewSummary)) { writeTableBoxHeaderNumeric(writer, 28); writePIN(writer); } diff --git a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/FourCornerRecipe.java b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/FourCornerRecipe.java index 1940a8b..c76f41b 100644 --- a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/FourCornerRecipe.java +++ b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/FourCornerRecipe.java @@ -90,19 +90,19 @@ final public class FourCornerRecipe { } static public List embedNCR1632Denominator(BigInteger value) { - return embedNCR1632Value(new ArrayList<>(), value, FourCornerDotCake.FC_NCR1632_XD.getStart()); + return embedNCR1632Value(new ArrayList<>(), value, FourCornerDotCake.FC_NCR1632_DEN.getStart()); } static public List embedNCR1632Numerator(BigInteger value) { - return embedNCR1632Value(new ArrayList<>(), value, FourCornerDotCake.FC_NCR1632_XN.getStart()); + return embedNCR1632Value(new ArrayList<>(), value, FourCornerDotCake.FC_NCR1632_NUM.getStart()); } static public void embedNCR1632Denominator(List out, BigInteger value) { - embedNCR1632Value(out, value, FourCornerDotCake.FC_NCR1632_XD.getStart()); + embedNCR1632Value(out, value, FourCornerDotCake.FC_NCR1632_DEN.getStart()); } static public void embedNCR1632Numerator(List out, BigInteger value) { - embedNCR1632Value(out, value, FourCornerDotCake.FC_NCR1632_XN.getStart()); + embedNCR1632Value(out, value, FourCornerDotCake.FC_NCR1632_NUM.getStart()); } static private List embedNCR1632Value(List out, BigInteger value, int bankStart) { diff --git a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/cake2/FourCornerDotCake.java b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/cake2/FourCornerDotCake.java index 460a0aa..bad838a 100644 --- a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/cake2/FourCornerDotCake.java +++ b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/cake2/FourCornerDotCake.java @@ -52,9 +52,6 @@ import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashW; import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashX; import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashY; import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashZ; -import org.x4o.fc18.cake2.flag4.FCDotF4SID0064DashXN; -import org.x4o.fc18.cake2.flag4.FCDotF4SID0512DashXA; -import org.x4o.fc18.cake2.flag4.FCDotF4SID0512DashXE; import org.x4o.fc18.cake2.flag4.FCDotF4TTY0001DashNL; import org.x4o.fc18.cake2.flag4.FCDotF4TXT0001DashSP; import org.x4o.fc18.cake2.gram5.FCDotAMD0110DashSA; @@ -313,14 +310,14 @@ public enum FourCornerDotCake { // =========== Allow structures,sandworms and legacy unicode an pieve of the cake - FC_F4SID0512_XE(0x026800, 512, FCDotF4SID0512DashXE.values(), "Flag4 StringID XML4 Elements"), - FC_F4SID0512_XA(0x026A00, 512, FCDotF4SID0512DashXA.values(), "Flag4 StringID XML4 Attributes"), - FC_F4SID0064_XN(0x026C00, 64, FCDotF4SID0064DashXN.values(), "Flag4 StringID XML4 Namespaces"), + //FC_F4SID0512_XE(0x026800, 512, FCDotF4SID0512DashXE.values(), "Flag4 StringID XML4 Elements"), + //FC_F4SID0512_XA(0x026A00, 512, FCDotF4SID0512DashXA.values(), "Flag4 StringID XML4 Attributes"), + //FC_F4SID0064_XN(0x026C00, 64, FCDotF4SID0064DashXN.values(), "Flag4 StringID XML4 Namespaces"), //FC_F4XMLXDBX_V4() /// Reserved Flag4 Structures - __RESERVED_F4(0x026C40, 0x026DBE - 0x026C40, "Reserved for F4 structures"), + __RESERVED_F4(0x026800, 0x026DBE - 0x026800, "Reserved for F4 structures"), /// Tele Type Ytructure00 zero one Nether Line FC_F4TTY0001_NL(0x026DBE, 1, FCDotF4TTY0001DashNL.values(), "Flag4 TTY00 zero one Nether Line"), @@ -331,28 +328,29 @@ public enum FourCornerDotCake { FC_F4TXT0001_SP(0x026DBF, 1, FCDotF4TXT0001DashSP.values(), "Flag4 TXT00 zero one Spanish Peace"), /// free - __RESERVED_F4C(0x026DC0, 576, "free"), + __RESERVED_XDBX(0x026DC0, 64, "free"), + //FC_XDBX0064_DOC(0x026DC0, 64, "Flag4 Doctype usage header flags."), + + /// XML4 has fixed size limits to have stable complexity + FC_XDBX0512_NS(0x026E00, 512, "XML4 StringID of Namespace"), + FC_XDBX2048_ATTR(0x027000, 2048, "XML4 StringID of Attribute"), + FC_XDBX2048_TAG(0x027800, 2048, "XML4 StringID of Element"), /// To escape the question of undefined behavior, we define it as dark nether space, so we can see it in C++ /// Undefined octal data which are packed big indian octals per 5, which is a 15 bit data gram in one 18 bit cake point. /// This can encode sand worm text data like icons, bitmap images or vector images and unicode4D/etc like HolyC of TempleOS. /// With the ESC_SAND_WALKER preamble the binary octal mime-type information must be send first. - FC_SAND_WORM(0x27000, 32768, "Sand octals of olgoi khorkhoi"), - - /// free - __RESERVED_F4A(0x30000 - 4096, 2048, "free"), - /// free - __RESERVED_F4B(0x30000 - 2048, 2048, "free"), + FC_SANDWORM_15(0x28000, 32768, "Sand octals of olgoi khorkhoi"), // =========== Allow big terminators to learn a computer math /// New Counting Rods, Select an 9 bit denominator to use. /// Divided in 64 nine bit banks, to select up to 576 bit denominator. - FC_NCR1632_XD(0x30000, 32768, "New Counting Rods X-denominator"), + FC_NCR1632_DEN(0x30000, 32768, "New Counting Rods Denominator"), /// New Counting Rods, Use one or more 9 bit numerator values. /// Divided in 64 nine bit banks, to select up to 576 bit numerator. /// NOTE: Every lowest (512) numerator trigger a fraction. - FC_NCR1632_XN(0x38000, 32768, "New Counting Rods X-Numerator"), + FC_NCR1632_NUM(0x38000, 32768, "New Counting Rods Numerator"), ; private static final FourCornerDotCake[] VALUES = values(); private final int start; @@ -440,7 +438,7 @@ public enum FourCornerDotCake { if (idx <= FC_PIE9D_27.ordinal()) { return false; } - if (idx >= FC_F4SID0512_XE.ordinal()) { + if (idx > FC_CLK1K_Z.ordinal()) { return false; } return true; diff --git a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/cake2/flag4/FCDotF4SID0064DashXN.java b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/cake2/flag4/FCDotF4SID0064DashXN.java deleted file mode 100644 index 685eeb9..0000000 --- a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/cake2/flag4/FCDotF4SID0064DashXN.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 2004-2014, Willem Cazander - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are permitted provided - * that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, this list of conditions and the - * following disclaimer. - * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and - * the following disclaimer in the documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package org.x4o.fc18.cake2.flag4; - -import org.x4o.fc18.cake2.FourCornerDotCake; -import org.x4o.fc18.cake2.FourCornerDotColleFlag4; - -/** - * "FC.F4SID0064-XN" Four Corner Flag String Identifier 0f 64 for XML namespaces. - * - * @author Willem Cazanders - * @version 1.0 Jan 26, 2025 - */ -public enum FCDotF4SID0064DashXN implements FourCornerDotColleFlag4 { - XE__SID_001, - XE__SID_002, - XE__SID_003, - XE__SID_004, - XE__SID_005, - XE__SID_006, - XE__SID_007, - XE__SID_008, - XE__SID_009, - XE__SID_010, - XE__SID_011, - XE__SID_012, - XE__SID_013, - XE__SID_014, - XE__SID_015, - XE__SID_016, - XE__SID_017, - XE__SID_018, - XE__SID_019, - XE__SID_020, - XE__SID_021, - XE__SID_022, - XE__SID_023, - XE__SID_024, - XE__SID_025, - XE__SID_026, - XE__SID_027, - XE__SID_028, - XE__SID_029, - XE__SID_030, - XE__SID_031, - XE__SID_032, - XE__SID_033, - XE__SID_034, - XE__SID_035, - XE__SID_036, - XE__SID_037, - XE__SID_038, - XE__SID_039, - XE__SID_040, - XE__SID_041, - XE__SID_042, - XE__SID_043, - XE__SID_044, - XE__SID_045, - XE__SID_046, - XE__SID_047, - XE__SID_048, - XE__SID_049, - XE__SID_050, - XE__SID_051, - XE__SID_052, - XE__SID_053, - XE__SID_054, - XE__SID_055, - XE__SID_056, - XE__SID_057, - XE__SID_058, - XE__SID_059, - XE__SID_060, - XE__SID_061, - XE__SID_062, - XE__SID_063, - XE__SID_064, - ; - - @Override - public int cakePointDotIndex() { - return FourCornerDotCake.FC_F4SID0064_XN.getStart() + ordinal(); - } -} diff --git a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/cake2/flag4/FCDotF4SID0512DashXA.java b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/cake2/flag4/FCDotF4SID0512DashXA.java deleted file mode 100644 index b17afd6..0000000 --- a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/cake2/flag4/FCDotF4SID0512DashXA.java +++ /dev/null @@ -1,553 +0,0 @@ -/* - * Copyright (c) 2004-2014, Willem Cazander - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are permitted provided - * that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, this list of conditions and the - * following disclaimer. - * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and - * the following disclaimer in the documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package org.x4o.fc18.cake2.flag4; - -import org.x4o.fc18.cake2.FourCornerDotCake; -import org.x4o.fc18.cake2.FourCornerDotColleFlag4; - -/** - * "FC.F4SID0512-XA" Four Corner Flag String Identifier 0f 512 for XML attributes. - * - * @author Willem Cazander - * @version 1.0 Jan 26, 2025 - */ -public enum FCDotF4SID0512DashXA implements FourCornerDotColleFlag4 { - XA__SID_001, - XA__SID_002, - XA__SID_003, - XA__SID_004, - XA__SID_005, - XA__SID_006, - XA__SID_007, - XA__SID_008, - XA__SID_009, - XA__SID_010, - XA__SID_011, - XA__SID_012, - XA__SID_013, - XA__SID_014, - XA__SID_015, - XA__SID_016, - XA__SID_017, - XA__SID_018, - XA__SID_019, - XA__SID_020, - XA__SID_021, - XA__SID_022, - XA__SID_023, - XA__SID_024, - XA__SID_025, - XA__SID_026, - XA__SID_027, - XA__SID_028, - XA__SID_029, - XA__SID_030, - XA__SID_031, - XA__SID_032, - XA__SID_033, - XA__SID_034, - XA__SID_035, - XA__SID_036, - XA__SID_037, - XA__SID_038, - XA__SID_039, - XA__SID_040, - XA__SID_041, - XA__SID_042, - XA__SID_043, - XA__SID_044, - XA__SID_045, - XA__SID_046, - XA__SID_047, - XA__SID_048, - XA__SID_049, - XA__SID_050, - XA__SID_051, - XA__SID_052, - XA__SID_053, - XA__SID_054, - XA__SID_055, - XA__SID_056, - XA__SID_057, - XA__SID_058, - XA__SID_059, - XA__SID_060, - XA__SID_061, - XA__SID_062, - XA__SID_063, - XA__SID_064, - XA__SID_065, - XA__SID_066, - XA__SID_067, - XA__SID_068, - XA__SID_069, - XA__SID_070, - XA__SID_071, - XA__SID_072, - XA__SID_073, - XA__SID_074, - XA__SID_075, - XA__SID_076, - XA__SID_077, - XA__SID_078, - XA__SID_079, - XA__SID_080, - XA__SID_081, - XA__SID_082, - XA__SID_083, - XA__SID_084, - XA__SID_085, - XA__SID_086, - XA__SID_087, - XA__SID_088, - XA__SID_089, - XA__SID_090, - XA__SID_091, - XA__SID_092, - XA__SID_093, - XA__SID_094, - XA__SID_095, - XA__SID_096, - XA__SID_097, - XA__SID_098, - XA__SID_099, - XA__SID_100, - XA__SID_101, - XA__SID_102, - XA__SID_103, - XA__SID_104, - XA__SID_105, - XA__SID_106, - XA__SID_107, - XA__SID_108, - XA__SID_109, - XA__SID_110, - XA__SID_111, - XA__SID_112, - XA__SID_113, - XA__SID_114, - XA__SID_115, - XA__SID_116, - XA__SID_117, - XA__SID_118, - XA__SID_119, - XA__SID_120, - XA__SID_121, - XA__SID_122, - XA__SID_123, - XA__SID_124, - XA__SID_125, - XA__SID_126, - XA__SID_127, - XA__SID_128, - XA__SID_129, - XA__SID_130, - XA__SID_131, - XA__SID_132, - XA__SID_133, - XA__SID_134, - XA__SID_135, - XA__SID_136, - XA__SID_137, - XA__SID_138, - XA__SID_139, - XA__SID_140, - XA__SID_141, - XA__SID_142, - XA__SID_143, - XA__SID_144, - XA__SID_145, - XA__SID_146, - XA__SID_147, - XA__SID_148, - XA__SID_149, - XA__SID_150, - XA__SID_151, - XA__SID_152, - XA__SID_153, - XA__SID_154, - XA__SID_155, - XA__SID_156, - XA__SID_157, - XA__SID_158, - XA__SID_159, - XA__SID_160, - XA__SID_161, - XA__SID_162, - XA__SID_163, - XA__SID_164, - XA__SID_165, - XA__SID_166, - XA__SID_167, - XA__SID_168, - XA__SID_169, - XA__SID_170, - XA__SID_171, - XA__SID_172, - XA__SID_173, - XA__SID_174, - XA__SID_175, - XA__SID_176, - XA__SID_177, - XA__SID_178, - XA__SID_179, - XA__SID_180, - XA__SID_181, - XA__SID_182, - XA__SID_183, - XA__SID_184, - XA__SID_185, - XA__SID_186, - XA__SID_187, - XA__SID_188, - XA__SID_189, - XA__SID_190, - XA__SID_191, - XA__SID_192, - XA__SID_193, - XA__SID_194, - XA__SID_195, - XA__SID_196, - XA__SID_197, - XA__SID_198, - XA__SID_199, - XA__SID_200, - XA__SID_201, - XA__SID_202, - XA__SID_203, - XA__SID_204, - XA__SID_205, - XA__SID_206, - XA__SID_207, - XA__SID_208, - XA__SID_209, - XA__SID_210, - XA__SID_211, - XA__SID_212, - XA__SID_213, - XA__SID_214, - XA__SID_215, - XA__SID_216, - XA__SID_217, - XA__SID_218, - XA__SID_219, - XA__SID_220, - XA__SID_221, - XA__SID_222, - XA__SID_223, - XA__SID_224, - XA__SID_225, - XA__SID_226, - XA__SID_227, - XA__SID_228, - XA__SID_229, - XA__SID_230, - XA__SID_231, - XA__SID_232, - XA__SID_233, - XA__SID_234, - XA__SID_235, - XA__SID_236, - XA__SID_237, - XA__SID_238, - XA__SID_239, - XA__SID_240, - XA__SID_241, - XA__SID_242, - XA__SID_243, - XA__SID_244, - XA__SID_245, - XA__SID_246, - XA__SID_247, - XA__SID_248, - XA__SID_249, - XA__SID_250, - XA__SID_251, - XA__SID_252, - XA__SID_253, - XA__SID_254, - XA__SID_255, - XA__SID_256, - XA__SID_257, - XA__SID_258, - XA__SID_259, - XA__SID_260, - XA__SID_261, - XA__SID_262, - XA__SID_263, - XA__SID_264, - XA__SID_265, - XA__SID_266, - XA__SID_267, - XA__SID_268, - XA__SID_269, - XA__SID_270, - XA__SID_271, - XA__SID_272, - XA__SID_273, - XA__SID_274, - XA__SID_275, - XA__SID_276, - XA__SID_277, - XA__SID_278, - XA__SID_279, - XA__SID_280, - XA__SID_281, - XA__SID_282, - XA__SID_283, - XA__SID_284, - XA__SID_285, - XA__SID_286, - XA__SID_287, - XA__SID_288, - XA__SID_289, - XA__SID_290, - XA__SID_291, - XA__SID_292, - XA__SID_293, - XA__SID_294, - XA__SID_295, - XA__SID_296, - XA__SID_297, - XA__SID_298, - XA__SID_299, - XA__SID_300, - XA__SID_301, - XA__SID_302, - XA__SID_303, - XA__SID_304, - XA__SID_305, - XA__SID_306, - XA__SID_307, - XA__SID_308, - XA__SID_309, - XA__SID_310, - XA__SID_311, - XA__SID_312, - XA__SID_313, - XA__SID_314, - XA__SID_315, - XA__SID_316, - XA__SID_317, - XA__SID_318, - XA__SID_319, - XA__SID_320, - XA__SID_321, - XA__SID_322, - XA__SID_323, - XA__SID_324, - XA__SID_325, - XA__SID_326, - XA__SID_327, - XA__SID_328, - XA__SID_329, - XA__SID_330, - XA__SID_331, - XA__SID_332, - XA__SID_333, - XA__SID_334, - XA__SID_335, - XA__SID_336, - XA__SID_337, - XA__SID_338, - XA__SID_339, - XA__SID_340, - XA__SID_341, - XA__SID_342, - XA__SID_343, - XA__SID_344, - XA__SID_345, - XA__SID_346, - XA__SID_347, - XA__SID_348, - XA__SID_349, - XA__SID_350, - XA__SID_351, - XA__SID_352, - XA__SID_353, - XA__SID_354, - XA__SID_355, - XA__SID_356, - XA__SID_357, - XA__SID_358, - XA__SID_359, - XA__SID_360, - XA__SID_361, - XA__SID_362, - XA__SID_363, - XA__SID_364, - XA__SID_365, - XA__SID_366, - XA__SID_367, - XA__SID_368, - XA__SID_369, - XA__SID_370, - XA__SID_371, - XA__SID_372, - XA__SID_373, - XA__SID_374, - XA__SID_375, - XA__SID_376, - XA__SID_377, - XA__SID_378, - XA__SID_379, - XA__SID_380, - XA__SID_381, - XA__SID_382, - XA__SID_383, - XA__SID_384, - XA__SID_385, - XA__SID_386, - XA__SID_387, - XA__SID_388, - XA__SID_389, - XA__SID_390, - XA__SID_391, - XA__SID_392, - XA__SID_393, - XA__SID_394, - XA__SID_395, - XA__SID_396, - XA__SID_397, - XA__SID_398, - XA__SID_399, - XA__SID_400, - XA__SID_401, - XA__SID_402, - XA__SID_403, - XA__SID_404, - XA__SID_405, - XA__SID_406, - XA__SID_407, - XA__SID_408, - XA__SID_409, - XA__SID_410, - XA__SID_411, - XA__SID_412, - XA__SID_413, - XA__SID_414, - XA__SID_415, - XA__SID_416, - XA__SID_417, - XA__SID_418, - XA__SID_419, - XA__SID_420, - XA__SID_421, - XA__SID_422, - XA__SID_423, - XA__SID_424, - XA__SID_425, - XA__SID_426, - XA__SID_427, - XA__SID_428, - XA__SID_429, - XA__SID_430, - XA__SID_431, - XA__SID_432, - XA__SID_433, - XA__SID_434, - XA__SID_435, - XA__SID_436, - XA__SID_437, - XA__SID_438, - XA__SID_439, - XA__SID_440, - XA__SID_441, - XA__SID_442, - XA__SID_443, - XA__SID_444, - XA__SID_445, - XA__SID_446, - XA__SID_447, - XA__SID_448, - XA__SID_449, - XA__SID_450, - XA__SID_451, - XA__SID_452, - XA__SID_453, - XA__SID_454, - XA__SID_455, - XA__SID_456, - XA__SID_457, - XA__SID_458, - XA__SID_459, - XA__SID_460, - XA__SID_461, - XA__SID_462, - XA__SID_463, - XA__SID_464, - XA__SID_465, - XA__SID_466, - XA__SID_467, - XA__SID_468, - XA__SID_469, - XA__SID_470, - XA__SID_471, - XA__SID_472, - XA__SID_473, - XA__SID_474, - XA__SID_475, - XA__SID_476, - XA__SID_477, - XA__SID_478, - XA__SID_479, - XA__SID_480, - XA__SID_481, - XA__SID_482, - XA__SID_483, - XA__SID_484, - XA__SID_485, - XA__SID_486, - XA__SID_487, - XA__SID_488, - XA__SID_489, - XA__SID_490, - XA__SID_491, - XA__SID_492, - XA__SID_493, - XA__SID_494, - XA__SID_495, - XA__SID_496, - XA__SID_497, - XA__SID_498, - XA__SID_499, - XA__SID_500, - XA__SID_501, - XA__SID_502, - XA__SID_503, - XA__SID_504, - XA__SID_505, - XA__SID_506, - XA__SID_507, - XA__SID_508, - XA__SID_509, - XA__SID_510, - XA__SID_511, - XA__SID_512, - ; - - @Override - public int cakePointDotIndex() { - return FourCornerDotCake.FC_F4SID0512_XA.getStart() + ordinal(); - } -} diff --git a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/cake2/flag4/FCDotF4SID0512DashXE.java b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/cake2/flag4/FCDotF4SID0512DashXE.java deleted file mode 100644 index dbcf752..0000000 --- a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/cake2/flag4/FCDotF4SID0512DashXE.java +++ /dev/null @@ -1,553 +0,0 @@ -/* - * Copyright (c) 2004-2014, Willem Cazander - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are permitted provided - * that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, this list of conditions and the - * following disclaimer. - * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and - * the following disclaimer in the documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package org.x4o.fc18.cake2.flag4; - -import org.x4o.fc18.cake2.FourCornerDotCake; -import org.x4o.fc18.cake2.FourCornerDotColleFlag4; - -/** - * "FC.F4SID0512-XE" Four Corner Flag String Identifier 0f 512 for XML elements. - * - * @author Willem Cazanders - * @version 1.0 Jan 26, 2025 - */ -public enum FCDotF4SID0512DashXE implements FourCornerDotColleFlag4 { - XE__SID_001, - XE__SID_002, - XE__SID_003, - XE__SID_004, - XE__SID_005, - XE__SID_006, - XE__SID_007, - XE__SID_008, - XE__SID_009, - XE__SID_010, - XE__SID_011, - XE__SID_012, - XE__SID_013, - XE__SID_014, - XE__SID_015, - XE__SID_016, - XE__SID_017, - XE__SID_018, - XE__SID_019, - XE__SID_020, - XE__SID_021, - XE__SID_022, - XE__SID_023, - XE__SID_024, - XE__SID_025, - XE__SID_026, - XE__SID_027, - XE__SID_028, - XE__SID_029, - XE__SID_030, - XE__SID_031, - XE__SID_032, - XE__SID_033, - XE__SID_034, - XE__SID_035, - XE__SID_036, - XE__SID_037, - XE__SID_038, - XE__SID_039, - XE__SID_040, - XE__SID_041, - XE__SID_042, - XE__SID_043, - XE__SID_044, - XE__SID_045, - XE__SID_046, - XE__SID_047, - XE__SID_048, - XE__SID_049, - XE__SID_050, - XE__SID_051, - XE__SID_052, - XE__SID_053, - XE__SID_054, - XE__SID_055, - XE__SID_056, - XE__SID_057, - XE__SID_058, - XE__SID_059, - XE__SID_060, - XE__SID_061, - XE__SID_062, - XE__SID_063, - XE__SID_064, - XE__SID_065, - XE__SID_066, - XE__SID_067, - XE__SID_068, - XE__SID_069, - XE__SID_070, - XE__SID_071, - XE__SID_072, - XE__SID_073, - XE__SID_074, - XE__SID_075, - XE__SID_076, - XE__SID_077, - XE__SID_078, - XE__SID_079, - XE__SID_080, - XE__SID_081, - XE__SID_082, - XE__SID_083, - XE__SID_084, - XE__SID_085, - XE__SID_086, - XE__SID_087, - XE__SID_088, - XE__SID_089, - XE__SID_090, - XE__SID_091, - XE__SID_092, - XE__SID_093, - XE__SID_094, - XE__SID_095, - XE__SID_096, - XE__SID_097, - XE__SID_098, - XE__SID_099, - XE__SID_100, - XE__SID_101, - XE__SID_102, - XE__SID_103, - XE__SID_104, - XE__SID_105, - XE__SID_106, - XE__SID_107, - XE__SID_108, - XE__SID_109, - XE__SID_110, - XE__SID_111, - XE__SID_112, - XE__SID_113, - XE__SID_114, - XE__SID_115, - XE__SID_116, - XE__SID_117, - XE__SID_118, - XE__SID_119, - XE__SID_120, - XE__SID_121, - XE__SID_122, - XE__SID_123, - XE__SID_124, - XE__SID_125, - XE__SID_126, - XE__SID_127, - XE__SID_128, - XE__SID_129, - XE__SID_130, - XE__SID_131, - XE__SID_132, - XE__SID_133, - XE__SID_134, - XE__SID_135, - XE__SID_136, - XE__SID_137, - XE__SID_138, - XE__SID_139, - XE__SID_140, - XE__SID_141, - XE__SID_142, - XE__SID_143, - XE__SID_144, - XE__SID_145, - XE__SID_146, - XE__SID_147, - XE__SID_148, - XE__SID_149, - XE__SID_150, - XE__SID_151, - XE__SID_152, - XE__SID_153, - XE__SID_154, - XE__SID_155, - XE__SID_156, - XE__SID_157, - XE__SID_158, - XE__SID_159, - XE__SID_160, - XE__SID_161, - XE__SID_162, - XE__SID_163, - XE__SID_164, - XE__SID_165, - XE__SID_166, - XE__SID_167, - XE__SID_168, - XE__SID_169, - XE__SID_170, - XE__SID_171, - XE__SID_172, - XE__SID_173, - XE__SID_174, - XE__SID_175, - XE__SID_176, - XE__SID_177, - XE__SID_178, - XE__SID_179, - XE__SID_180, - XE__SID_181, - XE__SID_182, - XE__SID_183, - XE__SID_184, - XE__SID_185, - XE__SID_186, - XE__SID_187, - XE__SID_188, - XE__SID_189, - XE__SID_190, - XE__SID_191, - XE__SID_192, - XE__SID_193, - XE__SID_194, - XE__SID_195, - XE__SID_196, - XE__SID_197, - XE__SID_198, - XE__SID_199, - XE__SID_200, - XE__SID_201, - XE__SID_202, - XE__SID_203, - XE__SID_204, - XE__SID_205, - XE__SID_206, - XE__SID_207, - XE__SID_208, - XE__SID_209, - XE__SID_210, - XE__SID_211, - XE__SID_212, - XE__SID_213, - XE__SID_214, - XE__SID_215, - XE__SID_216, - XE__SID_217, - XE__SID_218, - XE__SID_219, - XE__SID_220, - XE__SID_221, - XE__SID_222, - XE__SID_223, - XE__SID_224, - XE__SID_225, - XE__SID_226, - XE__SID_227, - XE__SID_228, - XE__SID_229, - XE__SID_230, - XE__SID_231, - XE__SID_232, - XE__SID_233, - XE__SID_234, - XE__SID_235, - XE__SID_236, - XE__SID_237, - XE__SID_238, - XE__SID_239, - XE__SID_240, - XE__SID_241, - XE__SID_242, - XE__SID_243, - XE__SID_244, - XE__SID_245, - XE__SID_246, - XE__SID_247, - XE__SID_248, - XE__SID_249, - XE__SID_250, - XE__SID_251, - XE__SID_252, - XE__SID_253, - XE__SID_254, - XE__SID_255, - XE__SID_256, - XE__SID_257, - XE__SID_258, - XE__SID_259, - XE__SID_260, - XE__SID_261, - XE__SID_262, - XE__SID_263, - XE__SID_264, - XE__SID_265, - XE__SID_266, - XE__SID_267, - XE__SID_268, - XE__SID_269, - XE__SID_270, - XE__SID_271, - XE__SID_272, - XE__SID_273, - XE__SID_274, - XE__SID_275, - XE__SID_276, - XE__SID_277, - XE__SID_278, - XE__SID_279, - XE__SID_280, - XE__SID_281, - XE__SID_282, - XE__SID_283, - XE__SID_284, - XE__SID_285, - XE__SID_286, - XE__SID_287, - XE__SID_288, - XE__SID_289, - XE__SID_290, - XE__SID_291, - XE__SID_292, - XE__SID_293, - XE__SID_294, - XE__SID_295, - XE__SID_296, - XE__SID_297, - XE__SID_298, - XE__SID_299, - XE__SID_300, - XE__SID_301, - XE__SID_302, - XE__SID_303, - XE__SID_304, - XE__SID_305, - XE__SID_306, - XE__SID_307, - XE__SID_308, - XE__SID_309, - XE__SID_310, - XE__SID_311, - XE__SID_312, - XE__SID_313, - XE__SID_314, - XE__SID_315, - XE__SID_316, - XE__SID_317, - XE__SID_318, - XE__SID_319, - XE__SID_320, - XE__SID_321, - XE__SID_322, - XE__SID_323, - XE__SID_324, - XE__SID_325, - XE__SID_326, - XE__SID_327, - XE__SID_328, - XE__SID_329, - XE__SID_330, - XE__SID_331, - XE__SID_332, - XE__SID_333, - XE__SID_334, - XE__SID_335, - XE__SID_336, - XE__SID_337, - XE__SID_338, - XE__SID_339, - XE__SID_340, - XE__SID_341, - XE__SID_342, - XE__SID_343, - XE__SID_344, - XE__SID_345, - XE__SID_346, - XE__SID_347, - XE__SID_348, - XE__SID_349, - XE__SID_350, - XE__SID_351, - XE__SID_352, - XE__SID_353, - XE__SID_354, - XE__SID_355, - XE__SID_356, - XE__SID_357, - XE__SID_358, - XE__SID_359, - XE__SID_360, - XE__SID_361, - XE__SID_362, - XE__SID_363, - XE__SID_364, - XE__SID_365, - XE__SID_366, - XE__SID_367, - XE__SID_368, - XE__SID_369, - XE__SID_370, - XE__SID_371, - XE__SID_372, - XE__SID_373, - XE__SID_374, - XE__SID_375, - XE__SID_376, - XE__SID_377, - XE__SID_378, - XE__SID_379, - XE__SID_380, - XE__SID_381, - XE__SID_382, - XE__SID_383, - XE__SID_384, - XE__SID_385, - XE__SID_386, - XE__SID_387, - XE__SID_388, - XE__SID_389, - XE__SID_390, - XE__SID_391, - XE__SID_392, - XE__SID_393, - XE__SID_394, - XE__SID_395, - XE__SID_396, - XE__SID_397, - XE__SID_398, - XE__SID_399, - XE__SID_400, - XE__SID_401, - XE__SID_402, - XE__SID_403, - XE__SID_404, - XE__SID_405, - XE__SID_406, - XE__SID_407, - XE__SID_408, - XE__SID_409, - XE__SID_410, - XE__SID_411, - XE__SID_412, - XE__SID_413, - XE__SID_414, - XE__SID_415, - XE__SID_416, - XE__SID_417, - XE__SID_418, - XE__SID_419, - XE__SID_420, - XE__SID_421, - XE__SID_422, - XE__SID_423, - XE__SID_424, - XE__SID_425, - XE__SID_426, - XE__SID_427, - XE__SID_428, - XE__SID_429, - XE__SID_430, - XE__SID_431, - XE__SID_432, - XE__SID_433, - XE__SID_434, - XE__SID_435, - XE__SID_436, - XE__SID_437, - XE__SID_438, - XE__SID_439, - XE__SID_440, - XE__SID_441, - XE__SID_442, - XE__SID_443, - XE__SID_444, - XE__SID_445, - XE__SID_446, - XE__SID_447, - XE__SID_448, - XE__SID_449, - XE__SID_450, - XE__SID_451, - XE__SID_452, - XE__SID_453, - XE__SID_454, - XE__SID_455, - XE__SID_456, - XE__SID_457, - XE__SID_458, - XE__SID_459, - XE__SID_460, - XE__SID_461, - XE__SID_462, - XE__SID_463, - XE__SID_464, - XE__SID_465, - XE__SID_466, - XE__SID_467, - XE__SID_468, - XE__SID_469, - XE__SID_470, - XE__SID_471, - XE__SID_472, - XE__SID_473, - XE__SID_474, - XE__SID_475, - XE__SID_476, - XE__SID_477, - XE__SID_478, - XE__SID_479, - XE__SID_480, - XE__SID_481, - XE__SID_482, - XE__SID_483, - XE__SID_484, - XE__SID_485, - XE__SID_486, - XE__SID_487, - XE__SID_488, - XE__SID_489, - XE__SID_490, - XE__SID_491, - XE__SID_492, - XE__SID_493, - XE__SID_494, - XE__SID_495, - XE__SID_496, - XE__SID_497, - XE__SID_498, - XE__SID_499, - XE__SID_500, - XE__SID_501, - XE__SID_502, - XE__SID_503, - XE__SID_504, - XE__SID_505, - XE__SID_506, - XE__SID_507, - XE__SID_508, - XE__SID_509, - XE__SID_510, - XE__SID_511, - XE__SID_512, - ; - - @Override - public int cakePointDotIndex() { - return FourCornerDotCake.FC_F4SID0512_XE.getStart() + ordinal(); - } -} diff --git a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZionStenoGrapher.java b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZionStenoGrapher.java index ad86640..b59c0d9 100644 --- a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZionStenoGrapher.java +++ b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZionStenoGrapher.java @@ -36,14 +36,24 @@ import org.x4o.fc18.octal8.PrimordialOctal; /// @version 1.0 Jan 11, 2025 public class FourCornerZionStenoGrapher { - private final List out; - - public FourCornerZionStenoGrapher(List out) { - this.out = Objects.requireNonNull(out); + static public FourCornerWriter writerX06(List out) { + return new FourCornerWriter(out, true); + } + + static public FourCornerWriter writerX18(List out) { + return new FourCornerWriter(out, false); } - class FourCornerWriter implements FourCornerZion7AlphaOmega,FourCornerZion7SalahSequence { + static public final class FourCornerWriter implements FourCornerZion7AlphaOmega,FourCornerZion7SalahSequence,FourCornerZion7TempleScrolls { + private final List out; + private final boolean isSixBit; + + public FourCornerWriter(List out,boolean isSixBit) { + this.out = Objects.requireNonNull(out); + this.isSixBit = isSixBit; + } + @Override public void strobeDocumentAlpha() { } @@ -54,12 +64,16 @@ public class FourCornerZionStenoGrapher { @Override public void strobeWord(int cakePoint) { + //if (isSixBit) { + //} out.add(cakePoint); } @Override public void strobeWords(List cakePoints) { - out.addAll(cakePoints); + for (Integer cakePoint : cakePoints) { // todo: remove iterator + strobeWord(cakePoint); + } } @Override @@ -85,3 +99,4 @@ public class FourCornerZionStenoGrapher { } } + \ No newline at end of file diff --git a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZionStenoLexer.java b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZionStenoLexer.java index 0acd5b1..e55d328 100644 --- a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZionStenoLexer.java +++ b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZionStenoLexer.java @@ -86,13 +86,13 @@ public class FourCornerZionStenoLexer { if (FourCornerDotCake.FC_DEC2701_PX0.equals(cakeSlice)) { continue; // handle DEC manually } - if (FourCornerDotCake.FC_SAND_WORM.equals(cakeSlice)) { + if (FourCornerDotCake.FC_SANDWORM_15.equals(cakeSlice)) { continue; // parse nether body manually } - if (FourCornerDotCake.FC_NCR1632_XD.equals(cakeSlice)) { + if (FourCornerDotCake.FC_NCR1632_DEN.equals(cakeSlice)) { continue; // parse block manually } - if (FourCornerDotCake.FC_NCR1632_XN.equals(cakeSlice)) { + if (FourCornerDotCake.FC_NCR1632_NUM.equals(cakeSlice)) { continue; // parse block manually } CAKE_SLICE_EATERS.add(new StenoScannerWordCakeSlice(cakeSlice)); @@ -304,7 +304,7 @@ public class FourCornerZionStenoLexer { static class StenoScannerSandWorm extends StenoScanner { public StenoScannerSandWorm() { - super(FourCornerDotCake.FC_SAND_WORM); + super(FourCornerDotCake.FC_SANDWORM_15); } @Override @@ -349,10 +349,10 @@ public class FourCornerZionStenoLexer { static class StenoScannerNCR18 extends StenoScanner { - static private final int CAKEPOINT_BANK0_END = FourCornerDotCake.FC_NCR1632_XN.getStart() + 512; + static private final int CAKEPOINT_BANK0_END = FourCornerDotCake.FC_NCR1632_NUM.getStart() + 512; public StenoScannerNCR18() { - super(FourCornerDotCake.FC_NCR1632_XD.getStart(), FourCornerDotCake.FC_NCR1632_XN.getStop()); + super(FourCornerDotCake.FC_NCR1632_DEN.getStart(), FourCornerDotCake.FC_NCR1632_NUM.getStop()); } @Override @@ -362,16 +362,16 @@ public class FourCornerZionStenoLexer { boolean requestBankReset = false; for (int i = idxFirst; i <= idxLast; i++) { int cakePoint = lexer.input.get(i); - if (cakePoint >= FourCornerDotCake.FC_NCR1632_XD.getStart() && cakePoint <= FourCornerDotCake.FC_NCR1632_XD.getStop()) { - int denominatorX = cakePoint - FourCornerDotCake.FC_NCR1632_XD.getStart(); + if (cakePoint >= FourCornerDotCake.FC_NCR1632_DEN.getStart() && cakePoint <= FourCornerDotCake.FC_NCR1632_DEN.getStop()) { + int denominatorX = cakePoint - FourCornerDotCake.FC_NCR1632_DEN.getStart(); lexer.denominatorBank[denominatorX / 512] = denominatorX % 512; magicSparkler = true; continue; } - int numeratorX = cakePoint - FourCornerDotCake.FC_NCR1632_XN.getStart(); + int numeratorX = cakePoint - FourCornerDotCake.FC_NCR1632_NUM.getStart(); lexer.numeratorBank[numeratorX / 512] = numeratorX % 512; // 1st select + enable request, if second than reset bank - if (cakePoint == FourCornerDotCake.FC_NCR1632_XN.getStop()) { + if (cakePoint == FourCornerDotCake.FC_NCR1632_NUM.getStop()) { if (requestBankReset) { requestBankReset = false; lexer.ncrBankReset(true); diff --git a/nx01-x4o-fc18/src/test/java/org/x4o/fc18/cake2/pie9/FCDotPIE9Test.java b/nx01-x4o-fc18/src/test/java/org/x4o/fc18/cake2/pie9/FCDotPIE9Test.java index 06e6cd6..4f19227 100644 --- a/nx01-x4o-fc18/src/test/java/org/x4o/fc18/cake2/pie9/FCDotPIE9Test.java +++ b/nx01-x4o-fc18/src/test/java/org/x4o/fc18/cake2/pie9/FCDotPIE9Test.java @@ -24,6 +24,7 @@ package org.x4o.fc18.cake2.pie9; import java.util.ArrayList; import java.util.List; +import java.util.PrimitiveIterator; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; @@ -33,6 +34,7 @@ import org.x4o.fc18.cake2.FourCornerDotCake; public class FCDotPIE9Test { String pieChars; + String cakeChars; public FCDotPIE9Test() { int pieStart = FourCornerDotCake.FC_PIE9C_01.getStart(); @@ -42,21 +44,88 @@ public class FCDotPIE9Test { cakePoints.add(i); } FourCornerUnicodeDisplay disp = FourCornerUnicodeDisplay.text(); - StringBuilder buf = new StringBuilder(); - buf.append(disp.renderFromInt18(cakePoints)); - pieChars = buf.toString(); + pieChars = disp.renderFromInt18(cakePoints); + int cakeStart = FourCornerDotCake.FC_CDC1604_P6.getStart(); + int cakeStop = FourCornerDotCake.FC_BYD0127_P7F.getStop(); + for (int i = cakeStart; i <= cakeStop; i++) { + cakePoints.add(i); + } + cakeChars = disp.renderFromInt18(cakePoints); } @Test - public void testUnusedMath() throws Exception { + public void testUnusedUnicodeMath() throws Exception { int totalMissing = 0; for (int i = 0x2200; i <= 0x22FF; i++) { - String mathChar = new StringBuilder().appendCodePoint(i).toString(); - if (!pieChars.contains(mathChar)) { + String testChar = new StringBuilder().appendCodePoint(i).toString(); + if (!pieChars.contains(testChar)) { totalMissing++; - //System.out.println(totalMissing + ":missing-math-chr: " + mathChar); + //System.out.println(totalMissing + ":missing-test-chr: " + testChar); } } Assertions.assertTrue(totalMissing < 128, "To many math chars missing...."); } + + @Test + public void testUnusedKuTen1And2() throws Exception { + // see: https://www.msx.org/wiki/KuTen_-_JIS_-_SJIS_Code_Conversion_Tables + String kuTenPage1 = "、 。 , . ・ : ; ? ! ゛ ゜ ´ ` ¨"+ + "^  ̄ _ ヽ ヾ ゝ ゞ 〃 仝 々 〆 〇 ー ― ‐ / " + + "\ ~ ∥ | … ‥ ‘ ’ “ ” ( ) 〔 〕 [ ]" + + " } 〈 〉 《 》 「 」 『 』 【 】 + - ± ×" + + "÷ = ≠ < > ≦ ≧ ∞ ∴ ♂ ♀ ° ′ ″ ℃ ¥" + + "$ ¢ £ % # & * @ § ☆ ★ ○ ● ◎ ◇ "; + String kuTenPage2 = "◆ □ ■ △ ▲ ▽ ▼ ※ 〒 → ← ↑ ↓ 〓" + + "∈ ∋ ⊆ ⊇ ⊂ ⊃" + + "∪ ∩ ∧ ∨ ¬ ⇒ ⇔ ∀ " + + "∃ ∠ ⊥ ⌒ ∂ " + + "∇ ≡ ≒ ≪ ≫ √ ∽ ∝ ∵ ∫ ∬" + + "Å ‰ ♯ ♭ ♪ † ‡ ¶ ◯"; + String kuTen = (kuTenPage1 + kuTenPage2).replaceAll("\t", "").replaceAll(" ", ""); + int totalMissing = 0; + PrimitiveIterator.OfInt charCheck = kuTen.codePoints().iterator(); + while (charCheck.hasNext()) { + String testChar = new StringBuilder().appendCodePoint(charCheck.next()).toString(); + if (!cakeChars.contains(testChar)) { + totalMissing++; + //System.out.println(totalMissing + ":missing-test-chr: " + testChar); + } + } + Assertions.assertTrue(totalMissing < 128, "To many kuten chars missing...."); + } + + @Test + public void testUnusedVGATempleOS() throws Exception { + // see: https://github.com/rendello/templeos_font/blob/master/Convert/chars.txt + String vgaTOSChars = " !\"#$%&'()*+,-./"+ + "0123456789:;<=>?" + + "@ABCDEFGHIJKLMNO" + + "PQRSTUVWXYZ[\\]^_" + + "`abcdefghijklmno" + + "pqrstuvwxyz{|}~ " + + "çüéâäàȧ êëèïîìÄȦ" + + "ÉæÆôöòûùÿÖÜ¢£¥ 𝑓" + + "áíóú ¿ ½¼¡«»" + + "░▒▓│┤╡╢╖╕╣║╗╝╜╛┐" + + "└┴┬├─┼╞╟╚╔╩╦╠═╬╧" + + "╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀" + + "αβΓπΣσμτΦθΩδ∞ ε " + + "≡±≤≥ ÷≈ √ⁿ² " + + "ВГЁЖЗИЙЛПУФЧШЪЫЭ" + + "ЮЯбвгёжзийклмнпт" + + "чшъыьэюя „”№ " + + " ⅠⅡ↑↓⭰⭲ " + + "ДЦЩдф щ ij🔔 " + + " ⅓ ¾ §¶ "; + int totalMissing = 0; + PrimitiveIterator.OfInt charCheck = vgaTOSChars.codePoints().iterator(); + while (charCheck.hasNext()) { + String testChar = new StringBuilder().appendCodePoint(charCheck.next()).toString(); + if (!cakeChars.contains(testChar)) { + totalMissing++; + //System.out.println(totalMissing + ":missing-test-chr: " + testChar); + } + } + Assertions.assertTrue(totalMissing < 128, "To many temple os chars missing...."); + } } diff --git a/nx01-x4o-fc18/src/test/java/org/x4o/fc18/zion7/LexerNCRTest.java b/nx01-x4o-fc18/src/test/java/org/x4o/fc18/zion7/LexerNCRTest.java index ef9f057..e0241f0 100644 --- a/nx01-x4o-fc18/src/test/java/org/x4o/fc18/zion7/LexerNCRTest.java +++ b/nx01-x4o-fc18/src/test/java/org/x4o/fc18/zion7/LexerNCRTest.java @@ -50,28 +50,28 @@ public class LexerNCRTest { lexer.withFireSignals(fireWalker); List cdc = new ArrayList<>(); - cdc.add(FourCornerDotCake.FC_NCR1632_XD.getStart() + (512*3) + 1); /// auto NXX_001 + cdc.add(FourCornerDotCake.FC_NCR1632_DEN.getStart() + (512*3) + 1); /// auto NXX_001 Assertions.assertEquals(0, fireWalker.ncr1632BankSparkler); lexer.read(cdc); Assertions.assertEquals(1, fireWalker.ncr1632BankSparkler); cdc.addAll(FCDotDEC2701DashPX0.ESC_STOP.baklavaPointSequence()); // the print above auto value + next test - cdc.add(FourCornerDotCake.FC_NCR1632_XN.getStart() - 1 + 123); // normal NXX_123 - cdc.add(FourCornerDotCake.FC_NCR1632_XN.getStart() + (512*4) + 2); /// auto NXX_123 + this + cdc.add(FourCornerDotCake.FC_NCR1632_NUM.getStart() - 1 + 123); // normal NXX_123 + cdc.add(FourCornerDotCake.FC_NCR1632_NUM.getStart() + (512*4) + 2); /// auto NXX_123 + this fireWalker.reset(); lexer.read(cdc); Assertions.assertEquals(2, fireWalker.ncr1632BankSparkler); Assertions.assertEquals(0, fireWalker.ncr1632BankReset); cdc.addAll(FCDotDEC2701DashPX0.ESC_STOP.cakePointSequence()); // the print above auto value + next test (normal bank reset) - cdc.add(FourCornerDotCake.FC_NCR1632_XD.getStart() - 1 + 11); - cdc.add(FourCornerDotCake.FC_NCR1632_XD.getStart() + (512*3) + 12); - cdc.add(FourCornerDotCake.FC_NCR1632_XN.getStart() + (512*4) + 13); - cdc.add(FourCornerDotCake.FC_NCR1632_XN.getStart() + (512*5) + 14); - cdc.add(FourCornerDotCake.FC_NCR1632_XN.getStart()); // and one which prints - cdc.add(FourCornerDotCake.FC_NCR1632_XN.getStop()); - cdc.add(FourCornerDotCake.FC_NCR1632_XN.getStop()); // embedded bank reset - cdc.add(FourCornerDotCake.FC_NCR1632_XN.getStart() - 1 + 123); // normal NXX_123 + cdc.add(FourCornerDotCake.FC_NCR1632_DEN.getStart() - 1 + 11); + cdc.add(FourCornerDotCake.FC_NCR1632_DEN.getStart() + (512*3) + 12); + cdc.add(FourCornerDotCake.FC_NCR1632_NUM.getStart() + (512*4) + 13); + cdc.add(FourCornerDotCake.FC_NCR1632_NUM.getStart() + (512*5) + 14); + cdc.add(FourCornerDotCake.FC_NCR1632_NUM.getStart()); // and one which prints + cdc.add(FourCornerDotCake.FC_NCR1632_NUM.getStop()); + cdc.add(FourCornerDotCake.FC_NCR1632_NUM.getStop()); // embedded bank reset + cdc.add(FourCornerDotCake.FC_NCR1632_NUM.getStart() - 1 + 123); // normal NXX_123 fireWalker.reset(); lexer.read(cdc); Assertions.assertEquals(1, fireWalker.ncr1632BankReset); @@ -105,15 +105,15 @@ public class LexerNCRTest { List cdc = new ArrayList<>(); cdc.add(FCDotCDC1604DashP6.NX24_X.ordinal()); // = X cdc.add(FCDotCDC1604DashP6.NY09_EQUALS.ordinal()); - cdc.add(FourCornerDotCake.FC_NCR1632_XN.getStart() - 1 + 11); // NXX_011 - cdc.add(FourCornerDotCake.FC_NCR1632_XD.getStart()); // T001 - cdc.add(FourCornerDotCake.FC_NCR1632_XN.getStart()); // NXX_001 - cdc.add(FourCornerDotCake.FC_NCR1632_XD.getStart() - 1 + 15); // T015 - cdc.add(FourCornerDotCake.FC_NCR1632_XN.getStart() - 1 + 14); // NXX_014 - cdc.add(FourCornerDotCake.FC_NCR1632_XD.getStart() - 1 + 1); // one - cdc.add(FourCornerDotCake.FC_NCR1632_XD.getStart() + 512 + 2); // T1024 + one - cdc.add(FourCornerDotCake.FC_NCR1632_XN.getStart() - 1 + 123); // NXX_123 - cdc.add(FourCornerDotCake.FC_NCR1632_XN.getStart() - 1 + 4); // NXX_004 + cdc.add(FourCornerDotCake.FC_NCR1632_NUM.getStart() - 1 + 11); // NXX_011 + cdc.add(FourCornerDotCake.FC_NCR1632_DEN.getStart()); // T001 + cdc.add(FourCornerDotCake.FC_NCR1632_NUM.getStart()); // NXX_001 + cdc.add(FourCornerDotCake.FC_NCR1632_DEN.getStart() - 1 + 15); // T015 + cdc.add(FourCornerDotCake.FC_NCR1632_NUM.getStart() - 1 + 14); // NXX_014 + cdc.add(FourCornerDotCake.FC_NCR1632_DEN.getStart() - 1 + 1); // one + cdc.add(FourCornerDotCake.FC_NCR1632_DEN.getStart() + 512 + 2); // T1024 + one + cdc.add(FourCornerDotCake.FC_NCR1632_NUM.getStart() - 1 + 123); // NXX_123 + cdc.add(FourCornerDotCake.FC_NCR1632_NUM.getStart() - 1 + 4); // NXX_004 cdc.add(FCDotCDC1604DashP6.NY14_SEMICOLON.ordinal()); //cdc.add(FCDotCDC1604DashP6._NEWLINE.ordinal()); @@ -123,10 +123,10 @@ public class LexerNCRTest { @Test public void testNCRLargestF576() throws Exception { List cdc = new ArrayList<>(); - for (int i = FourCornerDotCake.FC_NCR1632_XD.getStop(); i >= FourCornerDotCake.FC_NCR1632_XD.getStart(); i = i - 512) { + for (int i = FourCornerDotCake.FC_NCR1632_DEN.getStop(); i >= FourCornerDotCake.FC_NCR1632_DEN.getStart(); i = i - 512) { cdc.add(i); } - for (int i = FourCornerDotCake.FC_NCR1632_XN.getStop(); i >= FourCornerDotCake.FC_NCR1632_XN.getStart(); i = i - 512) { + for (int i = FourCornerDotCake.FC_NCR1632_NUM.getStop(); i >= FourCornerDotCake.FC_NCR1632_NUM.getStart(); i = i - 512) { cdc.add(i); } String resSuper = "²⁴⁷³³⁰⁴⁰¹⁴⁷³¹⁰⁴⁵³⁴⁰⁶⁰⁵⁰²⁵²¹⁰¹⁹⁶⁴⁷¹⁹⁰⁰³⁵¹³¹³⁴⁹¹⁰¹²¹¹⁸³⁹⁹¹⁴⁰⁶³⁰⁵⁶⁰⁹²⁸⁹⁷²²⁵¹⁰⁶⁵³¹⁸⁶⁷¹⁷⁰³¹⁶⁴⁰¹⁰⁶¹²⁴³⁰⁴⁴⁹⁸⁹⁵⁹⁷⁶⁷¹⁴²⁶⁰¹⁶¹³⁹³³⁹³⁵¹³⁶⁵⁰³⁴³⁰⁶⁷⁵¹²⁰⁹⁹⁶⁷⁵⁴⁶¹⁵⁵¹⁰¹⁸⁹³¹⁶⁷⁹¹⁶⁶⁰⁶⁷⁷²¹⁴⁸⁶⁹⁹¹³⁶";