--- /dev/null
+EXPR =
+ '<expr>' [ DEFUN | DEFMACRO | DEFVAR | TERM ] * '</expr>'
+
+TERM = [ VAR | DIRECT | FUNCALL ]
+
+TYPE = 'integer' | 'string' | 'boolean' | 'symbol' | 'list'
+
+DEFUN =
+ '<defun fname="' FUNCNAME '">'
+ ARGS ?
+ TERM *
+ '</defun>'
+
+DEFMACRO =
+ '<defmacro mname="' MACRONAME '">'
+ ARGS ?
+ TERM *
+ '</defmacro>'
+
+ARGS =
+ '<args>' SYMBOL * '</args>' | '<args/>'
+
+DEFVAR = DEFVAR-INT DEFVAR-STR DEFVAR-BOOL
+
+DEFVAR-INT =
+ '<defvar vname="' VARNAME '">'
+ DESCRIPTION ?
+ INT ?
+ <possible-value>[ INT | '<range>' INT INT '</range>' ] *</possible-value>
+ '</defvar>'
+
+DEFVAR-STR =
+ '<defvar vname"' VARNAME '">'
+ DESCRIPTION ?
+ STR ?
+ <possible-value> STR * </possible-value>
+ '</defvar>'
+
+DEFVAR-BOOL =
+ '<defvar vname"' VARNAME '">'
+ DESCRIPTION ?
+ BOOL ?
+ <possible-value> BOOL </possible-value>
+ '</defvar>'
+
+DESCRIPTION =
+ '<description>' TEXT '</description>'
+
+VAR =
+ '<variable vname="' NAME '"/>'
+
+DIRECT = INT STR BOOL SYMBOL LIST
+
+INT =
+ '<const type="integer">' INTEGER '</const>'
+STR =
+ '<const type="string">' STRING '</const>'
+BOOL =
+ '<const type="boolean">' [ 'true' | 'false' ] </const>
+SYMBOL =
+ '<const type="symbol">' NAME '</const>'
+LIST =
+ '<const type="list">' DIRECT * '</const>' | <const type="list"/>
+
+FUNCALL =
+ '<funcall id="' [ FUNCNAME | MACRONAME ] '">' TERM * '</funcall>'
+ | '<funcall fname="' PREDEFINED-FUNC-NAME '">' TERM * '</funcall>'
+ | '<funcall mname="' PREDEFINED-MACRO-NAME '">' TERM * '</funcall>'
+ | '<' PREDEFINED-FUNC-SYMBOL '>' TERM * '</' PREDEFINED-FUNC-SYMBOL '>'
+ | '<' PREDEFINED-MACRO-SYMBOL '>' TERM * '</' PREDEFINED-MACRO-SYMBOL '>'
+
+PREDEFINED-FUNC-SYMBOL =
+ 'set'
+ | 'and' | 'or' | 'not'
+ | 'lt' | 'le' | 'eq' | 'ge' | 'gt'
+ | 'noteq'
+ | 'add' | 'sub' | 'mul' | 'div' | 'mod'
+ | 'add-set' | 'sub-set' | 'mul-set' | 'div-set' | 'mod-set'
+ | 'logand' | 'logior' | 'logxor' | 'lsh'
+ | 'logand-set' | 'logior-set' | 'logxor-set' | 'lsh-set'
+ | 'append' | 'concat' | 'substr'
+ | 'cons' | 'car' | 'cdr' | 'nth'
+
+PREDEFINED-FUNC-NAME =
+ PREDEFINED-FUNC-SYMBOL
+ | '='
+ | '&&' | '||' | '!'
+ | '<' | '<=' | '==' | '>=' | '>'
+ | '!='
+ | '+' | '-' | '*' | '/' | '%'
+ | '+=' | '-=' | '*=' | '/=' | '%='
+ | '&=' | '|=' | '~=' | '<<=' | '>>='
+
+PREDEFINED-MACRO-SYMBOL =
+ 'case' | 'cond' | 'if' | 'progn' | 'when' | 'while'
+
+PREDEFINED-MACRO-NAME = PREDEFINED-MACRO-SYMBOL