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

@@ -2,7 +2,7 @@ Language "IBAFlang"
Syntax START:start ::= statement*
Semantics start[[ _:start ]] : =>null-type
Rule start[[ Stmt* ]] = initialise-binding execute-block[[ '{' Stmt* '}' ]]
Rule start[[ Stmt* ]] = initialise-binding scope(collateral(collect-declared-vars[[ Stmt* ]]), execute[[ Stmt* ]])
@@ -16,10 +16,3 @@ lexical syntax
lexical restrictions
``id`` -/- [A-Za-z0-9]
*/
Syntax SDF
/*
context-free syntax
``exp ::= exp '+' exp`` {assoc}
``exp ::= exp '&&' exp`` {assoc}
*/