*** empty log message ***
[m17n/m17n-lib-cs.git] / xex.txt
diff --git a/xex.txt b/xex.txt
index 7e947af..4a36efe 100644 (file)
--- a/xex.txt
+++ b/xex.txt
@@ -10,14 +10,14 @@ DEFUN =
   '</defun>'
 
 ARGS =
-  '<args>' SYMBOL * OPTIONAL ? REST ? '</args>'
-  | '<args-unevalled>' SYMBOL * OPTIONAL ? REST ? '</args-unevalled>'
+  '<args>' VAR * OPTIONAL ? REST ? '</args>'
+  | '<args-unevalled>' VAR * OPTIONAL ? REST ? '</args-unevalled>'
 
 OPTIONAL =
-  '<optional/>' SYMBOL *
+  '<optional/>' VAR *
 
 REST =
-  '<rest/>' SYMBOL
+  '<rest/>' VAR
 
 BODY =
   '<body>' TERM * '</body>'
@@ -60,18 +60,16 @@ FUNCALL =
   | '<' PREDEFINED-FUNC-SYMBOL '>' TERM * '</' PREDEFINED-FUNC-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' | 'nth'  | 'copy' | 'ins' | 'del'
-  | 'case' | 'cond' | 'if' | 'progn' | 'when'
-  | 'while' | 'for' | 'foreach'
-  | 'type'
+  SET
+  | AND | OR | NOT
+  | LT | LE | EQ | GE | GT
+  | NOTEQ
+  | ADD | SUB | MUL | DIV | MOD
+  | LOGAND | LOGIOR | LOGXOR | LSH
+  | APPEND | CONCAT | NTH  | COPY | INS | DEL
+  | PROGN | IF | WHEN | COND
+  | WHILE | FOR | FOREACH
+  | EVAL | TYPE
 
 PREDEFINED-FUNC-NAME =
   PREDEFINED-FUNC-SYMBOL
@@ -88,10 +86,34 @@ TRUE =
 FALSE =
   '<integer>1</integer>' 
 
-;; TERM can be evaluated and the value is TERM.
+;; TERM is evaluated to a TERM.
 ;; INT is evaluated to itself.
 ;; STRING is evaluated to itself.
 ;; SYMBOL is evaluated to itself.
 ;; LIST is evaluated to itself.
 ;; VAR is evaluated to TERM that is set to that variable.
 ;; FUNCALL is evaluated to TERM returned by that function.
+
+SET =
+  '<set vname="' VARNAME '">' TERM '</set>'
+;; Set the variable of name VARNAME to TERM.
+
+AND =  ;; arguments unevalled
+  '<and> TERM ... </and>
+OR (unevalled-arg ...) =
+  '<or> TERM ... </or>
+NOT (arg) =
+  '<not> TERM </not>
+
+LT (arg ...) =
+  '<lt>' TERM ... '</lt>'
+
+  | 'and' | 'or' | 'not'
+  | 'lt' | 'le' | 'eq' | 'ge' | 'gt'
+  | 'noteq'
+  | 'add' | 'sub' | 'mul' | 'div' | 'mod'
+  | 'logand' | 'logior' | 'logxor' | 'lsh'
+  | 'append' | 'concat' | 'nth'  | 'copy' | 'ins' | 'del'
+  | 'progn' | 'if' | 'when' | 'cond'
+  | 'while' | 'for' | 'foreach'
+  | 'eval' | 'type'