[liblouis-liblouisxml] Re: Multipass opcodes, strings and backslashes

  • From: "John J. Boyer" <john.boyer@xxxxxxxxxxxxxxxxx>
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Mon, 4 Jun 2012 14:03:50 -0500

Thanks again for finding bugs. However, it is not a good idea to require 
nonnstandard notation. Two backslashes in the table entry should match a 
single one in the input. The problem is in passGetStrring, and it does 
call for a rewrite of this function. Do you want to try that?

Thanks,
John

On Mon, Jun 04, 2012 at 04:11:01PM +0200, Micha� Ba�amut wrote:
> Hi,
> I have attached a patch for another bug.
> When matching a string in multipass opcodes, it was impossible to use a 
> single backslash as the last matched character.
> "\" and "\\" produced an error "unterminated string", and "\\\" matched only 
> two consecutive backslashes.
> My solution is not very good, as now in order to match a single backslash at 
> the end of string you need to type "\\\". It could also break existing 
> tables, if someone previously used "\\\" to match 2 backslashes, but I 
> searched all tables and such string was never used.
> Better fix would require some redesigning of the way strings are processed.
> 
> regards,
> MB


-- 
John J. Boyer; President, Chief Software Developer
Abilitiessoft, Inc.
http://www.abilitiessoft.com
Madison, Wisconsin USA
Developing software for people with disabilities

For a description of the software, to download it and links to
project pages go to http://www.abilitiessoft.com

Other related posts: