Browsable Super Awesome Fighter Grammar

CC-BY

Grammar connected by Vadim Zaytsev, see the Grammar Zoo entry for details: toy/saf/concrete/connected
Source used for this grammar: Tijs van der Storm, lang::saf::SAF, 11 October 2012 [Explore]

Summary

Syntax

Fighter ::=
	[fighter]::(name⟩:Id "{"specs⟩:Spec* "}")
Action ::=
	[choose]::("choose" "("actions⟩:Id* ")")
	[action]::Id
Spec ::=
	[attribute]::(name⟩:Id "="strength⟩:Number)
	[behavior]::(cond⟩:Cond "["move⟩:Actionfight⟩:Action "]")
Cond ::=
	[and]::(lhs⟩:Cond "and"rhs⟩:Cond)
	[const]::Id
	[or]::(lhs⟩:Cond "or"rhs⟩:Cond)
Id ::=
	string
Number ::=
	integer

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