PRIVATE char ifstack[IFDEPTH]; /* if-stack: the content of an entry is */
/* 1 if a corresponding ELSE has been */
/* encountered. */
-PRIVATE int nestlevel = -1; /* initially no nesting level. */
+int nestlevel = -1; /* initially no nesting level. */
PRIVATE struct idf *
GetIdentifier()
AtEoIT()
{
#ifndef NOPP
- if (NoUnstack) lexerror("unexpected EOF");
+ if (NoUnstack) lexwarning("unexpected EOF");
DoUnstack();
#endif NOPP
return 0;
AtEoIF()
{
- if (NoUnstack) lexerror("unexpected EOF");
+#ifndef NOPP
+ extern int nestlevel;
+
+ if (nestlevel != -1) lexwarning("missing #endif");
+ else
+#endif NOPP
+ if (NoUnstack) lexwarning("unexpected EOF");
return 0;
}
*/
lexwarning("argument mismatch, %s", idef->id_text);
- while (++nr_of_params < acnt) {
+ while (nr_of_params < acnt) {
/* too few paraeters: remaining actuals are ""
*/
actparams[nr_of_params] = "";
+ nr_of_params++;
}
}
switch(ch) {
+#ifdef __MATCHING_PAR__
case ')':
case '}':
case ']':
lexerror("unbalanced parenthesis");
break;
+#endif __MATCHING_PAR__
case '(':
copyact('(', ')', level+1);
break;
+#ifdef __MATCHING_PAR__
case '{':
/* example:
#define declare(v, t) t v
case '[':
copyact('[', ']', level+1);
break;
+#endif __MATCHING_PAR__
case '\n':
while (LoadChar(ch), ch == '#') {