Module Name:    src
Committed By:   christos
Date:           Wed Sep 10 21:04:08 UTC 2014

Modified Files:
        src/crypto/dist/ipsec-tools/src/setkey: parse.y

Log Message:
fix grammar stupidity: ipandport takes an optional port but has 2 grammar
productions, one with and one without an optional port. make the port
not optional and kill reduce-reduce conflicts.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/crypto/dist/ipsec-tools/src/setkey/parse.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/dist/ipsec-tools/src/setkey/parse.y
diff -u src/crypto/dist/ipsec-tools/src/setkey/parse.y:1.16 src/crypto/dist/ipsec-tools/src/setkey/parse.y:1.17
--- src/crypto/dist/ipsec-tools/src/setkey/parse.y:1.16	Sun Oct 20 17:17:28 2013
+++ src/crypto/dist/ipsec-tools/src/setkey/parse.y	Wed Sep 10 17:04:08 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.y,v 1.16 2013/10/20 21:17:28 christos Exp $	*/
+/*	$NetBSD: parse.y,v 1.17 2014/09/10 21:04:08 christos Exp $	*/
 
 /*	$KAME: parse.y,v 1.81 2003/07/01 04:01:48 itojun Exp $	*/
 
@@ -141,7 +141,7 @@ static int setkeymsg_add __P((unsigned i
 %type <num> PR_ESP PR_AH PR_IPCOMP PR_ESPUDP PR_TCP
 %type <num> EXTENSION MODE
 %type <ulnum> DECSTRING
-%type <val> PL_REQUESTS portstr key_string
+%type <val> PL_REQUESTS portstr portstr_notempty key_string
 %type <val> policy_requests
 %type <val> QUOTEDSTRING HEXSTRING STRING
 %type <val> F_AIFLAGS
@@ -772,7 +772,7 @@ ipandport
 				return -1;
 			}
 		}
-	|	STRING portstr
+	|	STRING portstr_notempty
 		{
 			$$ = parse_addr($1.buf, $2.buf);
 			if ($$ == NULL) {
@@ -797,7 +797,11 @@ portstr
 			}
 			$$.len = strlen($$.buf);
 		}
-	|	BLCL ANY ELCL
+	| portstr_notempty
+	;
+
+portstr_notempty
+	: 	BLCL ANY ELCL
 		{
 			$$.buf = strdup("0");
 			if (!$$.buf) {

Reply via email to