This is the mail archive of the
cgen@sources.redhat.com
mailing list for the CGEN project.
Re: escaping in syntax strings
- To: bje at redhat dot com (Ben Elliston)
- Subject: Re: escaping in syntax strings
- From: fche at redhat dot com (Frank Ch. Eigler)
- Date: 26 Mar 2001 11:29:50 -0500
- Cc: cgen at sources dot redhat dot com
- References: <20010326081015.D13900@redhat.com><15039.17056.78350.71117.cygnus.local.cgen@scooby.apac.redhat.com>
bje wrote:
: Frank> : Is it a bug that I had to use "... \\$" in my cpu description?
: Frank> Try plain "\$".
:
: I did. It reached the relevant routine as merely `$'. It looks like
: an earlier stage of processing stripped that level of escaping. I
: definitely needed two \\'s to make it work.
Okay. This is probably a problem with using the same general escape
character ("\") in strings, as well as within syntax strings for the
"$" code. Perhaps the latter should be changed to be more like "make",
i.e., "$$" means "$".
By the way, why do you need a "$" in the syntax string? Are you
confusing register name keywords or hexadecimal constants with
the markers that actually belong into the syntax strings?
- FChE