Files
IBAFLang/IBAF-cbs/IBAF/IBAF-Start/IBAF-Start.cbs
2023-12-19 14:15:26 +01:00

25 lines
465 B
Plaintext

Language "IBAFlang"
Syntax START:start ::= statement*
Semantics start[[ _:start ]] : =>null-type
Rule start[[ Stmt* ]] = initialise-binding execute-block[[ '{' Stmt* '}' ]]
Lexis keyword ::= 'else' | 'false' | 'if' | 'true' | 'while' | 'int'
Lexis SDF
/*
lexical syntax
``id`` = ``keyword`` {reject}
lexical restrictions
``id`` -/- [A-Za-z0-9]
*/
Syntax SDF
/*
context-free syntax
``exp ::= exp '+' exp`` {assoc}
``exp ::= exp '&&' exp`` {assoc}
*/