summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/parse.y
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2018-05-30 19:01:59 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2018-05-30 19:01:59 +0000
commitac383797d22f1bd77546ddc2e65f8433091e3d41 (patch)
tree2ba641360a222baea307ac81a699ca24c00dc77f /usr.sbin/smtpd/parse.y
parent7e97791df3343f7e795d7f864564659d43f74d65 (diff)
cosmethic change, shuffle smtpd specific grammar bits _after_ the ones that
make sense to others
Diffstat (limited to 'usr.sbin/smtpd/parse.y')
-rw-r--r--usr.sbin/smtpd/parse.y68
1 files changed, 35 insertions, 33 deletions
diff --git a/usr.sbin/smtpd/parse.y b/usr.sbin/smtpd/parse.y
index eb47726aaa5..31a3bb4547d 100644
--- a/usr.sbin/smtpd/parse.y
+++ b/usr.sbin/smtpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.205 2018/05/30 09:31:57 gilles Exp $ */
+/* $OpenBSD: parse.y,v 1.206 2018/05/30 19:01:58 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -259,6 +259,40 @@ optnl : '\n' optnl
nl : '\n' optnl
;
+negation : '!' { $$ = 1; }
+ | /* empty */ { $$ = 0; }
+ ;
+
+assign : '=' | ARROW;
+
+
+keyval : STRING assign STRING {
+ table->t_type = T_HASH;
+ table_add(table, $1, $3);
+ free($1);
+ free($3);
+ }
+ ;
+
+keyval_list : keyval
+ | keyval comma keyval_list
+ ;
+
+stringel : STRING {
+ table->t_type = T_LIST;
+ table_add(table, $1, NULL);
+ free($1);
+ }
+ ;
+
+string_list : stringel
+ | stringel comma string_list
+ ;
+
+tableval_list : string_list { }
+ | keyval_list { }
+ ;
+
dispatcher_local_option:
USER STRING {
@@ -1424,35 +1458,6 @@ table : TABLE STRING STRING {
}
;
-assign : '=' | ARROW;
-
-keyval : STRING assign STRING {
- table->t_type = T_HASH;
- table_add(table, $1, $3);
- free($1);
- free($3);
- }
- ;
-
-keyval_list : keyval
- | keyval comma keyval_list
- ;
-
-stringel : STRING {
- table->t_type = T_LIST;
- table_add(table, $1, NULL);
- free($1);
- }
- ;
-
-string_list : stringel
- | stringel comma string_list
- ;
-
-tableval_list : string_list { }
- | keyval_list { }
- ;
-
tablenew : STRING {
struct table *t;
@@ -1486,9 +1491,6 @@ tables : tablenew { $$ = $1; }
| tableref { $$ = $1; }
;
-negation : '!' { $$ = 1; }
- | /* empty */ { $$ = 0; }
- ;
%%