Browsable FL Grammar

CC-BY

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]

Summary

Syntax

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]::"=="

GrammarLabMaintained by Dr. Vadim Zaytsev a.k.a. @grammarware. Last updated in September 2015. []