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]
Fighter
, Action
, Spec
, Cond
), 1 root (Fighter
), 0 top (—), 2 bottom (Id
5, Number
).[fighter]
, [choose]
, [action]
, [attribute]
, [behavior]
, [and]
, [const]
, [or]
.⟨name⟩
2, ⟨specs⟩
, ⟨actions⟩
, ⟨strength⟩
, ⟨cond⟩
, ⟨move⟩
, ⟨fight⟩
, ⟨lhs⟩
2, ⟨rhs⟩
2.Fighter ::= [fighter]::Id "{" ⟨specs⟩:Spec "}"⟨name⟩:
Action ::= [choose]::"choose" "(" ⟨actions⟩:Id ")"
Action ::= [action]::Id
Spec ::= [attribute]::Id "=" ⟨strength⟩:Number⟨name⟩:
Spec ::= [behavior]::Cond "[" ⟨move⟩:Action ⟨fight⟩:Action "]"⟨cond⟩:
Cond ::= [and]::Cond "and" ⟨rhs⟩:Cond⟨lhs⟩:
Cond ::= [const]::Id
Cond ::= [or]::Cond "or" ⟨rhs⟩:Cond⟨lhs⟩: