From e423f7f8b93179733ed81ee4cf6f8f2930e31d42 Mon Sep 17 00:00:00 2001 From: Paolo Marinelli Date: Wed, 26 Mar 2003 18:38:52 +0000 Subject: [PATCH] Added some other rules in the "Left Drop" section. --- helm/DEVEL/mathml_editor/doc/spec.tex | 37 ++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/helm/DEVEL/mathml_editor/doc/spec.tex b/helm/DEVEL/mathml_editor/doc/spec.tex index 93ca81a76..1c20a1564 100644 --- a/helm/DEVEL/mathml_editor/doc/spec.tex +++ b/helm/DEVEL/mathml_editor/doc/spec.tex @@ -411,14 +411,49 @@ cursor with \ONODE{}, append $\tadvance$ after the \ONODE{} node % in the rules below, a token is either an i node, an n node, an o node, an s node or an empty c node. % an empty c node is either an undefined macro or an empty macro. These c node are handled as they actually were % tokens (i, n, o, s). + % An important observation is: a sequence of groups with id, in which every group has one and only one child and where + % the last group contains the cursor, is equivalent to the cursor (Is it clear?). For example: + % ...... is equivalent to: + % % there is an optional sequence of groups with id, all of which having one and only one child. The last % child of this sequence (or the root, if the sequence is empty) is a group with id, has as first element a % token and has as second and last element an eventually empty sequence of groups with id, all of which having %one and only one child. The last element of this sequence has the cursor as its child. - \item{\verb+(g[@id][^*$]/++\verb+)?g[@id][^(i|n|o|s|c[ ])#$]/(g[@id][^*$]/++\verb+)?cursor+}\\ + \item{\verb+(g[@id][^#$]/++\verb+)?g[@id][^(i|n|o|s|c[ ])#$]/(g[@id][^#$]/++\verb+)?cursor+}\\ replace the whole fragment with the cursor. + % the cursor is a macro's child. There is an eventually empty sequence of delimiters, which precedes the + % cursor. Before this sequence, there is a p node. This p node has as its last child a token + \item{\verb+c[p[(i|n|o|s|c[ ])$]((i|n|o|s|c[ ])*)#]/cursor+}\\ + remove the cursor and replace the token with the cursor. + + % there is a token, which precedes the cursor. The cursor is child of either a group or a parameter. + % the case where the cursor is child of a group with id, there are no nodes after the cusror and there + % are no nodes preceding the token, is handled by the first rule. + % This rule is duplicated below, but that one could have a wrong syntax. This one has been tested. + \item{\verb+[(i|n|o|c[ ])#]/cursor+}\\ + remove the cursor and replace the token with the cursor. + + % cursor's parent is a script (the cursor is not the base). The script's base is an empty group with id. + % The script is preceded by a token.The script's parent is group or a parameter. + % The case where the script's parent is a group with id and the token is the first child, while + % the script is the last one, is handled some rules later. + \item{\verb+[(i|n|o|s|c[ ])#]/[^(g[@id][ ])#$]/cursor+}\\ + remove the script and replace the token with the cursor. + + % As above, but: we don't care who precedes the script (we do not have to remove it); the script's base + % is still an empty group, but it has no id. + % Ad above, we have to precise that the situation where the script is the only child of a group with id + % is handled some rules later. + \item{\verb+/[^(g[!@id][ ])#$]/curosr+}\\ + replace the script with the cursor. + + % The cursor is the last child of a script. The script's base is token. + \item{\verb+/[^(i|n|o|s|c[ ])#$]/cursor+}\\ + repalce the script with the cursor. + + %******************************************************************************************************* %************** rules handling the case in which the cursor has a preceding node *********************** %******************************************************************************************************* -- 2.39.2