Skip to content

Test actions #112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 2, 2025
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
10 changes: 9 additions & 1 deletion .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ jobs:
build-amd64:
name: Build and run tests on Linux amd64
runs-on: ubuntu-22.04

permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -35,6 +37,9 @@ jobs:
build-macos-M1:
name: Build and run tests on MacOS M1 (ARM64)
runs-on: macos-14
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -56,6 +61,9 @@ jobs:
build-windows:
name: Build and run tests on Windows
runs-on: windows-2019
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@v4
with:
Expand Down
10 changes: 5 additions & 5 deletions src/syntax/float.syn
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ FP_T_EXPR: floating point constant, variable or function
FP_FUNCS
"(" FP_EXPR ")"
ARRAY_FLOAT_ADDR emit TOK_FP_LOAD
emit { TOK_VAR_ADDR, VT_FLOAT } E_VAR_SEARCH "%" emit TOK_FP_LOAD
INT_FUNCTIONS emit TOK_INT_FP

FP_FUNCS:
Expand All @@ -85,7 +84,7 @@ FP_FUNCS:
"%Time" emit TOK_FP_TIME

ADR_EXPR:
emit { TOK_VAR_LOAD, VT_ARRAY_FLOAT } E_VAR_SEARCH "%"
emit { TOK_VAR_LOAD, VT_ARRAY_FLOAT } E_VAR_SEARCH "%"
emit { TOK_VAR_ADDR, VT_FLOAT } E_VAR_SEARCH "%"
emit { TOK_NUM, VT_ARRAY_FLOAT } E_LABEL "%"

Expand All @@ -109,7 +108,7 @@ COMP_OR_BOOL:
emit TOK_INT_FP COMP_FP_RIGHT COMP_EXPR_MORE

TEST_BOOL_EXPR:
emit TOK_INT_FP COMP_FP_RIGHT OR_EXPR_MORE AND_EXPR_MORE COMP_EXPR_MORE
emit TOK_INT_FP COMP_FP_RIGHT OR_EXPR_MORE AND_EXPR_MORE COMP_EXPR_MORE

EXPR:
FP_EXPR COMP_FP_RIGHT
Expand All @@ -122,10 +121,11 @@ PRINT_ONE:
FP_EXPR emit { TOK_FP_STR }

INPUT_VAR:
VAR_FP_LVALUE_SADDR emit { TOK_INPUT_STR, TOK_FP_VAL, TOK_FP_STORE }
VAR_FP_LVALUE_SADDR emit { TOK_INPUT_STR, TOK_FP_VAL, TOK_FP_STORE }

# Arrays
ARRAY_FLOAT_ADDR:
emit { TOK_VAR_ADDR, VT_FLOAT } E_VAR_SEARCH "%"
emit { TOK_VAR_LOAD, VT_ARRAY_FLOAT } E_VAR_SEARCH "%" emit TOK_PUSH PAR_EXPR emit { TOK_MUL6, TOK_ADD }
emit { TOK_NUM, VT_ARRAY_FLOAT } E_LABEL "%" emit TOK_PUSH PAR_EXPR emit { TOK_MUL6, TOK_ADD }
"%" PAR_EXPR
Expand All @@ -135,7 +135,7 @@ DIM_VAR_TYPE:<
"%" PAR_EXPR emit { TOK_PUSH_1, TOK_ADD, TOK_MUL6, VT_ARRAY_FLOAT }

DIM_VAR:
emit { VT_FLOAT } E_VAR_SEARCH "%" E_PUSH_VAR
emit { VT_FLOAT } E_VAR_SEARCH "%" E_PUSH_VAR

DATA_FLOATS: data number
"," E_NUMBER_FP DATA_FLOATS
Expand Down