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]
Fighter
, Action
, Spec
, Cond
, Id
, Number
), 1 root (Fighter
), 0 top (—), 0 bottom (—).[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]::Id
Spec ::= [attribute]::Id "=" ⟨strength⟩:Number [behavior]:: ⟨cond⟩:Cond "[" ⟨move⟩:Action ⟨fight⟩:Action "]"⟨name⟩:
Cond ::= [and]::Cond "and" ⟨rhs⟩:Cond [const]::Id [or]:: ⟨lhs⟩:Cond "or" ⟨rhs⟩:Cond⟨lhs⟩:
Id ::= string
Number ::= integer