From: Damien Neil Date: Tue, 27 Feb 2001 01:15:38 +0000 (+0000) Subject: Added tokens for "close", "create", "open", and "help" to the lexer. X-Git-Tag: V3-BETA-2-PATCH-19~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9345f3ccbb7d74ed6187859f8b1632e57184c368;p=thirdparty%2Fdhcp.git Added tokens for "close", "create", "open", and "help" to the lexer. --- diff --git a/common/conflex.c b/common/conflex.c index d0c4812dd..ba22e32b3 100644 --- a/common/conflex.c +++ b/common/conflex.c @@ -43,7 +43,7 @@ #ifndef lint static char copyright[] = -"$Id: conflex.c,v 1.87 2001/01/25 08:20:21 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n"; +"$Id: conflex.c,v 1.88 2001/02/27 01:15:36 neild Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -556,6 +556,10 @@ static enum dhcp_token intern (atom, dfv) return CHECK; if (!strcasecmp (atom + 1, "lass")) return CLASS; + if (!strcasecmp (atom + 1, "lose")) + return TOKEN_CLOSE; + if (!strcasecmp (atom + 1, "reate")) + return TOKEN_CREATE; if (!strcasecmp (atom + 1, "iaddr")) return CIADDR; if (!strncasecmp (atom + 1, "lient", 5)) { @@ -693,6 +697,8 @@ static enum dhcp_token intern (atom, dfv) return HARDWARE; if (!strcasecmp (atom + 1, "ostname")) return HOSTNAME; + if (!strcasecmp (atom + 1, "elp")) + return TOKEN_HELP; break; case 'i': if (!strcasecmp (atom + 1, "nclude")) @@ -819,6 +825,8 @@ static enum dhcp_token intern (atom, dfv) return OR; if (!strcasecmp (atom + 1, "n")) return ON; + if (!strcasecmp (atom + 1, "pen")) + return TOKEN_OPEN; if (!strcasecmp (atom + 1, "ption")) return OPTION; if (!strcasecmp (atom + 1, "ne-lease-per-client")) diff --git a/includes/dhctoken.h b/includes/dhctoken.h index f9e2360f5..cd94c02c4 100644 --- a/includes/dhctoken.h +++ b/includes/dhctoken.h @@ -304,7 +304,11 @@ enum dhcp_token { RECONTACT_INTERVAL = 600, CLIENT_UPDATES = 601, TOKEN_NEW = 601, - TRANSMISSION = 602 + TRANSMISSION = 602, + TOKEN_CLOSE = 603, + TOKEN_CREATE = 604, + TOKEN_OPEN = 605, + TOKEN_HELP = 606 }; #define is_identifier(x) ((x) >= FIRST_TOKEN && \