diff --git a/nx01-x4o-o2o/src/main/java/org/x4o/o2o/fc18/FourCornerUnicodeDisplay.java b/nx01-x4o-o2o/src/main/java/org/x4o/o2o/fc18/FourCornerUnicodeDisplay.java index f845d59..5df1291 100644 --- a/nx01-x4o-o2o/src/main/java/org/x4o/o2o/fc18/FourCornerUnicodeDisplay.java +++ b/nx01-x4o-o2o/src/main/java/org/x4o/o2o/fc18/FourCornerUnicodeDisplay.java @@ -264,10 +264,5 @@ public class FourCornerUnicodeDisplay { public void burnRecursive(int line, int col) { throw new IllegalStateException("loop"); } - - @Override - public void burnInvalidSalah(int line, int col) { - throw new IllegalStateException("Invalid salah on line: " + line + ":" + col); - } } } diff --git a/nx01-x4o-o2o/src/main/java/org/x4o/o2o/fc18/zion7/FourCornerZionStenoLexer.java b/nx01-x4o-o2o/src/main/java/org/x4o/o2o/fc18/zion7/FourCornerZionStenoLexer.java index cdd841c..fd8b4a3 100644 --- a/nx01-x4o-o2o/src/main/java/org/x4o/o2o/fc18/zion7/FourCornerZionStenoLexer.java +++ b/nx01-x4o-o2o/src/main/java/org/x4o/o2o/fc18/zion7/FourCornerZionStenoLexer.java @@ -569,7 +569,7 @@ public class FourCornerZionStenoLexer { } if (salahMode.equals(decMode)) { if (salahMode.name().startsWith("__")) { - smokeSignals.burnInvalidSalah(currLine, currCol); + smokeSignals.burnSalahDECUnsupported(currLine, currCol, decMode); return false; } List> args = new ArrayList<>(); @@ -617,7 +617,7 @@ public class FourCornerZionStenoLexer { while (input.hasNext()) { int cdcPoint = input.next(); if (cdcPoint == FCDotCDC1604DashP6._NUL.ordinal()) { - smokeSignals.burnInvalidSalah(currLine, currCol); + smokeSignals.burnSalahInvalidCakePoint(currLine, currCol, cdcPoint); result.clear(); return ScanResult.NEXT; // _NUL not allowed salah } @@ -641,7 +641,7 @@ public class FourCornerZionStenoLexer { continue; // Next argument } if (!embedESC.isEmbeddable()) { - smokeSignals.burnInvalidEscape(currLine, currCol, cdcPoint); + smokeSignals.burnSalahDECIllegal(currLine, currCol, embedESC); result.clear(); return ScanResult.NEXT; } @@ -651,7 +651,7 @@ public class FourCornerZionStenoLexer { } argu.add(cdcPoint); } - smokeSignals.burnInvalidSalah(currLine, currCol); + smokeSignals.burnSalahMissingAmen(currLine, currCol); result.clear(); return ScanResult.NEXT; } diff --git a/nx01-x4o-o2o/src/main/java/org/x4o/o2o/fc18/zion7/FourCornerZionStenoLexerSmoke.java b/nx01-x4o-o2o/src/main/java/org/x4o/o2o/fc18/zion7/FourCornerZionStenoLexerSmoke.java index 0b7fc11..d11c2c2 100644 --- a/nx01-x4o-o2o/src/main/java/org/x4o/o2o/fc18/zion7/FourCornerZionStenoLexerSmoke.java +++ b/nx01-x4o-o2o/src/main/java/org/x4o/o2o/fc18/zion7/FourCornerZionStenoLexerSmoke.java @@ -22,6 +22,8 @@ */ package org.x4o.o2o.fc18.zion7; +import org.x4o.o2o.fc18.zero33.FCDotDEC0127DashPX0; + /// Provides lexer smoke signals feedback. /// /// @author Willem Cazander @@ -32,16 +34,26 @@ public interface FourCornerZionStenoLexerSmoke { void burnRecursive(int line, int col); - void burnInvalidSalah(int line, int col); - void burnInvalidEscape(int line, int col, int cakePoint); + + void burnSalahInvalidCakePoint(int line, int col, int cakePoint); + + void burnSalahDECUnsupported(int line, int col, FCDotDEC0127DashPX0 mode); + + void burnSalahDECIllegal(int line, int col, FCDotDEC0127DashPX0 mode); + + void burnSalahMissingAmen(int line, int col); + + void burnUNI21UnusedBigIndian(int line, int col); + void burnNCR1632ZeroSparks(int line, int col); void burnNCR1632UnusedSparks(int line, int col); + interface Adapter extends FourCornerZionStenoLexerSmoke { @Override @@ -53,7 +65,19 @@ public interface FourCornerZionStenoLexerSmoke { } @Override - default void burnInvalidSalah(int line, int col) { + default void burnSalahInvalidCakePoint(int line, int col, int cakePoint) { + } + + @Override + default void burnSalahDECUnsupported(int line, int col, FCDotDEC0127DashPX0 mode) { + } + + @Override + default void burnSalahDECIllegal(int line, int col, FCDotDEC0127DashPX0 mode) { + } + + @Override + default void burnSalahMissingAmen(int line, int col) { } @Override diff --git a/nx01-x4o-o2o/src/test/java/org/x4o/o2o/fc18/zion7/TestSmokeReader.java b/nx01-x4o-o2o/src/test/java/org/x4o/o2o/fc18/zion7/TestSmokeReader.java index 897ca93..e32814a 100644 --- a/nx01-x4o-o2o/src/test/java/org/x4o/o2o/fc18/zion7/TestSmokeReader.java +++ b/nx01-x4o-o2o/src/test/java/org/x4o/o2o/fc18/zion7/TestSmokeReader.java @@ -28,7 +28,7 @@ package org.x4o.o2o.fc18.zion7; * @author Willem Cazander * @version 1.0 Jan 14, 2025 */ -public class TestSmokeReader implements FourCornerZionStenoLexerSmoke { +public class TestSmokeReader implements FourCornerZionStenoLexerSmoke.Adapter { int errorNCRZeroSparks; int errorNCRUnusedSparks; @@ -72,16 +72,4 @@ public class TestSmokeReader implements FourCornerZionStenoLexerSmoke { public void burnRecursive(int line, int col) { errorRecursive = line; } - - @Override - public void burnInvalidSalah(int line, int col) { - // TODO Auto-generated method stub - - } - - @Override - public void burnInvalidEscape(int line, int col, int cakePoint) { - // TODO Auto-generated method stub - - } }