[Swift-devel] [Bug 158] New: Tidy up backslash escape processing
bugzilla-daemon at mcs.anl.gov
bugzilla-daemon at mcs.anl.gov
Sat Nov 15 19:55:21 CST 2008
http://bugzilla.mcs.anl.gov/swift/show_bug.cgi?id=158
Summary: Tidy up backslash escape processing
Product: Swift
Version: unspecified
Platform: Macintosh
OS/Version: Mac OS
Status: NEW
Severity: normal
Priority: P2
Component: SwiftScript language
AssignedTo: benc at hawaga.org.uk
ReportedBy: wilde at mcs.anl.gov
CC: benc at hawaga.org.uk
On Sat, 15 Nov 2008, Michael Wilde wrote:
> > It seems from experimentation that backslash quoting changed at some point (or
> > the user guide and tutorial are wrong): the \1 needed in the transform arg of
> > the regexp_mapper needs to be \\1 - at least it seems this way from
> > experimentation with trace().
Yes, that changed between v0.4 and v0.5.
This is an intended behaviour, to facilitate putting in \" characters.
> > Its also odd trace() takes \t and \n but echoes them just like that, with the
> > backslashes printing.
I don't think has had any strong intention about that should behave.
On looking at the parser, \ followed by one of n r t b f " \ will be
passed through, with apparently only the quotes having some special
behaviour and the others passing through unmodified. Other \ sequences,
such as \g, will cause a parser error.
This could be tidied up sometime. File a bug for it.
--
Configure bugmail: http://bugzilla.mcs.anl.gov/swift/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.
More information about the Swift-devel
mailing list