STATELIST = '<state-list>' STATE * '</state-list>'
MODULE = '<module>' DEFUN-NAME + '</module>'
-DEFUN-NAME = '<defun fname=">' FNAME '"/>'
+DEFUN-NAME = '<defun fname="' FNAME '"/>'
+
+COMMAND
+ = '<defcmd cname="' COMMANDNAME '">'
+ DESCRIPTION ?
+ KEYSEQ *
+ '</defcmd>'
MAP = '<map id="' MAPNAME '">' RULE * '</map>'
-RULE = '<rule>' [ KEYSEQ | COMMAND-REF ] FUNCALL * '</rule>'
+RULE = '<rule>' [ KEYSEQ | CMDREF ] FUNCALL * '</rule>'
+
+CMDREF = '<command cname="' COMMANDNAME '"/>'
STATE = '<state id="' STATENAME '">' BRANCH * '</state>'
TERM += MIM-TERM
PREDEFINED += MIM-PREDEFEIND
-MIM-TERM = KEYSEQ MARKER
+MIM-TERM = KEYSEQ | MARKER
KEYSEQ = '<keyseq>' [ INTTERM | STRTERM | SYMTERM ] + '</keyseq>'
KEYSEQTERM = KEYSEQ | VAR (value is KEYSEQ) | FUNCALL (return KEYSEQ)
MARKER = '<marker>' SYMTERM '</marker>'
MARKERTERM = MARKER | VAR (value is MARKER) | FUNCALL (return MARKER)
+SELECTOR = '<selector>' SYMTERM '</selector>'
+SELECTORTERM = SELECTOR | VAR (value is SELECTOR) | FUNCALL (return SELECTOR)
-MIM-PREDEFINED = MARK MOVE PUSHBACK ...
+MIM-PREDEFINED
+ = INSERT | CANDIDATES | DELETE | SELECT | SHOW | HIDE
+ | MARK | MOVE | PUSHBACK | POP | UNDO | COMMIT | UNHANDLE
+ | SHIFT | SHIFTBACK
+INSERT = '<insert>' [ INTTERM | STRTERM ] '</insert>'
+CANDIDATES = '<insert-candidates>' [ STRTERM | LISTTERM ] '</insert-candiates>'
+DELETE = '<delete>' [ MARKERTERM | INTTERM ] '</delete>'
+SELECT = '<select>' [ SELECTTERM | INTTERM ] '</select>'
+SHOW = '<show-candidates/>'
+HIDE = '<hide-candidates/>'
MOVE = '<move>' [ MARKERTERM | INTTERM ] '</move>'
MARK = '<mark>' MARKERTERM '</mark>'
PUSHBACK = '<pushback>' [ KEYSEQTERM | INTTERM ] '</pushback>'
-...
+POP = '<pop/>'
+UNDO = '<undo>' INTTERM ? '</undo>'
+COMMIT = '<commit/>'
+UNHANDLE = '<unhandle/>'
+SHIFT = '<shift>' SYMTERM '</shift>'
+SHIFTBACK = '<shiftback/>'