Browsable ASF Grammar

CC-BY

Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: transform/asf/sdf/extracted
Source used for this grammar: Jurgen Vinju, SDF Library, asf/syntax/*.sdf, February 2006 [Explore]

Summary

Syntax

ASF-Condition ::=
	[lhs]::Tree [unequal]::"!=" [rhs]::Tree
ASF-Condition ::=
	[lhs]::Tree [equality]::"==" [rhs]::Tree
ASF-Condition ::=
	[lhs]::Tree [match]::":=" [rhs]::Tree
ASF-Condition ::=
	[lhs]::Tree [match]::"!:=" [rhs]::Tree
ASF-Conditions ::=
	[list]::(ASF-Condition ("," ASF-Condition)*)
Tree ::=
	"amb" "(" [ambs]::(Tree ("," Tree)*)? ")"
Tree ::=
	[name]::Tree "(" [list]::CHAR* ")"
ASF-ConditionalEquation ::=
	ASF-Tag ASF-Equation
ASF-ConditionalEquation ::=
	ASF-Tag ASF-Conditions ASF-Implies ASF-Equation
ASF-ConditionalEquation ::=
	ASF-Tag ASF-Equation "when" ASF-Conditions
ASF-Equation ::=
	[lhs]::Tree "=" [rhs]::Tree
ASF-Module ::=
	[list]::ASF-Section*
ASF-Section ::=
	"equations" [list]::ASF-ConditionalEquation*
ASF-Section ::=
	"tests" [test-list]::ASF-TestEquation*
ASF-Tag ::=
	"[" "]"
ASF-Tag ::=
	"[" ASF-TagId "]"
ASF-TestEquation ::=
	ASF-Tag ASF-Condition
ASF-TestEquation ::=
	ASF-Tag ASF-Conditions ASF-Implies ASF-Condition
ASF-TestEquation ::=
	ASF-Tag ASF-Condition "when" ASF-Conditions

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