This is a tentative BNF for Velocity, right now this is pretty much the WM syntax. This might change, as arithmetic might not make it into the syntax, and the future velocity syntax will more then likely remove block markers and instead use an "#end" token to signify the end of a directive. ::= | | | | | | | | | | ::= "#begin" { } "#end" ::= "#if" "(" ")" [ ] ::= "#elseif" "(" ")" [ ] ::= "#foreach" "in" ::= "#include" ::= "#set" "=" ::= "#parse" ::= "#param" "=" ::= "#stop" ::= "$" { "." | } ::= "(" [ { "," } ] ")" ::= | ::= "a..z, A..Z" ::= "a..z, A..Z ,0..9 ,- ,_" ::= { } ::= | | "=" | ::= "=" ::= { "||" } ::= { "&&" } ::= { "==" | "!=" } ::= { "<" | ">" | "<=" | ">=" } ::= { "+" | "-" } ::= { "*" | "/" | "%" } ::= "!" | ::= | | | "(" ")"