Browsable FL Grammar

CC-BY

Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: toy/fl/concrete/dcg/extracted
Source used for this grammar: Ralf Lämmel, Parser.pro, 28 July – 3 September 2008 [GitHub]

Summary

Syntax

program ::=
	function+
function ::=
	name name+ "=" expr newline+
expr ::=
	[binary]::(atom (ops atom)*)
expr ::=
	[apply]::(name atom+)
expr ::=
	[ifThenElse]::("if" expr "then" expr "else" expr)
atom ::=
	[literal]::int
atom ::=
	[argument]::name
atom ::=
	"(" expr ")"
ops ::=
	[equal]::"=="
ops ::=
	[plus]::"+"
ops ::=
	[minus]::"-"

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