Module Syntax

module Syntax: sig .. end
Abstract syntax of BulletML programs.


Abstract syntax of BulletML programs.
type op = 
| Add
| Sub
| Mul
| Div
| Mod
Binary operations
type expr = 
| Num of float (*Constant*)
| Op of op * expr * expr (*Binary operation*)
| Param of int (*Function parameter*)
| Rand (*Random value between 0.0 and 1.0*)
| Rank (*Difficulty factor, between 0.0 and 1.0*)
type speed = 
| SpdAbs of expr
| SpdRel of expr
| SpdSeq of expr
type direction = 
| DirAbs of expr
| DirSeq of expr
| DirAim of expr
| DirRel of expr
type 'a id = string 
type 'a ind = 
| Direct of 'a
| Indirect of 'a id * expr list
type subaction = 
| Repeat of expr * action ind
| Fire of fire ind
| ChangeSpeed of speed * expr
| ChangeDirection of direction * expr
| Accel of expr option * expr option * expr
| Wait of expr
| Vanish
| Action of action ind
type action = subaction list 
type bullet = 
| Bullet of direction option * speed option * action ind list
type fire = direction option * speed option * bullet ind 
type hv = 
| NoDir
| Horizontal
| Vertical
type elem = 
| EBullet of string * bullet
| EAction of string * action
| EFire of string * fire
type t = 
| BulletML of hv * elem list
val (+@) : expr -> expr -> expr
val (-@) : expr -> expr -> expr
val ( *@ ) : expr -> expr -> expr
val (/@) : expr -> expr -> expr
val (~@) : expr -> expr
val bulletDefault : bullet