Compare commits

..

5 commits

13 changed files with 474 additions and 136 deletions

View file

@ -26,6 +26,7 @@ import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Consumer;
import org.x4o.fc18.cake2.FourCornerDotCake;
@ -129,10 +130,10 @@ public class FourCornerUnicodeDisplay {
this.output = Objects.requireNonNull(output);
}
private boolean printedEscape(FourCornerDotCake slice, int offset) {
private boolean printedEscape(FourCornerDotCake slice, int cakePoint) {
if (FourCornerDotCake.FC_CDC1604_P6.equals(slice)) {
if (offset < 4) {
output.appendCodePoint(FCDotPIE9DDash09.values()[offset].codePointDotIndex());
if (cakePoint < 4) {
output.appendCodePoint(FCDotPIE9DDash09.values()[cakePoint].codePointDotIndex());
return true;
}
}
@ -156,27 +157,35 @@ public class FourCornerUnicodeDisplay {
}
@Override
public void strobeWords(FourCornerDotCake slice, List<Integer> offsets) {
for (int i = 0; i < offsets.size(); i++) {
strobeWord(slice, offsets.get(i));
public void strobeWords(List<Integer> cakePoints) {
for (int i = 0; i < cakePoints.size(); i++) {
strobeWord(cakePoints.get(i));
}
}
@Override
public void strobeWord(FourCornerDotCake slice, int offset) {
if (printedEscape(slice, offset)) {
public void strobeWord(int cakePoint) {
// TODO: remove slice here;
Optional<FourCornerDotCake> sliceOpt = FourCornerDotCake.valueFromCakePoint(cakePoint);
if (sliceOpt.isEmpty()) {
return;
}
FourCornerDotCake slice = sliceOpt.get();
if (printedEscape(slice, cakePoint)) {
return;
}
FourCornerX00PetitVide[] videPoints = slice.getVidePoints();
if (slice.isExternWord()) {
String nameSpec = slice.nameSpec();
String key = nameSpec + "." + Integer.toString(offset);
String key = nameSpec + "." + Integer.toString(cakePoint);
String value = null;
if (value != null) {
output.append(value);
} else {
FourCornerX00PetitVide videPoint = videPoints[offset];
FourCornerX00PetitVide videPoint = videPoints[cakePoint - slice.getStart()];
if (videPoint.kaasX18CakeDotName().isPresent()) {
List<FourCornerX18CakePointSequence> nameX18 = videPoint.kaasX18CakeDotName().get().nameX18();
for (FourCornerX18CakePointSequence letter : nameX18) {
@ -200,7 +209,7 @@ public class FourCornerUnicodeDisplay {
//if (offset < 0 || offset > videPoints.length) {
// continue;
//}
FourCornerX00PetitVide videPoint = videPoints[offset];
FourCornerX00PetitVide videPoint = videPoints[cakePoint - slice.getStart()];
videPoint.kaasX21CodeSequence().ifPresent(v -> {
v.codePointSequence().forEach(vv -> output.appendCodePoint(vv));
});
@ -209,7 +218,7 @@ public class FourCornerUnicodeDisplay {
output.append(slice.name());
output.append("#");
output.append(offset);
output.append(cakePoint);
output.append("#");
}

View file

@ -164,6 +164,12 @@ public enum FourCornerDotCake {
// =========== Allow pie terminators for symbols without escaping
// build from ovewviews;
// - https://www.msx.org/wiki/KuTen_-_JIS_-_SJIS_Code_Conversion_Tables
// - https://en.wikipedia.org/wiki/Digital_encoding_of_APL_symbols
// - https://en.wikipedia.org/wiki/BraSCII
// - https://en.wikipedia.org/wiki/List_of_Unicode_characters
FC_PIE9C_01(256 + 0 , 1, FCDotPIE9CDash01.values()),
FC_PIE9C_02(1 + FC_PIE9C_01.getStop(), 2, FCDotPIE9CDash02.values()),
FC_PIE9C_03(1 + FC_PIE9C_02.getStop(), 3, FCDotPIE9CDash03.values()),

View file

@ -38,7 +38,7 @@ import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
public enum FCDotPIE9CDash06 implements FourCornerDotCollePie9 {
NXX_1('⍟'), // = FROM APL
NXX_2('⊗'), // = FROM APL
NXX_2('⊕'), // = FROM APL
NXX_3('⊗'), // = FROM APL
NXX_4('⊖'), // = FROM APL
NXX_5('⍉'), // = FROM APL

View file

@ -37,18 +37,18 @@ import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
*/
public enum FCDotPIE9DDash12 implements FourCornerDotCollePie9 {
NXX_01(' '),
NXX_02(' '),
NXX_03(' '),
NXX_04(' '),
NXX_05(' '),
NXX_06(' '),
NXX_07(' '),
NXX_08(' '),
NXX_09(' '),
NXX_10(' '),
NXX_11(' '),
NXX_12(' '),
NXX_01('≠'), // from APL
NXX_02('≡'), // from APL
NXX_03('≢'), // from APL
NXX_04(''),
NXX_05('≤'), // from APL
NXX_06('≥'), // from APL
NXX_07(''),
NXX_08(''),
NXX_09(''),
NXX_10(''),
NXX_11(''),
NXX_12(''),
;
private final List<Integer> codePointDisplay;

View file

@ -37,27 +37,27 @@ import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
*/
public enum FCDotPIE9DDash21 implements FourCornerDotCollePie9 {
NXX_01(' '),
NXX_02(' '),
NXX_03(' '),
NXX_04(' '),
NXX_05(' '),
NXX_06(' '),
NXX_07(' '),
NXX_08(' '),
NXX_09(' '),
NXX_10(' '),
NXX_11(' '),
NXX_12(' '),
NXX_13(' '),
NXX_14(' '),
NXX_15(' '),
NXX_16(' '),
NXX_17(' '),
NXX_18(' '),
NXX_19(' '),
NXX_20(' '),
NXX_21(' '),
NXX_01(''),
NXX_02(''),
NXX_03(''),
NXX_04(''),
NXX_05(''),
NXX_06(''),
NXX_07(''),
NXX_08(''),
NXX_09('∆'), // from APL
NXX_10('∇'), // from APL
NXX_11('⍋'), // from APL
NXX_12('⍒'), // from APL
NXX_13('∧'), // from APL
NXX_14('∨'), // from APL
NXX_15(''),
NXX_16(''),
NXX_17('⍲'), // from APL
NXX_18('⍱'), // from APL
NXX_19('⍙'), // from APL
NXX_20('⍫'), // from APL
NXX_21('⍝'), // from APL
;
private final List<Integer> codePointDisplay;

View file

@ -56,21 +56,21 @@ public enum FCDotAPL0127DashP7A implements FourCornerDotColleZero33 {
// === 8 directions T arrows
/// SL610000
UP_ARROW('↑'),
__UP_ARROW(' '),
/// SL600000
RIGHT_ARROW('→'),
__RIGHT_ARROW(' '),
/// SL620000
DOWN_ARROW('↓'),
__DOWN_ARROW(' '),
/// SL590000
LEFT_ARROW('←'),
__LEFT_ARROW(' '),
/// SL220000
UP_TACK('⊤'),
__UP_TACK(' '),
/// SL350000
RIGHT_TACK('⊣'),
__RIGHT_TACK(' '),
/// SL230000
DOWN_TACK('⊥'),
__DOWN_TACK(' '),
/// SL340000
LEFT_TACK('⊢'),
__LEFT_TACK(' '),
// === 8 mirrors
@ -87,21 +87,21 @@ public enum FCDotAPL0127DashP7A implements FourCornerDotColleZero33 {
/// SL020000
DOWN_STILE('⌊'),
/// SL030000 (used in GNU GPL)
DEL('∇'),
__DEL(' '),
/// SL060000 (used in GNU GPL)
DELTA('∆'),
__DELTA(' '),
// === 8 Oooohhhs
/// SL110000
CIRCLE_STAR('⍟'),
__CIRCLE_STAR(' '),
/// SL090000
CIRCLE_STILE('⌽'),
__CIRCLE_STILE(' '),
/// SL120000
CIRCLE_BAR('⊖'),
__CIRCLE_BAR(' '),
/// SL100000
CIRCLE_SLOPE('⍉'),
__CIRCLE_SLOPE(' '),
;

View file

@ -49,45 +49,45 @@ public enum FCDotAPL0127DashP7B implements FourCornerDotColleZero33 {
// SL790000 = Plus = FCDotCDC1604DashP6._PLUS
// SL690000 = Bar = FCDotCDC1604DashP6._MINUS
/// SL550000
TIMES('),
__TIMES(' '),
// SL760000 = Slash = FCDotCDC1604DashP6.BAR_V_RIGHT
/// SL540000
DIVIDE('),
__DIVIDE(' '),
// === ALGOL_60 <relational operator> ::= <, , =, , >,
// SL520000 = Less than = FCDotCDC1604DashP6.TAG_COMPARE_LEFT
/// SL560000
NOT_GREATER('≤'),
__NOT_GREATER(' '),
// SL810000 = Equal = FCDotCDC1604DashP6._EQUALS
/// SL570000
NOT_LESS('≥'),
__NOT_LESS(' '),
// SL530000 = Greater than = FCDotCDC1604DashP6.TAG_COMPARE_RIGHT
/// SL820000
NOT_EQUAL('≠'),
__NOT_EQUAL(' '),
/// SL050000
DEL_STILE('⍒'), // grade down
__DEL_STILE(' '), // grade down
/// SL070000
DELTA_STILE('⍋'),
__DELTA_STILE(' '),
// === ALGOL_60 <logical operator> ::= | | | | ¬
/// SL300000
EQUALS_UNDERBAR('≡'),
__EQUALS_UNDERBAR(' '),
/// SL430000
RIGHT_SHOE('⊃'),
__RIGHT_SHOE(' '),
/// SL510000
UP_CARET('∧'),
__UP_CARET(' '),
/// SL500000
DOWN_CARET('∨'),
__DOWN_CARET(' '),
/// NEW: This comes from ALGOL_60 chars.
ALGOL_NOT('¬'),
/// SL170000
UP_CARET_TILDE('⍲'), // NAND
__UP_CARET_TILDE(' '), // NAND
/// SL180000
DOWN_CARET_TILDE('⍱'),
__DOWN_CARET_TILDE(' '),
/// NEW: from Dynalog_APL
EQUALS_UNDERNOT('≢'),
__EQUALS_UNDERNOT(' '),
/// === Left over from modern APL for Zilog Z8000 see https://aplwiki.com/wiki/Dyalog_APL
@ -98,11 +98,11 @@ public enum FCDotAPL0127DashP7B implements FourCornerDotColleZero33 {
/// SL450000
DIAERESIS('¨'),
// SL870000
EPSILON_UNDERBAR('⍷'),
__EPSILON_UNDERBAR(' '),
// SL860000 = Iota Underbar
IOTA_UNDERBAR('⍸'),
__IOTA_UNDERBAR(' '),
/// SL730000
IOTA('⍳'),
__IOTA(' '),
/// SL410000
DOWN_SHOE('∪'),
/// SL400000

View file

@ -36,30 +36,30 @@ import org.x4o.fc18.cake2.zero33.dec1.FCDotINC0801DashP8;
public enum FCDotAPL0127DashP7C implements FourCornerDotColleZero33 {
/// SL720000
EPSILON('∊'),
__EPSILON(' '),
/// NEW from dynslog APL
LEFT_SHOE_UNDERBAR('⊆'),
__LEFT_SHOE_UNDERBAR(' '),
/// SL420000
LEFT_SHOE('⊂'),
__LEFT_SHOE(' '),
/// SL740000
RHO('⍴'),
__RHO(' '),
/// NEW from dynlog APL
MINUS_COMMA('⍪'),
/// --------- Left over from IBM APL
/// SL210000
UP_SHOE_NULL('⍝'),
__UP_SHOE_NULL(' '),
/// SL630000
OVERBAR('‾'),
/// SL710000
ALPHA('⍺'),
__ALPHA(' '),
/// SL750000
OMEGA('⍵'),
__OMEGA(' '),
/// SL040000
DEL_TILDE('⍫'), /// === LOCK
__DEL_TILDE(' '), /// === LOCK
/// SL130000
QUAD_QUOTE('⍞'), // GNU APL: stdin and debug out
/// SL270000
@ -69,23 +69,23 @@ public enum FCDotAPL0127DashP7C implements FourCornerDotColleZero33 {
/// SL320000
DIAERESIS_DOT('∵'), // each item
// SL330000
DELTA_UNDERBAR('⍙'), // GNU APL: user var: starts (A-Z) or one of the 3 characters _, , or
__DELTA_UNDERBAR(' '), // GNU APL: user var: starts (A-Z) or one of the 3 characters _, , or
/// SL370000
LESS_GREATER('⋄'), // each stmt
/// SL480000
CIRCLE_PLUS('⊕'), // group
__CIRCLE_PLUS(' '), // group
/// SL490000
CIRCLE_TIMES('⊗'), // index of
__CIRCLE_TIMES(' '), // index of
OPEN_19('?'),
OPEN_20('?'),
OPEN_21('?'),
OPEN_22('?'),
OPEN_23('?'),
OPEN_24('?'),
OPEN_25('?'),
OPEN_26('?'),
OPEN_27('?'),
OPEN_19(' '),
OPEN_20(' '),
OPEN_21(' '),
OPEN_22(' '),
OPEN_23(' '),
OPEN_24(' '),
OPEN_25(' '),
OPEN_26(' '),
OPEN_27(' '),

View file

@ -25,29 +25,22 @@ package org.x4o.fc18.zion7;
import java.math.BigInteger;
import java.util.List;
import org.x4o.fc18.cake2.FourCornerDotCake;
/// Handles the main lexer four corner cake strobes.
///
/// @author Willem Cazander
/// @version 1.0 Jan 09, 2025
public interface FourCornerZion7Candlelier {
// TODO: remove dot cake enum and change offsets to full cake points
// (and remove duplicate list objects like;)
// maybe remove cakeSliceStart as that is not needed for write support, (is already in fire)
//void strobeWords(List<Integer> text, int textStart, int textStop, int cakeSliceStart);
/// Single word cake point.
void strobeWord(int cakePoint);
/// Single word from slice.
void strobeWord(FourCornerDotCake slice, int offset);
/// Block of relative word slice offsets.
void strobeWords(FourCornerDotCake slice, List<Integer> offsets);
/// Block of word cake points.
void strobeWords(List<Integer> cakePoints);
/// 1152 bit fractions of two 576 bit numbers.
void strobeNCR1632(BigInteger denominator, BigInteger numerator);
/// Allows a 6 bit computer to use the nether,fractions or unicode.
/// Allows a 6 bit computer to use the full FC18 space for nether or fractions.
void strobeRecursiveCake(List<Integer> cakePoints);
/// Octal sand walker, with an 72 to 576 bit mime-type rhythm header.
@ -59,11 +52,11 @@ public interface FourCornerZion7Candlelier {
interface Adapter extends FourCornerZion7Candlelier {
@Override
default void strobeWords(FourCornerDotCake slice, List<Integer> offsets) {
default void strobeWord(int cakePoint) {
}
@Override
default void strobeWord(FourCornerDotCake slice, int offset) {
default void strobeWords(List<Integer> cakePoints) {
}
@Override

View file

@ -24,20 +24,18 @@ package org.x4o.fc18.zion7;
import java.util.List;
import org.x4o.fc18.cake2.zero33.dec1.FCDotDEC2701DashPX0;
/// Handles the lexer salah sequence strobes.
///
/// @author Willem Cazander
/// @version 1.0 Jan 11, 2025
public interface FourCornerZion7SalahSequence extends FourCornerZion7Candlelier {
void strobeSalahSequence(FCDotDEC2701DashPX0 type, List<List<Integer>> arguments);
void strobeSalahSequence(int type, List<List<Integer>> arguments);
interface Adapter extends FourCornerZion7SalahSequence, FourCornerZion7Candlelier.Adapter {
@Override
default void strobeSalahSequence(FCDotDEC2701DashPX0 type, List<List<Integer>> arguments) {
default void strobeSalahSequence(int type, List<List<Integer>> arguments) {
}
}
}

View file

@ -20,14 +20,66 @@
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.x4o.fc18.zion7;
package org.x4o.fc18.zion7;
import java.math.BigInteger;
import java.util.List;
import java.util.Objects;
import org.x4o.fc18.cake2.zero33.dec1.FCDotDEC2701DashPX0;
/// Write steno for zion.
///
/// @author Willem Cazander
/// @version 1.0 Jan 11, 2025
public class FourCornerZionStenoGrapher {
private final List<Integer> out;
public FourCornerZionStenoGrapher(List<Integer> out) {
this.out = Objects.requireNonNull(out);
}
class FourCornerWriter implements FourCornerZion7AlphaOmega,FourCornerZion7SalahSequence {
@Override
public void strobeDocumentAlpha() {
}
@Override
public void strobeDocumentOmega() {
}
@Override
public void strobeWord(int cakePoint) {
out.add(cakePoint);
}
@Override
public void strobeWords(List<Integer> cakePoints) {
out.addAll(cakePoints);
}
@Override
public void strobeNCR1632(BigInteger denominator, BigInteger numerator) {
}
@Override
public void strobeRecursiveCake(List<Integer> cakePoints) {
}
@Override
public void strobeSandWalker(List<Integer> rhythm) {
}
@Override
public void strobeSandWorm(List<Integer> spice) {
}
@Override
public void strobeSalahSequence(int type, List<List<Integer>> arguments) {
FCDotDEC2701DashPX0 cdcDECMode = FCDotDEC2701DashPX0.valueOf(type);
}
public void write() {
}
}

View file

@ -32,6 +32,8 @@ import java.util.Optional;
import java.util.PrimitiveIterator;
import org.x4o.fc18.cake2.FourCornerDotCake;
import org.x4o.fc18.cake2.flag4.FCDotF4TTY0001DashNL;
import org.x4o.fc18.cake2.flag4.FCDotF4TXT0001DashSP;
import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
import org.x4o.fc18.cake2.zero33.dec1.FCDotCMD5401Dash2D;
import org.x4o.fc18.cake2.zero33.dec1.FCDotDEC0801DashE10;
@ -303,20 +305,21 @@ public class FourCornerZionStenoLexer {
static class StenoScannerWordCakeSlice extends StenoScanner {
private final FourCornerDotCake cakeSlice;
//private final FourCornerDotCake cakeSlice;
public StenoScannerWordCakeSlice(FourCornerDotCake cakeSlice) {
super(cakeSlice);
this.cakeSlice = Objects.requireNonNull(cakeSlice);
//this.cakeSlice = Objects.requireNonNull(cakeSlice);
}
@Override
public void process(FourCornerZionStenoLexer lexer, int idxFirst, int idxLast) {
List<Integer> offsets = new ArrayList<>();
for (int i = idxFirst; i <= idxLast; i++) {
offsets.add(lexer.input.get(i) - blockStart);
}
lexer.handler.strobeWords(cakeSlice, offsets);
// List<Integer> offsets = new ArrayList<>();
// for (int i = idxFirst; i <= idxLast; i++) {
// offsets.add(lexer.input.get(i) - blockStart);
// }
// lexer.handler.strobeWords(cakeSlice, offsets);
lexer.handler.strobeWords(lexer.input.subList(idxFirst, idxLast + 1));
}
}
@ -517,11 +520,12 @@ public class FourCornerZionStenoLexer {
continue;
}
int cdcDECPoint = lexer.input.get(lexer.cdcDECScanIndex);
if (FourCornerDotCake.FC_DEC2701_PX0.contains(cdcDECPoint)) {
lexer.handler.strobeWord(FourCornerDotCake.FC_DEC2701_PX0, cdcDECPoint - FourCornerDotCake.FC_DEC2701_PX0.getStart());
} else {
lexer.handler.strobeWord(FourCornerDotCake.FC_CDC1604_P6, cdcDECPoint);
}
lexer.handler.strobeWord(cdcDECPoint);
// if (FourCornerDotCake.FC_DEC2701_PX0.contains(cdcDECPoint)) {
// lexer.handler.strobeWord(FourCornerDotCake.FC_DEC2701_PX0, cdcDECPoint - FourCornerDotCake.FC_DEC2701_PX0.getStart());
// } else {
// lexer.handler.strobeWord(FourCornerDotCake.FC_CDC1604_P6, cdcDECPoint);
// }
}
}
@ -603,7 +607,7 @@ public class FourCornerZionStenoLexer {
if (readOK == false) {
return true; // point is eaten
}
lexer.handlerSalahSequence.strobeSalahSequence(cdcDECMode, args);
lexer.handlerSalahSequence.strobeSalahSequence(cdcDECMode.ordinal(), args);
return true;
}
if (FCDotDEC2701DashPX0.ESC68_2PIE9C.equals(cdcDECMode)) {
@ -654,7 +658,8 @@ public class FourCornerZionStenoLexer {
lexer.decModeReset();
return false;
}
lexer.handler.strobeWord(displayCake, cdcPoint - FCDotCDC1604DashP6.NX01_A.ordinal());
//lexer.handler.strobeWord(displayCake, cdcPoint - FCDotCDC1604DashP6.NX01_A.ordinal());
lexer.handler.strobeWord(displayCake.getStart() + cdcPoint - FCDotCDC1604DashP6.NX01_A.ordinal());
return true;
}
@ -681,7 +686,8 @@ public class FourCornerZionStenoLexer {
// }
if (FCDotDEC0801DashE10.E10_CDC1604_P6.equals(lexer.cdcDECModeE10)) {
lexer.handler.strobeWord(FourCornerDotCake.FC_CDC1604_P6, cdcPoint); // not A based offset here
lexer.handler.strobeWord(cdcPoint); // not A based offset here
//lexer.handler.strobeWord(FourCornerDotCake.FC_CDC1604_P6, cdcPoint); // not A based offset here
return true;
}
FourCornerDotCake displayCake = lexer.cdcDECModeE10.displayCake();
@ -689,7 +695,8 @@ public class FourCornerZionStenoLexer {
lexer.decModeReset();
return false;
}
lexer.handler.strobeWord(displayCake, cdcPoint - FCDotCDC1604DashP6.NX01_A.ordinal());
//lexer.handler.strobeWord(displayCake, cdcPoint - FCDotCDC1604DashP6.NX01_A.ordinal());
lexer.handler.strobeWord(displayCake.getStart() + cdcPoint - FCDotCDC1604DashP6.NX01_A.ordinal());
return true;
}
@ -704,7 +711,8 @@ public class FourCornerZionStenoLexer {
FCDotCMD5401Dash2D cmdMode = cmdModeOpt.get();
if (FCDotCMD5401Dash2D.CMD_F4TXT0001_SP.equals(cmdMode)) {
lexer.decModeReset();
lexer.handler.strobeWord(FourCornerDotCake.FC_F4TXT0001_SP, 0); // white space
//lexer.handler.strobeWord(FourCornerDotCake.FC_F4TXT0001_SP, 0); // white space
lexer.handler.strobeWord(FCDotF4TXT0001DashSP.SPANISH_PEACE.cakePointDotIndex()); // white space
return true;
}
if (FCDotCMD5401Dash2D.CMD_F4TTY0001_NL.equals(cmdMode)) {
@ -712,7 +720,8 @@ public class FourCornerZionStenoLexer {
lexer.currLine++;
lexer.currCol = 0;
lexer.fireSignals.fireStateLine(lexer.currLine);
lexer.handler.strobeWord(FourCornerDotCake.FC_F4TTY0001_NL, 0); // new line
//lexer.handler.strobeWord(FourCornerDotCake.FC_F4TTY0001_NL, 0); // new line
lexer.handler.strobeWord(FCDotF4TTY0001DashNL.NETHER_LINE.cakePointDotIndex()); // new line
return true;
}
lexer.decModeReset();
@ -758,7 +767,8 @@ public class FourCornerZionStenoLexer {
sliceBase = FourCornerDotCake.FC_PIE9D_01.ordinal();
}
FourCornerDotCake slice = FourCornerDotCake.valueOf(terminatorOffZero + sliceBase);
lexer.handler.strobeWord(slice, numberIdxOffZero);
//lexer.handler.strobeWord(slice, numberIdxOffZero);
lexer.handler.strobeWord(slice.getStart() + numberIdxOffZero);
return true;
}

View file

@ -0,0 +1,270 @@
/*
* Copyright (c) 2004-2014, Willem Cazander
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
* that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
* following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
* the following disclaimer in the documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.x4o.fc18.cake2.zero33;
/**
* Enum to convert APL to FC18.
*
* TODO: finish write when needed..
*
* @author Willem Cazander
* @version 1.0 Jul 30, 2025
*/
public enum FCDotAPL {
/// SL080000 One is pi
CIRCLE('○'),
// === 2 + 6 boxes
/// SL360000
QUAD('⎕'),
/// SL260000
SQUISH_QUAD('⌷'),
/// SL140000
QUAD_DIVIDE('⌹'),
/// NEW from Dynlog APL
QUAD_DOT2('⍠'),
/// NEW from Dynlog APL
QUAD_BOX3('⌸'),
/// NEW from Dynlog APl
QUAD_QUAD('⌺'),
// === 8 directions T arrows
/// SL610000
UP_ARROW('↑'),
/// SL600000
RIGHT_ARROW('→'),
/// SL620000
DOWN_ARROW('↓'),
/// SL590000
LEFT_ARROW('←'),
/// SL220000
UP_TACK('⊤'),
/// SL350000
RIGHT_TACK('⊣'),
/// SL230000
DOWN_TACK('⊥'),
/// SL340000
LEFT_TACK('⊢'),
// === 8 mirrors
/// SL190000
DOWN_TACK_JOT('⍎'),
/// SL200000
UP_TACK_JOT('⍕'),
/// SL150000
SLASH_BAR('⌿'),
/// SL160000
SLOPE_BAR('⍀'),
/// SL010000
UP_STILE('⌈'),
/// SL020000
DOWN_STILE('⌊'),
/// SL030000 (used in GNU GPL)
DEL('∇'),
/// SL060000 (used in GNU GPL)
DELTA('∆'),
// === 8 Oooohhhs
/// SL110000
CIRCLE_STAR('⍟'),
/// SL090000
CIRCLE_STILE('⌽'),
/// SL120000
CIRCLE_BAR('⊖'),
/// SL100000
CIRCLE_SLOPE('⍉'),
//--------------------------------------------
/// NEW from dynlog APL
CIRCLE_DOT_XL('⍥'),
/// NEW from dynlog APL
CIRLCE_DOT('⍤'),
/// SL250000
JOT('∘'),
/// NEW from dynlog APL
STAR_DOT('⍣'),
// === ALGOL_60 <arithmetic operator> ::= + | - | × | / | ÷ |
// SL790000 = Plus = FCDotCDC1604DashP6._PLUS
// SL690000 = Bar = FCDotCDC1604DashP6._MINUS
/// SL550000
TIMES('×'),
// SL760000 = Slash = FCDotCDC1604DashP6.BAR_V_RIGHT
/// SL540000
DIVIDE('÷'),
// === ALGOL_60 <relational operator> ::= <, , =, , >,
// SL520000 = Less than = FCDotCDC1604DashP6.TAG_COMPARE_LEFT
/// SL560000
NOT_GREATER('≤'),
// SL810000 = Equal = FCDotCDC1604DashP6._EQUALS
/// SL570000
NOT_LESS('≥'),
// SL530000 = Greater than = FCDotCDC1604DashP6.TAG_COMPARE_RIGHT
/// SL820000
NOT_EQUAL('≠'),
/// SL050000
DEL_STILE('⍒'), // grade down
/// SL070000
DELTA_STILE('⍋'),
// === ALGOL_60 <logical operator> ::= | | | | ¬
/// SL300000
EQUALS_UNDERBAR('≡'),
/// SL430000
RIGHT_SHOE('⊃'),
/// SL510000
UP_CARET('∧'),
/// SL500000
DOWN_CARET('∨'),
/// NEW: This comes from ALGOL_60 chars.
ALGOL_NOT('¬'),
/// SL170000
UP_CARET_TILDE('⍲'), // NAND
/// SL180000
DOWN_CARET_TILDE('⍱'),
/// NEW: from Dynalog_APL
EQUALS_UNDERNOT('≢'),
/// === Left over from modern APL for Zilog Z8000 see https://aplwiki.com/wiki/Dyalog_APL
/// SL240000
IBEAM_TACK('⌶'),
/// NEW from DYNA
DOTTED_TILDE('⍨'),
/// SL450000
DIAERESIS('¨'),
// SL870000
EPSILON_UNDERBAR('⍷'),
// SL860000 = Iota Underbar
IOTA_UNDERBAR('⍸'),
/// SL730000
IOTA('⍳'),
/// SL410000
DOWN_SHOE('∪'),
/// SL400000
UP_SHOE('∩'),
// ------------------------------------------------
/// SL720000
EPSILON('∊'),
/// NEW from dynslog APL
LEFT_SHOE_UNDERBAR('⊆'),
/// SL420000
LEFT_SHOE('⊂'),
/// SL740000
RHO('⍴'),
/// NEW from dynlog APL
MINUS_COMMA('⍪'),
/// --------- Left over from IBM APL
/// SL210000
UP_SHOE_NULL('⍝'),
/// SL630000
OVERBAR('‾'),
/// SL710000
ALPHA('⍺'),
/// SL750000
OMEGA('⍵'),
/// SL040000
DEL_TILDE('⍫'), /// === LOCK
/// SL130000
QUAD_QUOTE('⍞'), // GNU APL: stdin and debug out
/// SL270000
QUAD_JOT('⌻'), // file meta info
/// SL280000
QUAD_SLOPE('⍂'), // was expand
/// SL320000
DIAERESIS_DOT('∵'), // each item
// SL330000
DELTA_UNDERBAR('⍙'), // GNU APL: user var: starts (A-Z) or one of the 3 characters _, , or
/// SL370000
LESS_GREATER('⋄'), // each stmt
/// SL480000
CIRCLE_PLUS('⊕'), // group
/// SL490000
CIRCLE_TIMES('⊗'), // index of
OPEN_19('?'),
OPEN_20('?'),
OPEN_21('?'),
OPEN_22('?'),
OPEN_23('?'),
OPEN_24('?'),
OPEN_25('?'),
OPEN_26('?'),
OPEN_27('?'),
// SL290000 = Unsupported = Ampersand Underbar
// SL310000 = Unsupported = OUT Symbol = Not used by IBM ?
// SL380000 = Stile = FCDotCDC1604DashP6.BAR_VERTICAL
// SL390000 = undefined
// SL440000 = Underbar = FCDotCDC1604DashP6.BAR_UNDER
// SL460000 = Tilde = FCDotCDC1604DashP6._TILDE
// SL470000 = undefined
// SL580000 = Quote Dot = FCDotCDC1604DashP6._EXCLAMATION
// SL640000 = Slope = FCDotCDC1604DashP6.BAR_V_LEFT
// SL650000 = Star = FCDotCDC1604DashP6._ASTRIKS
// SL660000 = Quota = FCDotCDC1604DashP6._APOSTROPHE
// SL670000 = Left Parenthesis = FCDotCDC1604DashP6.TAG_ROUND_LEFT
// SL680000 = Right Parenthesis = FCDotCDC1604DashP6.TAG_ROUND_RIGHT
// SL700000 = Query = FCDotCDC1604DashP6._QUESTION
// SL770000 = Left Bracket = FCDotCDC1604DashP6.TAG_SQUARE_LEFT
// SL780000 = Right Bracket = FCDotCDC1604DashP6.TAG_SQUARE_RIGHT
// SL800000 = Semicolon = FCDotCDC1604DashP6._SEMICOLON
// SL830000 = Colon = FCDotCDC1604DashP6._COLON
// SL840000 = Dot = FCDotCDC1604DashP6._DOT
// SL850000 = Comma = FCDotCDC1604DashP6._COMMA
;
private final int codePoint;
private FCDotAPL(int codePoint) {
this.codePoint = codePoint;
}
public int codePoint() {
return codePoint;
}
}