Browsable FL Grammar

CC-BY

Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: toy/fl/concrete/antlr/extracted
Source used for this grammar: Ralf Lämmel, FL.g, 17 May – 16 July 2008 [GitHub]

Summary

Syntax

program ::=
	[f]::function+
function ::=
	[n]::ID [a]::ID+ "=" [e]::expr NEWLINE+
expr ::=
	[b]::binary
	[a]::apply
	[i]::ifThenElse
binary ::=
	[l]::atom ([o]::ops [r]::atom)*
apply ::=
	[i]::ID [a]::atom+
ifThenElse ::=
	"if" [c]::expr "then" [e1]::expr "else" [e2]::expr
atom ::=
	ID
	INT
	"(" [e]::expr ")"
ops ::=
	"=="
	"+"
	"-"

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