Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
29 changes: 12 additions & 17 deletions src/som/compiler/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,18 +87,13 @@ public class Parser {
private String text;
private Symbol nextSym;

private static final List<Symbol> singleOpSyms = new ArrayList<Symbol>();
private static final List<Symbol> binaryOpSyms = new ArrayList<Symbol>();
private static final List<Symbol> opSyms = new ArrayList<Symbol>();
private static final List<Symbol> keywordSelectorSyms = new ArrayList<Symbol>();

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);
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
}
Expand Down Expand Up @@ -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();
Expand Down
1 change: 0 additions & 1 deletion src/som/vmobjects/SNumber.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package som.vmobjects;

import java.math.BigDecimal;
import java.math.BigInteger;

import som.vm.Universe;

Expand Down