]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Add support for arbitrary parenthetical expressions.
authorTed Lemon <source@isc.org>
Thu, 6 Jul 2000 09:57:23 +0000 (09:57 +0000)
committerTed Lemon <source@isc.org>
Thu, 6 Jul 2000 09:57:23 +0000 (09:57 +0000)
common/parse.c

index d2bae6dfee6c20bb39a1c7085a164c1c7c83fc75..fdbf659844f25ef706496dba4bf9016ecdc03a1e 100644 (file)
@@ -43,7 +43,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: parse.c,v 1.76 2000/06/29 20:05:18 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: parse.c,v 1.77 2000/07/06 09:57:23 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -2441,6 +2441,26 @@ int parse_non_binary (expr, cfile, lose, context)
                }
                break;
 
+             case LPAREN:
+               token = next_token (&val, cfile);
+               if (!parse_expression (expr, cfile, lose, context,
+                                      (struct expression **)0, expr_none)) {
+                       if (!*lose) {
+                               parse_warn (cfile, "expression expected");
+                               skip_to_semi (cfile);
+                       }
+                       *lose = 1;
+                       return 0;
+               }
+               token = next_token (&val, cfile);
+               if (token != RPAREN) {
+                       *lose = 1;
+                       parse_warn (cfile, "right paren expected");
+                       skip_to_semi (cfile);
+                       return 0;
+               }
+               break;
+
              case EXISTS:
                if (context == context_dns)
                        goto ns_exists;