* error msg tweak
authorFrank Ch. Eigler <fche@redhat.com>
Thu, 28 Dec 2000 19:53:54 +0000 (19:53 +0000)
committerFrank Ch. Eigler <fche@redhat.com>
Thu, 28 Dec 2000 19:53:54 +0000 (19:53 +0000)
2000-12-28  Frank Ch. Eigler  <fche@redhat.com>

* cgen-asm.in (parse_insn_normal): Print better error message for
instructions with missing operands.

opcodes/ChangeLog
opcodes/cgen-asm.in

index cd9239c28ca510664ee3cc4602e4331bbfd0c7a7..4eda874c6f83bc0a689014051c548a026c3547f7 100644 (file)
@@ -1,3 +1,8 @@
+2000-12-28  Frank Ch. Eigler  <fche@redhat.com>
+
+       * cgen-asm.in (parse_insn_normal): Print better error message for
+       instructions with missing operands.
+
 2000-12-21  Santeri Paavolainen <santtu@ssh.com>
 
        * cgen-opc.c: Include alloca.h if HAVE_ALLOCA_H is defined.
index ad6d1722fab769373483ba0d9a35a720a4478816..9915f065b7a64c02681ba254d915e9b06d8bcbd3 100644 (file)
@@ -127,7 +127,7 @@ parse_insn_normal (cd, insn, strp, fields)
              ++ syn;
              ++ str;
            }
-         else
+         else if (*str)
            {
              /* Syntax char didn't match.  Can't be this insn.  */
              static char msg [80];
@@ -136,6 +136,15 @@ parse_insn_normal (cd, insn, strp, fields)
                       *syn, *str);
              return msg;
            }
+         else
+           {
+             /* Ran out of input.  */
+             static char msg [80];
+             /* xgettext:c-format */
+             sprintf (msg, _("syntax error (expected char `%c', found end of instruction)"),
+                      *syn);
+             return msg;
+           }
          continue;
        }
 
This page took 0.042748 seconds and 4 git commands to generate.