+#include <string.h>
+
/* common */
#include "xmalloc.h"
/* Check for end of input */
if (Tok == TOK_EOF) {
- Error (ERR_UNEXPECTED_EOF);
+ Error ("Unexpected end of file");
FreeTokList (List);
return 0;
}
/* Called each time a token from a repeat token list is set. Is used to check
* for and replace identifiers that are the repeat counter.
*/
-{
+{
if (Tok == TOK_IDENT && L->Data != 0 && strcmp (SVal, L->Data) == 0) {
/* Must replace by the repeat counter */
Tok = TOK_INTCON;
/* Repeat count follows */
long RepCount = ConstExpression ();
if (RepCount < 0) {
- Error (ERR_RANGE);
+ Error ("Range error");
RepCount = 0;
}
/* Check for an identifier */
if (Tok != TOK_IDENT) {
- ErrorSkip (ERR_IDENT_EXPECTED);
+ ErrorSkip ("Identifier expected");
} else {
/* Remember the name and skip it */
Name = xstrdup (SVal);