* cgen-asm.c (cgen_parse_keyword): Allow any first character.
* cgen-opc.c (cgen_keyword_add): Ignore special first character when building nonalpha_chars field.
This commit is contained in:
parent
461b96748f
commit
5e91c3b431
3 changed files with 13 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2001-06-28 Geoffrey Keating <geoffk@redhat.com>
|
||||
|
||||
* cgen-asm.c (cgen_parse_keyword): Allow any first character.
|
||||
* cgen-opc.c (cgen_keyword_add): Ignore special first
|
||||
character when building nonalpha_chars field.
|
||||
|
||||
2001-06-24 Ben Elliston <bje@redhat.com>
|
||||
|
||||
* m88k-dis.c: Format to conform to GNU coding standards.
|
||||
|
|
|
@ -212,6 +212,12 @@ cgen_parse_keyword (cd, strp, keyword_table, valuep)
|
|||
|
||||
p = start = *strp;
|
||||
|
||||
/* Allow any first character. This is to make life easier for
|
||||
the fairly common case of suffixes, eg. 'ld.b.w', where the first
|
||||
character of the suffix ('.') is special. */
|
||||
if (*p)
|
||||
++p;
|
||||
|
||||
/* Allow letters, digits, and any special characters. */
|
||||
while (((p - start) < (int) sizeof (buf))
|
||||
&& *p
|
||||
|
|
|
@ -134,7 +134,7 @@ cgen_keyword_add (kt, ke)
|
|||
if (ke->name[0] == 0)
|
||||
kt->null_entry = ke;
|
||||
|
||||
for (i = 0; i < strlen (ke->name); i++)
|
||||
for (i = 1; i < strlen (ke->name); i++)
|
||||
if (! isalnum ((unsigned char) ke->name[i])
|
||||
&& ! strchr (kt->nonalpha_chars, ke->name[i]))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue