[liblouis-liblouisxml] Selection of multipass opcodes

  • From: "Michael Whapples" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "mwhapples" for DMARC)
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Thu, 29 Dec 2016 14:10:43 +0000

Hello,

In doing some work on the Nemeth table I noticed that the selecting of multipass opcodes does not quite seem to match the documentation. May be someone could explain how multipass opcode selection works or whether this is a bug.


In the Nemeth table there is a section related to correcting for number sign insertion. In particular within that section there is a rule:

pass2 @a[]$d @3456

When I pass the string:

3+4 = 7

the translation is:

3+4 \x00a0.k\x00a07

This is lacking a number sign before the 7 as got when translating the string:

3+4=7

which gives translation:

3+4\x00a0.k\x00a0#7


It turns out that the first one does not get the number sign because there is also a rule:

pass2 @a-0 @a

So I tried to create a rule to catch the case of the first translation:

pass2 @a[@0]$d @3456

This rule does not get applied when I added it to the nemeth.ctb file. I needed to create the rule:

pass2 [@a-0]$d @a-3456


Reading the documentation it says that when selecting the multipass rule it chooses the one for that pass with the longest match. So why does the rule:
pass2 @a[@0]$d @3456
not get applied? Surely this has a match length of 3 when @a-0 is a match length of 2. Is this a bug?

Michael Whapples
For a description of the software, to download it and links to
project pages go to http://liblouis.org

Other related posts:

  • » [liblouis-liblouisxml] Selection of multipass opcodes - Michael Whapples