This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: patch for gas to accept mri single quote strings


Hi!

Ian Lance Taylor wrote:
>
>    The gas mri mode only supports double-quote strings.
> 
> Does the MRI assembler accept single-quote strings?
> 
> Ian

For the 68K mri, I must admit I don't know.

For 68HC11, the Motorola specification says in
Section 8.2.9.5 String Constants, page 14-15:
http://www.mcu.motsps.com/dev_tools/hc12/eabi/m8-16alis.pdf

------
8.2.9.5. String Constants 

A string_constant is a sequence of zero or more ASCII characters 
proceeded and followed by a single or double quote.

 string_constant ::= 'string' | "string"

 - Double quotes shall be permitted only within strings delimited
   by single quotes. 
 - Single quotes shall be permitted only within strings delimited
   by double quotes.
------

I can change the patch to control this depending on the
SINGLE_QUOTE_STRINGS define if you want. Something like 
{in stringer()}:

 	{
#ifdef SINGLE_QUOTE_STRINGS
        case '\'':
#endif
 	case '\"':


I did that for further testing. This does not pollute too much the code.
I'll have to remove the test in that case because it will no longer be
always valid.

	Stephane
 
-----------------------------------------------------------------------
         Home                               Office
E-mail: stcarrez@worldnet.fr               Stephane.Carrez@sun.com
WWW:    http://home.worldnet.fr/stcarrez   http://www.sun.com
Mail:   17, rue Foucher Lepelletier        6, avenue Gustave Eiffel
        92130 Issy Les Moulineaux          78182 Saint Quentin en Yvelines
        France

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]