19 lines
401 B
Plaintext
19 lines
401 B
Plaintext
Language "IBAFlang"
|
|
|
|
Syntax START:start ::= statement*
|
|
Semantics start[[ _:start ]] : =>null-type
|
|
Rule start[[ Stmt* ]] = initialise-binding scope(collateral(collect-declared-vars[[ Stmt* ]]), execute[[ Stmt* ]])
|
|
|
|
|
|
|
|
|
|
|
|
Lexis keyword ::= 'else' | 'false' | 'if' | 'true' | 'while' | 'int'
|
|
Lexis SDF
|
|
/*
|
|
lexical syntax
|
|
``id`` = ``keyword`` {reject}
|
|
lexical restrictions
|
|
``id`` -/- [A-Za-z0-9]
|
|
*/
|