Collect all declared variables at start of program execution

This commit is contained in:
Peter
2024-04-16 08:12:52 +02:00
parent cb7f6f8e5d
commit f5f5626521
21 changed files with 299 additions and 284 deletions

View File

@@ -18,7 +18,7 @@ rules
to-funcons:
|[ eval-exp[: (:Id:) :] ]| ->
|[ assigned (bound (id[: (:Id:) :])) ]|
|[ assigned bound id[: (:Id:) :] ]|
to-funcons:
|[ eval-exp[: (:Int:) :] ]| ->
|[ int-val[: (:Int:) :] ]|
@@ -83,6 +83,10 @@ to-funcons:
to-funcons:
|[ eval-exp[: ((:Exp:)) :] ]| ->
|[ eval-exp[: (:Exp:) :] ]|
// ## Handling expressions for function calls
to-funcons:
|[ eval-params[: :] ]| ->
|[ list () ]|
@@ -93,12 +97,20 @@ to-funcons:
|[ eval-params[: (:Exp:),(:ParamValues:) :] ]| ->
|[ cons (eval-exp[: (:Exp:) :],
eval-params[: (:ParamValues:) :]) ]|
// ## Ids
to-funcons-lex:
FCTDoubleQuoted(L-id(LEX-id(str))) ->
FCTString(<double-quote> str)
to-funcons:
|[ id[: (:Id:) :] ]| ->
|[ \"(:Id:)\" ]|
// ## Integers and decimals
to-funcons:
|[ int-val[: 0 :] ]| ->
|[ 0 ]|