On Tue, 23 Nov 1999, Larry Wall wrote: > Philip Newton writes: > : Not quite. I want '\\' to be translated to \ in a previous pass, before > : the \c mechanism sees it. After the '\\' -> \ pass, I want left-to-right. > > It would have to be done in the same pass, by pretending that \c is a > funny kind of \. Is this then where the current problem comes from? "\c\\" gets parsed left-to-right, and if \c is a funny escape sign, then we have the "token" \c + backslash, followed by another backslash. \c + backslash is converted to ^\, and the final backslash stays chr(92). The parser (lexer?) never sees "\\" to convert to one backslash because the first backslash is already eaten by the \c "escape". Maybe some magic, then, which makes "\c\\" into one token, which gets eaten whole by the "maximal munch" strategy? Cheers, Philip -- Philip Newton <newton@newton.digitalspace.net>Thread Previous | Thread Next