* readelf.c (dump_relocations): Print "bad symbol index" if
[deliverable/binutils-gdb.git] / opcodes / cgen-asm.c
index a8d6ff8471b692a596bb10fd041d6d2fab83b2b9..315b802f71d87cc0ce98d25fd31083a700a1781d 100644 (file)
@@ -207,17 +207,16 @@ cgen_parse_keyword (cd, strp, keyword_table, valuep)
   char buf[256];
   const char *p,*start;
 
-  p = start = *strp;
+  if (keyword_table->name_hash_table == NULL)
+    (void) cgen_keyword_search_init (keyword_table, NULL);
 
-  /* Allow any first character.
-     Note that this allows recognizing ",a" for the annul flag in sparc
-     even though "," is subsequently not a valid keyword char.  */
-  if (*p)
-    ++p;
+  p = start = *strp;
 
-  /* Now allow letters, digits, and _.  */
+  /* Allow letters, digits, and any special characters.  */
   while (((p - start) < (int) sizeof (buf))
-        && (isalnum ((unsigned char) *p) || *p == '_'))
+        && *p
+        && (isalnum ((unsigned char) *p) 
+            || strchr (keyword_table->nonalpha_chars, *p)))
     ++p;
 
   if (p - start >= (int) sizeof (buf))
This page took 0.028305 seconds and 4 git commands to generate.