Cleaned lexer DEC modes and removed some pepper and found tab space
This commit is contained in:
parent
365505afc6
commit
8c7cd6e81a
|
@ -139,12 +139,17 @@ public class FourCornerUnicodeDisplay {
|
||||||
if (FourCornerDotCake.FC_DEC2701_PX0.equals(slice)) {
|
if (FourCornerDotCake.FC_DEC2701_PX0.equals(slice)) {
|
||||||
output.appendCodePoint(FCDotPIE9DDash09.IMG_ESC_DEC.codePointDotIndex());
|
output.appendCodePoint(FCDotPIE9DDash09.IMG_ESC_DEC.codePointDotIndex());
|
||||||
}
|
}
|
||||||
|
// TODO: rm after file loading
|
||||||
if (FourCornerDotCake.FC_UWU0101_S1.equals(slice)) {
|
if (FourCornerDotCake.FC_UWU0101_S1.equals(slice)) {
|
||||||
output.appendCodePoint(' '); // TMP hack
|
output.append("__\t \t__.:=UWU=:.__\t \t__"); // user defined tab space
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (FourCornerDotCake.FC_TTY0001_NL.equals(slice)) {
|
if (FourCornerDotCake.FC_F4TXT0001_SP.equals(slice)) {
|
||||||
output.appendCodePoint('\n'); // TMP hack
|
output.appendCodePoint(' ');
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (FourCornerDotCake.FC_F4TTY0001_NL.equals(slice)) {
|
||||||
|
output.appendCodePoint('\n');
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -34,10 +34,9 @@ import org.x4o.fc18.cake2.FourCornerX06BaklavaPointSequence;
|
||||||
import org.x4o.fc18.cake2.FourCornerX08MuffinPointSequence;
|
import org.x4o.fc18.cake2.FourCornerX08MuffinPointSequence;
|
||||||
import org.x4o.fc18.cake2.FourCornerX18CakePointSequence;
|
import org.x4o.fc18.cake2.FourCornerX18CakePointSequence;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
|
import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotDEC0801DashE10;
|
import org.x4o.fc18.cake2.zero33.dec1.FCDotCMD5401Dash2D;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotDEC0801DashE16;
|
import org.x4o.fc18.cake2.zero33.dec1.FCDotDEC2701DashPX0;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotDEC0801DashE19;
|
import org.x4o.fc18.cake2.zero33.dec1.FCDotINC0801DashP8;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotDEC2701DashPX0;
|
|
||||||
|
|
||||||
/// Imports unicode as four corner BASIC text from the "FC.CDC1604-P6" code page.
|
/// Imports unicode as four corner BASIC text from the "FC.CDC1604-P6" code page.
|
||||||
///
|
///
|
||||||
|
@ -152,8 +151,7 @@ public class FourCornerUnicodeImport {
|
||||||
private boolean handleDataGramWordSpacerTypes(ImportState ctx) {
|
private boolean handleDataGramWordSpacerTypes(ImportState ctx) {
|
||||||
if (' ' == ctx.codePoint) {
|
if (' ' == ctx.codePoint) {
|
||||||
ctx.reset();
|
ctx.reset();
|
||||||
ctx.output.add(FCDotDEC2701DashPX0.ESC_DEC0801_E10);
|
ctx.output.add(FCDotCMD5401Dash2D.CMD_F4TXT0001_SP);
|
||||||
ctx.output.add(FCDotDEC0801DashE10.E10_UWU0101_S1);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (convertWhitespaces == false) {
|
if (convertWhitespaces == false) {
|
||||||
|
@ -161,8 +159,7 @@ public class FourCornerUnicodeImport {
|
||||||
}
|
}
|
||||||
if (WHITE_SPACES.contains(ctx.codePoint)) {
|
if (WHITE_SPACES.contains(ctx.codePoint)) {
|
||||||
ctx.reset();
|
ctx.reset();
|
||||||
ctx.output.add(FCDotDEC2701DashPX0.ESC_DEC0801_E10);
|
ctx.output.add(FCDotCMD5401Dash2D.CMD_F4TXT0001_SP);
|
||||||
ctx.output.add(FCDotDEC0801DashE10.E10_UWU0101_S1);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -170,8 +167,7 @@ public class FourCornerUnicodeImport {
|
||||||
|
|
||||||
private void sendTypeWriterNewLine(ImportState ctx) {
|
private void sendTypeWriterNewLine(ImportState ctx) {
|
||||||
ctx.reset();
|
ctx.reset();
|
||||||
ctx.output.add(FCDotDEC2701DashPX0.ESC68_DEC0801_E19);
|
ctx.output.add(FCDotCMD5401Dash2D.CMD_F4TTY0001_NL);
|
||||||
ctx.output.add(FCDotDEC0801DashE19.TYPE_WRITER_TTY0001_NL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean handleTypeWriterStructureTypes(ImportState ctx) {
|
private boolean handleTypeWriterStructureTypes(ImportState ctx) {
|
||||||
|
@ -270,9 +266,9 @@ public class FourCornerUnicodeImport {
|
||||||
if (ctx.codePoint >= '0' && ctx.codePoint <= '9') {
|
if (ctx.codePoint >= '0' && ctx.codePoint <= '9') {
|
||||||
if (!FCDotCDC1604DashP6.NX10_J.equals(ctx.cdcNumberTerminator)) {
|
if (!FCDotCDC1604DashP6.NX10_J.equals(ctx.cdcNumberTerminator)) {
|
||||||
if (ctx.bits == 6) {
|
if (ctx.bits == 6) {
|
||||||
ctx.output.addAll(toX06BaklavaPoints(FCDotDEC0801DashE16.ESC68_PIE, FCDotCDC1604DashP6.NX10_J));
|
ctx.output.addAll(toX06BaklavaPoints(FCDotCDC1604DashP6.NX10_J));
|
||||||
} else {
|
} else {
|
||||||
ctx.output.addAll(toX08MuffinPoints(FCDotDEC0801DashE16.ESC68_PIE, FCDotCDC1604DashP6.NX10_J));
|
ctx.output.addAll(toX08MuffinPoints(FCDotCDC1604DashP6.NX10_J));
|
||||||
}
|
}
|
||||||
ctx.cdcNumberTerminator = FCDotCDC1604DashP6.NX10_J;
|
ctx.cdcNumberTerminator = FCDotCDC1604DashP6.NX10_J;
|
||||||
}
|
}
|
||||||
|
@ -299,9 +295,9 @@ public class FourCornerUnicodeImport {
|
||||||
if (ctx.codePoint >= 'a' && ctx.codePoint <= 'z') {
|
if (ctx.codePoint >= 'a' && ctx.codePoint <= 'z') {
|
||||||
if (!FCDotCDC1604DashP6.NX26_Z.equals(ctx.cdcCaseTerminator)) {
|
if (!FCDotCDC1604DashP6.NX26_Z.equals(ctx.cdcCaseTerminator)) {
|
||||||
if (ctx.bits == 6) {
|
if (ctx.bits == 6) {
|
||||||
ctx.output.addAll(toX06BaklavaPoints(FCDotDEC0801DashE16.ESC68_PIE, FCDotCDC1604DashP6.NX26_Z));
|
ctx.output.addAll(toX06BaklavaPoints(FCDotCDC1604DashP6.NX26_Z));
|
||||||
} else {
|
} else {
|
||||||
ctx.output.addAll(toX08MuffinPoints(FCDotDEC0801DashE16.ESC68_PIE, FCDotCDC1604DashP6.NX26_Z));
|
ctx.output.addAll(toX08MuffinPoints(FCDotCDC1604DashP6.NX26_Z));
|
||||||
}
|
}
|
||||||
ctx.cdcCaseTerminator = FCDotCDC1604DashP6.NX26_Z;
|
ctx.cdcCaseTerminator = FCDotCDC1604DashP6.NX26_Z;
|
||||||
}
|
}
|
||||||
|
@ -327,20 +323,18 @@ public class FourCornerUnicodeImport {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<FourCornerX08MuffinPointSequence> toX08MuffinPoints(FCDotDEC0801DashE16 py1, FCDotCDC1604DashP6... letters) {
|
private List<FourCornerX08MuffinPointSequence> toX08MuffinPoints(FCDotCDC1604DashP6... letters) {
|
||||||
List<FourCornerX08MuffinPointSequence> result = new ArrayList<>();
|
List<FourCornerX08MuffinPointSequence> result = new ArrayList<>();
|
||||||
result.add(FCDotDEC2701DashPX0.ESC68_DEC0801_E16);
|
result.add(FCDotDEC2701DashPX0.ESC68_2PIE);
|
||||||
result.addAll(py1.muffinPointSequence().stream().map(v -> FCDotCDC1604DashP6.valueOf(v)).toList());
|
|
||||||
for (FCDotCDC1604DashP6 letter : letters) {
|
for (FCDotCDC1604DashP6 letter : letters) {
|
||||||
result.add(letter);
|
result.add(letter);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<FourCornerX06BaklavaPointSequence> toX06BaklavaPoints(FCDotDEC0801DashE16 py1, FCDotCDC1604DashP6... letters) {
|
private List<FourCornerX06BaklavaPointSequence> toX06BaklavaPoints(FCDotCDC1604DashP6... letters) {
|
||||||
List<FourCornerX06BaklavaPointSequence> result = new ArrayList<>();
|
List<FourCornerX06BaklavaPointSequence> result = new ArrayList<>();
|
||||||
result.addAll(FCDotDEC2701DashPX0.ESC68_DEC0801_E16.baklavaPointSequence().stream().map(v -> FCDotCDC1604DashP6.valueOf(v)).toList());
|
result.add(FCDotDEC2701DashPX0.ESC68_2PIE);
|
||||||
result.addAll(py1.baklavaPointSequence().stream().map(v -> FCDotCDC1604DashP6.valueOf(v)).toList());
|
|
||||||
for (FCDotCDC1604DashP6 letter : letters) {
|
for (FCDotCDC1604DashP6 letter : letters) {
|
||||||
result.add(letter);
|
result.add(letter);
|
||||||
}
|
}
|
||||||
|
@ -439,7 +433,7 @@ public class FourCornerUnicodeImport {
|
||||||
return FCDotCDC1604DashP6.NX26_Z;
|
return FCDotCDC1604DashP6.NX26_Z;
|
||||||
}
|
}
|
||||||
if ("& ⅋ 🙰 🙱 🙲 🙳 🙴 🙵".contains(codePoint)) {
|
if ("& ⅋ 🙰 🙱 🙲 🙳 🙴 🙵".contains(codePoint)) {
|
||||||
return FCDotCDC1604DashP6.NX27_AMPERSAND;
|
return FCDotCDC1604DashP6.NX27_AMP;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ import org.x4o.fc18.cake2.pie9c.FCDotPIE9CDash10;
|
||||||
import org.x4o.fc18.cake2.pie9c.FCDotPIE9CDash11;
|
import org.x4o.fc18.cake2.pie9c.FCDotPIE9CDash11;
|
||||||
import org.x4o.fc18.cake2.pie9c.FCDotPIE9CDash20;
|
import org.x4o.fc18.cake2.pie9c.FCDotPIE9CDash20;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
|
import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotDEC2701DashPX0;
|
import org.x4o.fc18.cake2.zero33.dec1.FCDotDEC2701DashPX0;
|
||||||
|
|
||||||
/// Holds conversion maps between four corner int18 and unicode int21 points.
|
/// Holds conversion maps between four corner int18 and unicode int21 points.
|
||||||
///
|
///
|
||||||
|
|
|
@ -52,6 +52,8 @@ import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashW;
|
||||||
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashX;
|
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashX;
|
||||||
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashY;
|
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashY;
|
||||||
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashZ;
|
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashZ;
|
||||||
|
import org.x4o.fc18.cake2.flag4.FCDotF4TTY0001DashNL;
|
||||||
|
import org.x4o.fc18.cake2.flag4.FCDotF4TXT0001DashSP;
|
||||||
import org.x4o.fc18.cake2.gram5.FCDotAMD0110DashSA;
|
import org.x4o.fc18.cake2.gram5.FCDotAMD0110DashSA;
|
||||||
import org.x4o.fc18.cake2.gram5.FCDotBIP0039Dash2K;
|
import org.x4o.fc18.cake2.gram5.FCDotBIP0039Dash2K;
|
||||||
import org.x4o.fc18.cake2.gram5.FCDotBMW0102DashS2;
|
import org.x4o.fc18.cake2.gram5.FCDotBMW0102DashS2;
|
||||||
|
@ -121,7 +123,6 @@ import org.x4o.fc18.cake2.pie9d.FCDotPIE9DDash24;
|
||||||
import org.x4o.fc18.cake2.pie9d.FCDotPIE9DDash25;
|
import org.x4o.fc18.cake2.pie9d.FCDotPIE9DDash25;
|
||||||
import org.x4o.fc18.cake2.pie9d.FCDotPIE9DDash26;
|
import org.x4o.fc18.cake2.pie9d.FCDotPIE9DDash26;
|
||||||
import org.x4o.fc18.cake2.pie9d.FCDotPIE9DDash27;
|
import org.x4o.fc18.cake2.pie9d.FCDotPIE9DDash27;
|
||||||
import org.x4o.fc18.cake2.tty00.FCDotTTY0001DashNL;
|
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotAPL0127DashP7A;
|
import org.x4o.fc18.cake2.zero33.FCDotAPL0127DashP7A;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotAPL0127DashP7B;
|
import org.x4o.fc18.cake2.zero33.FCDotAPL0127DashP7B;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotAPL0127DashP7C;
|
import org.x4o.fc18.cake2.zero33.FCDotAPL0127DashP7C;
|
||||||
|
@ -129,7 +130,7 @@ import org.x4o.fc18.cake2.zero33.FCDotBYD0127DashP7D;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotBYD0127DashP7E;
|
import org.x4o.fc18.cake2.zero33.FCDotBYD0127DashP7E;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotBYD0127DashP7F;
|
import org.x4o.fc18.cake2.zero33.FCDotBYD0127DashP7F;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
|
import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotDEC2701DashPX0;
|
import org.x4o.fc18.cake2.zero33.dec1.FCDotDEC2701DashPX0;
|
||||||
|
|
||||||
/// The dot cake index of four corner 18 bit words in cake slices which holds the cake points.
|
/// The dot cake index of four corner 18 bit words in cake slices which holds the cake points.
|
||||||
///
|
///
|
||||||
|
@ -307,11 +308,15 @@ public enum FourCornerDotCake {
|
||||||
|
|
||||||
// =========== Allow structures,sandworms and legacy unicode an pieve of the cake
|
// =========== Allow structures,sandworms and legacy unicode an pieve of the cake
|
||||||
|
|
||||||
/// Tele Type Ytructure00 zero one New Line
|
/// Tele Type Ytructure00 zero one Spanish Peace
|
||||||
FC_TTY0001_NL(0x026C00, 1, FCDotTTY0001DashNL.values(), "TTY00 zero one New Line"),
|
/// The "normal" space, An undefined UWU points to here, as that is a custom space like tab space.
|
||||||
|
FC_F4TXT0001_SP(0x026C00, 1, FCDotF4TXT0001DashSP.values(), "TXT00 zero one Spanish Peace"),
|
||||||
|
|
||||||
|
/// Tele Type Ytructure00 zero one Nether Line
|
||||||
|
FC_F4TTY0001_NL(0x026C01, 1, FCDotF4TTY0001DashNL.values(), "TTY00 zero one Nether Line"),
|
||||||
|
|
||||||
/// Reserved tele type ytructure controls.
|
/// Reserved tele type ytructure controls.
|
||||||
__RESERVED_TTY00(0x026C00 + 1, 0x026DC0 - 0x026C00 - 1, "Reserved for TTY00"),
|
__RESERVED_TTY00(0x026C00 + 2, 0x026DC0 - 0x026C00 - 2, "Reserved for TTY00"),
|
||||||
|
|
||||||
/// Preamble of a sand worm body as a identifiable type header or an Número2 Lingua tree key.
|
/// Preamble of a sand worm body as a identifiable type header or an Número2 Lingua tree key.
|
||||||
/// Octal worm encoding are 192 unique octals in ordered sequence and have allowed length of 24/48/96 or 192.
|
/// Octal worm encoding are 192 unique octals in ordered sequence and have allowed length of 24/48/96 or 192.
|
||||||
|
|
|
@ -26,6 +26,6 @@ package org.x4o.fc18.cake2;
|
||||||
///
|
///
|
||||||
/// @author Willem Cazander
|
/// @author Willem Cazander
|
||||||
/// @version 1.0 Jan 22, 2025
|
/// @version 1.0 Jan 22, 2025
|
||||||
public interface FourCornerDotColleTTY extends FourCornerX18CakePointDotIndex {
|
public interface FourCornerDotColleFlag4 extends FourCornerX18CakePointDotIndex {
|
||||||
|
|
||||||
}
|
}
|
|
@ -26,8 +26,7 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
|
import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotDEC0801DashE16;
|
import org.x4o.fc18.cake2.zero33.dec1.FCDotDEC2701DashPX0;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotDEC2701DashPX0;
|
|
||||||
|
|
||||||
/// Parent interface for all PIE9C and PIE9D enum.
|
/// Parent interface for all PIE9C and PIE9D enum.
|
||||||
///
|
///
|
||||||
|
@ -63,8 +62,7 @@ public interface FourCornerDotCollePie9 extends FourCornerX06BaklavaPointSequenc
|
||||||
|
|
||||||
default List<Integer> baklavaPointsPIE9C(FCDotCDC1604DashP6 letter, int offset) {
|
default List<Integer> baklavaPointsPIE9C(FCDotCDC1604DashP6 letter, int offset) {
|
||||||
List<Integer> result = new ArrayList<>();
|
List<Integer> result = new ArrayList<>();
|
||||||
result.addAll(FCDotDEC2701DashPX0.ESC68_DEC0801_E16.baklavaPointSequence());
|
result.addAll(FCDotDEC2701DashPX0.ESC68_2PIE.baklavaPointSequence());
|
||||||
result.addAll(FCDotDEC0801DashE16.ESC68_PIE.baklavaPointSequence());
|
|
||||||
result.add(letter.baklavaPointDotIndex());
|
result.add(letter.baklavaPointDotIndex());
|
||||||
result.add(FCDotCDC1604DashP6.NX01_A.ordinal() + offset);
|
result.add(FCDotCDC1604DashP6.NX01_A.ordinal() + offset);
|
||||||
//result.add(FCDotCDC1604DashP6.SEQ_SALAH__EXCLAMATION.cakePointDotIndex()); // TODO: add api layer snake for head
|
//result.add(FCDotCDC1604DashP6.SEQ_SALAH__EXCLAMATION.cakePointDotIndex()); // TODO: add api layer snake for head
|
||||||
|
@ -73,10 +71,10 @@ public interface FourCornerDotCollePie9 extends FourCornerX06BaklavaPointSequenc
|
||||||
|
|
||||||
default List<Integer> baklavaPointsPIE9D(FCDotCDC1604DashP6 letter, int offset) {
|
default List<Integer> baklavaPointsPIE9D(FCDotCDC1604DashP6 letter, int offset) {
|
||||||
List<Integer> result = new ArrayList<>();
|
List<Integer> result = new ArrayList<>();
|
||||||
result.addAll(FCDotDEC2701DashPX0.ESC68_DEC0801_E16.baklavaPointSequence());
|
result.addAll(FCDotDEC2701DashPX0.ESC68_2PIE.baklavaPointSequence());
|
||||||
result.addAll(FCDotDEC0801DashE16.ESC68_PIE.baklavaPointSequence());
|
|
||||||
result.add(letter.baklavaPointDotIndex());
|
result.add(letter.baklavaPointDotIndex());
|
||||||
result.add(FCDotCDC1604DashP6.NY01_AT.ordinal() - offset);
|
result.add(FCDotCDC1604DashP6._SALT_COMPARE_RIGHT.baklavaPointDotIndex());
|
||||||
|
result.add(FCDotCDC1604DashP6.NX01_A.ordinal() - offset);
|
||||||
//result.add(FCDotCDC1604DashP6.SEQ_SALAH__EXCLAMATION.cakePointDotIndex()); // TODO: add api layer snake for head
|
//result.add(FCDotCDC1604DashP6.SEQ_SALAH__EXCLAMATION.cakePointDotIndex()); // TODO: add api layer snake for head
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
|
import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotDEC2701DashPX0;
|
import org.x4o.fc18.cake2.zero33.dec1.FCDotDEC2701DashPX0;
|
||||||
|
|
||||||
/// Glue interface for the command VT enums.
|
/// Glue interface for the command VT enums.
|
||||||
///
|
///
|
||||||
|
|
|
@ -20,24 +20,24 @@
|
||||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* 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.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
package org.x4o.fc18.cake2.tty00;
|
package org.x4o.fc18.cake2.flag4;
|
||||||
|
|
||||||
import org.x4o.fc18.cake2.FourCornerDotCake;
|
import org.x4o.fc18.cake2.FourCornerDotCake;
|
||||||
import org.x4o.fc18.cake2.FourCornerDotColleTTY;
|
import org.x4o.fc18.cake2.FourCornerDotColleFlag4;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* "FC.TYY0001-NL" Four Corner Tele Type Ytucture00 zero one New Line with automatic carriage return.
|
* "FC.F4TTY0001-NL" Four Corner Flag 4 Tele Type Ytucture00 zero one New Line with automatic carriage return.
|
||||||
*
|
*
|
||||||
* @author Willem Cazander
|
* @author Willem Cazander
|
||||||
* @version 1.0 Jan 22, 2025
|
* @version 1.0 Jan 22, 2025
|
||||||
*/
|
*/
|
||||||
public enum FCDotTTY0001DashNL implements FourCornerDotColleTTY {
|
public enum FCDotF4TTY0001DashNL implements FourCornerDotColleFlag4 {
|
||||||
|
|
||||||
NEW_LINE,
|
NETHER_LINE,
|
||||||
;
|
;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int cakePointDotIndex() {
|
public int cakePointDotIndex() {
|
||||||
return FourCornerDotCake.FC_TTY0001_NL.getStart() + ordinal();
|
return FourCornerDotCake.FC_F4TTY0001_NL.getStart() + ordinal();
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -20,24 +20,24 @@
|
||||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* 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.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
package org.x4o.fc18.cake2.zero33;
|
package org.x4o.fc18.cake2.flag4;
|
||||||
|
|
||||||
|
import org.x4o.fc18.cake2.FourCornerDotCake;
|
||||||
|
import org.x4o.fc18.cake2.FourCornerDotColleFlag4;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* "FC.DEC0901-EU" Four Corner dot Directly Escaped Control of 9 Extra User control codes.
|
* "FC.F4TXT0001-SP" Four Corner Flag 4 Tele Type Ytucture00 zero one Spanish Peace empty space indicator for text.
|
||||||
*
|
*
|
||||||
* @author Willem Cazander
|
* @author Willem Cazander
|
||||||
* @version 1.0 Jan 21, 2025
|
* @version 1.0 Jan 22, 2025
|
||||||
*/
|
*/
|
||||||
public enum FCDotDEC0901DashEU {
|
public enum FCDotF4TXT0001DashSP implements FourCornerDotColleFlag4 {
|
||||||
|
|
||||||
ESC_USER_1,
|
SPANISH_PEACE,
|
||||||
ESC_USER_2,
|
|
||||||
ESC_USER_3,
|
|
||||||
ESC_USER_4,
|
|
||||||
ESC_USER_5,
|
|
||||||
ESC_USER_6,
|
|
||||||
ESC_USER_7,
|
|
||||||
ESC_USER_8,
|
|
||||||
ESC_USER_9,
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int cakePointDotIndex() {
|
||||||
|
return FourCornerDotCake.FC_F4TXT0001_SP.getStart() + ordinal();
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -27,4 +27,4 @@
|
||||||
*
|
*
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
package org.x4o.fc18.cake2.tty00;
|
package org.x4o.fc18.cake2.flag4;
|
|
@ -73,7 +73,7 @@ public enum FCDotPIE9CDash27 implements FourCornerDotCollePie9 {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Integer> baklavaPointSequence() {
|
public List<Integer> baklavaPointSequence() {
|
||||||
return baklavaPointsPIE9C(FCDotCDC1604DashP6.NX27_AMPERSAND, ordinal());
|
return baklavaPointsPIE9C(FCDotCDC1604DashP6.NX27_AMP, ordinal());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -26,6 +26,7 @@ import java.util.List;
|
||||||
|
|
||||||
import org.x4o.fc18.cake2.FourCornerDotCake;
|
import org.x4o.fc18.cake2.FourCornerDotCake;
|
||||||
import org.x4o.fc18.cake2.FourCornerDotColleZero33;
|
import org.x4o.fc18.cake2.FourCornerDotColleZero33;
|
||||||
|
import org.x4o.fc18.cake2.zero33.dec1.FCDotINC0801DashP8;
|
||||||
|
|
||||||
/// "FC.APL0127-P7A" Four Corner A Programming Language symbols cake slice of cake points.
|
/// "FC.APL0127-P7A" Four Corner A Programming Language symbols cake slice of cake points.
|
||||||
///
|
///
|
||||||
|
@ -114,7 +115,7 @@ public enum FCDotAPL0127DashP7A implements FourCornerDotColleZero33 {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Integer> baklavaPointSequence() {
|
public List<Integer> baklavaPointSequence() {
|
||||||
return FCDotDEC0801DashE16.ESC6_APL0127_P7A.baklavaPointsE16(ordinal());
|
return FCDotINC0801DashP8.INC_APL0127_P7A.baklavaPointsE16(ordinal());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -26,6 +26,7 @@ import java.util.List;
|
||||||
|
|
||||||
import org.x4o.fc18.cake2.FourCornerDotCake;
|
import org.x4o.fc18.cake2.FourCornerDotCake;
|
||||||
import org.x4o.fc18.cake2.FourCornerDotColleZero33;
|
import org.x4o.fc18.cake2.FourCornerDotColleZero33;
|
||||||
|
import org.x4o.fc18.cake2.zero33.dec1.FCDotINC0801DashP8;
|
||||||
|
|
||||||
/// "FC.APL0127-P7B" Four Corner A Programming Language symbols cake slice of cake points.
|
/// "FC.APL0127-P7B" Four Corner A Programming Language symbols cake slice of cake points.
|
||||||
///
|
///
|
||||||
|
@ -118,7 +119,7 @@ public enum FCDotAPL0127DashP7B implements FourCornerDotColleZero33 {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Integer> baklavaPointSequence() {
|
public List<Integer> baklavaPointSequence() {
|
||||||
return FCDotDEC0801DashE16.ESC6_APL0127_P7B.baklavaPointsE16(ordinal());
|
return FCDotINC0801DashP8.INC_APL0127_P7B.baklavaPointsE16(ordinal());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -26,6 +26,7 @@ import java.util.List;
|
||||||
|
|
||||||
import org.x4o.fc18.cake2.FourCornerDotCake;
|
import org.x4o.fc18.cake2.FourCornerDotCake;
|
||||||
import org.x4o.fc18.cake2.FourCornerDotColleZero33;
|
import org.x4o.fc18.cake2.FourCornerDotColleZero33;
|
||||||
|
import org.x4o.fc18.cake2.zero33.dec1.FCDotINC0801DashP8;
|
||||||
|
|
||||||
/// "FC.APL0127-P7C" Four Corner A Programming Language symbols cake slice of cake points.
|
/// "FC.APL0127-P7C" Four Corner A Programming Language symbols cake slice of cake points.
|
||||||
///
|
///
|
||||||
|
@ -120,7 +121,7 @@ public enum FCDotAPL0127DashP7C implements FourCornerDotColleZero33 {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Integer> baklavaPointSequence() {
|
public List<Integer> baklavaPointSequence() {
|
||||||
return FCDotDEC0801DashE16.ESC6_APL0127_P7A.baklavaPointsE16(ordinal());
|
return FCDotINC0801DashP8.INC_APL0127_P7A.baklavaPointsE16(ordinal());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -26,6 +26,7 @@ import java.util.List;
|
||||||
|
|
||||||
import org.x4o.fc18.cake2.FourCornerDotCake;
|
import org.x4o.fc18.cake2.FourCornerDotCake;
|
||||||
import org.x4o.fc18.cake2.FourCornerDotColleZero33;
|
import org.x4o.fc18.cake2.FourCornerDotColleZero33;
|
||||||
|
import org.x4o.fc18.cake2.zero33.dec1.FCDotINC0801DashP8;
|
||||||
|
|
||||||
/// "FC.BYD0127-P7D" Four Corner Block Your Display terminal application.
|
/// "FC.BYD0127-P7D" Four Corner Block Your Display terminal application.
|
||||||
///
|
///
|
||||||
|
@ -72,7 +73,7 @@ public enum FCDotBYD0127DashP7D implements FourCornerDotColleZero33 {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Integer> baklavaPointSequence() {
|
public List<Integer> baklavaPointSequence() {
|
||||||
return FCDotDEC0801DashE16.ESC6_BYD0127_P7D.baklavaPointsE16(ordinal());
|
return FCDotINC0801DashP8.INC_BYD0127_P7D.baklavaPointsE16(ordinal());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -26,6 +26,7 @@ import java.util.List;
|
||||||
|
|
||||||
import org.x4o.fc18.cake2.FourCornerDotCake;
|
import org.x4o.fc18.cake2.FourCornerDotCake;
|
||||||
import org.x4o.fc18.cake2.FourCornerDotColleZero33;
|
import org.x4o.fc18.cake2.FourCornerDotColleZero33;
|
||||||
|
import org.x4o.fc18.cake2.zero33.dec1.FCDotINC0801DashP8;
|
||||||
|
|
||||||
/// "FC.BYD0127-P7E" Four Corner Block Your Display terminal application.
|
/// "FC.BYD0127-P7E" Four Corner Block Your Display terminal application.
|
||||||
///
|
///
|
||||||
|
@ -74,7 +75,7 @@ public enum FCDotBYD0127DashP7E implements FourCornerDotColleZero33 {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Integer> baklavaPointSequence() {
|
public List<Integer> baklavaPointSequence() {
|
||||||
return FCDotDEC0801DashE16.ESC6_BYD0127_P7E.baklavaPointsE16(ordinal());
|
return FCDotINC0801DashP8.INC_BYD0127_P7E.baklavaPointsE16(ordinal());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -26,6 +26,7 @@ import java.util.List;
|
||||||
|
|
||||||
import org.x4o.fc18.cake2.FourCornerDotCake;
|
import org.x4o.fc18.cake2.FourCornerDotCake;
|
||||||
import org.x4o.fc18.cake2.FourCornerDotColleZero33;
|
import org.x4o.fc18.cake2.FourCornerDotColleZero33;
|
||||||
|
import org.x4o.fc18.cake2.zero33.dec1.FCDotINC0801DashP8;
|
||||||
|
|
||||||
/// "FC.BYD0127-P7F" Four Corner Block Your Display terminal application.
|
/// "FC.BYD0127-P7F" Four Corner Block Your Display terminal application.
|
||||||
///
|
///
|
||||||
|
@ -76,7 +77,7 @@ public enum FCDotBYD0127DashP7F implements FourCornerDotColleZero33 {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Integer> baklavaPointSequence() {
|
public List<Integer> baklavaPointSequence() {
|
||||||
return FCDotDEC0801DashE16.ESC6_BYD0127_P7F.baklavaPointsE16(ordinal());
|
return FCDotINC0801DashP8.INC_BYD0127_P7F.baklavaPointsE16(ordinal());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -127,7 +127,7 @@ public enum FCDotCDC1604DashP6 implements FourCornerDotColleZero33 {
|
||||||
NX25_Y('Y'),
|
NX25_Y('Y'),
|
||||||
NX26_Z('Z'),
|
NX26_Z('Z'),
|
||||||
/// The 27th letter is at the end of the old english alphabet.
|
/// The 27th letter is at the end of the old english alphabet.
|
||||||
NX27_AMPERSAND('&'),
|
NX27_AMP('&'),
|
||||||
;
|
;
|
||||||
|
|
||||||
static final private FCDotCDC1604DashP6[] VALUES = values(); // values() is slow method
|
static final private FCDotCDC1604DashP6[] VALUES = values(); // values() is slow method
|
||||||
|
|
|
@ -20,51 +20,48 @@
|
||||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* 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.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
package org.x4o.fc18.cake2.zero33;
|
package org.x4o.fc18.cake2.zero33.dec1;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
import org.x4o.fc18.cake2.FourCornerX06BaklavaPointSequence;
|
import org.x4o.fc18.cake2.FourCornerX06BaklavaPointSequence;
|
||||||
import org.x4o.fc18.cake2.FourCornerX08MuffinPointSequence;
|
import org.x4o.fc18.cake2.FourCornerX08MuffinPointSequence;
|
||||||
import org.x4o.fc18.cake2.FourCornerX18CakePointSequence;
|
import org.x4o.fc18.cake2.FourCornerX18CakePointSequence;
|
||||||
|
import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* "FC.DEC0801-E19" Four Corner dot Directly Escaped Control of 8 embedded control codes.
|
* "FC.CMD5401-2D" Four Corner dot Command for 54 embedded control codes.
|
||||||
*
|
*
|
||||||
* @author Willem Cazander
|
* @author Willem Cazander
|
||||||
* @version 1.0 Jan 21, 2025
|
* @version 1.0 Jan 21, 2025
|
||||||
*/
|
*/
|
||||||
public enum FCDotDEC0801DashE19 implements FourCornerX06BaklavaPointSequence, FourCornerX08MuffinPointSequence, FourCornerX18CakePointSequence {
|
public enum FCDotCMD5401Dash2D implements FourCornerX06BaklavaPointSequence, FourCornerX08MuffinPointSequence, FourCornerX18CakePointSequence {
|
||||||
|
|
||||||
/// ¡¡¡
|
/// Write out an basic spanish peace sign, a virtual none-excisting symbol.
|
||||||
/// Write out an basic structure NEXT token, also called a line feed with automatic carriage return.
|
CMD_F4TXT0001_SP(FCDotCDC1604DashP6.NX01_A),
|
||||||
TYPE_WRITER_TTY0001_NL,
|
|
||||||
|
|
||||||
/// ¡¡¿
|
/// Write out an nether line which goes to the line below, also called a line feed with automatic carriage return.
|
||||||
__RESERVED_2,
|
CMD_F4TTY0001_NL(FCDotCDC1604DashP6.NX02_B),
|
||||||
|
|
||||||
/// ¡¿¡
|
|
||||||
__RESERVED_3,
|
|
||||||
|
|
||||||
/// ¡¿¿
|
|
||||||
__RESERVED_4,
|
|
||||||
|
|
||||||
/// ¿¡¿
|
|
||||||
__RESERVED_5,
|
|
||||||
|
|
||||||
/// ¿¡¿
|
|
||||||
__RESERVED_6,
|
|
||||||
|
|
||||||
/// ¿¡¡
|
|
||||||
__RESERVED_7,
|
|
||||||
|
|
||||||
/// ¿¿¿
|
|
||||||
__RESERVED_8,
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
private final FCDotCDC1604DashP6 selector;
|
||||||
|
|
||||||
|
private FCDotCMD5401Dash2D(FCDotCDC1604DashP6 selector) {
|
||||||
|
this.selector = Objects.requireNonNull(selector);
|
||||||
|
if (selector.ordinal() <= FCDotCDC1604DashP6._SALT_COMPARE_RIGHT.ordinal()) {
|
||||||
|
throw new IllegalArgumentException("Not used here to keep mind space free");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Integer> baklavaPointSequence() {
|
public List<Integer> baklavaPointSequence() {
|
||||||
return FCDotCDC1604DashP6.pepper3SequenceWritePoints(ordinal());
|
List<Integer> result = new ArrayList<>();
|
||||||
|
result.addAll(FCDotDEC2701DashPX0.ESC68_CMD5401_2D.baklavaPointSequence());
|
||||||
|
result.add(selector.baklavaPointDotIndex());
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -76,4 +73,13 @@ public enum FCDotDEC0801DashE19 implements FourCornerX06BaklavaPointSequence, Fo
|
||||||
public List<Integer> cakePointSequence() {
|
public List<Integer> cakePointSequence() {
|
||||||
return baklavaPointSequence();
|
return baklavaPointSequence();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static public Optional<FCDotCMD5401Dash2D> valueOfCDC(int cdcPoint) {
|
||||||
|
for (FCDotCMD5401Dash2D value : values()) {
|
||||||
|
if (value.selector.baklavaPointDotIndex() == cdcPoint) {
|
||||||
|
return Optional.of(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return Optional.empty();
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -20,7 +20,7 @@
|
||||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* 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.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
package org.x4o.fc18.cake2.zero33;
|
package org.x4o.fc18.cake2.zero33.dec1;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -28,6 +28,7 @@ import java.util.List;
|
||||||
import org.x4o.fc18.cake2.FourCornerX06BaklavaPointSequence;
|
import org.x4o.fc18.cake2.FourCornerX06BaklavaPointSequence;
|
||||||
import org.x4o.fc18.cake2.FourCornerX08MuffinPointSequence;
|
import org.x4o.fc18.cake2.FourCornerX08MuffinPointSequence;
|
||||||
import org.x4o.fc18.cake2.FourCornerX18CakePointSequence;
|
import org.x4o.fc18.cake2.FourCornerX18CakePointSequence;
|
||||||
|
import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* "FC.DEC0801-E10" Four Corner dot Directly Escaped Control of 8 embedded control codes.
|
* "FC.DEC0801-E10" Four Corner dot Directly Escaped Control of 8 embedded control codes.
|
|
@ -20,7 +20,7 @@
|
||||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* 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.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
package org.x4o.fc18.cake2.zero33;
|
package org.x4o.fc18.cake2.zero33.dec1;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@ import org.x4o.fc18.cake2.FourCornerDotCake;
|
||||||
import org.x4o.fc18.cake2.FourCornerX06BaklavaPointSequence;
|
import org.x4o.fc18.cake2.FourCornerX06BaklavaPointSequence;
|
||||||
import org.x4o.fc18.cake2.FourCornerX08MuffinPointSequence;
|
import org.x4o.fc18.cake2.FourCornerX08MuffinPointSequence;
|
||||||
import org.x4o.fc18.cake2.FourCornerX18CakePointDotIndex;
|
import org.x4o.fc18.cake2.FourCornerX18CakePointDotIndex;
|
||||||
|
import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* "FC.DEC2701-PX0" Four Corner dot Direct or Escaped Control in grid of 1 by 27 of dashed CDC invisible page X Zero codes.
|
* "FC.DEC2701-PX0" Four Corner dot Direct or Escaped Control in grid of 1 by 27 of dashed CDC invisible page X Zero codes.
|
||||||
|
@ -107,11 +108,16 @@ public enum FCDotDEC2701DashPX0 implements FourCornerX06BaklavaPointSequence, Fo
|
||||||
__ESC_RESERVED_B5,
|
__ESC_RESERVED_B5,
|
||||||
|
|
||||||
/// _ESC6_X2 _ESC6_X2 _ESC6_X3 = 15
|
/// _ESC6_X2 _ESC6_X2 _ESC6_X3 = 15
|
||||||
__ESC_RESERVED_B6,
|
/// Select psacked pie terminator symbol on 6 and 8 bit systems.
|
||||||
|
/// A = 1, first P6 is terminator select, than next P6 _A++ select pie part 1-27, until other P6 stops it.
|
||||||
|
/// Example ascii "012" is
|
||||||
|
/// 012 = __PIE NX10_J NX01_A NX02_B NX02_C
|
||||||
|
/// TODO: Add negative AT for -1 to -27 as P6 symbols to select PIE9D + map in __RESERVED_PIE_SYMBOLS
|
||||||
|
ESC68_2PIE,
|
||||||
|
|
||||||
/// _ESC6_X2 _ESC6_X3 _ESC6_X1 = 16
|
/// _ESC6_X2 _ESC6_X3 _ESC6_X1 = 16
|
||||||
/// Embed symbol mode starts in CDC, use sequence of 3 UPDOWN letters to select mode and end with !
|
/// Embed symbol mode starts in CDC, use sequence of 3 UPDOWN letters to select mode and end with !
|
||||||
ESC68_DEC0801_E16,
|
ESC68_INC0801_P8,
|
||||||
|
|
||||||
/// _ESC6_X2 _ESC6_X3 _ESC6_X2 = 17
|
/// _ESC6_X2 _ESC6_X3 _ESC6_X2 = 17
|
||||||
/// Select packed pie terminator number for 6 and 8 bit systems.
|
/// Select packed pie terminator number for 6 and 8 bit systems.
|
||||||
|
@ -127,8 +133,8 @@ public enum FCDotDEC2701DashPX0 implements FourCornerX06BaklavaPointSequence, Fo
|
||||||
// =========== Internal control sequences
|
// =========== Internal control sequences
|
||||||
|
|
||||||
/// _ESC6_X3 _ESC6_X1 _ESC6_X1 = 19
|
/// _ESC6_X3 _ESC6_X1 _ESC6_X1 = 19
|
||||||
/// Extra sequence selector for type writer signals.
|
/// Command for type writer signals shortcuts.
|
||||||
ESC68_DEC0801_E19,
|
ESC68_CMD5401_2D,
|
||||||
|
|
||||||
/// _ESC6_X3 _ESC6_X1 _ESC6_X2 = 20
|
/// _ESC6_X3 _ESC6_X1 _ESC6_X2 = 20
|
||||||
__ESC_RESERVED_C2,
|
__ESC_RESERVED_C2,
|
|
@ -20,7 +20,7 @@
|
||||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* 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.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
package org.x4o.fc18.cake2.zero33;
|
package org.x4o.fc18.cake2.zero33.dec1;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -28,50 +28,47 @@ import java.util.List;
|
||||||
import org.x4o.fc18.cake2.FourCornerX06BaklavaPointSequence;
|
import org.x4o.fc18.cake2.FourCornerX06BaklavaPointSequence;
|
||||||
import org.x4o.fc18.cake2.FourCornerX08MuffinPointSequence;
|
import org.x4o.fc18.cake2.FourCornerX08MuffinPointSequence;
|
||||||
import org.x4o.fc18.cake2.FourCornerX18CakePointSequence;
|
import org.x4o.fc18.cake2.FourCornerX18CakePointSequence;
|
||||||
|
import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* "FC.DEC0801-E16" Four Corner dot Directly Escaped Control of 8 symbols modes.
|
* "FC.INC0801-P8" Four Corner dot escaped Incremented 8 controls of the Page modes.
|
||||||
*
|
*
|
||||||
* @author Willem Cazander
|
* @author Willem Cazander
|
||||||
* @version 1.0 Jan 21, 2025
|
* @version 1.0 Jan 21, 2025
|
||||||
*/
|
*/
|
||||||
public enum FCDotDEC0801DashE16 implements FourCornerX06BaklavaPointSequence, FourCornerX08MuffinPointSequence, FourCornerX18CakePointSequence {
|
public enum FCDotINC0801DashP8 implements FourCornerX06BaklavaPointSequence, FourCornerX08MuffinPointSequence, FourCornerX18CakePointSequence {
|
||||||
|
|
||||||
/// ¡¡¡
|
/// ¡¡¡
|
||||||
/// Return back to P6 mode.
|
/// Select italic mode.
|
||||||
ESC68_CDC1604_P6,
|
INC_PIE9D_27,
|
||||||
|
|
||||||
/// ¡¡¿
|
/// ¡¡¿
|
||||||
/// Select APL page 7A mode.
|
/// Select APL page 7A mode.
|
||||||
ESC6_APL0127_P7A,
|
INC_APL0127_P7A,
|
||||||
|
|
||||||
/// ¡¿¡
|
/// ¡¿¡
|
||||||
/// Select APL page 7B mode.
|
/// Select APL page 7B mode.
|
||||||
ESC6_APL0127_P7B,
|
INC_APL0127_P7B,
|
||||||
|
|
||||||
/// ¡¿¿
|
/// ¡¿¿
|
||||||
/// Select APL page 7C mode.
|
/// Select APL page 7C mode.
|
||||||
ESC6_APL0127_P7C,
|
INC_APL0127_P7C,
|
||||||
|
|
||||||
/// ¿¡¿
|
/// ¿¡¿
|
||||||
/// Select BYD page 7D mode.
|
/// Select BYD page 7D mode.
|
||||||
ESC6_BYD0127_P7D,
|
INC_BYD0127_P7D,
|
||||||
|
|
||||||
/// ¿¡¿
|
/// ¿¡¿
|
||||||
/// Select BYD page 7E mode.
|
/// Select BYD page 7E mode.
|
||||||
ESC6_BYD0127_P7E,
|
INC_BYD0127_P7E,
|
||||||
|
|
||||||
/// ¿¡¡
|
/// ¿¡¡
|
||||||
/// Select BYD page 7F mode.
|
/// Select BYD page 7F mode.
|
||||||
ESC6_BYD0127_P7F,
|
INC_BYD0127_P7F,
|
||||||
|
|
||||||
/// ¿¿¿
|
/// ¿¿¿
|
||||||
/// Select packed pie terminator symbol on 6 and 8 bit systems.
|
// Select lower case mode.
|
||||||
/// A = 1, first P6 is terminator select, than next P6 _A++ select pie part 1-27, until other P6 stops it.
|
INC_PIE9C_26,
|
||||||
/// Example ascii "012" is
|
|
||||||
/// 012 = __PIE NX10_J NX01_A NX02_B NX02_C
|
|
||||||
/// TODO: Add negative AT for -1 to -27 as P6 symbols to select PIE9D + map in __RESERVED_PIE_SYMBOLS
|
|
||||||
ESC68_PIE,
|
|
||||||
;
|
;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -91,7 +88,7 @@ public enum FCDotDEC0801DashE16 implements FourCornerX06BaklavaPointSequence, Fo
|
||||||
|
|
||||||
public List<Integer> baklavaPointsE16(int offset) {
|
public List<Integer> baklavaPointsE16(int offset) {
|
||||||
List<Integer> result = new ArrayList<>();
|
List<Integer> result = new ArrayList<>();
|
||||||
result.addAll(FCDotDEC2701DashPX0.ESC68_DEC0801_E16.baklavaPointSequence());
|
result.addAll(FCDotDEC2701DashPX0.ESC68_INC0801_P8.baklavaPointSequence());
|
||||||
result.addAll(baklavaPointSequence());
|
result.addAll(baklavaPointSequence());
|
||||||
result.add(FCDotCDC1604DashP6.NX01_A.ordinal() + offset);
|
result.add(FCDotCDC1604DashP6.NX01_A.ordinal() + offset);
|
||||||
//result.add(FCDotCDC1604DashP6.SEQ_SALAH__EXCLAMATION.cakePointDotIndex()); // TODO: add api layer snake for head
|
//result.add(FCDotCDC1604DashP6.SEQ_SALAH__EXCLAMATION.cakePointDotIndex()); // TODO: add api layer snake for head
|
|
@ -20,7 +20,7 @@
|
||||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* 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.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
package org.x4o.fc18.cake2.zero33.vt06;
|
package org.x4o.fc18.cake2.zero33.dec1.vt06;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* 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.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
package org.x4o.fc18.cake2.zero33.vt06;
|
package org.x4o.fc18.cake2.zero33.dec1.vt06;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
|
@ -20,7 +20,7 @@
|
||||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* 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.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
package org.x4o.fc18.cake2.zero33.vt06;
|
package org.x4o.fc18.cake2.zero33.dec1.vt06;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
|
@ -24,7 +24,7 @@ package org.x4o.fc18.zion7;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotDEC0901DashEU;
|
import org.x4o.fc18.cake2.zero33.dec1.FCDotDEC2701DashPX0;
|
||||||
|
|
||||||
/// Handles the lexer salah sequence strobes.
|
/// Handles the lexer salah sequence strobes.
|
||||||
///
|
///
|
||||||
|
@ -32,5 +32,5 @@ import org.x4o.fc18.cake2.zero33.FCDotDEC0901DashEU;
|
||||||
/// @version 1.0 Jan 11, 2025
|
/// @version 1.0 Jan 11, 2025
|
||||||
public interface FourCornerZion7SalahSequence extends FourCornerZion7Candlelier {
|
public interface FourCornerZion7SalahSequence extends FourCornerZion7Candlelier {
|
||||||
|
|
||||||
void strobeSalahSequence(FCDotDEC0901DashEU type, List<List<Integer>> arguments);
|
void strobeSalahSequence(FCDotDEC2701DashPX0 type, List<List<Integer>> arguments);
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,15 +28,15 @@ import java.util.Arrays;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import java.util.Optional;
|
||||||
import java.util.PrimitiveIterator;
|
import java.util.PrimitiveIterator;
|
||||||
|
|
||||||
import org.x4o.fc18.cake2.FourCornerDotCake;
|
import org.x4o.fc18.cake2.FourCornerDotCake;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
|
import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotDEC0801DashE10;
|
import org.x4o.fc18.cake2.zero33.dec1.FCDotCMD5401Dash2D;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotDEC0801DashE16;
|
import org.x4o.fc18.cake2.zero33.dec1.FCDotDEC0801DashE10;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotDEC0801DashE19;
|
import org.x4o.fc18.cake2.zero33.dec1.FCDotDEC2701DashPX0;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotDEC0901DashEU;
|
import org.x4o.fc18.cake2.zero33.dec1.FCDotINC0801DashP8;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotDEC2701DashPX0;
|
|
||||||
|
|
||||||
/// Parsed FC text and calls the handler methods for the classified strobe lights.
|
/// Parsed FC text and calls the handler methods for the classified strobe lights.
|
||||||
///
|
///
|
||||||
|
@ -472,12 +472,13 @@ public class FourCornerZionStenoLexer {
|
||||||
static class StenoScannerCDCDEC extends StenoScanner {
|
static class StenoScannerCDCDEC extends StenoScanner {
|
||||||
|
|
||||||
// TODO: remove state here
|
// TODO: remove state here
|
||||||
private int scanIndex = 0;
|
private int cdcDECScanIndex = 0;
|
||||||
private int scanIndexEnd = 0;
|
private int cdcDECScanIndexEnd = 0;
|
||||||
private Integer ncrMode = null;
|
private FCDotDEC2701DashPX0 cdcDECMode = null;
|
||||||
private Integer pieMode = null;
|
private FCDotINC0801DashP8 cdcDECModeInc = null;
|
||||||
private FCDotDEC2701DashPX0 decMode = null;
|
private FCDotDEC0801DashE10 cdcDECModeE10 = null;
|
||||||
private Integer pepperMode = null;
|
private Integer cdcDECModeNcr = null;
|
||||||
|
private Integer cdcDECModePie = null;
|
||||||
|
|
||||||
public StenoScannerCDCDEC() {
|
public StenoScannerCDCDEC() {
|
||||||
super(FourCornerDotCake.FC_CDC1604_P6.getStart(), FourCornerDotCake.FC_DEC2701_PX0.getStop());
|
super(FourCornerDotCake.FC_CDC1604_P6.getStart(), FourCornerDotCake.FC_DEC2701_PX0.getStop());
|
||||||
|
@ -485,20 +486,17 @@ public class FourCornerZionStenoLexer {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void process(FourCornerZionStenoLexer lexer, int idxFirst, int idxLast) {
|
public void process(FourCornerZionStenoLexer lexer, int idxFirst, int idxLast) {
|
||||||
decMode = null;
|
decModeReset();
|
||||||
ncrMode = null;
|
cdcDECScanIndex = idxFirst;
|
||||||
pieMode = null;
|
cdcDECScanIndexEnd = idxLast;
|
||||||
pepperMode = null;
|
for (cdcDECScanIndex = idxFirst; cdcDECScanIndex <= cdcDECScanIndexEnd; cdcDECScanIndex++) {
|
||||||
scanIndex = idxFirst;
|
|
||||||
scanIndexEnd = idxLast;
|
|
||||||
for (scanIndex = idxFirst; scanIndex <= scanIndexEnd; scanIndex++) {
|
|
||||||
if (handleEscape(lexer)) {
|
if (handleEscape(lexer)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (decMode != null && handleDECMode(lexer)) {
|
if (cdcDECMode != null && handleDECMode(lexer)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
int cdcDECPoint = lexer.input.get(scanIndex);
|
int cdcDECPoint = lexer.input.get(cdcDECScanIndex);
|
||||||
if (FourCornerDotCake.FC_DEC2701_PX0.contains(cdcDECPoint)) {
|
if (FourCornerDotCake.FC_DEC2701_PX0.contains(cdcDECPoint)) {
|
||||||
lexer.handler.strobeWord(FourCornerDotCake.FC_DEC2701_PX0, cdcDECPoint - FourCornerDotCake.FC_DEC2701_PX0.getStart());
|
lexer.handler.strobeWord(FourCornerDotCake.FC_DEC2701_PX0, cdcDECPoint - FourCornerDotCake.FC_DEC2701_PX0.getStart());
|
||||||
} else {
|
} else {
|
||||||
|
@ -507,65 +505,46 @@ public class FourCornerZionStenoLexer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cleanOldDECMode() {
|
private void decModeReset() {
|
||||||
pepperMode = null;
|
cdcDECMode = null;
|
||||||
ncrMode = null;
|
cdcDECModeInc = null;
|
||||||
pieMode = null;
|
cdcDECModeE10 = null;
|
||||||
|
cdcDECModeNcr = null;
|
||||||
|
cdcDECModePie = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean handleEscape(FourCornerZionStenoLexer lexer) {
|
private boolean handleEscape(FourCornerZionStenoLexer lexer) {
|
||||||
if (!lexer.handlerEscape) {
|
if (!lexer.handlerEscape) {
|
||||||
return false; // disable escape handing
|
return false; // disable escape handing
|
||||||
}
|
}
|
||||||
int cdcDECPoint = lexer.input.get(scanIndex);
|
int cdcDECPoint = lexer.input.get(cdcDECScanIndex);
|
||||||
if (FourCornerDotCake.FC_DEC2701_PX0.contains(cdcDECPoint)) {
|
if (FourCornerDotCake.FC_DEC2701_PX0.contains(cdcDECPoint)) {
|
||||||
decMode = FCDotDEC2701DashPX0.valueOfCakePoint(cdcDECPoint);
|
decModeReset();
|
||||||
cleanOldDECMode();
|
cdcDECMode = FCDotDEC2701DashPX0.valueOfCakePoint(cdcDECPoint);
|
||||||
return true;
|
return true;
|
||||||
} else if (FCDotCDC1604DashP6.isEscape6(cdcDECPoint)) {
|
} else if (FCDotCDC1604DashP6.isEscape6(cdcDECPoint)) {
|
||||||
decMode = readEscape6(lexer);
|
decModeReset();
|
||||||
cleanOldDECMode();
|
cdcDECMode = readEscape6(lexer);
|
||||||
return true;
|
|
||||||
}
|
|
||||||
// TODO: move this code where used
|
|
||||||
if (FCDotCDC1604DashP6.isEscapePepper(cdcDECPoint)) {
|
|
||||||
pepperMode = readEscapePepper3(lexer);
|
|
||||||
|
|
||||||
// pepper is allowed to be last char of stream of ending with new line ending
|
|
||||||
if (FCDotDEC2701DashPX0.ESC68_DEC0801_E19.equals(decMode)) {
|
|
||||||
FCDotDEC0801DashE19 e19Mode = FCDotDEC0801DashE19.values()[pepperMode];
|
|
||||||
if (e19Mode == FCDotDEC0801DashE19.TYPE_WRITER_TTY0001_NL) {
|
|
||||||
decMode = null;
|
|
||||||
pepperMode = null;
|
|
||||||
lexer.currLine++;
|
|
||||||
lexer.currCol = 0;
|
|
||||||
lexer.fireSignals.fireStateLine(lexer.currLine);
|
|
||||||
lexer.fireSignals.fireStateColumn(lexer.currCol);
|
|
||||||
lexer.handler.strobeWord(FourCornerDotCake.FC_TTY0001_NL, 0); // new line
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
lexer.smokeSignals.burnUnsupported(lexer.currLine, lexer.currCol, pepperMode);
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private FCDotDEC2701DashPX0 readEscape6(FourCornerZionStenoLexer lexer) {
|
private FCDotDEC2701DashPX0 readEscape6(FourCornerZionStenoLexer lexer) {
|
||||||
int cdcPoint1 = lexer.input.get(scanIndex);
|
int cdcPoint1 = lexer.input.get(cdcDECScanIndex);
|
||||||
if (scanIndex >= scanIndexEnd) {
|
if (cdcDECScanIndex >= cdcDECScanIndexEnd) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
scanIndex++;
|
cdcDECScanIndex++;
|
||||||
int cdcPoint2 = lexer.input.get(scanIndex);
|
int cdcPoint2 = lexer.input.get(cdcDECScanIndex);
|
||||||
if (!FCDotCDC1604DashP6.isEscape6(cdcPoint2)) {
|
if (!FCDotCDC1604DashP6.isEscape6(cdcPoint2)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (scanIndex >= scanIndexEnd) {
|
if (cdcDECScanIndex >= cdcDECScanIndexEnd) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
scanIndex++;
|
cdcDECScanIndex++;
|
||||||
int cdcPoint3 = lexer.input.get(scanIndex);
|
int cdcPoint3 = lexer.input.get(cdcDECScanIndex);
|
||||||
if (!FCDotCDC1604DashP6.isEscape6(cdcPoint3)) {
|
if (!FCDotCDC1604DashP6.isEscape6(cdcPoint3)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -576,20 +555,20 @@ public class FourCornerZionStenoLexer {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Integer readEscapePepper3(FourCornerZionStenoLexer lexer) {
|
private Integer readEscapePepper3(FourCornerZionStenoLexer lexer) {
|
||||||
int cdcPoint1 = lexer.input.get(scanIndex);
|
int cdcPoint1 = lexer.input.get(cdcDECScanIndex);
|
||||||
if (scanIndex >= scanIndexEnd) {
|
if (cdcDECScanIndex >= cdcDECScanIndexEnd) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
scanIndex++;
|
cdcDECScanIndex++;
|
||||||
int cdcPoint2 = lexer.input.get(scanIndex);
|
int cdcPoint2 = lexer.input.get(cdcDECScanIndex);
|
||||||
if (!FCDotCDC1604DashP6.isEscapePepper(cdcPoint2)) {
|
if (!FCDotCDC1604DashP6.isEscapePepper(cdcPoint2)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (scanIndex >= scanIndexEnd) {
|
if (cdcDECScanIndex >= cdcDECScanIndexEnd) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
scanIndex++;
|
cdcDECScanIndex++;
|
||||||
int cdcPoint3 = lexer.input.get(scanIndex);
|
int cdcPoint3 = lexer.input.get(cdcDECScanIndex);
|
||||||
if (!FCDotCDC1604DashP6.isEscapePepper(cdcPoint3)) {
|
if (!FCDotCDC1604DashP6.isEscapePepper(cdcPoint3)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -600,120 +579,266 @@ public class FourCornerZionStenoLexer {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean handleDECMode(FourCornerZionStenoLexer lexer) {
|
private boolean handleDECMode(FourCornerZionStenoLexer lexer) {
|
||||||
if (FCDotDEC2701DashPX0.ESC_STOP.equals(decMode)) {
|
if (FCDotDEC2701DashPX0.ESC_STOP.equals(cdcDECMode)) {
|
||||||
cleanOldDECMode();
|
decModeReset();
|
||||||
decMode = null;
|
|
||||||
return false; // print current char
|
return false; // print current char
|
||||||
}
|
}
|
||||||
if (decMode.isExternal()) {
|
if (cdcDECMode.isExternal() || FCDotDEC2701DashPX0.ESC_VT06.equals(cdcDECMode)) {
|
||||||
|
decModeReset();
|
||||||
List<List<Integer>> args = new ArrayList<>();
|
List<List<Integer>> args = new ArrayList<>();
|
||||||
boolean readOK = scanSalahRakaAt(lexer, args);
|
boolean readOK = scanSalahRakaAt(lexer, args);
|
||||||
if (readOK == false) {
|
if (readOK == false) {
|
||||||
return true; // point is eaten
|
return true; // point is eaten
|
||||||
}
|
}
|
||||||
if (lexer.handlerSalahSequence != null) {
|
if (lexer.handlerSalahSequence != null) {
|
||||||
FCDotDEC0901DashEU salahMode = FCDotDEC0901DashEU.values()[decMode.ordinal()];
|
lexer.handlerSalahSequence.strobeSalahSequence(cdcDECMode, args);
|
||||||
lexer.handlerSalahSequence.strobeSalahSequence(salahMode, args);
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (pepperMode != null) {
|
if (FCDotDEC2701DashPX0.ESC68_2PIE.equals(cdcDECMode)) {
|
||||||
return handlePepper(lexer);
|
return handlePIE(lexer);
|
||||||
}
|
}
|
||||||
if (FCDotDEC2701DashPX0.ESC68_NCR.equals(decMode)) {
|
if (FCDotDEC2701DashPX0.ESC68_CMD5401_2D.equals(cdcDECMode)) {
|
||||||
|
return handleCMD(lexer);
|
||||||
|
}
|
||||||
|
if (FCDotDEC2701DashPX0.ESC68_NCR.equals(cdcDECMode)) {
|
||||||
return handleNCR(lexer); // TODO: add small bank switching ?
|
return handleNCR(lexer); // TODO: add small bank switching ?
|
||||||
}
|
}
|
||||||
if (FCDotDEC2701DashPX0.ESC68_FC18.equals(decMode)) {
|
if (FCDotDEC2701DashPX0.ESC68_FC18.equals(cdcDECMode)) {
|
||||||
decMode = null;
|
|
||||||
return handleFC18(lexer);
|
return handleFC18(lexer);
|
||||||
}
|
}
|
||||||
if (FCDotDEC2701DashPX0.ESC_VT06.equals(decMode)) {
|
if (FCDotDEC2701DashPX0.ESC_DEC0801_E10.equals(cdcDECMode)) {
|
||||||
// TODO: impl
|
return handleE10(lexer);
|
||||||
}
|
}
|
||||||
if (FCDotDEC2701DashPX0.ESC_KANJI.equals(decMode)) {
|
if (FCDotDEC2701DashPX0.ESC68_INC0801_P8.equals(cdcDECMode)) {
|
||||||
|
return handleINC(lexer);
|
||||||
|
}
|
||||||
|
if (FCDotDEC2701DashPX0.ESC_KANJI.equals(cdcDECMode)) {
|
||||||
// TODO: impl
|
// TODO: impl
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean handlePepper(FourCornerZionStenoLexer lexer) {
|
private boolean handleINC(FourCornerZionStenoLexer lexer) {
|
||||||
int cdcPoint = lexer.input.get(scanIndex);
|
int cdcPoint = lexer.input.get(cdcDECScanIndex);
|
||||||
if (FCDotDEC2701DashPX0.ESC_DEC0801_E10.equals(decMode)) {
|
if (FCDotCDC1604DashP6.isEscapePepper(cdcPoint)) {
|
||||||
FCDotDEC0801DashE10 e10Mode = FCDotDEC0801DashE10.values()[pepperMode];
|
cdcDECModeInc = FCDotINC0801DashP8.values()[readEscapePepper3(lexer)];
|
||||||
if (e10Mode == FCDotDEC0801DashE10.E10_UWU0101_S1) {
|
return true;
|
||||||
decMode = null;
|
}
|
||||||
pepperMode = null;
|
if (cdcDECModeInc == null) {
|
||||||
lexer.handler.strobeWord(FourCornerDotCake.FC_UWU0101_S1, 0); // white space
|
decModeReset();
|
||||||
return false; // print current char, which is the next....
|
|
||||||
}
|
|
||||||
lexer.smokeSignals.burnUnsupported(lexer.currLine, lexer.currCol, cdcPoint);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (FCDotDEC2701DashPX0.ESC68_DEC0801_E16.equals(decMode)) {
|
// if (cdcPoint < FCDotCDC1604DashP6.NX01_A.ordinal()) {
|
||||||
FCDotDEC0801DashE16 e10Mode = FCDotDEC0801DashE16.values()[pepperMode];
|
// decModeReset();
|
||||||
if (e10Mode == FCDotDEC0801DashE16.ESC68_CDC1604_P6) {
|
// return false;
|
||||||
pepperMode = null;
|
// }
|
||||||
return true;
|
if (FCDotINC0801DashP8.INC_PIE9D_27.equals(cdcDECModeInc)) {
|
||||||
}
|
if (cdcPoint < FCDotCDC1604DashP6.NX01_A.ordinal() || cdcPoint > FCDotCDC1604DashP6.NX27_AMP.ordinal()) {
|
||||||
// TODO: add PIE left/right + elevator button support
|
decModeReset();
|
||||||
if (cdcPoint < FCDotCDC1604DashP6.NX01_A.ordinal()) {
|
|
||||||
pepperMode = null;
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (e10Mode == FCDotDEC0801DashE16.ESC6_APL0127_P7A) {
|
lexer.handler.strobeWord(FourCornerDotCake.FC_PIE9C_27, cdcPoint - FCDotCDC1604DashP6.NX01_A.ordinal());
|
||||||
lexer.handler.strobeWord(FourCornerDotCake.FC_APL0127_P7A, cdcPoint - FCDotCDC1604DashP6.NX01_A.ordinal());
|
return true;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (e10Mode == FCDotDEC0801DashE16.ESC6_APL0127_P7B) {
|
|
||||||
lexer.handler.strobeWord(FourCornerDotCake.FC_APL0127_P7B, cdcPoint - FCDotCDC1604DashP6.NX01_A.ordinal());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (e10Mode == FCDotDEC0801DashE16.ESC6_APL0127_P7C) {
|
|
||||||
lexer.handler.strobeWord(FourCornerDotCake.FC_APL0127_P7C, cdcPoint - FCDotCDC1604DashP6.NX01_A.ordinal());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (e10Mode == FCDotDEC0801DashE16.ESC6_BYD0127_P7D) {
|
|
||||||
lexer.handler.strobeWord(FourCornerDotCake.FC_BYD0127_P7D, cdcPoint - FCDotCDC1604DashP6.NX01_A.ordinal());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (e10Mode == FCDotDEC0801DashE16.ESC6_BYD0127_P7E) {
|
|
||||||
lexer.handler.strobeWord(FourCornerDotCake.FC_BYD0127_P7E, cdcPoint - FCDotCDC1604DashP6.NX01_A.ordinal());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (e10Mode == FCDotDEC0801DashE16.ESC6_BYD0127_P7F) {
|
|
||||||
lexer.handler.strobeWord(FourCornerDotCake.FC_BYD0127_P7F, cdcPoint - FCDotCDC1604DashP6.NX01_A.ordinal());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (e10Mode == FCDotDEC0801DashE16.ESC68_PIE) {
|
|
||||||
return handlePIE(lexer);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
if (FCDotINC0801DashP8.INC_APL0127_P7A.equals(cdcDECModeInc)) {
|
||||||
|
if (cdcPoint < FCDotCDC1604DashP6.NX01_A.ordinal() || cdcPoint > FCDotCDC1604DashP6.NX27_AMP.ordinal()) {
|
||||||
|
decModeReset();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
lexer.handler.strobeWord(FourCornerDotCake.FC_APL0127_P7A, cdcPoint - FCDotCDC1604DashP6.NX01_A.ordinal());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (FCDotINC0801DashP8.INC_APL0127_P7B.equals(cdcDECModeInc)) {
|
||||||
|
if (cdcPoint < FCDotCDC1604DashP6.NX01_A.ordinal() || cdcPoint > FCDotCDC1604DashP6.NX27_AMP.ordinal()) {
|
||||||
|
decModeReset();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
lexer.handler.strobeWord(FourCornerDotCake.FC_APL0127_P7B, cdcPoint - FCDotCDC1604DashP6.NX01_A.ordinal());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (FCDotINC0801DashP8.INC_APL0127_P7C.equals(cdcDECModeInc)) {
|
||||||
|
if (cdcPoint < FCDotCDC1604DashP6.NX01_A.ordinal() || cdcPoint > FCDotCDC1604DashP6.NX27_AMP.ordinal()) {
|
||||||
|
decModeReset();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
lexer.handler.strobeWord(FourCornerDotCake.FC_APL0127_P7C, cdcPoint - FCDotCDC1604DashP6.NX01_A.ordinal());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (FCDotINC0801DashP8.INC_BYD0127_P7D.equals(cdcDECModeInc)) {
|
||||||
|
if (cdcPoint < FCDotCDC1604DashP6.NX01_A.ordinal() || cdcPoint > FCDotCDC1604DashP6.NX27_AMP.ordinal()) {
|
||||||
|
decModeReset();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
lexer.handler.strobeWord(FourCornerDotCake.FC_BYD0127_P7D, cdcPoint - FCDotCDC1604DashP6.NX01_A.ordinal());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (FCDotINC0801DashP8.INC_BYD0127_P7E.equals(cdcDECModeInc)) {
|
||||||
|
if (cdcPoint < FCDotCDC1604DashP6.NX01_A.ordinal() || cdcPoint > FCDotCDC1604DashP6.NX27_AMP.ordinal()) {
|
||||||
|
decModeReset();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
lexer.handler.strobeWord(FourCornerDotCake.FC_BYD0127_P7E, cdcPoint - FCDotCDC1604DashP6.NX01_A.ordinal());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (FCDotINC0801DashP8.INC_BYD0127_P7F.equals(cdcDECModeInc)) {
|
||||||
|
if (cdcPoint < FCDotCDC1604DashP6.NX01_A.ordinal() || cdcPoint > FCDotCDC1604DashP6.NX27_AMP.ordinal()) {
|
||||||
|
decModeReset();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
lexer.handler.strobeWord(FourCornerDotCake.FC_BYD0127_P7F, cdcPoint - FCDotCDC1604DashP6.NX01_A.ordinal());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (FCDotINC0801DashP8.INC_PIE9C_26.equals(cdcDECModeInc)) {
|
||||||
|
if (cdcPoint < FCDotCDC1604DashP6.NX01_A.ordinal() || cdcPoint > FCDotCDC1604DashP6.NX26_Z.ordinal()) {
|
||||||
|
decModeReset();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
lexer.handler.strobeWord(FourCornerDotCake.FC_PIE9C_26, cdcPoint - FCDotCDC1604DashP6.NX01_A.ordinal());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean handleE10(FourCornerZionStenoLexer lexer) {
|
||||||
|
int cdcPoint = lexer.input.get(cdcDECScanIndex);
|
||||||
|
if (FCDotCDC1604DashP6.isEscapePepper(cdcPoint)) {
|
||||||
|
cdcDECModeE10 = FCDotDEC0801DashE10.values()[readEscapePepper3(lexer)];
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (FCDotCDC1604DashP6._SALAH_EXCLAMATION.baklavaPointDotIndex() == cdcPoint) {
|
||||||
|
decModeReset();
|
||||||
|
return true; // end E10 mode, so no print
|
||||||
|
}
|
||||||
|
// if (FCDotCDC1604DashP6._RAKA_QUESTION.baklavaPointDotIndex() == cdcPoint) {
|
||||||
|
// decModeE10DeckLevel = 0;
|
||||||
|
// }
|
||||||
|
// if (FCDotCDC1604DashP6._SALT_COMPARE_LEFT.baklavaPointDotIndex() == cdcPoint) {
|
||||||
|
// decModeE10DeckLevel = 1;
|
||||||
|
// return true;
|
||||||
|
// }
|
||||||
|
// if (FCDotCDC1604DashP6._SALT_COMPARE_RIGHT.baklavaPointDotIndex() == cdcPoint) {
|
||||||
|
// decModeE10DeckLevel = 2;
|
||||||
|
// return true;
|
||||||
|
// }
|
||||||
|
if (FCDotDEC0801DashE10.E10_CDC1604_P6.equals(cdcDECModeE10)) {
|
||||||
|
lexer.handler.strobeWord(FourCornerDotCake.FC_CDC1604_P6, cdcPoint);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (FCDotDEC0801DashE10.E10_BMW0102_S2.equals(cdcDECModeE10)) {
|
||||||
|
if (cdcPoint < FCDotCDC1604DashP6.NX01_A.ordinal() || cdcPoint > FCDotCDC1604DashP6.NX02_B.ordinal()) {
|
||||||
|
decModeReset();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
lexer.handler.strobeWord(FourCornerDotCake.FC_BMW0102_S2, cdcPoint - FCDotCDC1604DashP6.NX01_A.ordinal());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (FCDotDEC0801DashE10.E10_AMD0110_SA.equals(cdcDECModeE10)) {
|
||||||
|
if (cdcPoint < FCDotCDC1604DashP6.NX01_A.ordinal() || cdcPoint > FCDotCDC1604DashP6.NX10_J.ordinal()) {
|
||||||
|
decModeReset();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
lexer.handler.strobeWord(FourCornerDotCake.FC_AMD0110_SA, cdcPoint);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (FCDotDEC0801DashE10.E10_NES0127_9C.equals(cdcDECModeE10)) {
|
||||||
|
if (cdcPoint < FCDotCDC1604DashP6.NX01_A.ordinal() || cdcPoint > FCDotCDC1604DashP6.NX27_AMP.ordinal()) {
|
||||||
|
decModeReset();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
lexer.handler.strobeWord(FourCornerDotCake.FC_NES0127_9C, cdcPoint);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (FCDotDEC0801DashE10.E10_NXP0103_S3.equals(cdcDECModeE10)) {
|
||||||
|
if (cdcPoint < FCDotCDC1604DashP6.NX01_A.ordinal() || cdcPoint > FCDotCDC1604DashP6.NX03_C.ordinal()) {
|
||||||
|
decModeReset();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
lexer.handler.strobeWord(FourCornerDotCake.FC_NXP0103_S3, cdcPoint);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (FCDotDEC0801DashE10.E10_UWU0101_S1.equals(cdcDECModeE10)) {
|
||||||
|
if (cdcPoint < FCDotCDC1604DashP6.NX01_A.ordinal() || cdcPoint > FCDotCDC1604DashP6.NX01_A.ordinal()) {
|
||||||
|
decModeReset();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
lexer.handler.strobeWord(FourCornerDotCake.FC_UWU0101_S1, 0); // white space
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (FCDotDEC0801DashE10.E10_ICL0126_9B.equals(cdcDECModeE10)) {
|
||||||
|
if (cdcPoint < FCDotCDC1604DashP6.NX01_A.ordinal() || cdcPoint > FCDotCDC1604DashP6.NX26_Z.ordinal()) {
|
||||||
|
decModeReset();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
lexer.handler.strobeWord(FourCornerDotCake.FC_ICL0126_9B, cdcPoint);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (FCDotDEC0801DashE10.E10_OCE0801_H3.equals(cdcDECModeE10)) {
|
||||||
|
if (cdcPoint < FCDotCDC1604DashP6.NX01_A.ordinal() || cdcPoint > FCDotCDC1604DashP6.NX08_H.ordinal()) {
|
||||||
|
decModeReset();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
lexer.handler.strobeWord(FourCornerDotCake.FC_OCE0801_H3, cdcPoint);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
decModeReset();
|
||||||
|
lexer.smokeSignals.burnUnsupported(lexer.currLine, lexer.currCol, cdcPoint);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean handleCMD(FourCornerZionStenoLexer lexer) {
|
||||||
|
int cdcPoint = lexer.input.get(cdcDECScanIndex);
|
||||||
|
Optional<FCDotCMD5401Dash2D> cmdModeOpt = FCDotCMD5401Dash2D.valueOfCDC(cdcPoint);
|
||||||
|
if (cmdModeOpt.isEmpty()) {
|
||||||
|
decModeReset();
|
||||||
|
lexer.smokeSignals.burnUnsupported(lexer.currLine, lexer.currCol, cdcPoint);
|
||||||
|
return false; // TODO: add smoke for unkown cmd
|
||||||
|
}
|
||||||
|
FCDotCMD5401Dash2D cmdMode = cmdModeOpt.get();
|
||||||
|
if (FCDotCMD5401Dash2D.CMD_F4TXT0001_SP.equals(cmdMode)) {
|
||||||
|
decModeReset();
|
||||||
|
lexer.handler.strobeWord(FourCornerDotCake.FC_F4TXT0001_SP, 0); // white space
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (FCDotCMD5401Dash2D.CMD_F4TTY0001_NL.equals(cmdMode)) {
|
||||||
|
decModeReset();
|
||||||
|
lexer.currLine++;
|
||||||
|
lexer.currCol = 0;
|
||||||
|
lexer.fireSignals.fireStateLine(lexer.currLine);
|
||||||
|
lexer.fireSignals.fireStateColumn(lexer.currCol);
|
||||||
|
lexer.handler.strobeWord(FourCornerDotCake.FC_F4TTY0001_NL, 0); // new line
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
decModeReset();
|
||||||
|
lexer.smokeSignals.burnUnsupported(lexer.currLine, lexer.currCol, cdcPoint);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean handlePIE(FourCornerZionStenoLexer lexer) {
|
private boolean handlePIE(FourCornerZionStenoLexer lexer) {
|
||||||
int cdcPoint = lexer.input.get(scanIndex);
|
int cdcPoint = lexer.input.get(cdcDECScanIndex);
|
||||||
|
|
||||||
if (pieMode == null) {
|
// TODO: add PIE left/right + elevator button support
|
||||||
pieMode = cdcPoint;
|
|
||||||
if (pieMode < FCDotCDC1604DashP6.NX01_A.ordinal()) {
|
if (cdcDECModePie == null) {
|
||||||
pieMode = null; // invalid selector, thus stop
|
cdcDECModePie = cdcPoint;
|
||||||
|
if (cdcDECModePie < FCDotCDC1604DashP6.NX01_A.ordinal()) {
|
||||||
|
decModeReset();
|
||||||
return false; // print char
|
return false; // print char
|
||||||
} else {
|
} else {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (pieMode != null) {
|
if (cdcDECModePie != null) {
|
||||||
if (cdcPoint < FCDotCDC1604DashP6.NX01_A.ordinal()) {
|
if (cdcPoint < FCDotCDC1604DashP6.NX01_A.ordinal()) {
|
||||||
pieMode = null;
|
decModeReset();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (cdcPoint > pieMode) {
|
if (cdcPoint > cdcDECModePie) {
|
||||||
pieMode = null;
|
decModeReset();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int terminatorOffZero = pieMode - FCDotCDC1604DashP6.NX01_A.ordinal();
|
int terminatorOffZero = cdcDECModePie - FCDotCDC1604DashP6.NX01_A.ordinal();
|
||||||
int numberIdxOffZero = cdcPoint - FCDotCDC1604DashP6.NX01_A.ordinal();
|
int numberIdxOffZero = cdcPoint - FCDotCDC1604DashP6.NX01_A.ordinal();
|
||||||
FourCornerDotCake slice = FourCornerDotCake.values()[terminatorOffZero + FourCornerDotCake.FC_PIE9C_01.ordinal()];
|
FourCornerDotCake slice = FourCornerDotCake.values()[terminatorOffZero + FourCornerDotCake.FC_PIE9C_01.ordinal()];
|
||||||
lexer.handler.strobeWord(slice, numberIdxOffZero);
|
lexer.handler.strobeWord(slice, numberIdxOffZero);
|
||||||
|
@ -721,28 +846,28 @@ public class FourCornerZionStenoLexer {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean handleNCR(FourCornerZionStenoLexer lexer) {
|
private boolean handleNCR(FourCornerZionStenoLexer lexer) {
|
||||||
int cdcPoint = lexer.input.get(scanIndex);
|
int cdcPoint = lexer.input.get(cdcDECScanIndex);
|
||||||
|
|
||||||
if (ncrMode == null) {
|
if (cdcDECModeNcr == null) {
|
||||||
ncrMode = cdcPoint;
|
cdcDECModeNcr = cdcPoint;
|
||||||
if (ncrMode < FCDotCDC1604DashP6.NX01_A.ordinal()) {
|
if (cdcDECModeNcr < FCDotCDC1604DashP6.NX01_A.ordinal()) {
|
||||||
ncrMode = null; // invalid selector, thus stop
|
decModeReset();
|
||||||
return false; // print char
|
return false; // print char
|
||||||
} else {
|
} else {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ncrMode != null) {
|
if (cdcDECModeNcr != null) {
|
||||||
if (cdcPoint < FCDotCDC1604DashP6.NX01_A.ordinal()) {
|
if (cdcPoint < FCDotCDC1604DashP6.NX01_A.ordinal()) {
|
||||||
ncrMode = null;
|
decModeReset();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (cdcPoint > ncrMode) {
|
if (cdcPoint > cdcDECModeNcr) {
|
||||||
ncrMode = null;
|
decModeReset();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int terminatorOff = ncrMode - FCDotCDC1604DashP6.NX01_A.ordinal() + 1;
|
int terminatorOff = cdcDECModeNcr - FCDotCDC1604DashP6.NX01_A.ordinal() + 1;
|
||||||
int numberIdxOff = cdcPoint - FCDotCDC1604DashP6.NX01_A.ordinal() + 1;
|
int numberIdxOff = cdcPoint - FCDotCDC1604DashP6.NX01_A.ordinal() + 1;
|
||||||
BigInteger denominator = BigInteger.valueOf(terminatorOff);
|
BigInteger denominator = BigInteger.valueOf(terminatorOff);
|
||||||
BigInteger numerator = BigInteger.valueOf(numberIdxOff);
|
BigInteger numerator = BigInteger.valueOf(numberIdxOff);
|
||||||
|
@ -751,6 +876,7 @@ public class FourCornerZionStenoLexer {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean handleFC18(FourCornerZionStenoLexer lexer) {
|
private boolean handleFC18(FourCornerZionStenoLexer lexer) {
|
||||||
|
decModeReset();
|
||||||
List<List<Integer>> result = new ArrayList<>();
|
List<List<Integer>> result = new ArrayList<>();
|
||||||
scanSalahRakaAt(lexer, result);
|
scanSalahRakaAt(lexer, result);
|
||||||
if (result.isEmpty()) {
|
if (result.isEmpty()) {
|
||||||
|
@ -786,17 +912,17 @@ public class FourCornerZionStenoLexer {
|
||||||
|
|
||||||
private boolean scanSalahRakaAt(FourCornerZionStenoLexer lexer, List<List<Integer>> result) {
|
private boolean scanSalahRakaAt(FourCornerZionStenoLexer lexer, List<List<Integer>> result) {
|
||||||
List<Integer> argu = new ArrayList<>();
|
List<Integer> argu = new ArrayList<>();
|
||||||
while (scanIndex <= scanIndexEnd) {
|
while (cdcDECScanIndex <= cdcDECScanIndexEnd) {
|
||||||
int cdcPoint = lexer.input.get(scanIndex);
|
int cdcPoint = lexer.input.get(cdcDECScanIndex);
|
||||||
if (cdcPoint == FCDotCDC1604DashP6._NUL.ordinal()) {
|
if (cdcPoint == FCDotCDC1604DashP6._NUL.ordinal()) {
|
||||||
lexer.smokeSignals.burnSalahInvalidCakePoint(lexer.currLine, lexer.currCol, cdcPoint);
|
lexer.smokeSignals.burnSalahInvalidCakePoint(lexer.currLine, lexer.currCol, cdcPoint);
|
||||||
result.clear();
|
result.clear();
|
||||||
scanIndex--;
|
cdcDECScanIndex--;
|
||||||
return false; // _NUL not allowed salah
|
return false; // _NUL not allowed salah
|
||||||
}
|
}
|
||||||
if (FCDotCDC1604DashP6.isEscape6(cdcPoint)) {
|
if (FCDotCDC1604DashP6.isEscape6(cdcPoint)) {
|
||||||
result.add(argu);
|
result.add(argu);
|
||||||
scanIndex--;
|
cdcDECScanIndex--;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (FCDotCDC1604DashP6._SALAH_EXCLAMATION.ordinal() == cdcPoint) {
|
if (FCDotCDC1604DashP6._SALAH_EXCLAMATION.ordinal() == cdcPoint) {
|
||||||
|
@ -806,10 +932,10 @@ public class FourCornerZionStenoLexer {
|
||||||
if (FCDotCDC1604DashP6._RAKA_QUESTION.ordinal() == cdcPoint) {
|
if (FCDotCDC1604DashP6._RAKA_QUESTION.ordinal() == cdcPoint) {
|
||||||
result.add(argu);
|
result.add(argu);
|
||||||
argu = new ArrayList<>();
|
argu = new ArrayList<>();
|
||||||
scanIndex++;
|
cdcDECScanIndex++;
|
||||||
continue; // Next argument
|
continue; // Next argument
|
||||||
}
|
}
|
||||||
scanIndex++;
|
cdcDECScanIndex++;
|
||||||
argu.add(cdcPoint);
|
argu.add(cdcPoint);
|
||||||
}
|
}
|
||||||
lexer.smokeSignals.burnSalahMissingAmen(lexer.currLine, lexer.currCol);
|
lexer.smokeSignals.burnSalahMissingAmen(lexer.currLine, lexer.currCol);
|
||||||
|
|
|
@ -31,9 +31,9 @@ import org.junit.jupiter.api.Test;
|
||||||
import org.x4o.fc18.cake2.FourCornerX06BaklavaPointSequence;
|
import org.x4o.fc18.cake2.FourCornerX06BaklavaPointSequence;
|
||||||
import org.x4o.fc18.cake2.pie9c.FCDotPIE9CDash26;
|
import org.x4o.fc18.cake2.pie9c.FCDotPIE9CDash26;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
|
import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotDEC0801DashE10;
|
import org.x4o.fc18.cake2.zero33.dec1.FCDotCMD5401Dash2D;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotDEC0801DashE16;
|
import org.x4o.fc18.cake2.zero33.dec1.FCDotDEC2701DashPX0;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotDEC2701DashPX0;
|
import org.x4o.fc18.cake2.zero33.dec1.FCDotINC0801DashP8;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests four corner displayed as unicode.
|
* Tests four corner displayed as unicode.
|
||||||
|
@ -48,15 +48,12 @@ public class FourCornerUnicodeDisplayTest {
|
||||||
List<FourCornerX06BaklavaPointSequence> cdc = new ArrayList<>();
|
List<FourCornerX06BaklavaPointSequence> cdc = new ArrayList<>();
|
||||||
cdc.add(FCDotPIE9CDash26.LOW_A);
|
cdc.add(FCDotPIE9CDash26.LOW_A);
|
||||||
cdc.add(FCDotPIE9CDash26.LOW_B); // if used as this per letter full escaping here....
|
cdc.add(FCDotPIE9CDash26.LOW_B); // if used as this per letter full escaping here....
|
||||||
//cdc.add(FCDotCDC1604DashP6._SPACE); // out of range is end lower
|
cdc.add(FCDotCMD5401Dash2D.CMD_F4TXT0001_SP);
|
||||||
cdc.add(FCDotDEC2701DashPX0.ESC_DEC0801_E10);
|
|
||||||
cdc.add(FCDotDEC0801DashE10.E10_UWU0101_S1);
|
|
||||||
cdc.add(FCDotCDC1604DashP6.NX02_B);
|
cdc.add(FCDotCDC1604DashP6.NX02_B);
|
||||||
cdc.add(FCDotCDC1604DashP6.NX03_C);
|
cdc.add(FCDotCDC1604DashP6.NX03_C);
|
||||||
cdc.add(FCDotCDC1604DashP6.NX04_D);
|
cdc.add(FCDotCDC1604DashP6.NX04_D);
|
||||||
cdc.add(FCDotCDC1604DashP6.NY16_DOT);
|
cdc.add(FCDotCDC1604DashP6.NY16_DOT);
|
||||||
cdc.add(FCDotDEC2701DashPX0.ESC68_DEC0801_E16);
|
cdc.add(FCDotDEC2701DashPX0.ESC68_2PIE);
|
||||||
cdc.add(FCDotDEC0801DashE16.ESC68_PIE);
|
|
||||||
cdc.add(FCDotCDC1604DashP6.NX26_Z); // select lower case
|
cdc.add(FCDotCDC1604DashP6.NX26_Z); // select lower case
|
||||||
cdc.add(FCDotCDC1604DashP6.NX10_J);
|
cdc.add(FCDotCDC1604DashP6.NX10_J);
|
||||||
cdc.add(FCDotCDC1604DashP6.NX11_K);
|
cdc.add(FCDotCDC1604DashP6.NX11_K);
|
||||||
|
@ -66,20 +63,17 @@ public class FourCornerUnicodeDisplayTest {
|
||||||
cdc.add(FCDotCDC1604DashP6.NX15_O);
|
cdc.add(FCDotCDC1604DashP6.NX15_O);
|
||||||
|
|
||||||
Assertions.assertEquals("ab BCD.jklmO", FourCornerUnicodeDisplay.text().renderFromX06(cdc));
|
Assertions.assertEquals("ab BCD.jklmO", FourCornerUnicodeDisplay.text().renderFromX06(cdc));
|
||||||
//Assertions.assertEquals("␃␃␁ZA␃␃␁ZB BCD.␃␃␁ZJKLM␃␃␃O", FourCornerUnicodeDisplay.raw().renderFromX06(cdc));
|
Assertions.assertEquals("␇␇␘ZA␇␇␘ZB␘␆␆ABCD.␇␇␘ZJKLM␘␘␘O", FourCornerUnicodeDisplay.raw().renderFromX06(cdc));
|
||||||
Assertions.assertEquals("␇␘␆¿¿¿ZA␇␘␆¿¿¿ZB␇␆␆¿¡¿BCD.␇␘␆¿¿¿ZJKLM␘␘␘O", FourCornerUnicodeDisplay.raw().renderFromX06(cdc));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testNumberTerminatorOutOfRange() throws Exception {
|
public void testNumberTerminatorOutOfRange() throws Exception {
|
||||||
List<FourCornerX06BaklavaPointSequence> cdc = new ArrayList<>();
|
List<FourCornerX06BaklavaPointSequence> cdc = new ArrayList<>();
|
||||||
cdc.add(FCDotCDC1604DashP6.NX24_X); // = X
|
cdc.add(FCDotCDC1604DashP6.NX24_X); // = X
|
||||||
cdc.add(FCDotDEC2701DashPX0.ESC68_DEC0801_E16);
|
cdc.add(FCDotDEC2701DashPX0.ESC68_2PIE);
|
||||||
cdc.add(FCDotDEC0801DashE16.ESC68_PIE);
|
|
||||||
cdc.add(FCDotCDC1604DashP6.NY10_CARET); // ^
|
cdc.add(FCDotCDC1604DashP6.NY10_CARET); // ^
|
||||||
cdc.add(FCDotCDC1604DashP6.NY06_PERCENT); // = %
|
cdc.add(FCDotCDC1604DashP6.NY06_PERCENT); // = %
|
||||||
cdc.add(FCDotDEC2701DashPX0.ESC68_DEC0801_E16);
|
cdc.add(FCDotDEC2701DashPX0.ESC68_2PIE);
|
||||||
cdc.add(FCDotDEC0801DashE16.ESC68_PIE);
|
|
||||||
cdc.add(FCDotCDC1604DashP6.NY01_AT);
|
cdc.add(FCDotCDC1604DashP6.NY01_AT);
|
||||||
cdc.add(FCDotCDC1604DashP6.NX11_K); // = K
|
cdc.add(FCDotCDC1604DashP6.NX11_K); // = K
|
||||||
|
|
||||||
|
@ -89,12 +83,10 @@ public class FourCornerUnicodeDisplayTest {
|
||||||
@Test
|
@Test
|
||||||
public void testNumberPieOutOfRange() throws Exception {
|
public void testNumberPieOutOfRange() throws Exception {
|
||||||
List<FourCornerX06BaklavaPointSequence> cdc = new ArrayList<>();
|
List<FourCornerX06BaklavaPointSequence> cdc = new ArrayList<>();
|
||||||
cdc.add(FCDotDEC2701DashPX0.ESC68_DEC0801_E16);
|
cdc.add(FCDotDEC2701DashPX0.ESC68_2PIE);
|
||||||
cdc.add(FCDotDEC0801DashE16.ESC68_PIE);
|
|
||||||
cdc.add(FCDotCDC1604DashP6.NX01_A);
|
cdc.add(FCDotCDC1604DashP6.NX01_A);
|
||||||
cdc.add(FCDotCDC1604DashP6.NX02_B); // B
|
cdc.add(FCDotCDC1604DashP6.NX02_B); // B
|
||||||
cdc.add(FCDotDEC2701DashPX0.ESC68_DEC0801_E16);
|
cdc.add(FCDotDEC2701DashPX0.ESC68_2PIE);
|
||||||
cdc.add(FCDotDEC0801DashE16.ESC68_PIE);
|
|
||||||
cdc.add(FCDotCDC1604DashP6.NX10_J);
|
cdc.add(FCDotCDC1604DashP6.NX10_J);
|
||||||
cdc.add(FCDotCDC1604DashP6.NX04_D); // 3
|
cdc.add(FCDotCDC1604DashP6.NX04_D); // 3
|
||||||
cdc.add(FCDotCDC1604DashP6.NX11_K); // K
|
cdc.add(FCDotCDC1604DashP6.NX11_K); // K
|
||||||
|
|
|
@ -33,8 +33,8 @@ import org.x4o.fc18.cake2.FourCornerX18CakePointSequence;
|
||||||
import org.x4o.fc18.cake2.pie9c.FCDotPIE9CDash10;
|
import org.x4o.fc18.cake2.pie9c.FCDotPIE9CDash10;
|
||||||
import org.x4o.fc18.cake2.pie9c.FCDotPIE9CDash26;
|
import org.x4o.fc18.cake2.pie9c.FCDotPIE9CDash26;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
|
import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotDEC0801DashE19;
|
import org.x4o.fc18.cake2.zero33.dec1.FCDotCMD5401Dash2D;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotDEC2701DashPX0;
|
import org.x4o.fc18.cake2.zero33.dec1.FCDotDEC2701DashPX0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests four corner unicode import.
|
* Tests four corner unicode import.
|
||||||
|
@ -64,22 +64,18 @@ public class FourCornerUnicodeImportTest {
|
||||||
@Test
|
@Test
|
||||||
public void testAsciiLower() throws Exception {
|
public void testAsciiLower() throws Exception {
|
||||||
List<FourCornerX06BaklavaPointSequence> cdc = FourCornerUnicodeImport.strict().convertToX06("foobar");
|
List<FourCornerX06BaklavaPointSequence> cdc = FourCornerUnicodeImport.strict().convertToX06("foobar");
|
||||||
|
Iterator<FourCornerX06BaklavaPointSequence> cdi = cdc.iterator();
|
||||||
Assertions.assertNotNull(cdc);
|
Assertions.assertNotNull(cdc);
|
||||||
Assertions.assertFalse(cdc.isEmpty());
|
Assertions.assertFalse(cdc.isEmpty());
|
||||||
Assertions.assertEquals(13, cdc.size());
|
Assertions.assertEquals(8, cdc.size());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6._ESC6_X2, cdc.get(0));
|
Assertions.assertEquals(FCDotDEC2701DashPX0.ESC68_2PIE, cdi.next());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6._ESC6_X3, cdc.get(1));
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX26_Z, cdi.next());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6._ESC6_X1, cdc.get(2));
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX06_F, cdi.next());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6._PEPPER_DOWNUP_QUESTION, cdc.get(3));
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX15_O, cdi.next());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6._PEPPER_DOWNUP_QUESTION, cdc.get(4));
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX15_O, cdi.next());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6._PEPPER_DOWNUP_QUESTION, cdc.get(5));
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX02_B, cdi.next());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX26_Z, cdc.get(6));
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX01_A, cdi.next());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX06_F, cdc.get(7));
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX18_R, cdi.next());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX15_O, cdc.get(8));
|
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX15_O, cdc.get(9));
|
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX02_B, cdc.get(10));
|
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX01_A, cdc.get(11));
|
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX18_R, cdc.get(12));
|
|
||||||
|
|
||||||
String out = FourCornerUnicodeDisplay.text().renderFromX06(cdc);
|
String out = FourCornerUnicodeDisplay.text().renderFromX06(cdc);
|
||||||
Assertions.assertEquals("foobar", out);
|
Assertions.assertEquals("foobar", out);
|
||||||
|
@ -88,25 +84,21 @@ public class FourCornerUnicodeImportTest {
|
||||||
@Test
|
@Test
|
||||||
public void testAsciiMixedX06() throws Exception {
|
public void testAsciiMixedX06() throws Exception {
|
||||||
List<FourCornerX06BaklavaPointSequence> cdc = FourCornerUnicodeImport.strict().convertToX06("fooBAR");
|
List<FourCornerX06BaklavaPointSequence> cdc = FourCornerUnicodeImport.strict().convertToX06("fooBAR");
|
||||||
|
Iterator<FourCornerX06BaklavaPointSequence> cdi = cdc.iterator();
|
||||||
Assertions.assertNotNull(cdc);
|
Assertions.assertNotNull(cdc);
|
||||||
Assertions.assertFalse(cdc.isEmpty());
|
Assertions.assertFalse(cdc.isEmpty());
|
||||||
Assertions.assertEquals(16, cdc.size());
|
Assertions.assertEquals(11, cdc.size());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6._ESC6_X2, cdc.get(0));
|
Assertions.assertEquals(FCDotDEC2701DashPX0.ESC68_2PIE, cdi.next());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6._ESC6_X3, cdc.get(1));
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX26_Z, cdi.next());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6._ESC6_X1, cdc.get(2));
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX06_F, cdi.next());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6._PEPPER_DOWNUP_QUESTION, cdc.get(3));
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX15_O, cdi.next());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6._PEPPER_DOWNUP_QUESTION, cdc.get(4));
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX15_O, cdi.next());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6._PEPPER_DOWNUP_QUESTION, cdc.get(5));
|
Assertions.assertEquals(FCDotCDC1604DashP6._ESC6_X3, cdi.next());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX26_Z, cdc.get(6));
|
Assertions.assertEquals(FCDotCDC1604DashP6._ESC6_X3, cdi.next());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX06_F, cdc.get(7));
|
Assertions.assertEquals(FCDotCDC1604DashP6._ESC6_X3, cdi.next());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX15_O, cdc.get(8));
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX02_B, cdi.next());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX15_O, cdc.get(9));
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX01_A, cdi.next());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6._ESC6_X3, cdc.get(10));
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX18_R, cdi.next());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6._ESC6_X3, cdc.get(11));
|
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6._ESC6_X3, cdc.get(12));
|
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX02_B, cdc.get(13));
|
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX01_A, cdc.get(14));
|
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX18_R, cdc.get(15));
|
|
||||||
|
|
||||||
String out = FourCornerUnicodeDisplay.text().renderFromX06(cdc);
|
String out = FourCornerUnicodeDisplay.text().renderFromX06(cdc);
|
||||||
Assertions.assertEquals("fooBAR", out);
|
Assertions.assertEquals("fooBAR", out);
|
||||||
|
@ -115,21 +107,19 @@ public class FourCornerUnicodeImportTest {
|
||||||
@Test
|
@Test
|
||||||
public void testAsciiMixedX08() throws Exception {
|
public void testAsciiMixedX08() throws Exception {
|
||||||
List<FourCornerX08MuffinPointSequence> cdc = FourCornerUnicodeImport.strict().convertToX08("fooBAR");
|
List<FourCornerX08MuffinPointSequence> cdc = FourCornerUnicodeImport.strict().convertToX08("fooBAR");
|
||||||
|
Iterator<FourCornerX08MuffinPointSequence> cdi = cdc.iterator();
|
||||||
Assertions.assertNotNull(cdc);
|
Assertions.assertNotNull(cdc);
|
||||||
Assertions.assertFalse(cdc.isEmpty());
|
Assertions.assertFalse(cdc.isEmpty());
|
||||||
Assertions.assertEquals(12, cdc.size());
|
Assertions.assertEquals(9, cdc.size());
|
||||||
Assertions.assertEquals(FCDotDEC2701DashPX0.ESC68_DEC0801_E16, cdc.get(0));
|
Assertions.assertEquals(FCDotDEC2701DashPX0.ESC68_2PIE, cdi.next());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6._PEPPER_DOWNUP_QUESTION, cdc.get(1));
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX26_Z, cdi.next());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6._PEPPER_DOWNUP_QUESTION, cdc.get(2));
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX06_F, cdi.next());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6._PEPPER_DOWNUP_QUESTION, cdc.get(3));
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX15_O, cdi.next());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX26_Z, cdc.get(4));
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX15_O, cdi.next());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX06_F, cdc.get(5));
|
Assertions.assertEquals(FCDotDEC2701DashPX0.ESC_STOP, cdi.next());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX15_O, cdc.get(6));
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX02_B, cdi.next());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX15_O, cdc.get(7));
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX01_A, cdi.next());
|
||||||
Assertions.assertEquals(FCDotDEC2701DashPX0.ESC_STOP, cdc.get(8));
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX18_R, cdi.next());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX02_B, cdc.get(9));
|
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX01_A, cdc.get(10));
|
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX18_R, cdc.get(11));
|
|
||||||
|
|
||||||
String out = FourCornerUnicodeDisplay.text().renderFromX08(cdc);
|
String out = FourCornerUnicodeDisplay.text().renderFromX08(cdc);
|
||||||
Assertions.assertEquals("fooBAR", out);
|
Assertions.assertEquals("fooBAR", out);
|
||||||
|
@ -180,24 +170,20 @@ public class FourCornerUnicodeImportTest {
|
||||||
@Test
|
@Test
|
||||||
public void testNumberX06() throws Exception {
|
public void testNumberX06() throws Exception {
|
||||||
List<FourCornerX06BaklavaPointSequence> cdc = FourCornerUnicodeImport.strict().convertToX06("01201337");
|
List<FourCornerX06BaklavaPointSequence> cdc = FourCornerUnicodeImport.strict().convertToX06("01201337");
|
||||||
|
Iterator<FourCornerX06BaklavaPointSequence> cdi = cdc.iterator();
|
||||||
Assertions.assertNotNull(cdc);
|
Assertions.assertNotNull(cdc);
|
||||||
Assertions.assertFalse(cdc.isEmpty());
|
Assertions.assertFalse(cdc.isEmpty());
|
||||||
Assertions.assertEquals(15, cdc.size());
|
Assertions.assertEquals(10, cdc.size());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6._ESC6_X2, cdc.get(0));
|
Assertions.assertEquals(FCDotDEC2701DashPX0.ESC68_2PIE, cdi.next());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6._ESC6_X3, cdc.get(1));
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX10_J, cdi.next());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6._ESC6_X1, cdc.get(2));
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX01_A, cdi.next()); // 0
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6._PEPPER_DOWNUP_QUESTION, cdc.get(3));
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX02_B, cdi.next()); // 1
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6._PEPPER_DOWNUP_QUESTION, cdc.get(4));
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX03_C, cdi.next()); // 2
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6._PEPPER_DOWNUP_QUESTION, cdc.get(5));
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX01_A, cdi.next()); // 0
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX10_J, cdc.get(6));
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX02_B, cdi.next()); // 1
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX01_A, cdc.get(7)); // 0
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX04_D, cdi.next()); // 3
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX02_B, cdc.get(8)); // 1
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX04_D, cdi.next()); // 3
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX03_C, cdc.get(9)); // 2
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX08_H, cdi.next()); // 7
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX01_A, cdc.get(10)); // 0
|
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX02_B, cdc.get(11)); // 1
|
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX04_D, cdc.get(12)); // 3
|
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX04_D, cdc.get(13)); // 3
|
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX08_H, cdc.get(14)); // 7
|
|
||||||
|
|
||||||
String out = FourCornerUnicodeDisplay.text().renderFromX06(cdc);
|
String out = FourCornerUnicodeDisplay.text().renderFromX06(cdc);
|
||||||
Assertions.assertEquals("01201337", out);
|
Assertions.assertEquals("01201337", out);
|
||||||
|
@ -206,22 +192,20 @@ public class FourCornerUnicodeImportTest {
|
||||||
@Test
|
@Test
|
||||||
public void testNumberX08() throws Exception {
|
public void testNumberX08() throws Exception {
|
||||||
List<FourCornerX08MuffinPointSequence> cdc = FourCornerUnicodeImport.strict().convertToX08("01201337");
|
List<FourCornerX08MuffinPointSequence> cdc = FourCornerUnicodeImport.strict().convertToX08("01201337");
|
||||||
|
Iterator<FourCornerX08MuffinPointSequence> cdi = cdc.iterator();
|
||||||
Assertions.assertNotNull(cdc);
|
Assertions.assertNotNull(cdc);
|
||||||
Assertions.assertFalse(cdc.isEmpty());
|
Assertions.assertFalse(cdc.isEmpty());
|
||||||
Assertions.assertEquals(13, cdc.size());
|
Assertions.assertEquals(10, cdc.size());
|
||||||
Assertions.assertEquals(FCDotDEC2701DashPX0.ESC68_DEC0801_E16, cdc.get(0));
|
Assertions.assertEquals(FCDotDEC2701DashPX0.ESC68_2PIE, cdi.next());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6._PEPPER_DOWNUP_QUESTION, cdc.get(1));
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX10_J, cdi.next());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6._PEPPER_DOWNUP_QUESTION, cdc.get(2));
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX01_A, cdi.next()); // 0
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6._PEPPER_DOWNUP_QUESTION, cdc.get(3));
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX02_B, cdi.next()); // 1
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX10_J, cdc.get(4));
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX03_C, cdi.next()); // 2
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX01_A, cdc.get(5)); // 0
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX01_A, cdi.next()); // 0
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX02_B, cdc.get(6)); // 1
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX02_B, cdi.next()); // 1
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX03_C, cdc.get(7)); // 2
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX04_D, cdi.next()); // 3
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX01_A, cdc.get(8)); // 0
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX04_D, cdi.next()); // 3
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX02_B, cdc.get(9)); // 1
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX08_H, cdi.next()); // 7
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX04_D, cdc.get(10)); // 3
|
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX04_D, cdc.get(11)); // 3
|
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX08_H, cdc.get(12)); // 7
|
|
||||||
|
|
||||||
String out = FourCornerUnicodeDisplay.text().renderFromX08(cdc);
|
String out = FourCornerUnicodeDisplay.text().renderFromX08(cdc);
|
||||||
Assertions.assertEquals("01201337", out);
|
Assertions.assertEquals("01201337", out);
|
||||||
|
@ -253,29 +237,21 @@ public class FourCornerUnicodeImportTest {
|
||||||
Assertions.assertNotNull(cdc);
|
Assertions.assertNotNull(cdc);
|
||||||
Assertions.assertTrue(cdi.hasNext());
|
Assertions.assertTrue(cdi.hasNext());
|
||||||
Assertions.assertFalse(cdc.isEmpty());
|
Assertions.assertFalse(cdc.isEmpty());
|
||||||
Assertions.assertEquals(22, cdc.size());
|
Assertions.assertEquals(14, cdc.size());
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX01_A, cdi.next());
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX01_A, cdi.next());
|
||||||
Assertions.assertEquals(FCDotDEC2701DashPX0.ESC68_DEC0801_E19, cdi.next());
|
Assertions.assertEquals(FCDotCMD5401Dash2D.CMD_F4TTY0001_NL, cdi.next());
|
||||||
Assertions.assertEquals(FCDotDEC0801DashE19.TYPE_WRITER_TTY0001_NL, cdi.next());
|
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX02_B, cdi.next());
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX02_B, cdi.next());
|
||||||
Assertions.assertEquals(FCDotDEC2701DashPX0.ESC68_DEC0801_E19, cdi.next());
|
Assertions.assertEquals(FCDotCMD5401Dash2D.CMD_F4TTY0001_NL, cdi.next());
|
||||||
Assertions.assertEquals(FCDotDEC0801DashE19.TYPE_WRITER_TTY0001_NL, cdi.next());
|
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX03_C, cdi.next());
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX03_C, cdi.next());
|
||||||
Assertions.assertEquals(FCDotDEC2701DashPX0.ESC68_DEC0801_E19, cdi.next());
|
Assertions.assertEquals(FCDotCMD5401Dash2D.CMD_F4TTY0001_NL, cdi.next());
|
||||||
Assertions.assertEquals(FCDotDEC0801DashE19.TYPE_WRITER_TTY0001_NL, cdi.next());
|
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX04_D, cdi.next());
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX04_D, cdi.next());
|
||||||
Assertions.assertEquals(FCDotDEC2701DashPX0.ESC68_DEC0801_E19, cdi.next());
|
Assertions.assertEquals(FCDotCMD5401Dash2D.CMD_F4TTY0001_NL, cdi.next());
|
||||||
Assertions.assertEquals(FCDotDEC0801DashE19.TYPE_WRITER_TTY0001_NL, cdi.next());
|
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX05_E, cdi.next());
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX05_E, cdi.next());
|
||||||
Assertions.assertEquals(FCDotDEC2701DashPX0.ESC68_DEC0801_E19, cdi.next());
|
Assertions.assertEquals(FCDotCMD5401Dash2D.CMD_F4TTY0001_NL, cdi.next());
|
||||||
Assertions.assertEquals(FCDotDEC0801DashE19.TYPE_WRITER_TTY0001_NL, cdi.next());
|
|
||||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX06_F, cdi.next());
|
Assertions.assertEquals(FCDotCDC1604DashP6.NX06_F, cdi.next());
|
||||||
Assertions.assertEquals(FCDotDEC2701DashPX0.ESC68_DEC0801_E19, cdi.next());
|
Assertions.assertEquals(FCDotCMD5401Dash2D.CMD_F4TTY0001_NL, cdi.next());
|
||||||
Assertions.assertEquals(FCDotDEC0801DashE19.TYPE_WRITER_TTY0001_NL, cdi.next());
|
Assertions.assertEquals(FCDotCMD5401Dash2D.CMD_F4TTY0001_NL, cdi.next());
|
||||||
Assertions.assertEquals(FCDotDEC2701DashPX0.ESC68_DEC0801_E19, cdi.next());
|
Assertions.assertEquals(FCDotCMD5401Dash2D.CMD_F4TTY0001_NL, cdi.next());
|
||||||
Assertions.assertEquals(FCDotDEC0801DashE19.TYPE_WRITER_TTY0001_NL, cdi.next());
|
|
||||||
Assertions.assertEquals(FCDotDEC2701DashPX0.ESC68_DEC0801_E19, cdi.next());
|
|
||||||
Assertions.assertEquals(FCDotDEC0801DashE19.TYPE_WRITER_TTY0001_NL, cdi.next());
|
|
||||||
|
|
||||||
String out = FourCornerUnicodeDisplay.text().renderFromX06(cdc);
|
String out = FourCornerUnicodeDisplay.text().renderFromX06(cdc);
|
||||||
Assertions.assertEquals("A\nB\nC\nD\nE\nF\n\n\n", out);
|
Assertions.assertEquals("A\nB\nC\nD\nE\nF\n\n\n", out);
|
||||||
|
|
|
@ -29,7 +29,7 @@ import java.util.List;
|
||||||
import org.x4o.fc18.FourCornerUnicodeDisplay;
|
import org.x4o.fc18.FourCornerUnicodeDisplay;
|
||||||
import org.x4o.fc18.cake2.FourCornerDotCake;
|
import org.x4o.fc18.cake2.FourCornerDotCake;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
|
import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotDEC2701DashPX0;
|
import org.x4o.fc18.cake2.zero33.dec1.FCDotDEC2701DashPX0;
|
||||||
import org.x4o.o2o.io.ContentWriterHtml.Tag;
|
import org.x4o.o2o.io.ContentWriterHtml.Tag;
|
||||||
import org.x4o.o2o.io.sax3.ContentCloseable;
|
import org.x4o.o2o.io.sax3.ContentCloseable;
|
||||||
import org.x4o.o2o.tdoc.ApiDocContentCss;
|
import org.x4o.o2o.tdoc.ApiDocContentCss;
|
||||||
|
|
|
@ -26,6 +26,7 @@ import java.util.List;
|
||||||
|
|
||||||
import org.junit.jupiter.api.Assertions;
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.x4o.fc18.cake2.zero33.dec1.FCDotDEC2701DashPX0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests DEC encoding.
|
* Tests DEC encoding.
|
||||||
|
|
|
@ -30,8 +30,8 @@ import org.junit.jupiter.api.Test;
|
||||||
import org.x4o.fc18.FourCornerUnicodeDisplay;
|
import org.x4o.fc18.FourCornerUnicodeDisplay;
|
||||||
import org.x4o.fc18.FourCornerUnicodeMapper;
|
import org.x4o.fc18.FourCornerUnicodeMapper;
|
||||||
import org.x4o.fc18.cake2.FourCornerX06BaklavaPointSequence;
|
import org.x4o.fc18.cake2.FourCornerX06BaklavaPointSequence;
|
||||||
import org.x4o.fc18.cake2.zero33.vt06.VTDash06DotZeroACursor;
|
import org.x4o.fc18.cake2.zero33.dec1.vt06.VTDash06DotZeroACursor;
|
||||||
import org.x4o.fc18.cake2.zero33.vt06.VTDash06DotZeroCClear;
|
import org.x4o.fc18.cake2.zero33.dec1.vt06.VTDash06DotZeroCClear;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests VT-06 encoding.
|
* Tests VT-06 encoding.
|
||||||
|
@ -45,12 +45,12 @@ public class FCDotVT06Test {
|
||||||
public void testCusorGoto() throws Exception {
|
public void testCusorGoto() throws Exception {
|
||||||
List<FourCornerX06BaklavaPointSequence> cdc = new ArrayList<>();
|
List<FourCornerX06BaklavaPointSequence> cdc = new ArrayList<>();
|
||||||
cdc.add(VTDash06DotZeroACursor.NX_CURSOR_GOTO);
|
cdc.add(VTDash06DotZeroACursor.NX_CURSOR_GOTO);
|
||||||
cdc.addAll(FourCornerUnicodeMapper.DICTIONARY.toDecimalsX06(123));
|
cdc.addAll(FourCornerUnicodeMapper.DICTIONARY.toDecimalsX06(123)); // TODO: fix these are the wrong, we need to use the txt grams version
|
||||||
cdc.add(FCDotCDC1604DashP6._RAKA_QUESTION);
|
cdc.add(FCDotCDC1604DashP6._RAKA_QUESTION);
|
||||||
cdc.addAll(FourCornerUnicodeMapper.DICTIONARY.toDecimalsX06(456));
|
cdc.addAll(FourCornerUnicodeMapper.DICTIONARY.toDecimalsX06(456));
|
||||||
cdc.add(FCDotCDC1604DashP6._SALAH_EXCLAMATION);
|
cdc.add(FCDotCDC1604DashP6._SALAH_EXCLAMATION);
|
||||||
|
|
||||||
Assertions.assertEquals("␘␘␇AG␇␘␆¿¿¿JBCD?␇␘␆¿¿¿JEFG!", FourCornerUnicodeDisplay.raw().renderFromX06(cdc));
|
Assertions.assertEquals("␘␘␇AG␇␇␘JBCD?␇␇␘JEFG!", FourCornerUnicodeDisplay.raw().renderFromX06(cdc));
|
||||||
// TODO: Fix lexer embedded escapes, and display external with single unicode escape sign
|
// TODO: Fix lexer embedded escapes, and display external with single unicode escape sign
|
||||||
//Assertions.assertEquals("?AG?BCD?EFG!", FourCornerUnicodeDisplay.text().renderFromX06(cdc));
|
//Assertions.assertEquals("?AG?BCD?EFG!", FourCornerUnicodeDisplay.text().renderFromX06(cdc));
|
||||||
}
|
}
|
||||||
|
@ -62,6 +62,6 @@ public class FCDotVT06Test {
|
||||||
cdc.addAll(FourCornerUnicodeMapper.DICTIONARY.toDecimalsX06(5));
|
cdc.addAll(FourCornerUnicodeMapper.DICTIONARY.toDecimalsX06(5));
|
||||||
cdc.add(FCDotCDC1604DashP6._SALAH_EXCLAMATION);
|
cdc.add(FCDotCDC1604DashP6._SALAH_EXCLAMATION);
|
||||||
|
|
||||||
Assertions.assertEquals("␘␘␇CA␇␘␆¿¿¿JF!", FourCornerUnicodeDisplay.raw().renderFromX06(cdc));
|
Assertions.assertEquals("␘␘␇CA␇␇␘JF!", FourCornerUnicodeDisplay.raw().renderFromX06(cdc));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ import org.x4o.fc18.FourCornerUnicodeDisplay;
|
||||||
import org.x4o.fc18.cake2.FourCornerDotCake;
|
import org.x4o.fc18.cake2.FourCornerDotCake;
|
||||||
import org.x4o.fc18.cake2.FourCornerX06BaklavaPointSequence;
|
import org.x4o.fc18.cake2.FourCornerX06BaklavaPointSequence;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
|
import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotDEC2701DashPX0;
|
import org.x4o.fc18.cake2.zero33.dec1.FCDotDEC2701DashPX0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests four corner lexer parts.
|
* Tests four corner lexer parts.
|
||||||
|
|
Loading…
Reference in a new issue