Browsable FL Grammar

CC-BY

Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: toy/fl/concrete/python/extracted
Source used for this grammar: Ruwen Hahn, parser.py, 13 Jul 2008 [GitHub]

Summary

Syntax

_Literal ::=
	Literal
_IF ::=
	"if"
_THEN ::=
	"then"
_ELSE ::=
	"else"
name ::=
	string
literal ::=
	"-"? integer
atom ::=
	name
	literal
	"(" expr ")"
ifThenElse ::=
	_IF expr _THEN expr _ELSE expr
operators ::=
	"=="
	"+"
	"-"
binary ::=
	atom (operators atom)*
apply ::=
	name atom+
expr ::=
	binary
	apply
	ifThenElse
function ::=
	name name+ "=" expr
program ::=
	function+ StringEnd

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