diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-02-25 10:40:52 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-02-25 10:40:52 -0800 |
commit | 56f0df1ea9282f1c050e23c78fed47f321ff8d06 (patch) | |
tree | 21f6252b754a0e1f8200a870c0568c810e612355 /txr.1 | |
parent | 504f3074c6c09fb41573f53181fa9bda46168469 (diff) | |
download | txr-56f0df1ea9282f1c050e23c78fed47f321ff8d06.tar.gz txr-56f0df1ea9282f1c050e23c78fed47f321ff8d06.tar.bz2 txr-56f0df1ea9282f1c050e23c78fed47f321ff8d06.zip |
doc: horizontal-vertical issues in block and accept.
* txr.1: Document what happens when a vertical block catches a
horizontal accept, a horizontal block catches a vertical
accept, or a horizontal block catches a horizontal accept
from a different line.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 44 |
1 files changed, 44 insertions, 0 deletions
@@ -7060,6 +7060,50 @@ transfer is converted to a .codn fail , with exactly the same block as its destination. +.coNP Vertical-Horizontal Mismatch Between @ block and @ accept +The +.codn block , +.code accept +and +.code fail +directives comes in horizontal and vertical forms. + +This creates the possibility than an +.code accept +in horizontal context targets a vertical +.code block +or vice-versa, raising the question of how the input position +is treated. The semantics of this is defined. + +If a horizontal-context +.code accept +targets a vertical block, the current position at the target block will be the +following line. That is to say, when the horizontal +.code accept +occurs, there is a current input line which may have unconsumed +material past the current position. If the +.code accept +communicates its input position to a vertical context, that unconsumed +material is skipped, as if it had been matched and the vertical position +is advanced to the next line. + +If a horizontal block catches a vertical accept, it rejects that +.codn accept 's +position and stays at the current backtracking position for that block. +Only the bindings from the +.code accept +are retained. + +.coNP Horizontal-Horizontal Mismatch between @ block and @ accept +It is possible for a horizontal +.code accept +to terminate in a horizontal block which is processing +a different line of input (or even a different input stream). +This situation is treated the same way as vertical accept terminating +in a horizontal block: the position communicated by +.code accept +is ignored, and only the bindings are taken. + .SS* Functions .NP* Overview |