liblouis: Swap Opcodes
1
1 2.10 Swap Opcodes
1 =================
1
11 The swap opcodes are needed to tell the 'context' opcode (⇒context
context opcode.), the 'correct' opcode (⇒correct correct opcode.)
1 and multipass opcodes which dot patterns to swap for which characters.
1 There are three, 'swapcd', 'swapdd' and 'swapcc'. The first swaps dot
1 patterns for characters. The second swaps dot patterns for dot patterns
1 and the third swaps characters for characters. The first is used in the
1 'context' opcode and the second is used in the multipass opcodes. Dot
1 patterns are separated by commas and may contain more than one cell.
1
1 'swapcd name characters dots, dots, dots, ...'
1 See above paragraph for explanation. For example:
1
1 swapcd dropped 0123456789 356,2,23,...
1
1 'swapdd name dots, dots, dots ... dotpattern1, dotpattern2, dotpattern3, ...'
1 The 'swapdd' opcode defines substitutions for the multipass
1 opcodes. In the second operand the dot patterns must be single
1 cells, but in the third operand multi-cell dot patterns are
1 allowed. This is because multi-cell patterns in the second operand
1 would lead to ambiguities.
1
1 'swapcc name characters characters'
1 The 'swapcc' opcode swaps characters in its second operand for
1 characters in the corresponding places in its third operand. It is
1 intended for use with 'correct' opcodes and can solve problems such
1 as formatting phone numbers.
1