Browsable Super Awesome Fighter Grammar

CC-BY

Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: toy/saf/concrete/extracted
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 ::=
	[action]::Id
Spec ::=
	[attribute]::(⟨name⟩:Id "=" ⟨strength⟩:Number)
Spec ::=
	[behavior]::(⟨cond⟩:Cond "[" ⟨move⟩:Action ⟨fight⟩:Action "]")
Cond ::=
	[and]::(⟨lhs⟩:Cond "and" ⟨rhs⟩:Cond)
Cond ::=
	[const]::Id
Cond ::=
	[or]::(⟨lhs⟩:Cond "or" ⟨rhs⟩:Cond)

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