#ifndef lint
static char copyright[] =
-"$Id: parse.c,v 1.10 1998/11/06 00:30:19 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: parse.c,v 1.11 1998/11/06 02:42:48 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
do {
token = peek_token (&val, cfile);
if (token == RBRACE) {
+ token = next_token (&val, cfile);
if (brace_count) {
- token = next_token (&val, cfile);
if (!--brace_count)
return;
} else
stmt = parse_if_statement (cfile, lose);
return stmt;
case ADD:
+ token = next_token (&val, cfile);
token = next_token (&val, cfile);
if (token != STRING) {
parse_warn ("expecting class name.");
return (struct executable_statement *)0;
}
true = parse_executable_statements (cfile, lose);
- if (*lose)
- return (struct executable_statement *)0;
token = next_token (&val, cfile);
+ if (*lose) {
+ /* Try to even things up. */
+ do {
+ token = next_token (&val, cfile);
+ } while (token != EOF && token != RBRACE);
+ return (struct executable_statement *)0;
+ }
if (token != RBRACE) {
parse_warn ("right brace expected.");
skip_to_semi (cfile);
return 0;
if (!parse_cshl (&t -> data.const_data, cfile))
return 0;
+ t -> op = expr_const_data;
} else if (token == STRING) {
token = next_token (&val, cfile);
if (!make_const_data (&t, (unsigned char *) val,