first usable version
This commit is contained in:
48
IBAF-Editor/syntax/cbs-gen/IBAF-Statements.sdf3
Normal file
48
IBAF-Editor/syntax/cbs-gen/IBAF-Statements.sdf3
Normal file
@@ -0,0 +1,48 @@
|
||||
module IBAF-Statements
|
||||
|
||||
imports
|
||||
IBAF-Expressions
|
||||
Funcons
|
||||
|
||||
// Language "IBAFlang"
|
||||
|
||||
lexical syntax // Language
|
||||
|
||||
syntax // Language
|
||||
|
||||
context-free syntax // Language
|
||||
L-stmt.L-stmt--L-type-L-id-EQUALS-L-exp-SEMI =
|
||||
L-type L-id "=" L-exp ";"
|
||||
L-stmt.L-stmt--R-print-LPAREN-L-exp-RPAREN-SEMI =
|
||||
"print" "(" L-exp ")" ";"
|
||||
L-stmt.L-stmt--L-stmt-L-stmt =
|
||||
L-stmt L-stmt
|
||||
|
||||
L-type.L-type--R-int =
|
||||
"int"
|
||||
L-type.L-type--R-bool =
|
||||
"bool"
|
||||
L-type.L-type--L-id =
|
||||
L-id
|
||||
|
||||
|
||||
context-free syntax // Semantics
|
||||
FCT.T-execute =
|
||||
"execute" "[:" L-stmt ":]"
|
||||
|
||||
context-free syntax // Desugaring
|
||||
|
||||
variables // Meta-variables
|
||||
L-stmt = "(:Stmt" [1-9]? ":)" {prefer}
|
||||
L-stmt? = "(:Stmt" [1-9]? "?:)" {prefer}
|
||||
L-stmt* = "(:Stmt" [1-9]? "*:)" {prefer}
|
||||
L-stmt+ = "(:Stmt" [1-9]? "+:)" {prefer}
|
||||
L-type = "(:Typ" [1-9]? ":)" {prefer}
|
||||
L-type? = "(:Typ" [1-9]? "?:)" {prefer}
|
||||
L-type* = "(:Typ" [1-9]? "*:)" {prefer}
|
||||
L-type+ = "(:Typ" [1-9]? "+:)" {prefer}
|
||||
|
||||
// SDF comments
|
||||
|
||||
sorts // ASTs
|
||||
T-start
|
||||
Reference in New Issue
Block a user