OSDN Git Service

* cgen-asm.c (cgen_parse_keyword): Added underscore to symbol character
authorDoug Evans <dje@sebabeach.org>
Fri, 20 Dec 2002 04:54:30 +0000 (04:54 +0000)
committerDoug Evans <dje@sebabeach.org>
Fri, 20 Dec 2002 04:54:30 +0000 (04:54 +0000)
check to fix false keyword trigger with names such as <keyword>_foo.

opcodes/ChangeLog
opcodes/cgen-asm.c

index 66221d8..f950874 100644 (file)
@@ -1,3 +1,8 @@
+2002-12-19  Nick Kelsey  <nickk@ubicom.com>
+
+       * cgen-asm.c (cgen_parse_keyword): Added underscore to symbol character
+       check to fix false keyword trigger with names such as <keyword>_foo.
+
 2002-12-19  Doug Evans  <dje@sebabeach.org>
 
        * Makefile.am (CGEN_CPUS): New variable.
index 05b62bf..c71c70d 100644 (file)
@@ -225,7 +225,9 @@ cgen_parse_keyword (cd, strp, keyword_table, valuep)
   /* Allow letters, digits, and any special characters.  */
   while (((p - start) < (int) sizeof (buf))
         && *p
-        && (ISALNUM (*p) || strchr (keyword_table->nonalpha_chars, *p)))
+        && (ISALNUM (*p)
+            || *p == '_'
+            || strchr (keyword_table->nonalpha_chars, *p)))
     ++p;
 
   if (p - start >= (int) sizeof (buf))