]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Add new tokens for match expressions.
authorTed Lemon <source@isc.org>
Mon, 20 Apr 1998 18:02:40 +0000 (18:02 +0000)
committerTed Lemon <source@isc.org>
Mon, 20 Apr 1998 18:02:40 +0000 (18:02 +0000)
common/conflex.c
includes/dhctoken.h

index b09f7a4f0b5f9fe876a26b036072d87bb5029ad3..b15346c843ec30fa4e2c346dae0cf5f75a274633 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: conflex.c,v 1.31 1998/04/09 04:28:20 mellon Exp $ Copyright (c) 1995, 1996, 1997 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: conflex.c,v 1.32 1998/04/20 18:01:08 mellon Exp $ Copyright (c) 1995, 1996, 1997 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -354,6 +354,8 @@ static int intern (atom, dfv)
 
        switch (tolower (atom [0])) {
              case 'a':
+               if (!strcasecmp (atom + 1, "nd"))
+                       return AND;
                if (!strcasecmp (atom + 1, "ppend"))
                        return APPEND;
                if (!strcasecmp (atom + 1, "llow"))
@@ -373,6 +375,8 @@ static int intern (atom, dfv)
                if (!strcasecmp (atom + 1, "oot-unknown-clients"))
                        return BOOT_UNKNOWN_CLIENTS;
              case 'c':
+               if (!strcasecmp (atom + 1, "heck"))
+                       return CHECK;
                if (!strcasecmp (atom + 1, "lass"))
                        return CLASS;
                if (!strcasecmp (atom + 1, "iaddr"))
@@ -405,6 +409,8 @@ static int intern (atom, dfv)
                }
                break;
              case 'e':
+               if (!strcasecmp (atom + 1, "xtract-int"))
+                       return EXTRACT_INT;
                if (!strcasecmp (atom + 1, "thernet"))
                        return ETHERNET;
                if (!strcasecmp (atom + 1, "nds"))
@@ -463,6 +469,8 @@ static int intern (atom, dfv)
                }
                break;
              case 'n':
+               if (!strcasecmp (atom + 1, "ot"))
+                       return NOT;
                if (!strcasecmp (atom + 1, "ameserver"))
                        return NAMESERVER;
                if (!strcasecmp (atom + 1, "etmask"))
@@ -471,6 +479,8 @@ static int intern (atom, dfv)
                        return NEXT_SERVER;
                break;
              case 'o':
+               if (!strcasecmp (atom + 1, "r"))
+                       return OR;
                if (!strcasecmp (atom + 1, "ption"))
                        return OPTION;
                if (!strcasecmp (atom + 1, "ne-lease-per-client"))
@@ -501,6 +511,10 @@ static int intern (atom, dfv)
                        return REJECT;
                break;
              case 's':
+               if (!strcasecmp (atom + 1, "uffix"))
+                       return SUFFIX;
+               if (!strcasecmp (atom + 1, "ubstring"))
+                       return SUBSTRING;
                if (!strcasecmp (atom + 1, "earch"))
                        return SEARCH;
                if (!strcasecmp (atom + 1, "tarts"))
index f680517163dd747bb115f1c98c41e542c6df8f77..b99ab7dad0a1444a6e3a28377b0e3341bf5a2499 100644 (file)
@@ -3,7 +3,7 @@
    Tokens for config file lexer and parser. */
 
 /*
- * Copyright (c) 1995, 1996, 1997 The Internet Software Consortium.
+ * Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -47,6 +47,9 @@
 #define SLASH '/'
 #define LBRACE '{'
 #define RBRACE '}'
+#define LPAREN '('
+#define RPAREN ')'
+#define EQUAL '='
 
 #define FIRST_TOKEN    HOST
 #define HOST           256
 #define USE_LEASE_ADDR_FOR_DEFAULT_ROUTE 331
 #define MIN_LEASE_TIME 332
 #define MIN_SECS       333
+#define AND            334
+#define OR             335
+#define        NOT             336
+#define SUBSTRING      337
+#define SUFFIX         338
+#define CHECK          339
+#define EXTRACT_INT    340
 
 #define is_identifier(x)       ((x) >= FIRST_TOKEN &&  \
                                 (x) != STRING &&       \