diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 926fc83..14262ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-24.04 # ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: submodules: true @@ -37,8 +37,8 @@ jobs: - name: Download Eclipse run: | export ECLIPSE_TAR=eclipse.tar.gz - export ECLIPSE_URL=https://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops4/R-4.22-202111241800/eclipse-SDK-4.22-linux-gtk-x86_64.tar.gz - wget ${ECLIPSE_URL} -O ${ECLIPSE_TAR} + export ECLIPSE_URL='https://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops4/R-4.38-202512010920/eclipse-SDK-4.38-linux-gtk-x86_64.tar.gz&r=1' + wget --progress=dot:giga ${ECLIPSE_URL} -O ${ECLIPSE_TAR} tar -C ${GITHUB_WORKSPACE}/.. -xzf ${ECLIPSE_TAR} - name: Check Eclipse Format @@ -47,7 +47,7 @@ jobs: ant eclipseformat - name: Checkout AWFY - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: repository: smarr/are-we-fast-yet path: are-we-fast-yet diff --git a/src/som/compiler/Parser.java b/src/som/compiler/Parser.java index 296ad00..8b4f106 100644 --- a/src/som/compiler/Parser.java +++ b/src/som/compiler/Parser.java @@ -87,18 +87,13 @@ public class Parser { private String text; private Symbol nextSym; - private static final List singleOpSyms = new ArrayList(); - private static final List binaryOpSyms = new ArrayList(); + private static final List opSyms = new ArrayList(); private static final List keywordSelectorSyms = new ArrayList(); static { - for (Symbol s : new Symbol[] {Not, And, Or, Star, Div, Mod, Plus, Equal, - More, Less, Comma, At, Per, Minus, NONE}) { - singleOpSyms.add(s); - } - for (Symbol s : new Symbol[] {Or, Comma, Minus, Equal, Not, And, Or, Star, - Div, Mod, Plus, Equal, More, Less, Comma, At, Per, NONE}) { - binaryOpSyms.add(s); + for (Symbol s : new Symbol[] {Or, Comma, Minus, Equal, Not, And, Star, + Div, Mod, Plus, More, Less, At, Per, NONE}) { + opSyms.add(s); } for (Symbol s : new Symbol[] {Keyword, KeywordSequence}) { keywordSelectorSyms.add(s); @@ -225,7 +220,7 @@ private void classBody() throws ProgramDefinitionError { private boolean symIsMethod() { return sym == Identifier || sym == Keyword || sym == OperatorSequence - || symIn(binaryOpSyms); + || symIn(opSyms); } private void superclass() throws ProgramDefinitionError { @@ -392,7 +387,7 @@ private SSymbol binarySelector() { String s = text; // Checkstyle: stop @formatter:off - if (acceptOneOf(singleOpSyms)) { + if (acceptOneOf(opSyms)) { } else if (accept(OperatorSequence)) { } else { expect(NONE); } // Checkstyle: resume @formatter:on @@ -579,19 +574,19 @@ private void messages(final MethodGenerationContext mgenc, boolean superSend) superSend = false; } while (sym == Identifier); - while (sym == OperatorSequence || symIn(binaryOpSyms)) { + while (sym == OperatorSequence || symIn(opSyms)) { binaryMessage(mgenc, false); } if (sym == Keyword) { keywordMessage(mgenc, false); } - } else if (sym == OperatorSequence || symIn(binaryOpSyms)) { + } else if (sym == OperatorSequence || symIn(opSyms)) { do { // only the first message in a sequence can be a super send binaryMessage(mgenc, superSend); superSend = false; - } while (sym == OperatorSequence || symIn(binaryOpSyms)); + } while (sym == OperatorSequence || symIn(opSyms)); if (sym == Keyword) { keywordMessage(mgenc, false); @@ -662,11 +657,11 @@ private void formula(final MethodGenerationContext mgenc) throws ProgramDefiniti boolean superSend = binaryOperand(mgenc); // only the first message in a sequence can be a super send - if (sym == OperatorSequence || symIn(binaryOpSyms)) { + if (sym == OperatorSequence || symIn(opSyms)) { binaryMessage(mgenc, superSend); } - while (sym == OperatorSequence || symIn(binaryOpSyms)) { + while (sym == OperatorSequence || symIn(opSyms)) { binaryMessage(mgenc, false); } } @@ -824,7 +819,7 @@ private void literalArray(final MethodGenerationContext mgenc) throws ParseError } private SSymbol selector() { - if (sym == OperatorSequence || symIn(singleOpSyms)) { + if (sym == OperatorSequence || symIn(opSyms)) { return binarySelector(); } else if (sym == Keyword || sym == KeywordSequence) { return keywordSelector(); diff --git a/src/som/vmobjects/SNumber.java b/src/som/vmobjects/SNumber.java index 5be3ff8..ee8084e 100644 --- a/src/som/vmobjects/SNumber.java +++ b/src/som/vmobjects/SNumber.java @@ -1,7 +1,6 @@ package som.vmobjects; import java.math.BigDecimal; -import java.math.BigInteger; import som.vm.Universe;