[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
a2ps perl.ssh handles s{}{} poorly
From: |
JOHN MACDONALD, BLOOMBERG/ 731 LEXIN |
Subject: |
a2ps perl.ssh handles s{}{} poorly |
Date: |
Mon, 6 Nov 2006 15:49:38 -0500 |
The perl.ssh sheet (version 4.13) looks wrong in the way it defines the
"balanced bracketing" forms of the susbstitute/translate command. When the
code looks like: s{regexp}{replacement}
it displays as: s{s}{replacement
The last line for each of the balanced delimiter forms of substitute in perl.ssh
looks like:
"s" Keyword_strong, "{" Plain, \1 Plain, "}" Plain),
but the "s" should be \1 (to insert either s or tr, depending upon which of the
synonyms was actually used, and the rest should not be using \1 as the body but
I have to confess that I don't see how the existing info in the .ssh file
actually produces the right value for the replacement part, so I can't give an
exact fix. The .ssh file obviously does not try to ahndle the full range of
possibilities (when the regexp portion of a substitue has balanced delimiters,
the replacement can have different balanced [or even repeated] delimiters, so
that all of the following mean the same:
s{a}{b}
s{a}[b]
s{a}(b}
s{a}/b/
s{a}'b'
s{a}"b"
(The last two differ as to whether variables are interpolated within the
replacement text.)