Skip to content

5.1 lou_debug

The lou_debug tool is intended for debugging liblouis translation tables. The command line for lou_debug is:

lou_debug [OPTIONS] TABLE[,TABLE,...]

The command line options that are accepted by lou_debug are described in common options.

The table (or comma-separated list of tables) is compiled. If no errors are found a brief command summary is printed, then the prompt ‘Command:’. You can then input one of the command letters and get output, as described below.

Most of the commands print information in the various arrays of TranslationTableHeader. Since these arrays are pointers to chains of hashed items, the commands first print the hash number, then the first item, then the next item chained to it, and so on. After each item there is a prompt indicated by ‘=>’. You can then press enter (RET) to see the next item in the chain or the first item in the next chain. Or you can press h (for next-(h)ash) to skip to the next hash chain. You can also press e to exit the command and go back to the ‘command:’ prompt.

h

Brings up a screen of somewhat more extensive help.

f

Display the first forward-translation rule in the first non-empty hash bucket. The number of the bucket is displayed at the beginning of the chain. Each rule is identified by the word ‘Rule:’. The fields are displayed by phrases consisting of the name of the field, an equal sign, and its value. The before and after fields are displayed only if they are nonzero. Special opcodes such as the correct opcode (see correct) and the multipass opcodes are shown with the code that instructs the virtual machine that interprets them. If you want to see only the rules for a particular character string you can type p at the ‘command:’ prompt. This will take you to the ‘particular:’ prompt, where you can press f and then type in the string. The whole hash chain containing the string will be displayed.

b

Display back-translation rules. This display is very similar to that of forward translation rules except that the dot pattern is displayed before the character string.

c

Display character definitions, again within their hash chains.

d

Displays single-cell dot definitions. If a character-definition opcode gives a multi-cell dot pattern, it is displayed among the back-translation rules.

C

Display the character-to-dots map. This is set up by the character-definition opcodes and can also be influenced by the display opcode (see display).

D

Display the dot to character map, which shows which single-cell dot patterns map to which characters.

z

Show the multi-cell dot patterns which have been assigned to the characters from 0 to 255 to comply with computer braille codes such as a 6-dot code. Note that the character-definition opcodes should use 8-dot computer braille.

p

Bring up a secondary (‘particular:’) prompt from which you can examine particular character strings, dot patterns, etc. The commands (given in its own command summary) are very similar to those of the main ‘command:’ prompt, but you can type a character string or dot pattern. They include h, f, b, c, d, C, D, z and x (to exit this prompt), but not p, i and m.

i

Show braille indicators. This shows the dot patterns for various opcodes such as the capsletter opcode (see capsletter) and the numsign opcode (see numsign). It also shows emphasis dot patterns, such as those for the begemphword opcode (see begemphword), the begemphphrase opcode (see begemphphrase), etc. If a given opcode has not been used nothing is printed for it.

m

Display various miscellaneous information about the table, such as the number of passes, whether certain opcodes have been used, and whether there is a hyphenation table.

q

Exit the program.