wf49670 / ppgen

Post-processing generator for DP
6 stars 4 forks source link

ppgen failure processing the command .ma x '"' #33

Closed wf49670 closed 10 years ago

wf49670 commented 10 years ago

Problem described here: http://www.pgdp.net/phpBB2/viewtopic.php?p=996220#996220

My analysis so far described here: http://www.pgdp.net/phpBB2/viewtopic.php?p=996236#996236

The 2nd argument of the .ma is single-quote double-quote single-quote.

Something is happening in the shlex routine, but only under some odd circumstances described at the 2nd link above. I'm giving up on figuring this one out, but figured I should log it here so it doesn't get lost, and maybe Roger or someone else can figure it out someday and fix it. I suspect it's related to shlex using '"' as a form of escaped quote mark, but what confounds me is that it's only with parsing .ma (not with .pm), and only when you generate both UTF-8 text and Latin-1 text. It then fails in the Latin-1 phase.

Walt

ghost commented 10 years ago

wrote a custom parser for .ma and tested with

.ma ↑ [^] 
.ma ∝ 'is proportional to' 
.ma √ [sqrt] 
.ma „ '"'

First and/or second argument to .ma can be in single quotes, double quotes, or unquoted.