EBNFによる文法です。基本的に、大文字で始まるシンボルがXMLの要素に対応します。

IDENTIFIER ::= <英字かアンダースコアで始まり、0個以上の英数字かアンダースコアが続いたもの>
IntegerLiteral ::= <Javaの整数リテラル>
FloatingPointLiteral ::= <Javaの浮動点リテラル>

Bulletml ::= ( "type" "=" ( IDENTIFIER | "vertical" | "horizontal" ) ";" )? ( Bullet | Action | Fire )*
Bullet ::= "bullet" IDENTIFIER? Direction? Speed? ( action | ";" )
action ::= Action | ActionRef
Action ::= "action" IDENTIFIER? ( "{" actionBodyItem* "}" | actionBodyItem | ";" )
actionBodyItem ::= ChangeDirection | Accel | Vanish | ChangeSpeed | Repeat | Wait | Fire | FireRef | Action | ActionRef
Fire ::= "fire" IDENTIFIER? Direction? Speed? ( Bullet | BulletRef )
ChangeDirection ::= "changeDirection" Direction_Omittable Term ";"
ChangeSpeed ::= "changeSpeed" Speed_Omittable Term ";"
Accel ::= "accel" Horizontal? Vertical? Term ";"
Wait ::= "wait" Expression ";"
Vanish ::= "vanish" ";"
Repeat ::= "repeat" Times action
Direction ::= "direction" ( "aim" | "absolute" | "relative" | "sequence" )? Expression
Direction_Omittable ::= "direction"? ( "aim" | "absolute" | "relative" | "sequence" )? Expression
Speed ::= "speed" ( "absolute" | "relative" | "sequence" )? Expression
Speed_Omittable ::= "speed"? ( "absolute" | "relative" | "sequence" )? Expression
Horizontal ::= "horizontal" ( "absolute" | "relative" | "sequence" )? Expression
Vertical ::= "vertical" ( "absolute" | "relative" | "sequence" )? Expression
Term ::= "term" Expression
Times ::= Expression
BulletRef ::= "bulletRef" IDENTIFIER params? ";"
ActionRef ::= "actionRef" IDENTIFIER params? ";"
FireRef ::= "fireRef" IDENTIFIER params? ";"
params ::= "(" ( Param ( "," Param )* )? ")"
Param ::= Expression
Expression ::= expression
expression ::= expression "+" term | expression "-" term | term
term ::= term "*" factor | term "/" factor | term "%" factor | factor
factor ::= "(" expression ")" | IntegerLiteral | FloatingPointLiteral | "$" IntegerLiteral | "$rand" | "$rank" | "-" factor

Java形式のコメントも使えます。