Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: toy/fl/concrete/sdf/extracted
Source used for this grammar: Ralf Lämmel, Vadim Zaytsev, FL.sdf
, Syntax.sdf
, Numbers.sdf
, Optimiser.sdf
, 1–25 Aug 2008 [GitHub]
Program
, Function
, Expr
, Ops
), 0 root (—), 1 top (Program
), 3 bottom (Newline
, Int
, Name
4).[binary]
, [apply]
, [ifThenElse]
, [argument]
, [literal]
, [minus]
, [plus]
, [equal]
.Program ::=
Function
Function ::= Name Name"=" Expr Newline
Expr ::= [binary]::Expr Ops Expr
Expr ::= [apply]::Name Expr
Expr ::= [ifThenElse]::"if" Expr "then" Expr "else" Expr
Expr ::= "(" Expr ")"
Expr ::= [argument]::Name
Expr ::= [literal]::Int
Ops ::=
[minus]::"-"
Ops ::=
[plus]::"+"
Ops ::=
[equal]::"=="