diff -uNr syslog-ng-1.5.13.orig/src/affile.h syslog-ng-1.5.13/src/affile.h
--- syslog-ng-1.5.13.orig/src/affile.h	Sun Aug 26 17:06:25 2001
+++ syslog-ng-1.5.13/src/affile.h	Thu Apr 18 22:34:35 2002
@@ -48,6 +48,8 @@
 #define AFFILE_FSYNC          0x0020
 #define AFFILE_FSYNC_SHIFT    5
 
+struct ol_string *expand_macros(struct syslog_config *cfg, struct ol_string *template, int template_escape, struct log_info *msg);
+
 void affile_set_syncfreq(struct log_dest_driver *affile, int syncfreq);
 void affile_set_fsync(struct log_dest_driver *c, int enable);
 void affile_set_compress(struct log_dest_driver *affile, int enable);
diff -uNr syslog-ng-1.5.13.orig/src/afprogram.c syslog-ng-1.5.13/src/afprogram.c
--- syslog-ng-1.5.13.orig/src/afprogram.c	Sun Jul  8 19:04:21 2001
+++ syslog-ng-1.5.13/src/afprogram.c	Thu Apr 18 22:34:28 2002
@@ -23,6 +23,9 @@
  *
  ***************************************************************************/
 
+/* Needed for expand_macros() */
+#include "affile.h"
+
 #include "afprogram.h"
 #include "destinations.h"
 #include "cfgfile.h"
@@ -44,6 +47,9 @@
      (super log_dest_driver)
      (vars
        (progname string)
+       (cfg object syslog_config)
+       (template_output string)
+       (template_escape . int)
        (dest object io_fd)))
 */
 
@@ -106,6 +112,7 @@
 		REMEMBER_RESOURCE(cfg->resources, &self->dest->super.super);
 	}
 
+	self->cfg = cfg;
 	return ST_OK | ST_GOON;
 }
 
@@ -114,13 +121,14 @@
 {
         CAST(afprogram_dest, self, c);
 
-        if (self->dest)
-                A_WRITE_STRING(&self->dest->buffer->super, 
-			       c_format("<%i>%S %S %S\n", 
-					msg->pri, 
-					msg->date, 
-					msg->host, 
-					msg->msg));
+        if (self->dest) {
+	  struct ol_string *l;
+	  if (self->template_output)
+	    l = expand_macros(self->cfg, self->template_output, self->template_escape, msg);
+	  else
+	    l = c_format("<%i>%S %S %S\n", msg->pri, msg->date, msg->host, msg->msg);
+	  A_WRITE_STRING(&self->dest->buffer->super, l);
+	}
         log_info_free(msg);
 }
 
@@ -133,3 +141,18 @@
 	self->progname = c_format_cstring("%z", cmd);
 	return &self->super;
 }
+
+void afprogram_set_template(struct log_dest_driver *c, char *t)
+{
+	CAST(afprogram_dest, self, c);
+
+	self->template_output = c_format("%z", t);
+}
+
+void afprogram_set_template_escape(struct log_dest_driver *c, int enable)
+{
+	CAST(afprogram_dest, self, c);
+
+	self->template_escape = enable;
+}
+
diff -uNr syslog-ng-1.5.13.orig/src/afprogram.c.x syslog-ng-1.5.13/src/afprogram.c.x
--- syslog-ng-1.5.13.orig/src/afprogram.c.x	Sun Jul  8 19:09:41 2001
+++ syslog-ng-1.5.13/src/afprogram.c.x	Thu Apr 18 22:34:58 2002
@@ -3,6 +3,9 @@
 {
   struct log_dest_driver super;
   struct ol_string *progname;
+  struct syslog_config *cfg;
+  struct ol_string *template_output;
+  int template_escape;
   struct io_fd *dest;
 };
 extern struct ol_class afprogram_dest_class;
@@ -13,6 +16,7 @@
 void (*mark)(struct ol_object *o))
 {
   struct afprogram_dest *i = (struct afprogram_dest *) o;
+  mark((struct ol_object *) i->cfg);
   mark((struct ol_object *) i->dest);
 }
 
@@ -20,6 +24,7 @@
 {
   struct afprogram_dest *i = (struct afprogram_dest *) o;
   ol_string_free(i->progname);
+  ol_string_free(i->template_output);
 }
 
 struct ol_class afprogram_dest_class =
diff -uNr syslog-ng-1.5.13.orig/src/afprogram.h syslog-ng-1.5.13/src/afprogram.h
--- syslog-ng-1.5.13.orig/src/afprogram.h	Sun Feb 25 13:00:22 2001
+++ syslog-ng-1.5.13/src/afprogram.h	Thu Apr 18 22:35:55 2002
@@ -29,5 +29,7 @@
 #include "syslog-ng.h"
 
 struct log_dest_driver *make_afprogram_dest(const char *cmd);
+void afprogram_set_template(struct log_dest_driver *c, char *t);
+void afprogram_set_template_escape(struct log_dest_driver *c, int enable);
 
 #endif
diff -uNr syslog-ng-1.5.13.orig/src/cfg-grammar.c syslog-ng-1.5.13/src/cfg-grammar.c
--- syslog-ng-1.5.13.orig/src/cfg-grammar.c	Mon Sep  3 18:46:16 2001
+++ syslog-ng-1.5.13/src/cfg-grammar.c	Thu Apr 18 22:55:09 2002
@@ -1,87 +1,15 @@
-
-/*  A Bison parser, made from cfg-grammar.y
-    by GNU Bison version 1.28  */
-
-#define YYBISON 1  /* Identify Bison output.  */
-
-#define	KW_SOURCE	257
-#define	KW_DESTINATION	258
-#define	KW_LOG	259
-#define	KW_OPTIONS	260
-#define	KW_FILTER	261
-#define	KW_INTERNAL	262
-#define	KW_FILE	263
-#define	KW_PIPE	264
-#define	KW_UNIX_STREAM	265
-#define	KW_UNIX_DGRAM	266
-#define	KW_UDP	267
-#define	KW_TCP	268
-#define	KW_USER	269
-#define	KW_DOOR	270
-#define	KW_SUN_STREAMS	271
-#define	KW_PROGRAM	272
-#define	KW_REMCTRL	273
-#define	KW_FLAGS	274
-#define	KW_CATCHALL	275
-#define	KW_FALLBACK	276
-#define	KW_FINAL	277
-#define	KW_FSYNC	278
-#define	KW_MARK_FREQ	279
-#define	KW_SYNC_FREQ	280
-#define	KW_STATS_FREQ	281
-#define	KW_CHAIN_HOSTNAMES	282
-#define	KW_KEEP_HOSTNAME	283
-#define	KW_LOG_FIFO_SIZE	284
-#define	KW_TIME_REOPEN	285
-#define	KW_TIME_REAP	286
-#define	KW_USE_TIME_RECVD	287
-#define	KW_USE_DNS	288
-#define	KW_USE_FQDN	289
-#define	KW_GC_BUSY_THRESHOLD	290
-#define	KW_GC_IDLE_THRESHOLD	291
-#define	KW_CREATE_DIRS	292
-#define	KW_DIR_OWNER	293
-#define	KW_DIR_GROUP	294
-#define	KW_DIR_PERM	295
-#define	KW_FILE_TEMPLATE	296
-#define	KW_TEMPLATE_ESCAPE	297
-#define	KW_OWNER	298
-#define	KW_GROUP	299
-#define	KW_PERM	300
-#define	KW_KEEP_ALIVE	301
-#define	KW_MAX_CONNECTIONS	302
-#define	KW_LOCALIP	303
-#define	KW_IP	304
-#define	KW_LOCALPORT	305
-#define	KW_PORT	306
-#define	KW_DESTPORT	307
-#define	KW_COMPRESS	308
-#define	KW_MAC	309
-#define	KW_AUTH	310
-#define	KW_ENCRYPT	311
-#define	KW_DNS_CACHE	312
-#define	KW_DNS_CACHE_SIZE	313
-#define	KW_DNS_CACHE_EXPIRE	314
-#define	KW_DNS_CACHE_EXPIRE_FAILED	315
-#define	KW_FACILITY	316
-#define	KW_LEVEL	317
-#define	KW_HOST	318
-#define	KW_MATCH	319
-#define	KW_YES	320
-#define	KW_NO	321
-#define	KW_REQUIRED	322
-#define	KW_ALLOW	323
-#define	KW_DENY	324
-#define	DOTDOT	325
-#define	IDENTIFIER	326
-#define	NUMBER	327
-#define	STRING	328
-#define	KW_OR	329
-#define	KW_AND	330
-#define	KW_NOT	331
-
-#line 26 "cfg-grammar.y"
-
+#ifndef lint
+/*static char yysccsid[] = "from: @(#)yaccpar	1.9 (Berkeley) 02/21/93";*/
+static char yyrcsid[] = "$Id: skeleton.c,v 1.4 1993/12/21 18:45:32 jtc Exp $";
+#endif
+#define YYBYACC 1
+#define YYMAJOR 1
+#define YYMINOR 9
+#define yyclearin (yychar=(-1))
+#define yyerrok (yyerrflag=0)
+#define YYRECOVERING (yyerrflag!=0)
+#define YYPREFIX "yy"
+#line 27 "cfg-grammar.y"
 
 #include "cfgfile.h"
 #include "filters.h"
@@ -96,6 +24,7 @@
 #include "afremctrl.h"
 
 #include <netinet/in.h>
+#include <stdio.h>
 
 void yyerror(char *msg);
 int yylex();
@@ -103,1764 +32,1565 @@
 static struct log_source_driver *last_source_driver;
 static struct log_dest_driver *last_dest_driver;
 
-
-#line 50 "cfg-grammar.y"
+#line 51 "cfg-grammar.y"
 typedef union {
 	UINT32 num;
 	char *cptr;
 	void *ptr;
 	struct filter_expr_node *node;
 } YYSTYPE;
-#include <stdio.h>
-
-#ifndef __cplusplus
-#ifndef __STDC__
-#define const
-#endif
-#endif
-
-
-
-#define	YYFINAL		533
-#define	YYFLAG		-32768
-#define	YYNTBASE	83
-
-#define YYTRANSLATE(x) ((unsigned)(x) <= 331 ? yytranslate[x] : 161)
-
-static const char yytranslate[] = {     0,
-     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-     2,     2,     2,     2,     2,     2,     2,     2,     2,    81,
-    82,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-     2,     2,     2,     2,     2,     2,     2,     2,    78,     2,
-     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-     2,     2,    79,     2,    80,     2,     2,     2,     2,     2,
-     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-     2,     2,     2,     2,     2,     1,     3,     4,     5,     6,
-     7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
-    17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
-    27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
-    37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
-    47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
-    57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
-    67,    68,    69,    70,    71,    72,    73,    74,    75,    76,
-    77
-};
-
-#if YYDEBUG != 0
-static const short yyprhs[] = {     0,
-     0,     2,     6,     7,    10,    13,    16,    19,    22,    27,
-    32,    37,    41,    45,    46,    48,    50,    52,    54,    58,
-    63,    68,    73,    78,    83,    88,    89,    93,    94,    98,
-   101,   102,   107,   112,   117,   119,   120,   123,   126,   127,
-   129,   134,   139,   144,   149,   154,   159,   160,   163,   166,
-   167,   169,   174,   179,   184,   189,   194,   196,   201,   206,
-   211,   212,   216,   219,   220,   225,   229,   230,   232,   234,
-   236,   238,   240,   242,   247,   252,   253,   257,   260,   261,
-   263,   268,   273,   278,   283,   288,   293,   298,   303,   308,
-   313,   318,   323,   328,   333,   334,   338,   341,   342,   347,
-   352,   357,   362,   367,   372,   377,   382,   387,   389,   391,
-   392,   396,   399,   400,   405,   410,   415,   420,   422,   427,
-   432,   437,   438,   442,   445,   446,   448,   453,   458,   463,
-   468,   473,   478,   483,   488,   493,   497,   501,   502,   507,
-   512,   517,   523,   524,   527,   528,   530,   532,   534,   538,
-   539,   544,   549,   554,   559,   564,   569,   574,   579,   584,
-   589,   594,   599,   604,   609,   614,   619,   624,   629,   634,
-   639,   644,   649,   654,   659,   665,   667,   670,   674,   678,
-   682,   687,   692,   697,   702,   707,   712,   717,   720,   722,
-   724,   727,   729,   733,   735,   737,   739,   741,   743,   745,
-   747,   749
-};
-
-static const short yyrhs[] = {    84,
-     0,    85,    78,    84,     0,     0,     3,    86,     0,     4,
-    87,     0,     5,    88,     0,     7,   151,     0,     6,    89,
-     0,   160,    79,    90,    80,     0,   160,    79,   116,    80,
-     0,    79,   144,   146,    80,     0,    79,   149,    80,     0,
-    91,    78,    90,     0,     0,    92,     0,    93,     0,    94,
-     0,   111,     0,     8,    81,    82,     0,     9,    81,   160,
-    82,     0,    10,    81,   160,    82,     0,    12,    81,    95,
-    82,     0,    11,    81,    97,    82,     0,    13,    81,   101,
-    82,     0,    14,    81,   106,    82,     0,     0,   160,    96,
-    99,     0,     0,   160,    98,    99,     0,   100,    99,     0,
-     0,    44,    81,   160,    82,     0,    45,    81,   160,    82,
-     0,    46,    81,    73,    82,     0,   110,     0,     0,   102,
-   103,     0,   104,   103,     0,     0,   105,     0,    51,    81,
-   160,    82,     0,    52,    81,   160,    82,     0,    49,    81,
-   160,    82,     0,    51,    81,    73,    82,     0,    52,    81,
-    73,    82,     0,    50,    81,   160,    82,     0,     0,   107,
-   108,     0,   109,   108,     0,     0,   105,     0,    51,    81,
-   160,    82,     0,    52,    81,   160,    82,     0,    56,    81,
-   159,    82,     0,    55,    81,   159,    82,     0,    57,    81,
-   159,    82,     0,   110,     0,    47,    81,   158,    82,     0,
-    48,    81,    73,    82,     0,    17,    81,   112,    82,     0,
-     0,   160,   113,   114,     0,   115,   114,     0,     0,    16,
-    81,   160,    82,     0,   117,    78,   116,     0,     0,   119,
-     0,   124,     0,   129,     0,   141,     0,   142,     0,   143,
-     0,    30,    81,    73,    82,     0,     9,    81,   120,    82,
-     0,     0,   160,   121,   122,     0,   123,   122,     0,     0,
-   118,     0,    26,    81,    73,    82,     0,    54,    81,   158,
-    82,     0,    57,    81,   158,    82,     0,    44,    81,   160,
-    82,     0,    45,    81,   160,    82,     0,    46,    81,    73,
-    82,     0,    39,    81,   160,    82,     0,    40,    81,   160,
-    82,     0,    41,    81,    73,    82,     0,    38,    81,   158,
-    82,     0,    42,    81,   160,    82,     0,    43,    81,   158,
-    82,     0,    24,    81,   158,    82,     0,    10,    81,   125,
-    82,     0,     0,   160,   126,   127,     0,   128,   127,     0,
-     0,    44,    81,   160,    82,     0,    45,    81,   160,    82,
-     0,    46,    81,    73,    82,     0,    42,    81,   160,    82,
-     0,    43,    81,   158,    82,     0,    12,    81,   130,    82,
-     0,    11,    81,   131,    82,     0,    13,    81,   132,    82,
-     0,    14,    81,   137,    82,     0,   160,     0,   160,     0,
-     0,   160,   133,   134,     0,   134,   136,     0,     0,    49,
-    81,   160,    82,     0,    51,    81,    73,    82,     0,    52,
-    81,    73,    82,     0,    53,    81,    73,    82,     0,   135,
-     0,    51,    81,   160,    82,     0,    52,    81,   160,    82,
-     0,    53,    81,   160,    82,     0,     0,   160,   138,   139,
-     0,   139,   140,     0,     0,   135,     0,    51,    81,   160,
-    82,     0,    52,    81,   160,    82,     0,    53,    81,   160,
-    82,     0,    55,    81,   158,    82,     0,    56,    81,   158,
-    82,     0,    57,    81,   158,    82,     0,    26,    81,    73,
-    82,     0,    15,    81,   160,    82,     0,    18,    81,   160,
-    82,     0,    19,    81,    82,     0,   145,    78,   144,     0,
-     0,     3,    81,   160,    82,     0,     7,    81,   160,    82,
-     0,     4,    81,   160,    82,     0,    20,    81,   147,    82,
-    78,     0,     0,   148,   147,     0,     0,    21,     0,    22,
-     0,    23,     0,   150,    78,   149,     0,     0,    25,    81,
-    73,    82,     0,    26,    81,    73,    82,     0,    27,    81,
-    73,    82,     0,    28,    81,   158,    82,     0,    29,    81,
-   158,    82,     0,    33,    81,   158,    82,     0,    35,    81,
-   158,    82,     0,    34,    81,   158,    82,     0,    31,    81,
-    73,    82,     0,    32,    81,    73,    82,     0,    30,    81,
-    73,    82,     0,    36,    81,    73,    82,     0,    37,    81,
-    73,    82,     0,    38,    81,   158,    82,     0,    44,    81,
-   160,    82,     0,    45,    81,   160,    82,     0,    46,    81,
-    73,    82,     0,    39,    81,   160,    82,     0,    40,    81,
-   160,    82,     0,    41,    81,    73,    82,     0,    58,    81,
-   158,    82,     0,    59,    81,    73,    82,     0,    60,    81,
-    73,    82,     0,    61,    81,    73,    82,     0,   160,    79,
-   152,    78,    80,     0,   153,     0,    77,   152,     0,   152,
-    75,   152,     0,   152,    76,   152,     0,    81,   152,    82,
-     0,    62,    81,   154,    82,     0,    62,    81,    73,    82,
-     0,    63,    81,   156,    82,     0,    18,    81,   160,    82,
-     0,    64,    81,   160,    82,     0,    65,    81,   160,    82,
-     0,     7,    81,   160,    82,     0,   155,   154,     0,   155,
-     0,    72,     0,   157,   156,     0,   157,     0,    72,    71,
-    72,     0,    72,     0,    66,     0,    67,     0,    73,     0,
-    68,     0,    69,     0,    70,     0,    72,     0,    74,     0
+#line 43 "y.tab.c"
+#define KW_SOURCE 257
+#define KW_DESTINATION 258
+#define KW_LOG 259
+#define KW_OPTIONS 260
+#define KW_FILTER 261
+#define KW_INTERNAL 262
+#define KW_FILE 263
+#define KW_PIPE 264
+#define KW_UNIX_STREAM 265
+#define KW_UNIX_DGRAM 266
+#define KW_UDP 267
+#define KW_TCP 268
+#define KW_USER 269
+#define KW_DOOR 270
+#define KW_SUN_STREAMS 271
+#define KW_PROGRAM 272
+#define KW_REMCTRL 273
+#define KW_FLAGS 274
+#define KW_CATCHALL 275
+#define KW_FALLBACK 276
+#define KW_FINAL 277
+#define KW_FSYNC 278
+#define KW_MARK_FREQ 279
+#define KW_SYNC_FREQ 280
+#define KW_STATS_FREQ 281
+#define KW_CHAIN_HOSTNAMES 282
+#define KW_KEEP_HOSTNAME 283
+#define KW_LOG_FIFO_SIZE 284
+#define KW_TIME_REOPEN 285
+#define KW_TIME_REAP 286
+#define KW_USE_TIME_RECVD 287
+#define KW_USE_DNS 288
+#define KW_USE_FQDN 289
+#define KW_GC_BUSY_THRESHOLD 290
+#define KW_GC_IDLE_THRESHOLD 291
+#define KW_CREATE_DIRS 292
+#define KW_DIR_OWNER 293
+#define KW_DIR_GROUP 294
+#define KW_DIR_PERM 295
+#define KW_FILE_TEMPLATE 296
+#define KW_TEMPLATE_ESCAPE 297
+#define KW_OWNER 298
+#define KW_GROUP 299
+#define KW_PERM 300
+#define KW_KEEP_ALIVE 301
+#define KW_MAX_CONNECTIONS 302
+#define KW_LOCALIP 303
+#define KW_IP 304
+#define KW_LOCALPORT 305
+#define KW_PORT 306
+#define KW_DESTPORT 307
+#define KW_COMPRESS 308
+#define KW_MAC 309
+#define KW_AUTH 310
+#define KW_ENCRYPT 311
+#define KW_DNS_CACHE 312
+#define KW_DNS_CACHE_SIZE 313
+#define KW_DNS_CACHE_EXPIRE 314
+#define KW_DNS_CACHE_EXPIRE_FAILED 315
+#define KW_FACILITY 316
+#define KW_LEVEL 317
+#define KW_HOST 318
+#define KW_MATCH 319
+#define KW_YES 320
+#define KW_NO 321
+#define KW_REQUIRED 322
+#define KW_ALLOW 323
+#define KW_DENY 324
+#define DOTDOT 325
+#define IDENTIFIER 326
+#define NUMBER 327
+#define STRING 328
+#define KW_OR 329
+#define KW_AND 330
+#define KW_NOT 331
+#define YYERRCODE 256
+short yylhs[] = {                                        -1,
+    0,   49,   49,   50,   50,   50,   50,   50,    1,    2,
+    3,    4,    5,    5,    6,    6,    6,    6,    7,    8,
+    8,    9,    9,    9,    9,   52,   10,   53,   11,   51,
+   51,   54,   54,   54,   54,   56,   12,   55,   55,   57,
+   57,   57,   58,   58,   58,   58,   60,   13,   59,   59,
+   61,   61,   61,   61,   61,   61,   61,   14,   14,   15,
+   63,   16,   62,   62,   64,   17,   17,   18,   18,   18,
+   18,   18,   18,   65,   19,   67,   20,   66,   66,   68,
+   68,   68,   68,   68,   68,   68,   68,   68,   68,   68,
+   68,   68,   68,   21,   70,   22,   69,   69,   71,   71,
+   71,   71,   71,   23,   23,   23,   23,   24,   25,   73,
+   26,   72,   72,   75,   75,   75,   75,   74,   74,   74,
+   74,   77,   27,   76,   76,   78,   78,   78,   78,   78,
+   78,   78,   78,   28,   29,   80,   30,   79,   79,   81,
+   81,   31,   32,   32,   33,   33,   33,   34,   34,   35,
+   35,   36,   36,   36,   37,   37,   38,   38,   38,   38,
+   38,   38,   38,   38,   38,   38,   38,   38,   38,   38,
+   38,   38,   38,   38,   38,   38,   38,   38,   38,   38,
+   39,   40,   40,   40,   40,   40,   41,   41,   41,   41,
+   41,   41,   41,   42,   42,   43,   44,   44,   45,   45,
+   46,   46,   46,   47,   47,   47,   48,   48,
 };
-
-#endif
-
-#if YYDEBUG != 0
-static const short yyrline[] = { 0,
-   156,   160,   161,   165,   166,   167,   168,   169,   173,   177,
-   181,   185,   189,   190,   194,   195,   196,   197,   201,   205,
-   206,   210,   211,   212,   213,   217,   224,   228,   235,   240,
-   241,   245,   246,   247,   248,   252,   258,   262,   263,   267,
-   268,   269,   273,   274,   275,   276,   280,   286,   290,   291,
-   295,   296,   297,   298,   299,   300,   301,   305,   306,   310,
-   314,   319,   323,   324,   328,   332,   333,   337,   338,   339,
-   340,   341,   342,   346,   350,   354,   360,   364,   365,   369,
-   370,   371,   372,   373,   374,   375,   376,   377,   378,   379,
-   380,   381,   382,   386,   390,   396,   400,   401,   405,   406,
-   407,   408,   409,   414,   415,   416,   417,   421,   429,   438,
-   445,   449,   450,   454,   455,   456,   457,   461,   462,   463,
-   464,   468,   475,   479,   480,   484,   485,   486,   487,   488,
-   489,   490,   491,   496,   500,   503,   506,   507,   511,   512,
-   513,   517,   518,   523,   524,   528,   529,   530,   534,   535,
-   539,   540,   541,   542,   543,   544,   545,   546,   547,   548,
-   549,   550,   551,   552,   553,   554,   555,   556,   557,   558,
-   559,   560,   561,   562,   567,   571,   572,   573,   574,   575,
-   579,   580,   581,   582,   583,   584,   585,   589,   590,   594,
-   609,   610,   614,   634,   649,   650,   651,   655,   656,   657,
-   661,   662
+short yylen[] = {                                         2,
+    1,    3,    0,    2,    2,    2,    2,    2,    4,    4,
+    4,    3,    3,    0,    1,    1,    1,    1,    3,    4,
+    4,    4,    4,    4,    4,    0,    3,    0,    3,    2,
+    0,    4,    4,    4,    1,    0,    2,    2,    0,    1,
+    4,    4,    4,    4,    4,    4,    0,    2,    2,    0,
+    1,    4,    4,    4,    4,    4,    1,    4,    4,    4,
+    0,    3,    2,    0,    4,    3,    0,    1,    1,    1,
+    1,    1,    1,    4,    4,    0,    3,    2,    0,    1,
+    4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
+    4,    4,    4,    4,    0,    3,    2,    0,    4,    4,
+    4,    4,    4,    4,    4,    4,    4,    1,    1,    0,
+    3,    2,    0,    4,    4,    4,    4,    1,    4,    4,
+    4,    0,    3,    2,    0,    1,    4,    4,    4,    4,
+    4,    4,    4,    4,    4,    0,    3,    2,    0,    4,
+    4,    3,    3,    0,    4,    4,    4,    5,    0,    2,
+    0,    1,    1,    1,    3,    0,    4,    4,    4,    4,
+    4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
+    4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
+    5,    1,    2,    3,    3,    3,    4,    4,    4,    4,
+    4,    4,    4,    2,    1,    1,    2,    1,    3,    1,
+    1,    1,    1,    1,    1,    1,    1,    1,
 };
-#endif
-
-
-#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
-
-static const char * const yytname[] = {   "$","error","$undefined.","KW_SOURCE",
-"KW_DESTINATION","KW_LOG","KW_OPTIONS","KW_FILTER","KW_INTERNAL","KW_FILE","KW_PIPE",
-"KW_UNIX_STREAM","KW_UNIX_DGRAM","KW_UDP","KW_TCP","KW_USER","KW_DOOR","KW_SUN_STREAMS",
-"KW_PROGRAM","KW_REMCTRL","KW_FLAGS","KW_CATCHALL","KW_FALLBACK","KW_FINAL",
-"KW_FSYNC","KW_MARK_FREQ","KW_SYNC_FREQ","KW_STATS_FREQ","KW_CHAIN_HOSTNAMES",
-"KW_KEEP_HOSTNAME","KW_LOG_FIFO_SIZE","KW_TIME_REOPEN","KW_TIME_REAP","KW_USE_TIME_RECVD",
-"KW_USE_DNS","KW_USE_FQDN","KW_GC_BUSY_THRESHOLD","KW_GC_IDLE_THRESHOLD","KW_CREATE_DIRS",
-"KW_DIR_OWNER","KW_DIR_GROUP","KW_DIR_PERM","KW_FILE_TEMPLATE","KW_TEMPLATE_ESCAPE",
-"KW_OWNER","KW_GROUP","KW_PERM","KW_KEEP_ALIVE","KW_MAX_CONNECTIONS","KW_LOCALIP",
-"KW_IP","KW_LOCALPORT","KW_PORT","KW_DESTPORT","KW_COMPRESS","KW_MAC","KW_AUTH",
-"KW_ENCRYPT","KW_DNS_CACHE","KW_DNS_CACHE_SIZE","KW_DNS_CACHE_EXPIRE","KW_DNS_CACHE_EXPIRE_FAILED",
-"KW_FACILITY","KW_LEVEL","KW_HOST","KW_MATCH","KW_YES","KW_NO","KW_REQUIRED",
-"KW_ALLOW","KW_DENY","DOTDOT","IDENTIFIER","NUMBER","STRING","KW_OR","KW_AND",
-"KW_NOT","';'","'{'","'}'","'('","')'","start","stmts","stmt","source_stmt",
-"dest_stmt","log_stmt","options_stmt","source_items","source_item","source_afinter",
-"source_affile","source_afsocket","source_afunix_dgram_params","@1","source_afunix_stream_params",
-"@2","source_afunix_options","source_afunix_option","source_afinet_udp_params",
-"@3","source_afinet_udp_options","source_afinet_udp_option","source_afinet_option",
-"source_afinet_tcp_params","@4","source_afinet_tcp_options","source_afinet_tcp_option",
-"source_afsocket_stream_params","source_afstreams","source_afstreams_params",
-"@5","source_afstreams_options","source_afstreams_option","dest_items","dest_item",
-"dest_item_option","dest_affile","dest_affile_params","@6","dest_affile_options",
-"dest_affile_option","dest_afpipe","dest_afpipe_params","@7","dest_afpipe_options",
-"dest_afpipe_option","dest_afsocket","dest_afunix_dgram_params","dest_afunix_stream_params",
-"dest_afinet_udp_params","@8","dest_afinet_udp_options","dest_afinet_option",
-"dest_afinet_udp_option","dest_afinet_tcp_params","@9","dest_afinet_tcp_options",
-"dest_afinet_tcp_option","dest_afuser","dest_afprogram","dest_afremctrl","log_items",
-"log_item","log_flags","log_flags_items","log_flags_item","options_items","options_item",
-"filter_stmt","filter_expr","filter_simple_expr","filter_fac_list","filter_fac",
-"filter_level_list","filter_level","yesno","tripleoption","string", NULL
+short yydefred[] = {                                      0,
+    0,    0,    0,    0,    0,    0,    1,    0,  207,  208,
+    4,    0,    5,    0,    0,    6,    0,    8,    7,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    2,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,   15,   16,   17,   18,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,   68,   69,   70,   71,   72,   73,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,   12,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,  182,    0,
+    0,    0,    0,    0,   36,   47,    0,    9,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,   10,    0,
+    0,    0,    0,    0,   11,  143,    0,    0,    0,  201,
+  202,  203,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,  155,    0,    0,    0,    0,    0,    0,
+  183,    0,    0,    0,    0,   19,    0,    0,    0,   28,
+    0,   26,    0,    0,    0,    0,    0,   61,   13,    0,
+   76,    0,   95,    0,  109,    0,  108,    0,  110,    0,
+  122,    0,    0,  136,  142,   66,  145,  147,  146,  152,
+  153,  154,    0,    0,  157,  158,  159,  160,  161,  167,
+  165,  166,  162,  164,  163,  168,  169,  170,  174,  175,
+  176,  171,  172,  173,  177,  178,  179,  180,    0,    0,
+  196,    0,    0,    0,    0,    0,    0,    0,    0,  186,
+    0,  185,  181,   20,   21,   23,    0,   22,    0,   24,
+    0,    0,    0,    0,   37,    0,   40,   25,    0,    0,
+    0,    0,    0,    0,    0,   57,   51,   48,    0,   60,
+    0,   75,    0,   94,    0,  105,  104,  106,  113,  107,
+  125,  134,  135,    0,    0,  150,  193,  190,  188,  187,
+  194,    0,  189,  197,  191,  192,    0,    0,    0,   35,
+   29,    0,   27,    0,    0,    0,    0,   38,    0,    0,
+    0,    0,    0,    0,    0,   49,    0,   62,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,   80,   77,    0,    0,    0,    0,    0,
+    0,   96,    0,    0,    0,    0,    0,  137,    0,  148,
+  199,    0,    0,    0,   30,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,  204,  205,  206,    0,    0,
+    0,    0,   63,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,   78,    0,    0,
+    0,    0,    0,   97,    0,    0,    0,    0,  112,  118,
+    0,    0,    0,    0,    0,    0,    0,  126,  124,    0,
+    0,  138,    0,    0,    0,   43,   46,   44,   41,   45,
+   42,   58,   59,   52,   53,   55,   54,   56,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,   32,   33,   34,   65,   93,   81,   74,   90,   87,
+   88,   89,   91,   92,   84,   85,   86,   82,   83,  102,
+  103,   99,  100,  101,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,  140,  141,
+  114,  115,  119,  116,  120,  117,  121,  133,  127,  128,
+  129,  130,  131,  132,
 };
-#endif
-
-static const short yyr1[] = {     0,
-    83,    84,    84,    85,    85,    85,    85,    85,    86,    87,
-    88,    89,    90,    90,    91,    91,    91,    91,    92,    93,
-    93,    94,    94,    94,    94,    96,    95,    98,    97,    99,
-    99,   100,   100,   100,   100,   102,   101,   103,   103,   104,
-   104,   104,   105,   105,   105,   105,   107,   106,   108,   108,
-   109,   109,   109,   109,   109,   109,   109,   110,   110,   111,
-   113,   112,   114,   114,   115,   116,   116,   117,   117,   117,
-   117,   117,   117,   118,   119,   121,   120,   122,   122,   123,
-   123,   123,   123,   123,   123,   123,   123,   123,   123,   123,
-   123,   123,   123,   124,   126,   125,   127,   127,   128,   128,
-   128,   128,   128,   129,   129,   129,   129,   130,   131,   133,
-   132,   134,   134,   135,   135,   135,   135,   136,   136,   136,
-   136,   138,   137,   139,   139,   140,   140,   140,   140,   140,
-   140,   140,   140,   141,   142,   143,   144,   144,   145,   145,
-   145,   146,   146,   147,   147,   148,   148,   148,   149,   149,
-   150,   150,   150,   150,   150,   150,   150,   150,   150,   150,
-   150,   150,   150,   150,   150,   150,   150,   150,   150,   150,
-   150,   150,   150,   150,   151,   152,   152,   152,   152,   152,
-   153,   153,   153,   153,   153,   153,   153,   154,   154,   155,
-   156,   156,   157,   157,   158,   158,   158,   159,   159,   159,
-   160,   160
+short yydgoto[] = {                                       6,
+   11,   13,   16,   18,   65,   66,   67,   68,   69,  201,
+  199,  203,  205,  330,   70,  207,   80,   81,   82,  210,
+   83,  212,   84,  216,  214,  218,  220,   85,   86,  223,
+   87,   27,   28,   92,  233,  234,   53,   54,   19,  128,
+  129,  263,  264,  266,  267,  163,  399,   12,    7,    8,
+  331,  279,  277,  332,  285,  204,  286,  287,  298,  206,
+  299,  348,  301,  349,  364,  365,  303,  366,  372,  305,
+  373,  374,  309,  429,  430,  375,  311,  439,  378,  314,
+  379,
 };
-
-static const short yyr2[] = {     0,
-     1,     3,     0,     2,     2,     2,     2,     2,     4,     4,
-     4,     3,     3,     0,     1,     1,     1,     1,     3,     4,
-     4,     4,     4,     4,     4,     0,     3,     0,     3,     2,
-     0,     4,     4,     4,     1,     0,     2,     2,     0,     1,
-     4,     4,     4,     4,     4,     4,     0,     2,     2,     0,
-     1,     4,     4,     4,     4,     4,     1,     4,     4,     4,
-     0,     3,     2,     0,     4,     3,     0,     1,     1,     1,
-     1,     1,     1,     4,     4,     0,     3,     2,     0,     1,
-     4,     4,     4,     4,     4,     4,     4,     4,     4,     4,
-     4,     4,     4,     4,     0,     3,     2,     0,     4,     4,
-     4,     4,     4,     4,     4,     4,     4,     1,     1,     0,
-     3,     2,     0,     4,     4,     4,     4,     1,     4,     4,
-     4,     0,     3,     2,     0,     1,     4,     4,     4,     4,
-     4,     4,     4,     4,     4,     3,     3,     0,     4,     4,
-     4,     5,     0,     2,     0,     1,     1,     1,     3,     0,
-     4,     4,     4,     4,     4,     4,     4,     4,     4,     4,
-     4,     4,     4,     4,     4,     4,     4,     4,     4,     4,
-     4,     4,     4,     4,     5,     1,     2,     3,     3,     3,
-     4,     4,     4,     4,     4,     4,     4,     2,     1,     1,
-     2,     1,     3,     1,     1,     1,     1,     1,     1,     1,
-     1,     1
+short yysindex[] = {                                   -186,
+ -192, -192,  -78,  -34, -192,    0,    0,   33,    0,    0,
+    0,  -25,    0,  -18, -167,    0, -256,    0,    0,    5,
+ -186, -101, -151,   93,   97,  112, -121,  109,  129,  142,
+  145,  146,  155,  156,  157,  158,  159,  160,  161,  162,
+  163,  164,  165,  166,  167,  168,  169,  170,  171,  172,
+  173,  174,   90,  176,  -38,    0,  177,  178,  179,  180,
+  181,  182,  184,  185,   91,  186,    0,    0,    0,    0,
+  187,  188,  189,  190,  191,  192,  193,  196,  197,  101,
+  194,    0,    0,    0,    0,    0,    0, -192, -192, -192,
+  198,  114, -167,  -87,  -86,  -84, -280, -280,  -83,  -81,
+  -80, -280, -280, -280,  -79,  -77, -280, -192, -192,  -76,
+ -192, -192,  -75, -280,  -73,  -72,  -71,    0, -256,  209,
+  217,  218,  219,  220,  221,  -38,  -38,  -47,    0,  222,
+ -192, -192, -192, -192,    0,    0, -192,    0, -101, -192,
+ -192, -192, -192, -192, -192, -192, -192,  223,    0, -151,
+  224,  225,  226, -173,    0,    0,  227,  228,  229,    0,
+    0,    0,  230,  231,  232,  233,  234,  235,  236,  243,
+  244,  245,  246,  247,  248,  249,  250,  254,  257,  258,
+  259,  260,  261,    0, -192, -192, -277,  -64, -192, -192,
+    0,  -33,  -38,  -38,  183,    0,  262,  263,  264,    0,
+  265,    0,  268, -221,  270, -155,  271,    0,    0,  272,
+    0,  273,    0,  275,    0,  276,    0,  277,    0,  280,
+    0,  281,  283,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,  284, -173,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,  285,  286,
+    0,  287,  288,    4,    6,  295,  -64,  296,  297,    0,
+   11,    0,    0,    0,    0,    0, -175,    0, -175,    0,
+  302,  303,  305,  306,    0, -221,    0,    0,  307,  308,
+  309,  310,  311,  312,  313,    0,    0,    0, -155,    0,
+   84,    0, -232,    0, -125,    0,    0,    0,    0,    0,
+    0,    0,    0, -219,  298,    0,    0,    0,    0,    0,
+    0,   29,    0,    0,    0,    0,  316,  318,  319,    0,
+    0, -175,    0, -192, -192, -307, -169,    0, -280,   34,
+ -307, -169, -146, -146, -146,    0,  320,    0,   84,  322,
+  323,  324,  325,  326,  327,  328,  329,  330,  331,  332,
+  333,  334,  335,    0,    0, -232,  336,  337,  338,  339,
+  342,    0, -125, -252, -210,  343,  344,    0, -219,    0,
+    0, -192, -192,   58,    0,  345,  346,  347,  348,  352,
+  353,  354,  355,  356,  357,    0,    0,    0,  358,  360,
+  361, -192,    0, -280,   76,   77, -280, -192, -192,   78,
+ -192, -280, -192, -192,   81, -280, -280,    0, -192, -280,
+ -192, -192,   83,    0,  373,  374,  375,  376,    0,    0,
+  378,  381,  382,  383,  384,  385,  386,    0,    0, -192,
+ -280,    0,  387,  388,  389,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,  390,  391,
+  392,  393,  394,  395,  396,  398,  399,  400,  401,  402,
+  403,  404,  405,  406,  407,  408,  409,  410, -192, -147,
+ -137, -134,  100, -147, -137, -134, -280, -280, -280,  411,
+  412,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,  413,  414,  415,  416,  417,  418,
+  419,  420,  421,  422,  423,  424,  425,  426,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,
 };
-
-static const short yydefact[] = {     3,
-     0,     0,     0,     0,     0,     1,     0,   201,   202,     4,
-     0,     5,     0,   138,     6,   150,     8,     7,     0,     3,
-    14,    67,     0,     0,     0,   143,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,     0,     2,     0,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,    15,    16,    17,    18,     0,
-     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-    68,    69,    70,    71,    72,    73,     0,     0,     0,     0,
-     0,   138,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,     0,    12,   150,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,   176,     0,     0,
-     0,     0,     0,    36,    47,     0,     9,    14,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,    10,    67,     0,
-     0,     0,   145,    11,   137,     0,     0,     0,   195,   196,
-   197,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,   149,     0,     0,     0,     0,     0,     0,   177,
-     0,     0,     0,     0,    19,     0,     0,     0,    28,     0,
-    26,     0,    39,     0,    50,     0,    61,    13,     0,    76,
-     0,    95,     0,   109,     0,   108,     0,   110,     0,   122,
-     0,     0,   136,    66,   139,   141,   140,   146,   147,   148,
-     0,   145,   151,   152,   153,   154,   155,   161,   159,   160,
-   156,   158,   157,   162,   163,   164,   168,   169,   170,   165,
-   166,   167,   171,   172,   173,   174,     0,     0,   190,     0,
-     0,   189,   194,     0,   192,     0,     0,   180,   178,   179,
-   175,    20,    21,    23,    31,    22,    31,    24,     0,     0,
-     0,     0,    37,    39,    40,    25,     0,     0,     0,     0,
-     0,     0,     0,    51,    48,    50,    57,    60,    64,    75,
-    79,    94,    98,   105,   104,   106,   113,   107,   125,   134,
-   135,     0,   144,   187,   184,   182,   181,   188,     0,   183,
-   191,   185,   186,     0,     0,     0,    29,    31,    35,    27,
-     0,     0,     0,     0,    38,     0,     0,     0,     0,     0,
-     0,     0,    49,     0,    62,    64,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-    80,    77,    79,     0,     0,     0,     0,     0,    96,    98,
-   111,   123,   142,   193,     0,     0,     0,    30,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,     0,   198,   199,
-   200,     0,     0,     0,     0,    63,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-    78,     0,     0,     0,     0,     0,    97,     0,     0,     0,
-     0,   118,   112,     0,     0,     0,     0,     0,     0,     0,
-   126,   124,     0,     0,     0,    43,    46,    44,    41,    45,
-    42,    58,    59,    52,    53,    55,    54,    56,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,     0,     0,     0,     0,    32,
-    33,    34,    65,    93,    81,    74,    90,    87,    88,    89,
-    91,    92,    84,    85,    86,    82,    83,   102,   103,    99,
-   100,   101,     0,     0,     0,     0,     0,     0,     0,     0,
-     0,     0,     0,     0,     0,     0,   114,   115,   119,   116,
-   120,   117,   121,   133,   127,   128,   129,   130,   131,   132,
-     0,     0,     0
+short yyrindex[] = {                                    468,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0, -114,    0,  349,    0,    0,    0,
+  468,  350,  351,    0,    0,    0,  101,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0, -114,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,  349,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,  350,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,  351,
+    0,    0,    0,  428,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,  429,    0,  430,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,  428,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,  431,  -32,    0,  432,    0,    0,    0,
+  -37,    0,    0,    0,    0,    0,  440,    0,  440,    0,
+    0,    0,    0,    0,    0,  429,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,  430,    0,
+  444,    0,  445,    0,  446,    0,    0,    0,    0,    0,
+    0,    0,    0,  447,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,  440,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,  444,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,  445,    0,    0,    0,    0,
+    0,    0,  446,  448,  449,    0,    0,    0,  447,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,
 };
-
-static const short yydefgoto[] = {   531,
-     6,     7,    10,    12,    15,    17,    64,    65,    66,    67,
-    68,   200,   277,   198,   275,   327,   328,   202,   203,   283,
-   284,   285,   204,   205,   295,   296,   329,    69,   206,   299,
-   345,   346,    79,    80,   361,    81,   209,   301,   362,   363,
-    82,   211,   303,   369,   370,    83,   215,   213,   217,   307,
-   371,   422,   423,   219,   309,   372,   432,    84,    85,    86,
-    26,    27,    91,   231,   232,    52,    53,    18,   127,   128,
-   261,   262,   264,   265,   162,   392,    11
+short yygindex[] = {                                      0,
+    0,    0,    0,    0,  359,    0,    0,    0,    0,    0,
+    0,    0,    0, -191,    0,    0,  341,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+    0,  427,    0,    0,  266,    0,  377,    0,    0, -113,
+    0,  237,    0,  238,    0,  -97, -225,   -2,  471,    0,
+ -263,    0,    0,    0,  207,    0,    0, -188,  195,    0,
+    0,  148,    0,    0,    0,  133,    0,    0,  122,    0,
+    0,    0,    0,    0,  127,    0,    0,    0,  124,    0,
+    0,
 };
-
-static const short yypact[] = {    85,
-     9,     9,   -68,   -63,     9,-32768,   -27,-32768,-32768,-32768,
-   -11,-32768,    -7,    11,-32768,    -5,-32768,-32768,    -3,    85,
-    90,   101,    -4,     3,    13,    76,    19,    37,    45,    46,
-    51,    52,    54,    55,    95,    96,   103,   104,   113,   114,
-   132,   134,   135,   137,   138,   139,   140,   142,   143,   144,
-   145,    78,    39,     1,-32768,   146,   147,   148,   149,   150,
-   151,   152,   153,   155,    79,-32768,-32768,-32768,-32768,   156,
-   157,   158,   160,   161,   162,   163,   164,   165,   167,   170,
--32768,-32768,-32768,-32768,-32768,-32768,     9,     9,     9,   168,
-   171,    11,   177,   179,   180,   -24,   -24,   181,   182,   183,
-   -24,   -24,   -24,   184,   185,   -24,     9,     9,   186,     9,
-     9,   187,   -24,   188,   189,   190,-32768,    -5,   191,   192,
-   193,   194,   195,   196,     1,     1,   -28,-32768,   129,     9,
-     9,     9,     9,-32768,-32768,     9,-32768,    90,     9,     9,
-     9,     9,     9,     9,     9,     9,   154,-32768,   101,   197,
-   198,   199,    36,-32768,-32768,   200,   201,   202,-32768,-32768,
--32768,   203,   204,   205,   206,   207,   208,   209,   210,   211,
-   212,   213,   214,   215,   216,   217,   218,   220,   221,   223,
-   224,   225,-32768,     9,     9,   -35,   236,     9,     9,-32768,
-   -30,     1,     1,   230,-32768,   229,   233,   234,-32768,   237,
--32768,   238,   119,   239,   141,   240,-32768,-32768,   241,-32768,
-   242,-32768,   243,-32768,   244,-32768,   245,-32768,   246,-32768,
-   251,   252,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-   253,    36,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,   256,   257,-32768,   258,
-   259,   270,   247,   261,   236,   262,   263,-32768,   271,-32768,
--32768,-32768,-32768,-32768,    77,-32768,    77,-32768,   231,   265,
-   267,   268,-32768,   119,-32768,-32768,   269,   272,   273,   274,
-   275,   276,   277,-32768,-32768,   141,-32768,-32768,   248,-32768,
-   121,-32768,   110,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,   281,-32768,-32768,-32768,-32768,-32768,-32768,   279,-32768,
--32768,-32768,-32768,   280,   282,   283,-32768,    77,-32768,-32768,
-     9,     9,   100,   107,-32768,   -24,   287,   100,   107,   131,
-   131,   131,-32768,   284,-32768,   248,   285,   286,   288,   289,
-   290,   291,   294,   295,   296,   297,   298,   299,   303,   304,
--32768,-32768,   121,   305,   306,   307,   308,   309,-32768,   110,
-    97,    18,-32768,-32768,     9,     9,   318,-32768,   310,   312,
-   313,   314,   315,   316,   319,   321,   324,   325,-32768,-32768,
--32768,   326,   327,   329,     9,-32768,   -24,   341,   342,   -24,
-     9,     9,   343,     9,   -24,     9,     9,   344,   -24,   -24,
--32768,     9,   -24,     9,     9,   345,-32768,   338,   339,   340,
-   346,-32768,-32768,   347,   348,   349,   350,   351,   352,   353,
--32768,-32768,   354,   355,   356,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   357,   358,
-   359,   360,   361,   362,   363,   364,   365,   366,   367,   368,
-   369,   370,   371,   372,   373,   374,   375,   376,     9,   130,
-   133,   136,   386,   130,   133,   136,   -24,   -24,   -24,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,   378,   379,   380,   381,   382,   383,   384,   389,
-   393,   394,   395,   396,   397,   398,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-   222,   266,-32768
+#define YYTABLESIZE 520
+short yytable[] = {                                      14,
+  164,  127,   20,  184,  168,  169,  170,  270,  200,  173,
+  144,  195,  191,  192,  296,  333,  180,  297,    9,  388,
+   10,  184,   29,   30,   31,   32,   33,   34,   35,   36,
+   37,   38,   39,   40,   41,   42,   43,   44,   45,  160,
+  161,   46,   47,   48,   15,  350,  162,  351,  261,  262,
+  425,  352,  426,  427,  428,   49,   50,   51,   52,  353,
+  354,  355,  356,  357,  358,  359,  360,  361,  385,  431,
+    1,    2,    3,    4,    5,  362,  376,  377,  363,  271,
+  272,  281,  282,  283,  284,  151,  152,  153,   17,   24,
+   25,   21,  425,   26,  432,  433,  434,   22,  435,  436,
+  437,  230,  231,  232,   23,  174,  175,  296,  177,  178,
+  297,   71,   72,   73,   74,   75,   76,   77,  400,  401,
+   78,   79,  327,  328,  329,  289,  290,   55,  197,  198,
+  200,  202,   88,    9,  208,   10,   89,  211,  213,  215,
+  217,  219,  221,  222,  224,  289,  290,  281,  282,  291,
+  292,   90,   91,  293,  294,  295,    9,  390,   10,  144,
+   57,   58,   59,   60,   61,   62,   63,   93,   94,   64,
+  367,  368,  369,  370,  371,  396,  397,  398,    9,  516,
+   10,   95,  259,  260,   96,   97,  268,  269,    9,  518,
+   10,    9,  520,   10,   98,   99,  100,  101,  102,  103,
+  104,  105,  106,  107,  108,  109,  110,  111,  112,  113,
+  114,  115,  116,  117,  118,  138,  130,  131,  132,  133,
+  134,  135,  120,  136,  137,  149,  140,  141,  142,  143,
+  144,  145,  146,  121,  119,  147,  148,  154,  155,  157,
+  158,  392,  159,  165,  139,  166,  167,  171,  185,  172,
+  176,  179,  150,  181,  182,  183,  186,  187,  188,  189,
+  190,  265,  196,  225,  227,  228,  229,  235,  236,  237,
+  238,  239,  240,  241,  242,  243,  244,  122,  123,  124,
+  125,  193,  194,  245,  246,  247,  248,  249,  250,  251,
+  252,  184,  126,  200,  253,  193,  194,  254,  255,  256,
+  257,  258,  274,  275,  276,  278,  460,  273,  280,  463,
+  288,  300,  302,  304,  468,  306,  307,  308,  472,  473,
+  310,  312,  475,  313,  315,  317,  318,  319,  320,  261,
+  322,  386,  387,  389,  391,  323,  325,  326,  394,  395,
+  194,  334,  335,  491,  336,  337,  339,  340,  341,  342,
+  343,  344,  345,  347,  381,  382,  380,  383,  384,  402,
+  393,  404,  405,  406,  407,  408,  409,  410,  411,  412,
+  413,  414,  415,  416,  417,  419,  420,  421,  422,  443,
+  444,  423,  440,  441,  445,  446,  447,  448,  449,  526,
+  527,  528,  450,  451,  452,  453,  454,  455,  456,  459,
+  457,  458,  461,  462,  466,  464,  465,  471,  467,  478,
+  469,  470,  479,  480,  481,  482,  474,  483,  476,  477,
+  484,  485,  486,  487,  488,  489,  522,  492,  493,  494,
+  495,  496,  497,  498,  499,  500,  501,  490,  502,  503,
+  504,  505,  506,  507,  508,  509,  510,  511,  512,  513,
+  514,  529,  530,  531,  532,  533,  534,  535,  536,  537,
+  538,  539,  540,  541,  542,  543,  544,    3,  151,   39,
+   50,  195,  198,  156,   14,   67,  515,  517,  519,  521,
+   31,  523,  524,  525,   64,   79,   98,  139,  111,  123,
+  226,   56,  338,  346,  424,  184,  403,  209,  418,  316,
+  321,  438,  442,    0,  324,    0,    0,    0,    0,    0,
+    0,    0,    0,    0,    0,    0,    0,    0,    0,  156,
 };
-
-static const short yypgoto[] = {-32768,
-   249,-32768,-32768,-32768,-32768,-32768,    74,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,  -268,-32768,-32768,-32768,   -70,
--32768,  -203,-32768,-32768,   -79,-32768,  -201,-32768,-32768,-32768,
-   -81,-32768,   118,-32768,-32768,-32768,-32768,-32768,   -95,-32768,
--32768,-32768,-32768,  -100,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,  -101,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-   260,-32768,-32768,   250,-32768,   317,-32768,-32768,  -113,-32768,
-    16,-32768,   159,-32768,   -96,  -280,    -2
+short yycheck[] = {                                       2,
+   98,   40,    5,   41,  102,  103,  104,   41,   41,  107,
+  125,   59,  126,  127,  206,  279,  114,  206,  326,  327,
+  328,   59,  279,  280,  281,  282,  283,  284,  285,  286,
+  287,  288,  289,  290,  291,  292,  293,  294,  295,  320,
+  321,  298,  299,  300,  123,  278,  327,  280,  326,  327,
+  303,  284,  305,  306,  307,  312,  313,  314,  315,  292,
+  293,  294,  295,  296,  297,  298,  299,  300,  332,  280,
+  257,  258,  259,  260,  261,  308,  296,  297,  311,  193,
+  194,  303,  304,  305,  306,   88,   89,   90,  123,  257,
+  258,   59,  303,  261,  305,  306,  307,  123,  309,  310,
+  311,  275,  276,  277,  123,  108,  109,  299,  111,  112,
+  299,  263,  264,  265,  266,  267,  268,  269,  344,  345,
+  272,  273,  298,  299,  300,  301,  302,  123,  131,  132,
+  133,  134,   40,  326,  137,  328,   40,  140,  141,  142,
+  143,  144,  145,  146,  147,  301,  302,  303,  304,  305,
+  306,   40,  274,  309,  310,  311,  326,  327,  328,  274,
+  262,  263,  264,  265,  266,  267,  268,   59,   40,  271,
+  296,  297,  298,  299,  300,  322,  323,  324,  326,  327,
+  328,   40,  185,  186,   40,   40,  189,  190,  326,  327,
+  328,  326,  327,  328,   40,   40,   40,   40,   40,   40,
+   40,   40,   40,   40,   40,   40,   40,   40,   40,   40,
+   40,   40,   40,   40,  125,  125,   40,   40,   40,   40,
+   40,   40,  261,   40,   40,  125,   40,   40,   40,   40,
+   40,   40,   40,  272,   59,   40,   40,   40,  125,  327,
+  327,  339,  327,  327,   59,  327,  327,  327,   40,  327,
+  327,  327,   59,  327,  327,  327,   40,   40,   40,   40,
+   40,  326,   41,   41,   41,   41,   41,   41,   41,   41,
+   41,   41,   41,   41,   41,   41,   41,  316,  317,  318,
+  319,  329,  330,   41,   41,   41,   41,   41,   41,   41,
+   41,  329,  331,  326,   41,  329,  330,   41,   41,   41,
+   41,   41,   41,   41,   41,   41,  404,  125,   41,  407,
+   41,   41,   41,   41,  412,   41,   41,   41,  416,  417,
+   41,   41,  420,   41,   41,   41,   41,   41,   41,  326,
+  325,  334,  335,  336,  337,   41,   41,   41,  341,  342,
+  330,   40,   40,  441,   40,   40,   40,   40,   40,   40,
+   40,   40,   40,  270,  326,   40,   59,   40,   40,   40,
+  327,   40,   40,   40,   40,   40,   40,   40,   40,   40,
+   40,   40,   40,   40,   40,   40,   40,   40,   40,  382,
+  383,   40,   40,   40,  327,   41,   41,   41,   41,  487,
+  488,  489,   41,   41,   41,   41,   41,   41,   41,  402,
+   41,   41,  327,  327,  327,  408,  409,  327,  411,  327,
+  413,  414,   40,   40,   40,   40,  419,   40,  421,  422,
+   40,   40,   40,   40,   40,   40,  327,   41,   41,   41,
+   41,   41,   41,   41,   41,   41,   41,  440,   41,   41,
+   41,   41,   41,   41,   41,   41,   41,   41,   41,   41,
+   41,   41,   41,   41,   41,   41,   41,   41,   41,   41,
+   41,   41,   41,   41,   41,   41,   41,    0,   41,   41,
+   41,   41,   41,  125,  125,  125,  479,  480,  481,  482,
+   41,  484,  485,  486,   41,   41,   41,   41,   41,   41,
+  150,   21,  286,  299,  373,  119,  349,  139,  366,  234,
+  264,  375,  379,   -1,  267,   -1,   -1,   -1,   -1,   -1,
+   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   93,
 };
-
-
-#define	YYLAST		482
-
-
-static const short yytable[] = {    13,
-   163,   294,    19,   297,   167,   168,   169,   119,   330,   172,
-    14,   190,   191,    23,    24,    16,   179,    25,   120,    28,
-    29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
-    39,    40,    41,    42,    43,    44,   259,   260,    45,    46,
-    47,   159,   160,   424,   192,   193,   192,   193,   161,   194,
-    20,   268,    48,    49,    50,    51,   228,   229,   230,   378,
-   393,   394,   121,   122,   123,   124,   418,    21,   425,   426,
-   427,    22,   428,   429,   430,    54,    87,   125,   269,   270,
-     8,   126,     9,    88,   150,   151,   152,     1,     2,     3,
-     4,     5,   294,    89,   297,    90,    92,    56,    57,    58,
-    59,    60,    61,    62,   173,   174,    63,   176,   177,    70,
-    71,    72,    73,    74,    75,    76,   118,    93,    77,    78,
-   324,   325,   326,   287,   288,    94,    95,   196,   197,   199,
-   201,    96,    97,   207,    98,    99,   210,   212,   214,   216,
-   218,   220,   221,   222,   347,   418,   348,   419,   420,   421,
-   349,   364,   365,   366,   367,   368,   138,   117,   350,   351,
-   352,   353,   354,   355,   356,   357,   358,   279,   280,   281,
-   282,     8,   381,     9,   359,   100,   101,   360,     8,   383,
-     9,   257,   258,   102,   103,   266,   267,   287,   288,   279,
-   280,   289,   290,   104,   105,   291,   292,   293,   389,   390,
-   391,     8,   504,     9,     8,   506,     9,     8,   508,     9,
-   195,   208,   106,   335,   107,   108,   343,   109,   110,   111,
-   112,   532,   113,   114,   115,   116,   129,   130,   131,   132,
-   133,   134,   135,   136,   137,   223,   139,   140,   141,   385,
-   142,   143,   144,   145,   146,   147,   148,   149,   153,   156,
-   154,   157,   158,   164,   165,   166,   170,   171,   175,   178,
-   180,   181,   182,   344,   396,   533,   224,   411,    55,   417,
-   431,   184,   185,   186,   187,   188,   189,   318,   225,   226,
-   227,   233,   234,   235,   236,   237,   238,   239,   240,   241,
-   242,   243,   244,   245,   246,   247,   248,   249,   250,   251,
-   450,   252,   253,   453,   254,   255,   256,   263,   458,   271,
-   272,   331,   462,   463,   273,   274,   465,   319,   276,   278,
-   286,   298,   300,   302,   304,   305,   306,   308,   379,   380,
-   382,   384,   310,   311,   312,   387,   388,   314,   315,   316,
-   317,   259,   320,   322,   323,   332,   193,   333,   334,   336,
-   374,   155,   337,   338,   339,   340,   341,   342,   373,   386,
-   375,     0,   376,   377,   395,   397,   398,     0,   399,   400,
-   401,   402,   433,   434,   403,   404,   405,   406,   407,   408,
-   514,   515,   516,   409,   410,   412,   413,   414,   415,   416,
-   435,   436,   449,   437,   438,   439,   440,   441,   454,   455,
-   442,   457,   443,   459,   460,   444,   445,   446,   447,   464,
-   448,   466,   467,   451,   452,   456,   461,   468,   469,   470,
-   471,     0,     0,   321,     0,     0,   472,   473,   474,   475,
-   476,   477,   478,   479,   183,   480,   481,   482,   483,   484,
-   485,   486,   487,   488,   489,   490,   491,   492,   493,   494,
-   495,   496,   497,   498,   499,   500,   501,   502,   510,   517,
-   518,   519,   520,   521,   522,   523,   503,   505,   507,   509,
-   524,   511,   512,   513,   525,   526,   527,   528,   529,   530,
-     0,   313
+#define YYFINAL 6
+#ifndef YYDEBUG
+#define YYDEBUG 0
+#endif
+#define YYMAXTOKEN 331
+#if YYDEBUG
+char *yyname[] = {
+"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,"'('","')'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"';'",0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"'{'",0,"'}'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"KW_SOURCE",
+"KW_DESTINATION","KW_LOG","KW_OPTIONS","KW_FILTER","KW_INTERNAL","KW_FILE",
+"KW_PIPE","KW_UNIX_STREAM","KW_UNIX_DGRAM","KW_UDP","KW_TCP","KW_USER",
+"KW_DOOR","KW_SUN_STREAMS","KW_PROGRAM","KW_REMCTRL","KW_FLAGS","KW_CATCHALL",
+"KW_FALLBACK","KW_FINAL","KW_FSYNC","KW_MARK_FREQ","KW_SYNC_FREQ",
+"KW_STATS_FREQ","KW_CHAIN_HOSTNAMES","KW_KEEP_HOSTNAME","KW_LOG_FIFO_SIZE",
+"KW_TIME_REOPEN","KW_TIME_REAP","KW_USE_TIME_RECVD","KW_USE_DNS","KW_USE_FQDN",
+"KW_GC_BUSY_THRESHOLD","KW_GC_IDLE_THRESHOLD","KW_CREATE_DIRS","KW_DIR_OWNER",
+"KW_DIR_GROUP","KW_DIR_PERM","KW_FILE_TEMPLATE","KW_TEMPLATE_ESCAPE","KW_OWNER",
+"KW_GROUP","KW_PERM","KW_KEEP_ALIVE","KW_MAX_CONNECTIONS","KW_LOCALIP","KW_IP",
+"KW_LOCALPORT","KW_PORT","KW_DESTPORT","KW_COMPRESS","KW_MAC","KW_AUTH",
+"KW_ENCRYPT","KW_DNS_CACHE","KW_DNS_CACHE_SIZE","KW_DNS_CACHE_EXPIRE",
+"KW_DNS_CACHE_EXPIRE_FAILED","KW_FACILITY","KW_LEVEL","KW_HOST","KW_MATCH",
+"KW_YES","KW_NO","KW_REQUIRED","KW_ALLOW","KW_DENY","DOTDOT","IDENTIFIER",
+"NUMBER","STRING","KW_OR","KW_AND","KW_NOT",
 };
-
-static const short yycheck[] = {     2,
-    97,   205,     5,   205,   101,   102,   103,     7,   277,   106,
-    79,   125,   126,     3,     4,    79,   113,     7,    18,    25,
-    26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
-    36,    37,    38,    39,    40,    41,    72,    73,    44,    45,
-    46,    66,    67,    26,    75,    76,    75,    76,    73,    78,
-    78,    82,    58,    59,    60,    61,    21,    22,    23,   328,
-   341,   342,    62,    63,    64,    65,    49,    79,    51,    52,
-    53,    79,    55,    56,    57,    79,    81,    77,   192,   193,
-    72,    81,    74,    81,    87,    88,    89,     3,     4,     5,
-     6,     7,   296,    81,   296,    20,    78,     8,     9,    10,
-    11,    12,    13,    14,   107,   108,    17,   110,   111,     9,
-    10,    11,    12,    13,    14,    15,    78,    81,    18,    19,
-    44,    45,    46,    47,    48,    81,    81,   130,   131,   132,
-   133,    81,    81,   136,    81,    81,   139,   140,   141,   142,
-   143,   144,   145,   146,    24,    49,    26,    51,    52,    53,
-    30,    42,    43,    44,    45,    46,    78,    80,    38,    39,
-    40,    41,    42,    43,    44,    45,    46,    49,    50,    51,
-    52,    72,    73,    74,    54,    81,    81,    57,    72,    73,
-    74,   184,   185,    81,    81,   188,   189,    47,    48,    49,
-    50,    51,    52,    81,    81,    55,    56,    57,    68,    69,
-    70,    72,    73,    74,    72,    73,    74,    72,    73,    74,
-    82,   138,    81,   284,    81,    81,   296,    81,    81,    81,
-    81,     0,    81,    81,    81,    81,    81,    81,    81,    81,
-    81,    81,    81,    81,    80,    82,    81,    81,    81,   336,
-    81,    81,    81,    81,    81,    81,    80,    78,    81,    73,
-    80,    73,    73,    73,    73,    73,    73,    73,    73,    73,
-    73,    73,    73,    16,   346,     0,   149,   363,    20,   370,
-   372,    81,    81,    81,    81,    81,    81,   262,    82,    82,
-    82,    82,    82,    82,    82,    82,    82,    82,    82,    82,
-    82,    82,    82,    82,    82,    82,    82,    82,    82,    82,
-   397,    82,    82,   400,    82,    82,    82,    72,   405,    80,
-    82,    81,   409,   410,    82,    82,   413,    71,    82,    82,
-    82,    82,    82,    82,    82,    82,    82,    82,   331,   332,
-   333,   334,    82,    82,    82,   338,   339,    82,    82,    82,
-    82,    72,    82,    82,    82,    81,    76,    81,    81,    81,
-    72,    92,    81,    81,    81,    81,    81,    81,    78,    73,
-    81,    -1,    81,    81,    81,    81,    81,    -1,    81,    81,
-    81,    81,   375,   376,    81,    81,    81,    81,    81,    81,
-   477,   478,   479,    81,    81,    81,    81,    81,    81,    81,
-    73,    82,   395,    82,    82,    82,    82,    82,   401,   402,
-    82,   404,    82,   406,   407,    82,    82,    82,    82,   412,
-    82,   414,   415,    73,    73,    73,    73,    73,    81,    81,
-    81,    -1,    -1,   265,    -1,    -1,    81,    81,    81,    81,
-    81,    81,    81,    81,   118,    82,    82,    82,    82,    82,
-    82,    82,    82,    82,    82,    82,    82,    82,    82,    82,
-    82,    82,    82,    82,    82,    82,    82,    82,    73,    82,
-    82,    82,    82,    82,    82,    82,   469,   470,   471,   472,
-    82,   474,   475,   476,    82,    82,    82,    82,    82,    82,
-    -1,   232
+char *yyrule[] = {
+"$accept : start",
+"start : stmts",
+"stmts : stmt ';' stmts",
+"stmts :",
+"stmt : KW_SOURCE source_stmt",
+"stmt : KW_DESTINATION dest_stmt",
+"stmt : KW_LOG log_stmt",
+"stmt : KW_FILTER filter_stmt",
+"stmt : KW_OPTIONS options_stmt",
+"source_stmt : string '{' source_items '}'",
+"dest_stmt : string '{' dest_items '}'",
+"log_stmt : '{' log_items log_flags '}'",
+"options_stmt : '{' options_items '}'",
+"source_items : source_item ';' source_items",
+"source_items :",
+"source_item : source_afinter",
+"source_item : source_affile",
+"source_item : source_afsocket",
+"source_item : source_afstreams",
+"source_afinter : KW_INTERNAL '(' ')'",
+"source_affile : KW_FILE '(' string ')'",
+"source_affile : KW_PIPE '(' string ')'",
+"source_afsocket : KW_UNIX_DGRAM '(' source_afunix_dgram_params ')'",
+"source_afsocket : KW_UNIX_STREAM '(' source_afunix_stream_params ')'",
+"source_afsocket : KW_UDP '(' source_afinet_udp_params ')'",
+"source_afsocket : KW_TCP '(' source_afinet_tcp_params ')'",
+"$$1 :",
+"source_afunix_dgram_params : string $$1 source_afunix_options",
+"$$2 :",
+"source_afunix_stream_params : string $$2 source_afunix_options",
+"source_afunix_options : source_afunix_option source_afunix_options",
+"source_afunix_options :",
+"source_afunix_option : KW_OWNER '(' string ')'",
+"source_afunix_option : KW_GROUP '(' string ')'",
+"source_afunix_option : KW_PERM '(' NUMBER ')'",
+"source_afunix_option : source_afsocket_stream_params",
+"$$3 :",
+"source_afinet_udp_params : $$3 source_afinet_udp_options",
+"source_afinet_udp_options : source_afinet_udp_option source_afinet_udp_options",
+"source_afinet_udp_options :",
+"source_afinet_udp_option : source_afinet_option",
+"source_afinet_udp_option : KW_LOCALPORT '(' string ')'",
+"source_afinet_udp_option : KW_PORT '(' string ')'",
+"source_afinet_option : KW_LOCALIP '(' string ')'",
+"source_afinet_option : KW_LOCALPORT '(' NUMBER ')'",
+"source_afinet_option : KW_PORT '(' NUMBER ')'",
+"source_afinet_option : KW_IP '(' string ')'",
+"$$4 :",
+"source_afinet_tcp_params : $$4 source_afinet_tcp_options",
+"source_afinet_tcp_options : source_afinet_tcp_option source_afinet_tcp_options",
+"source_afinet_tcp_options :",
+"source_afinet_tcp_option : source_afinet_option",
+"source_afinet_tcp_option : KW_LOCALPORT '(' string ')'",
+"source_afinet_tcp_option : KW_PORT '(' string ')'",
+"source_afinet_tcp_option : KW_AUTH '(' tripleoption ')'",
+"source_afinet_tcp_option : KW_MAC '(' tripleoption ')'",
+"source_afinet_tcp_option : KW_ENCRYPT '(' tripleoption ')'",
+"source_afinet_tcp_option : source_afsocket_stream_params",
+"source_afsocket_stream_params : KW_KEEP_ALIVE '(' yesno ')'",
+"source_afsocket_stream_params : KW_MAX_CONNECTIONS '(' NUMBER ')'",
+"source_afstreams : KW_SUN_STREAMS '(' source_afstreams_params ')'",
+"$$5 :",
+"source_afstreams_params : string $$5 source_afstreams_options",
+"source_afstreams_options : source_afstreams_option source_afstreams_options",
+"source_afstreams_options :",
+"source_afstreams_option : KW_DOOR '(' string ')'",
+"dest_items : dest_item ';' dest_items",
+"dest_items :",
+"dest_item : dest_affile",
+"dest_item : dest_afpipe",
+"dest_item : dest_afsocket",
+"dest_item : dest_afuser",
+"dest_item : dest_afprogram",
+"dest_item : dest_afremctrl",
+"dest_item_option : KW_LOG_FIFO_SIZE '(' NUMBER ')'",
+"dest_affile : KW_FILE '(' dest_affile_params ')'",
+"$$6 :",
+"dest_affile_params : string $$6 dest_affile_options",
+"dest_affile_options : dest_affile_option dest_affile_options",
+"dest_affile_options :",
+"dest_affile_option : dest_item_option",
+"dest_affile_option : KW_SYNC_FREQ '(' NUMBER ')'",
+"dest_affile_option : KW_COMPRESS '(' yesno ')'",
+"dest_affile_option : KW_ENCRYPT '(' yesno ')'",
+"dest_affile_option : KW_OWNER '(' string ')'",
+"dest_affile_option : KW_GROUP '(' string ')'",
+"dest_affile_option : KW_PERM '(' NUMBER ')'",
+"dest_affile_option : KW_DIR_OWNER '(' string ')'",
+"dest_affile_option : KW_DIR_GROUP '(' string ')'",
+"dest_affile_option : KW_DIR_PERM '(' NUMBER ')'",
+"dest_affile_option : KW_CREATE_DIRS '(' yesno ')'",
+"dest_affile_option : KW_FILE_TEMPLATE '(' string ')'",
+"dest_affile_option : KW_TEMPLATE_ESCAPE '(' yesno ')'",
+"dest_affile_option : KW_FSYNC '(' yesno ')'",
+"dest_afpipe : KW_PIPE '(' dest_afpipe_params ')'",
+"$$7 :",
+"dest_afpipe_params : string $$7 dest_afpipe_options",
+"dest_afpipe_options : dest_afpipe_option dest_afpipe_options",
+"dest_afpipe_options :",
+"dest_afpipe_option : KW_OWNER '(' string ')'",
+"dest_afpipe_option : KW_GROUP '(' string ')'",
+"dest_afpipe_option : KW_PERM '(' NUMBER ')'",
+"dest_afpipe_option : KW_FILE_TEMPLATE '(' string ')'",
+"dest_afpipe_option : KW_TEMPLATE_ESCAPE '(' yesno ')'",
+"dest_afsocket : KW_UNIX_DGRAM '(' dest_afunix_dgram_params ')'",
+"dest_afsocket : KW_UNIX_STREAM '(' dest_afunix_stream_params ')'",
+"dest_afsocket : KW_UDP '(' dest_afinet_udp_params ')'",
+"dest_afsocket : KW_TCP '(' dest_afinet_tcp_params ')'",
+"dest_afunix_dgram_params : string",
+"dest_afunix_stream_params : string",
+"$$8 :",
+"dest_afinet_udp_params : string $$8 dest_afinet_udp_options",
+"dest_afinet_udp_options : dest_afinet_udp_options dest_afinet_udp_option",
+"dest_afinet_udp_options :",
+"dest_afinet_option : KW_LOCALIP '(' string ')'",
+"dest_afinet_option : KW_LOCALPORT '(' NUMBER ')'",
+"dest_afinet_option : KW_PORT '(' NUMBER ')'",
+"dest_afinet_option : KW_DESTPORT '(' NUMBER ')'",
+"dest_afinet_udp_option : dest_afinet_option",
+"dest_afinet_udp_option : KW_LOCALPORT '(' string ')'",
+"dest_afinet_udp_option : KW_PORT '(' string ')'",
+"dest_afinet_udp_option : KW_DESTPORT '(' string ')'",
+"$$9 :",
+"dest_afinet_tcp_params : string $$9 dest_afinet_tcp_options",
+"dest_afinet_tcp_options : dest_afinet_tcp_options dest_afinet_tcp_option",
+"dest_afinet_tcp_options :",
+"dest_afinet_tcp_option : dest_afinet_option",
+"dest_afinet_tcp_option : KW_LOCALPORT '(' string ')'",
+"dest_afinet_tcp_option : KW_PORT '(' string ')'",
+"dest_afinet_tcp_option : KW_DESTPORT '(' string ')'",
+"dest_afinet_tcp_option : KW_MAC '(' yesno ')'",
+"dest_afinet_tcp_option : KW_AUTH '(' yesno ')'",
+"dest_afinet_tcp_option : KW_ENCRYPT '(' yesno ')'",
+"dest_afinet_tcp_option : KW_SYNC_FREQ '(' NUMBER ')'",
+"dest_afuser : KW_USER '(' string ')'",
+"dest_afprogram : KW_PROGRAM '(' dest_afprogram_params ')'",
+"$$10 :",
+"dest_afprogram_params : string $$10 dest_afprogram_options",
+"dest_afprogram_options : dest_afprogram_option dest_afprogram_options",
+"dest_afprogram_options :",
+"dest_afprogram_option : KW_FILE_TEMPLATE '(' string ')'",
+"dest_afprogram_option : KW_TEMPLATE_ESCAPE '(' yesno ')'",
+"dest_afremctrl : KW_REMCTRL '(' ')'",
+"log_items : log_item ';' log_items",
+"log_items :",
+"log_item : KW_SOURCE '(' string ')'",
+"log_item : KW_FILTER '(' string ')'",
+"log_item : KW_DESTINATION '(' string ')'",
+"log_flags : KW_FLAGS '(' log_flags_items ')' ';'",
+"log_flags :",
+"log_flags_items : log_flags_item log_flags_items",
+"log_flags_items :",
+"log_flags_item : KW_CATCHALL",
+"log_flags_item : KW_FALLBACK",
+"log_flags_item : KW_FINAL",
+"options_items : options_item ';' options_items",
+"options_items :",
+"options_item : KW_MARK_FREQ '(' NUMBER ')'",
+"options_item : KW_SYNC_FREQ '(' NUMBER ')'",
+"options_item : KW_STATS_FREQ '(' NUMBER ')'",
+"options_item : KW_CHAIN_HOSTNAMES '(' yesno ')'",
+"options_item : KW_KEEP_HOSTNAME '(' yesno ')'",
+"options_item : KW_USE_TIME_RECVD '(' yesno ')'",
+"options_item : KW_USE_FQDN '(' yesno ')'",
+"options_item : KW_USE_DNS '(' yesno ')'",
+"options_item : KW_TIME_REOPEN '(' NUMBER ')'",
+"options_item : KW_TIME_REAP '(' NUMBER ')'",
+"options_item : KW_LOG_FIFO_SIZE '(' NUMBER ')'",
+"options_item : KW_GC_BUSY_THRESHOLD '(' NUMBER ')'",
+"options_item : KW_GC_IDLE_THRESHOLD '(' NUMBER ')'",
+"options_item : KW_CREATE_DIRS '(' yesno ')'",
+"options_item : KW_OWNER '(' string ')'",
+"options_item : KW_GROUP '(' string ')'",
+"options_item : KW_PERM '(' NUMBER ')'",
+"options_item : KW_DIR_OWNER '(' string ')'",
+"options_item : KW_DIR_GROUP '(' string ')'",
+"options_item : KW_DIR_PERM '(' NUMBER ')'",
+"options_item : KW_DNS_CACHE '(' yesno ')'",
+"options_item : KW_DNS_CACHE_SIZE '(' NUMBER ')'",
+"options_item : KW_DNS_CACHE_EXPIRE '(' NUMBER ')'",
+"options_item : KW_DNS_CACHE_EXPIRE_FAILED '(' NUMBER ')'",
+"filter_stmt : string '{' filter_expr ';' '}'",
+"filter_expr : filter_simple_expr",
+"filter_expr : KW_NOT filter_expr",
+"filter_expr : filter_expr KW_OR filter_expr",
+"filter_expr : filter_expr KW_AND filter_expr",
+"filter_expr : '(' filter_expr ')'",
+"filter_simple_expr : KW_FACILITY '(' filter_fac_list ')'",
+"filter_simple_expr : KW_FACILITY '(' NUMBER ')'",
+"filter_simple_expr : KW_LEVEL '(' filter_level_list ')'",
+"filter_simple_expr : KW_PROGRAM '(' string ')'",
+"filter_simple_expr : KW_HOST '(' string ')'",
+"filter_simple_expr : KW_MATCH '(' string ')'",
+"filter_simple_expr : KW_FILTER '(' string ')'",
+"filter_fac_list : filter_fac filter_fac_list",
+"filter_fac_list : filter_fac",
+"filter_fac : IDENTIFIER",
+"filter_level_list : filter_level filter_level_list",
+"filter_level_list : filter_level",
+"filter_level : IDENTIFIER DOTDOT IDENTIFIER",
+"filter_level : IDENTIFIER",
+"yesno : KW_YES",
+"yesno : KW_NO",
+"yesno : NUMBER",
+"tripleoption : KW_REQUIRED",
+"tripleoption : KW_ALLOW",
+"tripleoption : KW_DENY",
+"string : IDENTIFIER",
+"string : STRING",
 };
-/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
-#line 3 "/usr/share/misc/bison.simple"
-/* This file comes from bison-1.28.  */
-
-/* Skeleton output parser for bison,
-   Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
-/* As a special exception, when this file is copied by Bison into a
-   Bison output file, you may use that output file without restriction.
-   This special exception was added by the Free Software Foundation
-   in version 1.24 of Bison.  */
-
-/* This is the parser code that is written into each bison parser
-  when the %semantic_parser declaration is not specified in the grammar.
-  It was written by Richard Stallman by simplifying the hairy parser
-  used when %semantic_parser is specified.  */
-
-#ifndef YYSTACK_USE_ALLOCA
-#ifdef alloca
-#define YYSTACK_USE_ALLOCA
-#else /* alloca not defined */
-#ifdef __GNUC__
-#define YYSTACK_USE_ALLOCA
-#define alloca __builtin_alloca
-#else /* not GNU C.  */
-#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
-#define YYSTACK_USE_ALLOCA
-#include <alloca.h>
-#else /* not sparc */
-/* We think this test detects Watcom and Microsoft C.  */
-/* This used to test MSDOS, but that is a bad idea
-   since that symbol is in the user namespace.  */
-#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
-#if 0 /* No need for malloc.h, which pollutes the namespace;
-	 instead, just don't use alloca.  */
-#include <malloc.h>
-#endif
-#else /* not MSDOS, or __TURBOC__ */
-#if defined(_AIX)
-/* I don't know what this was needed for, but it pollutes the namespace.
-   So I turned it off.   rms, 2 May 1997.  */
-/* #include <malloc.h>  */
- #pragma alloca
-#define YYSTACK_USE_ALLOCA
-#else /* not MSDOS, or __TURBOC__, or _AIX */
-#if 0
-#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
-		 and on HPUX 10.  Eventually we can turn this on.  */
-#define YYSTACK_USE_ALLOCA
-#define alloca __builtin_alloca
-#endif /* __hpux */
-#endif
-#endif /* not _AIX */
-#endif /* not MSDOS, or __TURBOC__ */
-#endif /* not sparc */
-#endif /* not GNU C */
-#endif /* alloca not defined */
-#endif /* YYSTACK_USE_ALLOCA not defined */
-
-#ifdef YYSTACK_USE_ALLOCA
-#define YYSTACK_ALLOC alloca
-#else
-#define YYSTACK_ALLOC malloc
 #endif
-
-/* Note: there must be only one dollar sign in this file.
-   It is replaced by the list of actions, each action
-   as one case of the switch.  */
-
-#define yyerrok		(yyerrstatus = 0)
-#define yyclearin	(yychar = YYEMPTY)
-#define YYEMPTY		-2
-#define YYEOF		0
-#define YYACCEPT	goto yyacceptlab
-#define YYABORT 	goto yyabortlab
-#define YYERROR		goto yyerrlab1
-/* Like YYERROR except do call yyerror.
-   This remains here temporarily to ease the
-   transition to the new meaning of YYERROR, for GCC.
-   Once GCC version 2 has supplanted version 1, this can go.  */
-#define YYFAIL		goto yyerrlab
-#define YYRECOVERING()  (!!yyerrstatus)
-#define YYBACKUP(token, value) \
-do								\
-  if (yychar == YYEMPTY && yylen == 1)				\
-    { yychar = (token), yylval = (value);			\
-      yychar1 = YYTRANSLATE (yychar);				\
-      YYPOPSTACK;						\
-      goto yybackup;						\
-    }								\
-  else								\
-    { yyerror ("syntax error: cannot back up"); YYERROR; }	\
-while (0)
-
-#define YYTERROR	1
-#define YYERRCODE	256
-
-#ifndef YYPURE
-#define YYLEX		yylex()
-#endif
-
-#ifdef YYPURE
-#ifdef YYLSP_NEEDED
-#ifdef YYLEX_PARAM
-#define YYLEX		yylex(&yylval, &yylloc, YYLEX_PARAM)
+#ifdef YYSTACKSIZE
+#undef YYMAXDEPTH
+#define YYMAXDEPTH YYSTACKSIZE
 #else
-#define YYLEX		yylex(&yylval, &yylloc)
-#endif
-#else /* not YYLSP_NEEDED */
-#ifdef YYLEX_PARAM
-#define YYLEX		yylex(&yylval, YYLEX_PARAM)
+#ifdef YYMAXDEPTH
+#define YYSTACKSIZE YYMAXDEPTH
 #else
-#define YYLEX		yylex(&yylval)
-#endif
-#endif /* not YYLSP_NEEDED */
+#define YYSTACKSIZE 500
+#define YYMAXDEPTH 500
 #endif
-
-/* If nonreentrant, generate the variables here */
-
-#ifndef YYPURE
-
-int	yychar;			/*  the lookahead symbol		*/
-YYSTYPE	yylval;			/*  the semantic value of the		*/
-				/*  lookahead symbol			*/
-
-#ifdef YYLSP_NEEDED
-YYLTYPE yylloc;			/*  location data for the lookahead	*/
-				/*  symbol				*/
-#endif
-
-int yynerrs;			/*  number of parse errors so far       */
-#endif  /* not YYPURE */
-
-#if YYDEBUG != 0
-int yydebug;			/*  nonzero means print parse trace	*/
-/* Since this is uninitialized, it does not stop multiple parsers
-   from coexisting.  */
-#endif
-
-/*  YYINITDEPTH indicates the initial size of the parser's stacks	*/
-
-#ifndef	YYINITDEPTH
-#define YYINITDEPTH 200
-#endif
-
-/*  YYMAXDEPTH is the maximum size the stacks can grow to
-    (effective only if the built-in stack extension method is used).  */
-
-#if YYMAXDEPTH == 0
-#undef YYMAXDEPTH
-#endif
-
-#ifndef YYMAXDEPTH
-#define YYMAXDEPTH 10000
 #endif
-
-/* Define __yy_memcpy.  Note that the size argument
-   should be passed with type unsigned int, because that is what the non-GCC
-   definitions require.  With GCC, __builtin_memcpy takes an arg
-   of type size_t, but it can handle unsigned int.  */
+int yydebug;
+int yynerrs;
+int yyerrflag;
+int yychar;
+short *yyssp;
+YYSTYPE *yyvsp;
+YYSTYPE yyval;
+YYSTYPE yylval;
+short yyss[YYSTACKSIZE];
+YYSTYPE yyvs[YYSTACKSIZE];
+#define yystacksize YYSTACKSIZE
+#line 687 "cfg-grammar.y"
 
-#if __GNUC__ > 1		/* GNU C and GNU C++ define this.  */
-#define __yy_memcpy(TO,FROM,COUNT)	__builtin_memcpy(TO,FROM,COUNT)
-#else				/* not GNU C or C++ */
-#ifndef __cplusplus
-
-/* This is the most reliable way to avoid incompatibilities
-   in available built-in functions on various systems.  */
-static void
-__yy_memcpy (to, from, count)
-     char *to;
-     char *from;
-     unsigned int count;
-{
-  register char *f = from;
-  register char *t = to;
-  register int i = count;
-
-  while (i-- > 0)
-    *t++ = *f++;
-}
-
-#else /* __cplusplus */
+extern int linenum;
 
-/* This is the most reliable way to avoid incompatibilities
-   in available built-in functions on various systems.  */
-static void
-__yy_memcpy (char *to, char *from, unsigned int count)
+void yyerror(char *msg)
 {
-  register char *t = to;
-  register char *f = from;
-  register int i = count;
-
-  while (i-- > 0)
-    *t++ = *f++;
+	fprintf(stderr, "%s at %d\n", msg, linenum);
 }
-
-#endif
-#endif
-
-#line 217 "/usr/share/misc/bison.simple"
-
-/* The user can define YYPARSE_PARAM as the name of an argument to be passed
-   into yyparse.  The argument should have type void *.
-   It should actually point to an object.
-   Grammar actions can access the variable by casting it
-   to the proper pointer type.  */
-
-#ifdef YYPARSE_PARAM
-#ifdef __cplusplus
-#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
-#define YYPARSE_PARAM_DECL
-#else /* not __cplusplus */
-#define YYPARSE_PARAM_ARG YYPARSE_PARAM
-#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
-#endif /* not __cplusplus */
-#else /* not YYPARSE_PARAM */
-#define YYPARSE_PARAM_ARG
-#define YYPARSE_PARAM_DECL
-#endif /* not YYPARSE_PARAM */
-
-/* Prevent warning if -Wstrict-prototypes.  */
-#ifdef __GNUC__
-#ifdef YYPARSE_PARAM
-int yyparse (void *);
-#else
-int yyparse (void);
-#endif
-#endif
-
+#line 739 "y.tab.c"
+#define YYABORT goto yyabort
+#define YYREJECT goto yyabort
+#define YYACCEPT goto yyaccept
+#define YYERROR goto yyerrlab
 int
-yyparse(YYPARSE_PARAM_ARG)
-     YYPARSE_PARAM_DECL
-{
-  register int yystate;
-  register int yyn;
-  register short *yyssp;
-  register YYSTYPE *yyvsp;
-  int yyerrstatus;	/*  number of tokens to shift before error messages enabled */
-  int yychar1 = 0;		/*  lookahead token as an internal (translated) token number */
-
-  short	yyssa[YYINITDEPTH];	/*  the state stack			*/
-  YYSTYPE yyvsa[YYINITDEPTH];	/*  the semantic value stack		*/
-
-  short *yyss = yyssa;		/*  refer to the stacks thru separate pointers */
-  YYSTYPE *yyvs = yyvsa;	/*  to allow yyoverflow to reallocate them elsewhere */
-
-#ifdef YYLSP_NEEDED
-  YYLTYPE yylsa[YYINITDEPTH];	/*  the location stack			*/
-  YYLTYPE *yyls = yylsa;
-  YYLTYPE *yylsp;
-
-#define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
+#if defined(__STDC__)
+yyparse(void)
 #else
-#define YYPOPSTACK   (yyvsp--, yyssp--)
+yyparse()
 #endif
+{
+    register int yym, yyn, yystate;
+#if YYDEBUG
+    register char *yys;
+    extern char *getenv();
 
-  int yystacksize = YYINITDEPTH;
-  int yyfree_stacks = 0;
-
-#ifdef YYPURE
-  int yychar;
-  YYSTYPE yylval;
-  int yynerrs;
-#ifdef YYLSP_NEEDED
-  YYLTYPE yylloc;
-#endif
-#endif
-
-  YYSTYPE yyval;		/*  the variable used to return		*/
-				/*  semantic values from the action	*/
-				/*  routines				*/
-
-  int yylen;
-
-#if YYDEBUG != 0
-  if (yydebug)
-    fprintf(stderr, "Starting parse\n");
-#endif
-
-  yystate = 0;
-  yyerrstatus = 0;
-  yynerrs = 0;
-  yychar = YYEMPTY;		/* Cause a token to be read.  */
-
-  /* Initialize stack pointers.
-     Waste one element of value and location stack
-     so that they stay on the same level as the state stack.
-     The wasted elements are never initialized.  */
-
-  yyssp = yyss - 1;
-  yyvsp = yyvs;
-#ifdef YYLSP_NEEDED
-  yylsp = yyls;
-#endif
-
-/* Push a new state, which is found in  yystate  .  */
-/* In all cases, when you get here, the value and location stacks
-   have just been pushed. so pushing a state here evens the stacks.  */
-yynewstate:
-
-  *++yyssp = yystate;
-
-  if (yyssp >= yyss + yystacksize - 1)
+    if (yys = getenv("YYDEBUG"))
     {
-      /* Give user a chance to reallocate the stack */
-      /* Use copies of these so that the &'s don't force the real ones into memory. */
-      YYSTYPE *yyvs1 = yyvs;
-      short *yyss1 = yyss;
-#ifdef YYLSP_NEEDED
-      YYLTYPE *yyls1 = yyls;
-#endif
-
-      /* Get the current used size of the three stacks, in elements.  */
-      int size = yyssp - yyss + 1;
-
-#ifdef yyoverflow
-      /* Each stack pointer address is followed by the size of
-	 the data in use in that stack, in bytes.  */
-#ifdef YYLSP_NEEDED
-      /* This used to be a conditional around just the two extra args,
-	 but that might be undefined if yyoverflow is a macro.  */
-      yyoverflow("parser stack overflow",
-		 &yyss1, size * sizeof (*yyssp),
-		 &yyvs1, size * sizeof (*yyvsp),
-		 &yyls1, size * sizeof (*yylsp),
-		 &yystacksize);
-#else
-      yyoverflow("parser stack overflow",
-		 &yyss1, size * sizeof (*yyssp),
-		 &yyvs1, size * sizeof (*yyvsp),
-		 &yystacksize);
-#endif
-
-      yyss = yyss1; yyvs = yyvs1;
-#ifdef YYLSP_NEEDED
-      yyls = yyls1;
-#endif
-#else /* no yyoverflow */
-      /* Extend the stack our own way.  */
-      if (yystacksize >= YYMAXDEPTH)
-	{
-	  yyerror("parser stack overflow");
-	  if (yyfree_stacks)
-	    {
-	      free (yyss);
-	      free (yyvs);
-#ifdef YYLSP_NEEDED
-	      free (yyls);
-#endif
-	    }
-	  return 2;
-	}
-      yystacksize *= 2;
-      if (yystacksize > YYMAXDEPTH)
-	yystacksize = YYMAXDEPTH;
-#ifndef YYSTACK_USE_ALLOCA
-      yyfree_stacks = 1;
-#endif
-      yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
-      __yy_memcpy ((char *)yyss, (char *)yyss1,
-		   size * (unsigned int) sizeof (*yyssp));
-      yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
-      __yy_memcpy ((char *)yyvs, (char *)yyvs1,
-		   size * (unsigned int) sizeof (*yyvsp));
-#ifdef YYLSP_NEEDED
-      yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
-      __yy_memcpy ((char *)yyls, (char *)yyls1,
-		   size * (unsigned int) sizeof (*yylsp));
-#endif
-#endif /* no yyoverflow */
-
-      yyssp = yyss + size - 1;
-      yyvsp = yyvs + size - 1;
-#ifdef YYLSP_NEEDED
-      yylsp = yyls + size - 1;
-#endif
-
-#if YYDEBUG != 0
-      if (yydebug)
-	fprintf(stderr, "Stack size increased to %d\n", yystacksize);
-#endif
-
-      if (yyssp >= yyss + yystacksize - 1)
-	YYABORT;
+        yyn = *yys;
+        if (yyn >= '0' && yyn <= '9')
+            yydebug = yyn - '0';
     }
-
-#if YYDEBUG != 0
-  if (yydebug)
-    fprintf(stderr, "Entering state %d\n", yystate);
 #endif
 
-  goto yybackup;
- yybackup:
-
-/* Do appropriate processing given the current state.  */
-/* Read a lookahead token if we need one and don't already have one.  */
-/* yyresume: */
-
-  /* First try to decide what to do without reference to lookahead token.  */
-
-  yyn = yypact[yystate];
-  if (yyn == YYFLAG)
-    goto yydefault;
-
-  /* Not known => get a lookahead token if don't already have one.  */
-
-  /* yychar is either YYEMPTY or YYEOF
-     or a valid token in external form.  */
-
-  if (yychar == YYEMPTY)
+    yynerrs = 0;
+    yyerrflag = 0;
+    yychar = (-1);
+
+    yyssp = yyss;
+    yyvsp = yyvs;
+    *yyssp = yystate = 0;
+
+yyloop:
+    if ((yyn = yydefred[yystate]) != 0) goto yyreduce;
+    if (yychar < 0)
     {
-#if YYDEBUG != 0
-      if (yydebug)
-	fprintf(stderr, "Reading a token: ");
+        if ((yychar = yylex()) < 0) yychar = 0;
+#if YYDEBUG
+        if (yydebug)
+        {
+            yys = 0;
+            if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
+            if (!yys) yys = "illegal-symbol";
+            printf("%sdebug: state %d, reading %d (%s)\n",
+                    YYPREFIX, yystate, yychar, yys);
+        }
 #endif
-      yychar = YYLEX;
     }
-
-  /* Convert token to internal form (in yychar1) for indexing tables with */
-
-  if (yychar <= 0)		/* This means end of input. */
+    if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&
+            yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
     {
-      yychar1 = 0;
-      yychar = YYEOF;		/* Don't call YYLEX any more */
-
-#if YYDEBUG != 0
-      if (yydebug)
-	fprintf(stderr, "Now at end of input.\n");
-#endif
-    }
-  else
-    {
-      yychar1 = YYTRANSLATE(yychar);
-
-#if YYDEBUG != 0
-      if (yydebug)
-	{
-	  fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
-	  /* Give the individual parser a way to print the precise meaning
-	     of a token, for further debugging info.  */
-#ifdef YYPRINT
-	  YYPRINT (stderr, yychar, yylval);
-#endif
-	  fprintf (stderr, ")\n");
-	}
-#endif
+#if YYDEBUG
+        if (yydebug)
+            printf("%sdebug: state %d, shifting to state %d\n",
+                    YYPREFIX, yystate, yytable[yyn]);
+#endif
+        if (yyssp >= yyss + yystacksize - 1)
+        {
+            goto yyoverflow;
+        }
+        *++yyssp = yystate = yytable[yyn];
+        *++yyvsp = yylval;
+        yychar = (-1);
+        if (yyerrflag > 0)  --yyerrflag;
+        goto yyloop;
     }
-
-  yyn += yychar1;
-  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
-    goto yydefault;
-
-  yyn = yytable[yyn];
-
-  /* yyn is what to do for this token type in this state.
-     Negative => reduce, -yyn is rule number.
-     Positive => shift, yyn is new state.
-       New state is final state => don't bother to shift,
-       just return success.
-     0, or most negative number => error.  */
-
-  if (yyn < 0)
+    if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&
+            yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
     {
-      if (yyn == YYFLAG)
-	goto yyerrlab;
-      yyn = -yyn;
-      goto yyreduce;
+        yyn = yytable[yyn];
+        goto yyreduce;
     }
-  else if (yyn == 0)
+    if (yyerrflag) goto yyinrecovery;
+    yyerror("syntax error");
+#ifdef lint
     goto yyerrlab;
-
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
-  /* Shift the lookahead token.  */
-
-#if YYDEBUG != 0
-  if (yydebug)
-    fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
 #endif
-
-  /* Discard the token being shifted unless it is eof.  */
-  if (yychar != YYEOF)
-    yychar = YYEMPTY;
-
-  *++yyvsp = yylval;
-#ifdef YYLSP_NEEDED
-  *++yylsp = yylloc;
-#endif
-
-  /* count tokens shifted since error; after three, turn off error status.  */
-  if (yyerrstatus) yyerrstatus--;
-
-  yystate = yyn;
-  goto yynewstate;
-
-/* Do the default action for the current state.  */
-yydefault:
-
-  yyn = yydefact[yystate];
-  if (yyn == 0)
-    goto yyerrlab;
-
-/* Do a reduction.  yyn is the number of a rule to reduce with.  */
-yyreduce:
-  yylen = yyr2[yyn];
-  if (yylen > 0)
-    yyval = yyvsp[1-yylen]; /* implement default value of the action */
-
-#if YYDEBUG != 0
-  if (yydebug)
+yyerrlab:
+    ++yynerrs;
+yyinrecovery:
+    if (yyerrflag < 3)
     {
-      int i;
-
-      fprintf (stderr, "Reducing via rule %d (line %d), ",
-	       yyn, yyrline[yyn]);
-
-      /* Print the symbols being reduced, and their result.  */
-      for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
-	fprintf (stderr, "%s ", yytname[yyrhs[i]]);
-      fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
+        yyerrflag = 3;
+        for (;;)
+        {
+            if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 &&
+                    yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)
+            {
+#if YYDEBUG
+                if (yydebug)
+                    printf("%sdebug: state %d, error recovery shifting\
+ to state %d\n", YYPREFIX, *yyssp, yytable[yyn]);
+#endif
+                if (yyssp >= yyss + yystacksize - 1)
+                {
+                    goto yyoverflow;
+                }
+                *++yyssp = yystate = yytable[yyn];
+                *++yyvsp = yylval;
+                goto yyloop;
+            }
+            else
+            {
+#if YYDEBUG
+                if (yydebug)
+                    printf("%sdebug: error recovery discarding state %d\n",
+                            YYPREFIX, *yyssp);
+#endif
+                if (yyssp <= yyss) goto yyabort;
+                --yyssp;
+                --yyvsp;
+            }
+        }
     }
+    else
+    {
+        if (yychar == 0) goto yyabort;
+#if YYDEBUG
+        if (yydebug)
+        {
+            yys = 0;
+            if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
+            if (!yys) yys = "illegal-symbol";
+            printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
+                    YYPREFIX, yystate, yychar, yys);
+        }
 #endif
-
-
-  switch (yyn) {
-
+        yychar = (-1);
+        goto yyloop;
+    }
+yyreduce:
+#if YYDEBUG
+    if (yydebug)
+        printf("%sdebug: state %d, reducing by rule %d (%s)\n",
+                YYPREFIX, yystate, yyn, yyrule[yyn]);
+#endif
+    yym = yylen[yyn];
+    yyval = yyvsp[1-yym];
+    switch (yyn)
+    {
 case 4:
-#line 165 "cfg-grammar.y"
-{ add_source_group(yyvsp[0].ptr); ;
-    break;}
+#line 167 "cfg-grammar.y"
+{ add_source_group(yyvsp[0].ptr); }
+break;
 case 5:
-#line 166 "cfg-grammar.y"
-{ add_dest_group(yyvsp[0].ptr); ;
-    break;}
+#line 168 "cfg-grammar.y"
+{ add_dest_group(yyvsp[0].ptr); }
+break;
 case 6:
-#line 167 "cfg-grammar.y"
-{ add_log_connection(yyvsp[0].ptr); ;
-    break;}
+#line 169 "cfg-grammar.y"
+{ add_log_connection(yyvsp[0].ptr); }
+break;
 case 7:
-#line 168 "cfg-grammar.y"
-{ add_filter_rule(yyvsp[0].ptr); ;
-    break;}
+#line 170 "cfg-grammar.y"
+{ add_filter_rule(yyvsp[0].ptr); }
+break;
 case 8:
-#line 169 "cfg-grammar.y"
-{  ;
-    break;}
+#line 171 "cfg-grammar.y"
+{  }
+break;
 case 9:
-#line 173 "cfg-grammar.y"
-{ yyval.ptr = make_source_group(yyvsp[-3].cptr, yyvsp[-1].ptr); free(yyvsp[-3].cptr); ;
-    break;}
+#line 175 "cfg-grammar.y"
+{ yyval.ptr = make_source_group(yyvsp[-3].cptr, yyvsp[-1].ptr); free(yyvsp[-3].cptr); }
+break;
 case 10:
-#line 177 "cfg-grammar.y"
-{ yyval.ptr = make_dest_group(yyvsp[-3].cptr, yyvsp[-1].ptr); free(yyvsp[-3].cptr); ;
-    break;}
+#line 179 "cfg-grammar.y"
+{ yyval.ptr = make_dest_group(yyvsp[-3].cptr, yyvsp[-1].ptr); free(yyvsp[-3].cptr); }
+break;
 case 11:
-#line 181 "cfg-grammar.y"
-{ yyval.ptr = make_log_connection(yyvsp[-2].ptr, yyvsp[-1].num); ;
-    break;}
+#line 183 "cfg-grammar.y"
+{ yyval.ptr = make_log_connection(yyvsp[-2].ptr, yyvsp[-1].num); }
+break;
 case 12:
-#line 185 "cfg-grammar.y"
-{ yyval.ptr = NULL; ;
-    break;}
+#line 187 "cfg-grammar.y"
+{ yyval.ptr = NULL; }
+break;
 case 13:
-#line 189 "cfg-grammar.y"
-{ append_source_driver(yyvsp[-2].ptr, yyvsp[0].ptr); yyval.ptr = yyvsp[-2].ptr; ;
-    break;}
+#line 191 "cfg-grammar.y"
+{ append_source_driver(yyvsp[-2].ptr, yyvsp[0].ptr); yyval.ptr = yyvsp[-2].ptr; }
+break;
 case 14:
-#line 190 "cfg-grammar.y"
-{ yyval.ptr = NULL; ;
-    break;}
+#line 192 "cfg-grammar.y"
+{ yyval.ptr = NULL; }
+break;
 case 15:
-#line 194 "cfg-grammar.y"
-{ yyval.ptr = yyvsp[0].ptr; ;
-    break;}
+#line 196 "cfg-grammar.y"
+{ yyval.ptr = yyvsp[0].ptr; }
+break;
 case 16:
-#line 195 "cfg-grammar.y"
-{ yyval.ptr = yyvsp[0].ptr; ;
-    break;}
+#line 197 "cfg-grammar.y"
+{ yyval.ptr = yyvsp[0].ptr; }
+break;
 case 17:
-#line 196 "cfg-grammar.y"
-{ yyval.ptr = yyvsp[0].ptr; ;
-    break;}
+#line 198 "cfg-grammar.y"
+{ yyval.ptr = yyvsp[0].ptr; }
+break;
 case 18:
-#line 197 "cfg-grammar.y"
-{ yyval.ptr = yyvsp[0].ptr; ;
-    break;}
+#line 199 "cfg-grammar.y"
+{ yyval.ptr = yyvsp[0].ptr; }
+break;
 case 19:
-#line 201 "cfg-grammar.y"
-{ yyval.ptr = make_afinter_source(); ;
-    break;}
+#line 203 "cfg-grammar.y"
+{ yyval.ptr = make_afinter_source(); }
+break;
 case 20:
-#line 205 "cfg-grammar.y"
-{ yyval.ptr = make_affile_source(yyvsp[-1].cptr, 0); free(yyvsp[-1].cptr); ;
-    break;}
+#line 207 "cfg-grammar.y"
+{ yyval.ptr = make_affile_source(yyvsp[-1].cptr, 0); free(yyvsp[-1].cptr); }
+break;
 case 21:
-#line 206 "cfg-grammar.y"
-{ yyval.ptr = make_affile_source(yyvsp[-1].cptr, AFFILE_PIPE); free(yyvsp[-1].cptr); ;
-    break;}
+#line 208 "cfg-grammar.y"
+{ yyval.ptr = make_affile_source(yyvsp[-1].cptr, AFFILE_PIPE); free(yyvsp[-1].cptr); }
+break;
 case 22:
-#line 210 "cfg-grammar.y"
-{ yyval.ptr = yyvsp[-1].ptr; ;
-    break;}
+#line 212 "cfg-grammar.y"
+{ yyval.ptr = yyvsp[-1].ptr; }
+break;
 case 23:
-#line 211 "cfg-grammar.y"
-{ yyval.ptr = yyvsp[-1].ptr; ;
-    break;}
+#line 213 "cfg-grammar.y"
+{ yyval.ptr = yyvsp[-1].ptr; }
+break;
 case 24:
-#line 212 "cfg-grammar.y"
-{ yyval.ptr = yyvsp[-1].ptr; ;
-    break;}
+#line 214 "cfg-grammar.y"
+{ yyval.ptr = yyvsp[-1].ptr; }
+break;
 case 25:
-#line 213 "cfg-grammar.y"
-{ yyval.ptr = yyvsp[-1].ptr; ;
-    break;}
+#line 215 "cfg-grammar.y"
+{ yyval.ptr = yyvsp[-1].ptr; }
+break;
 case 26:
-#line 218 "cfg-grammar.y"
+#line 220 "cfg-grammar.y"
 { 
 	    last_source_driver = make_afunix_source(
 		&make_unix_address_c(yyvsp[0].cptr)->super, 
 		AFSOCKET_DGRAM); 
 	    free(yyvsp[0].cptr); 
-	  ;
-    break;}
+	  }
+break;
 case 27:
-#line 224 "cfg-grammar.y"
-{ yyval.ptr = last_source_driver; ;
-    break;}
+#line 226 "cfg-grammar.y"
+{ yyval.ptr = last_source_driver; }
+break;
 case 28:
-#line 229 "cfg-grammar.y"
+#line 231 "cfg-grammar.y"
 { 
 	    last_source_driver = make_afunix_source(
 		&make_unix_address_c(yyvsp[0].cptr)->super,
 		AFSOCKET_STREAM | AFSOCKET_KEEP_ALIVE);
 	    free(yyvsp[0].cptr);
-	  ;
-    break;}
+	  }
+break;
 case 29:
-#line 235 "cfg-grammar.y"
-{ yyval.ptr = last_source_driver; ;
-    break;}
+#line 237 "cfg-grammar.y"
+{ yyval.ptr = last_source_driver; }
+break;
 case 32:
-#line 245 "cfg-grammar.y"
-{ afunix_set_owner(last_source_driver, yyvsp[-1].cptr); free(yyvsp[-1].cptr); ;
-    break;}
+#line 247 "cfg-grammar.y"
+{ afunix_set_owner(last_source_driver, yyvsp[-1].cptr); free(yyvsp[-1].cptr); }
+break;
 case 33:
-#line 246 "cfg-grammar.y"
-{ afunix_set_group(last_source_driver, yyvsp[-1].cptr); free(yyvsp[-1].cptr); ;
-    break;}
+#line 248 "cfg-grammar.y"
+{ afunix_set_group(last_source_driver, yyvsp[-1].cptr); free(yyvsp[-1].cptr); }
+break;
 case 34:
-#line 247 "cfg-grammar.y"
-{ afunix_set_perm(last_source_driver, yyvsp[-1].num); ;
-    break;}
+#line 249 "cfg-grammar.y"
+{ afunix_set_perm(last_source_driver, yyvsp[-1].num); }
+break;
 case 35:
-#line 248 "cfg-grammar.y"
-{;
-    break;}
+#line 250 "cfg-grammar.y"
+{}
+break;
 case 36:
-#line 253 "cfg-grammar.y"
+#line 255 "cfg-grammar.y"
 { 
 	    last_source_driver = make_afinet_source(
 			&make_inet_address_c("0.0.0.0", "514")->super, 
 			AFSOCKET_DGRAM);
-	  ;
-    break;}
+	  }
+break;
 case 37:
-#line 258 "cfg-grammar.y"
-{ yyval.ptr = last_source_driver; ;
-    break;}
+#line 260 "cfg-grammar.y"
+{ yyval.ptr = last_source_driver; }
+break;
 case 41:
-#line 268 "cfg-grammar.y"
-{ afinet_src_set_localport(last_source_driver, 0, yyvsp[-1].cptr ,"udp"); free(yyvsp[-1].cptr); ;
-    break;}
+#line 270 "cfg-grammar.y"
+{ afinet_src_set_localport(last_source_driver, 0, yyvsp[-1].cptr ,"udp"); free(yyvsp[-1].cptr); }
+break;
 case 42:
-#line 269 "cfg-grammar.y"
-{ afinet_src_set_localport(last_source_driver, 0, yyvsp[-1].cptr, "udp"); free(yyvsp[-1].cptr); ;
-    break;}
+#line 271 "cfg-grammar.y"
+{ afinet_src_set_localport(last_source_driver, 0, yyvsp[-1].cptr, "udp"); free(yyvsp[-1].cptr); }
+break;
 case 43:
-#line 273 "cfg-grammar.y"
-{ afinet_src_set_localip(last_source_driver, yyvsp[-1].cptr); free(yyvsp[-1].cptr); ;
-    break;}
+#line 275 "cfg-grammar.y"
+{ afinet_src_set_localip(last_source_driver, yyvsp[-1].cptr); free(yyvsp[-1].cptr); }
+break;
 case 44:
-#line 274 "cfg-grammar.y"
-{ afinet_src_set_localport(last_source_driver, yyvsp[-1].num, NULL, NULL); ;
-    break;}
+#line 276 "cfg-grammar.y"
+{ afinet_src_set_localport(last_source_driver, yyvsp[-1].num, NULL, NULL); }
+break;
 case 45:
-#line 275 "cfg-grammar.y"
-{ afinet_src_set_localport(last_source_driver, yyvsp[-1].num, NULL, NULL); ;
-    break;}
+#line 277 "cfg-grammar.y"
+{ afinet_src_set_localport(last_source_driver, yyvsp[-1].num, NULL, NULL); }
+break;
 case 46:
-#line 276 "cfg-grammar.y"
-{ afinet_src_set_localip(last_source_driver, yyvsp[-1].cptr); free(yyvsp[-1].cptr); ;
-    break;}
+#line 278 "cfg-grammar.y"
+{ afinet_src_set_localip(last_source_driver, yyvsp[-1].cptr); free(yyvsp[-1].cptr); }
+break;
 case 47:
-#line 281 "cfg-grammar.y"
+#line 283 "cfg-grammar.y"
 { 
 	    last_source_driver = make_afinet_source(
 			&make_inet_address_c("0.0.0.0", "514")->super,
 			AFSOCKET_STREAM);
-	  ;
-    break;}
+	  }
+break;
 case 48:
-#line 286 "cfg-grammar.y"
-{ yyval.ptr = last_source_driver; ;
-    break;}
+#line 288 "cfg-grammar.y"
+{ yyval.ptr = last_source_driver; }
+break;
 case 52:
-#line 296 "cfg-grammar.y"
-{ afinet_src_set_localport(last_source_driver, 0, yyvsp[-1].cptr, "tcp"); free(yyvsp[-1].cptr); ;
-    break;}
+#line 298 "cfg-grammar.y"
+{ afinet_src_set_localport(last_source_driver, 0, yyvsp[-1].cptr, "tcp"); free(yyvsp[-1].cptr); }
+break;
 case 53:
-#line 297 "cfg-grammar.y"
-{ afinet_src_set_localport(last_source_driver, 0, yyvsp[-1].cptr, "tcp"); free(yyvsp[-1].cptr); ;
-    break;}
+#line 299 "cfg-grammar.y"
+{ afinet_src_set_localport(last_source_driver, 0, yyvsp[-1].cptr, "tcp"); free(yyvsp[-1].cptr); }
+break;
 case 54:
-#line 298 "cfg-grammar.y"
-{ afinet_src_set_auth(last_source_driver, yyvsp[-1].num); ;
-    break;}
+#line 300 "cfg-grammar.y"
+{ afinet_src_set_auth(last_source_driver, yyvsp[-1].num); }
+break;
 case 55:
-#line 299 "cfg-grammar.y"
-{ afinet_src_set_mac(last_source_driver, yyvsp[-1].num); ;
-    break;}
+#line 301 "cfg-grammar.y"
+{ afinet_src_set_mac(last_source_driver, yyvsp[-1].num); }
+break;
 case 56:
-#line 300 "cfg-grammar.y"
-{ afinet_src_set_encrypt(last_source_driver, yyvsp[-1].num); ;
-    break;}
+#line 302 "cfg-grammar.y"
+{ afinet_src_set_encrypt(last_source_driver, yyvsp[-1].num); }
+break;
 case 57:
-#line 301 "cfg-grammar.y"
-{;
-    break;}
+#line 303 "cfg-grammar.y"
+{}
+break;
 case 58:
-#line 305 "cfg-grammar.y"
-{ afsocket_src_set_keep_alive(last_source_driver, yyvsp[-1].num); ;
-    break;}
+#line 307 "cfg-grammar.y"
+{ afsocket_src_set_keep_alive(last_source_driver, yyvsp[-1].num); }
+break;
 case 59:
-#line 306 "cfg-grammar.y"
-{ afsocket_src_set_max_connections(last_source_driver, yyvsp[-1].num); ;
-    break;}
+#line 308 "cfg-grammar.y"
+{ afsocket_src_set_max_connections(last_source_driver, yyvsp[-1].num); }
+break;
 case 60:
-#line 310 "cfg-grammar.y"
-{ yyval.ptr = yyvsp[-1].ptr; ;
-    break;}
+#line 312 "cfg-grammar.y"
+{ yyval.ptr = yyvsp[-1].ptr; }
+break;
 case 61:
-#line 315 "cfg-grammar.y"
+#line 317 "cfg-grammar.y"
 { 
 	    last_source_driver = make_afstreams_source(yyvsp[0].cptr); 
 	    free(yyvsp[0].cptr); 
-	  ;
-    break;}
+	  }
+break;
 case 62:
-#line 319 "cfg-grammar.y"
-{ yyval.ptr = last_source_driver; ;
-    break;}
+#line 321 "cfg-grammar.y"
+{ yyval.ptr = last_source_driver; }
+break;
 case 65:
-#line 328 "cfg-grammar.y"
-{ afstreams_set_sundoor(last_source_driver, yyvsp[-1].cptr); free(yyvsp[-1].cptr); ;
-    break;}
+#line 330 "cfg-grammar.y"
+{ afstreams_set_sundoor(last_source_driver, yyvsp[-1].cptr); free(yyvsp[-1].cptr); }
+break;
 case 66:
-#line 332 "cfg-grammar.y"
-{ append_dest_driver(yyvsp[-2].ptr, yyvsp[0].ptr); yyval.ptr = yyvsp[-2].ptr; ;
-    break;}
+#line 334 "cfg-grammar.y"
+{ append_dest_driver(yyvsp[-2].ptr, yyvsp[0].ptr); yyval.ptr = yyvsp[-2].ptr; }
+break;
 case 67:
-#line 333 "cfg-grammar.y"
-{ yyval.ptr = NULL; ;
-    break;}
+#line 335 "cfg-grammar.y"
+{ yyval.ptr = NULL; }
+break;
 case 68:
-#line 337 "cfg-grammar.y"
-{ yyval.ptr = yyvsp[0].ptr; ;
-    break;}
+#line 339 "cfg-grammar.y"
+{ yyval.ptr = yyvsp[0].ptr; }
+break;
 case 69:
-#line 338 "cfg-grammar.y"
-{ yyval.ptr = yyvsp[0].ptr; ;
-    break;}
+#line 340 "cfg-grammar.y"
+{ yyval.ptr = yyvsp[0].ptr; }
+break;
 case 70:
-#line 339 "cfg-grammar.y"
-{ yyval.ptr = yyvsp[0].ptr; ;
-    break;}
+#line 341 "cfg-grammar.y"
+{ yyval.ptr = yyvsp[0].ptr; }
+break;
 case 71:
-#line 340 "cfg-grammar.y"
-{ yyval.ptr = yyvsp[0].ptr; ;
-    break;}
+#line 342 "cfg-grammar.y"
+{ yyval.ptr = yyvsp[0].ptr; }
+break;
 case 72:
-#line 341 "cfg-grammar.y"
-{ yyval.ptr = yyvsp[0].ptr; ;
-    break;}
+#line 343 "cfg-grammar.y"
+{ yyval.ptr = yyvsp[0].ptr; }
+break;
 case 73:
-#line 342 "cfg-grammar.y"
-{ yyval.ptr = yyvsp[0].ptr; ;
-    break;}
+#line 344 "cfg-grammar.y"
+{ yyval.ptr = yyvsp[0].ptr; }
+break;
 case 74:
-#line 346 "cfg-grammar.y"
-{ last_dest_driver->log_fifo_size = yyvsp[-1].num; ;
-    break;}
+#line 348 "cfg-grammar.y"
+{ last_dest_driver->log_fifo_size = yyvsp[-1].num; }
+break;
 case 75:
-#line 350 "cfg-grammar.y"
-{ yyval.ptr = yyvsp[-1].ptr; ;
-    break;}
+#line 352 "cfg-grammar.y"
+{ yyval.ptr = yyvsp[-1].ptr; }
+break;
 case 76:
-#line 355 "cfg-grammar.y"
+#line 357 "cfg-grammar.y"
 { 
 	    last_dest_driver = make_affile_dest(yyvsp[0].cptr, 0); 
 	    free(yyvsp[0].cptr); 
-	  ;
-    break;}
+	  }
+break;
 case 77:
-#line 360 "cfg-grammar.y"
-{ yyval.ptr = last_dest_driver; ;
-    break;}
+#line 362 "cfg-grammar.y"
+{ yyval.ptr = last_dest_driver; }
+break;
 case 81:
-#line 370 "cfg-grammar.y"
-{ affile_set_syncfreq(last_dest_driver, yyvsp[-1].num); ;
-    break;}
+#line 372 "cfg-grammar.y"
+{ affile_set_syncfreq(last_dest_driver, yyvsp[-1].num); }
+break;
 case 82:
-#line 371 "cfg-grammar.y"
-{ affile_set_compress(last_dest_driver, yyvsp[-1].num); ;
-    break;}
+#line 373 "cfg-grammar.y"
+{ affile_set_compress(last_dest_driver, yyvsp[-1].num); }
+break;
 case 83:
-#line 372 "cfg-grammar.y"
-{ affile_set_encrypt(last_dest_driver, yyvsp[-1].num); ;
-    break;}
+#line 374 "cfg-grammar.y"
+{ affile_set_encrypt(last_dest_driver, yyvsp[-1].num); }
+break;
 case 84:
-#line 373 "cfg-grammar.y"
-{ affile_set_owner(last_dest_driver, yyvsp[-1].cptr); free(yyvsp[-1].cptr); ;
-    break;}
+#line 375 "cfg-grammar.y"
+{ affile_set_owner(last_dest_driver, yyvsp[-1].cptr); free(yyvsp[-1].cptr); }
+break;
 case 85:
-#line 374 "cfg-grammar.y"
-{ affile_set_group(last_dest_driver, yyvsp[-1].cptr); free(yyvsp[-1].cptr); ;
-    break;}
+#line 376 "cfg-grammar.y"
+{ affile_set_group(last_dest_driver, yyvsp[-1].cptr); free(yyvsp[-1].cptr); }
+break;
 case 86:
-#line 375 "cfg-grammar.y"
-{ affile_set_perm(last_dest_driver, yyvsp[-1].num); ;
-    break;}
+#line 377 "cfg-grammar.y"
+{ affile_set_perm(last_dest_driver, yyvsp[-1].num); }
+break;
 case 87:
-#line 376 "cfg-grammar.y"
-{ affile_set_dir_owner(last_dest_driver, yyvsp[-1].cptr); free(yyvsp[-1].cptr); ;
-    break;}
+#line 378 "cfg-grammar.y"
+{ affile_set_dir_owner(last_dest_driver, yyvsp[-1].cptr); free(yyvsp[-1].cptr); }
+break;
 case 88:
-#line 377 "cfg-grammar.y"
-{ affile_set_dir_group(last_dest_driver, yyvsp[-1].cptr); free(yyvsp[-1].cptr); ;
-    break;}
+#line 379 "cfg-grammar.y"
+{ affile_set_dir_group(last_dest_driver, yyvsp[-1].cptr); free(yyvsp[-1].cptr); }
+break;
 case 89:
-#line 378 "cfg-grammar.y"
-{ affile_set_dir_perm(last_dest_driver, yyvsp[-1].num); ;
-    break;}
+#line 380 "cfg-grammar.y"
+{ affile_set_dir_perm(last_dest_driver, yyvsp[-1].num); }
+break;
 case 90:
-#line 379 "cfg-grammar.y"
-{ affile_set_create_dirs(last_dest_driver, yyvsp[-1].num); ;
-    break;}
+#line 381 "cfg-grammar.y"
+{ affile_set_create_dirs(last_dest_driver, yyvsp[-1].num); }
+break;
 case 91:
-#line 380 "cfg-grammar.y"
-{ affile_set_file_template(last_dest_driver, yyvsp[-1].cptr); free(yyvsp[-1].cptr); ;
-    break;}
+#line 382 "cfg-grammar.y"
+{ affile_set_file_template(last_dest_driver, yyvsp[-1].cptr); free(yyvsp[-1].cptr); }
+break;
 case 92:
-#line 381 "cfg-grammar.y"
-{ affile_set_template_escape(last_dest_driver, yyvsp[-1].num); ;
-    break;}
+#line 383 "cfg-grammar.y"
+{ affile_set_template_escape(last_dest_driver, yyvsp[-1].num); }
+break;
 case 93:
-#line 382 "cfg-grammar.y"
-{ affile_set_fsync(last_dest_driver, yyvsp[-1].num); ;
-    break;}
+#line 384 "cfg-grammar.y"
+{ affile_set_fsync(last_dest_driver, yyvsp[-1].num); }
+break;
 case 94:
-#line 386 "cfg-grammar.y"
-{ yyval.ptr = yyvsp[-1].ptr; ;
-    break;}
+#line 388 "cfg-grammar.y"
+{ yyval.ptr = yyvsp[-1].ptr; }
+break;
 case 95:
-#line 391 "cfg-grammar.y"
+#line 393 "cfg-grammar.y"
 { 
 	    last_dest_driver = make_affile_dest(yyvsp[0].cptr, AFFILE_NO_EXPAND | AFFILE_PIPE);
 	    affile_set_syncfreq(last_dest_driver, 0);
 	    free(yyvsp[0].cptr); 
-	  ;
-    break;}
+	  }
+break;
 case 96:
-#line 396 "cfg-grammar.y"
-{ yyval.ptr = last_dest_driver; ;
-    break;}
+#line 398 "cfg-grammar.y"
+{ yyval.ptr = last_dest_driver; }
+break;
 case 99:
-#line 405 "cfg-grammar.y"
-{ affile_set_owner(last_dest_driver, yyvsp[-1].cptr); free(yyvsp[-1].cptr); ;
-    break;}
+#line 407 "cfg-grammar.y"
+{ affile_set_owner(last_dest_driver, yyvsp[-1].cptr); free(yyvsp[-1].cptr); }
+break;
 case 100:
-#line 406 "cfg-grammar.y"
-{ affile_set_group(last_dest_driver, yyvsp[-1].cptr); free(yyvsp[-1].cptr); ;
-    break;}
+#line 408 "cfg-grammar.y"
+{ affile_set_group(last_dest_driver, yyvsp[-1].cptr); free(yyvsp[-1].cptr); }
+break;
 case 101:
-#line 407 "cfg-grammar.y"
-{ affile_set_perm(last_dest_driver, yyvsp[-1].num); ;
-    break;}
+#line 409 "cfg-grammar.y"
+{ affile_set_perm(last_dest_driver, yyvsp[-1].num); }
+break;
 case 102:
-#line 408 "cfg-grammar.y"
-{ affile_set_file_template(last_dest_driver, yyvsp[-1].cptr); free(yyvsp[-1].cptr); ;
-    break;}
+#line 410 "cfg-grammar.y"
+{ affile_set_file_template(last_dest_driver, yyvsp[-1].cptr); free(yyvsp[-1].cptr); }
+break;
 case 103:
-#line 409 "cfg-grammar.y"
-{ affile_set_template_escape(last_dest_driver, yyvsp[-1].num); ;
-    break;}
+#line 411 "cfg-grammar.y"
+{ affile_set_template_escape(last_dest_driver, yyvsp[-1].num); }
+break;
 case 104:
-#line 414 "cfg-grammar.y"
-{ yyval.ptr = yyvsp[-1].ptr; ;
-    break;}
+#line 416 "cfg-grammar.y"
+{ yyval.ptr = yyvsp[-1].ptr; }
+break;
 case 105:
-#line 415 "cfg-grammar.y"
-{ yyval.ptr = yyvsp[-1].ptr; ;
-    break;}
+#line 417 "cfg-grammar.y"
+{ yyval.ptr = yyvsp[-1].ptr; }
+break;
 case 106:
-#line 416 "cfg-grammar.y"
-{ yyval.ptr = yyvsp[-1].ptr; ;
-    break;}
+#line 418 "cfg-grammar.y"
+{ yyval.ptr = yyvsp[-1].ptr; }
+break;
 case 107:
-#line 417 "cfg-grammar.y"
-{ yyval.ptr = yyvsp[-1].ptr; ;
-    break;}
+#line 419 "cfg-grammar.y"
+{ yyval.ptr = yyvsp[-1].ptr; }
+break;
 case 108:
-#line 421 "cfg-grammar.y"
+#line 423 "cfg-grammar.y"
 { yyval.ptr = make_afunix_dest(
 							&make_unix_address_c(yyvsp[0].cptr)->super, 
 							AFSOCKET_DGRAM);
 							free(yyvsp[0].cptr);
-						;
-    break;}
+						}
+break;
 case 109:
-#line 429 "cfg-grammar.y"
+#line 431 "cfg-grammar.y"
 { yyval.ptr = make_afunix_dest(
 							&make_unix_address_c(yyvsp[0].cptr)->super, 
 							AFSOCKET_STREAM);
 							free(yyvsp[0].cptr);
-						;
-    break;}
+						}
+break;
 case 110:
-#line 439 "cfg-grammar.y"
+#line 441 "cfg-grammar.y"
 { 
 	    last_dest_driver = make_afinet_dest(
 			&make_inet_address_c(yyvsp[0].cptr, "514")->super, 
 			AFSOCKET_DGRAM);
 	    free(yyvsp[0].cptr);
-	  ;
-    break;}
+	  }
+break;
 case 111:
-#line 445 "cfg-grammar.y"
-{ yyval.ptr = last_dest_driver; ;
-    break;}
+#line 447 "cfg-grammar.y"
+{ yyval.ptr = last_dest_driver; }
+break;
 case 114:
-#line 454 "cfg-grammar.y"
-{ afinet_dest_set_localip(last_dest_driver, yyvsp[-1].cptr); free(yyvsp[-1].cptr); ;
-    break;}
+#line 456 "cfg-grammar.y"
+{ afinet_dest_set_localip(last_dest_driver, yyvsp[-1].cptr); free(yyvsp[-1].cptr); }
+break;
 case 115:
-#line 455 "cfg-grammar.y"
-{ afinet_dest_set_localport(last_dest_driver, yyvsp[-1].num, NULL, NULL); ;
-    break;}
+#line 457 "cfg-grammar.y"
+{ afinet_dest_set_localport(last_dest_driver, yyvsp[-1].num, NULL, NULL); }
+break;
 case 116:
-#line 456 "cfg-grammar.y"
-{ afinet_dest_set_destport(last_dest_driver, yyvsp[-1].num, NULL, NULL); ;
-    break;}
+#line 458 "cfg-grammar.y"
+{ afinet_dest_set_destport(last_dest_driver, yyvsp[-1].num, NULL, NULL); }
+break;
 case 117:
-#line 457 "cfg-grammar.y"
-{ afinet_dest_set_destport(last_dest_driver, yyvsp[-1].num, NULL, NULL); ;
-    break;}
+#line 459 "cfg-grammar.y"
+{ afinet_dest_set_destport(last_dest_driver, yyvsp[-1].num, NULL, NULL); }
+break;
 case 119:
-#line 462 "cfg-grammar.y"
-{ afinet_dest_set_localport(last_dest_driver, 0, yyvsp[-1].cptr, "udp"); free(yyvsp[-1].cptr); ;
-    break;}
+#line 464 "cfg-grammar.y"
+{ afinet_dest_set_localport(last_dest_driver, 0, yyvsp[-1].cptr, "udp"); free(yyvsp[-1].cptr); }
+break;
 case 120:
-#line 463 "cfg-grammar.y"
-{ afinet_dest_set_destport(last_dest_driver, 0, yyvsp[-1].cptr, "udp"); free(yyvsp[-1].cptr); ;
-    break;}
+#line 465 "cfg-grammar.y"
+{ afinet_dest_set_destport(last_dest_driver, 0, yyvsp[-1].cptr, "udp"); free(yyvsp[-1].cptr); }
+break;
 case 121:
-#line 464 "cfg-grammar.y"
-{ afinet_dest_set_destport(last_dest_driver, 0, yyvsp[-1].cptr, "udp"); free(yyvsp[-1].cptr); ;
-    break;}
+#line 466 "cfg-grammar.y"
+{ afinet_dest_set_destport(last_dest_driver, 0, yyvsp[-1].cptr, "udp"); free(yyvsp[-1].cptr); }
+break;
 case 122:
-#line 469 "cfg-grammar.y"
+#line 471 "cfg-grammar.y"
 { 
 	    last_dest_driver = make_afinet_dest(
 			&make_inet_address_c(yyvsp[0].cptr, "514")->super, 
 			AFSOCKET_STREAM); 
 	    free(yyvsp[0].cptr);
-	  ;
-    break;}
+	  }
+break;
 case 123:
-#line 475 "cfg-grammar.y"
-{ yyval.ptr = last_dest_driver; ;
-    break;}
+#line 477 "cfg-grammar.y"
+{ yyval.ptr = last_dest_driver; }
+break;
 case 127:
-#line 485 "cfg-grammar.y"
-{ afinet_dest_set_localport(last_dest_driver, 0, yyvsp[-1].cptr, "tcp"); free(yyvsp[-1].cptr); ;
-    break;}
+#line 487 "cfg-grammar.y"
+{ afinet_dest_set_localport(last_dest_driver, 0, yyvsp[-1].cptr, "tcp"); free(yyvsp[-1].cptr); }
+break;
 case 128:
-#line 486 "cfg-grammar.y"
-{ afinet_dest_set_destport(last_dest_driver, 0, yyvsp[-1].cptr, "tcp"); free(yyvsp[-1].cptr); ;
-    break;}
+#line 488 "cfg-grammar.y"
+{ afinet_dest_set_destport(last_dest_driver, 0, yyvsp[-1].cptr, "tcp"); free(yyvsp[-1].cptr); }
+break;
 case 129:
-#line 487 "cfg-grammar.y"
-{ afinet_dest_set_destport(last_dest_driver, 0, yyvsp[-1].cptr, "tcp"); free(yyvsp[-1].cptr); ;
-    break;}
+#line 489 "cfg-grammar.y"
+{ afinet_dest_set_destport(last_dest_driver, 0, yyvsp[-1].cptr, "tcp"); free(yyvsp[-1].cptr); }
+break;
 case 133:
-#line 491 "cfg-grammar.y"
-{ afinet_dest_set_syncfreq(last_dest_driver, yyvsp[-1].num); ;
-    break;}
+#line 493 "cfg-grammar.y"
+{ afinet_dest_set_syncfreq(last_dest_driver, yyvsp[-1].num); }
+break;
 case 134:
-#line 496 "cfg-grammar.y"
-{ yyval.ptr = make_afuser_dest(yyvsp[-1].cptr); free(yyvsp[-1].cptr); ;
-    break;}
+#line 498 "cfg-grammar.y"
+{ yyval.ptr = make_afuser_dest(yyvsp[-1].cptr); free(yyvsp[-1].cptr); }
+break;
 case 135:
-#line 500 "cfg-grammar.y"
-{ yyval.ptr = make_afprogram_dest(yyvsp[-1].cptr); free(yyvsp[-1].cptr); ;
-    break;}
+#line 502 "cfg-grammar.y"
+{ yyval.ptr = yyvsp[-1].ptr; }
+break;
 case 136:
-#line 503 "cfg-grammar.y"
-{ yyval.ptr = make_afremctrl_dest(); ;
-    break;}
-case 137:
 #line 506 "cfg-grammar.y"
-{ append_endpoint_info(yyvsp[-2].ptr, yyvsp[0].ptr); yyval.ptr = yyvsp[-2].ptr; ;
-    break;}
-case 138:
-#line 507 "cfg-grammar.y"
-{ yyval.ptr = NULL; ;
-    break;}
-case 139:
-#line 511 "cfg-grammar.y"
-{ yyval.ptr = make_log_endpoint_info(EP_SOURCE, yyvsp[-1].cptr); free(yyvsp[-1].cptr); ;
-    break;}
+{ 
+	    last_dest_driver = make_afprogram_dest(yyvsp[0].cptr);
+	    free(yyvsp[0].cptr); 
+	  }
+break;
+case 137:
+#line 510 "cfg-grammar.y"
+{ yyval.ptr = last_dest_driver; }
+break;
 case 140:
-#line 512 "cfg-grammar.y"
-{ yyval.ptr = make_log_endpoint_info(EP_FILTER, yyvsp[-1].cptr); free(yyvsp[-1].cptr); ;
-    break;}
+#line 519 "cfg-grammar.y"
+{ afprogram_set_template(last_dest_driver, yyvsp[-1].cptr); free(yyvsp[-1].cptr); }
+break;
 case 141:
-#line 513 "cfg-grammar.y"
-{ yyval.ptr = make_log_endpoint_info(EP_DESTINATION, yyvsp[-1].cptr); free(yyvsp[-1].cptr); ;
-    break;}
+#line 520 "cfg-grammar.y"
+{ afprogram_set_template_escape(last_dest_driver, yyvsp[-1].num); }
+break;
 case 142:
-#line 517 "cfg-grammar.y"
-{ yyval.num = yyvsp[-2].num; ;
-    break;}
+#line 524 "cfg-grammar.y"
+{ yyval.ptr = make_afremctrl_dest(); }
+break;
 case 143:
-#line 518 "cfg-grammar.y"
-{ yyval.num = 0; ;
-    break;}
+#line 527 "cfg-grammar.y"
+{ append_endpoint_info(yyvsp[-2].ptr, yyvsp[0].ptr); yyval.ptr = yyvsp[-2].ptr; }
+break;
 case 144:
-#line 523 "cfg-grammar.y"
-{ yyval.num |= yyvsp[0].num; ;
-    break;}
+#line 528 "cfg-grammar.y"
+{ yyval.ptr = NULL; }
+break;
 case 145:
-#line 524 "cfg-grammar.y"
-{ yyval.num = 0; ;
-    break;}
+#line 532 "cfg-grammar.y"
+{ yyval.ptr = make_log_endpoint_info(EP_SOURCE, yyvsp[-1].cptr); free(yyvsp[-1].cptr); }
+break;
 case 146:
-#line 528 "cfg-grammar.y"
-{ yyval.num = LOG_CONN_CATCHALL; ;
-    break;}
+#line 533 "cfg-grammar.y"
+{ yyval.ptr = make_log_endpoint_info(EP_FILTER, yyvsp[-1].cptr); free(yyvsp[-1].cptr); }
+break;
 case 147:
-#line 529 "cfg-grammar.y"
-{ yyval.num = LOG_CONN_FALLBACK; ;
-    break;}
+#line 534 "cfg-grammar.y"
+{ yyval.ptr = make_log_endpoint_info(EP_DESTINATION, yyvsp[-1].cptr); free(yyvsp[-1].cptr); }
+break;
 case 148:
-#line 530 "cfg-grammar.y"
-{ yyval.num = LOG_CONN_FINAL; ;
-    break;}
+#line 538 "cfg-grammar.y"
+{ yyval.num = yyvsp[-2].num; }
+break;
 case 149:
-#line 534 "cfg-grammar.y"
-{ yyval.ptr = yyvsp[-2].ptr; ;
-    break;}
+#line 539 "cfg-grammar.y"
+{ yyval.num = 0; }
+break;
 case 150:
-#line 535 "cfg-grammar.y"
-{ yyval.ptr = NULL; ;
-    break;}
+#line 544 "cfg-grammar.y"
+{ yyval.num |= yyvsp[0].num; }
+break;
 case 151:
-#line 539 "cfg-grammar.y"
-{ configuration->mark_freq = yyvsp[-1].num; ;
-    break;}
+#line 545 "cfg-grammar.y"
+{ yyval.num = 0; }
+break;
 case 152:
-#line 540 "cfg-grammar.y"
-{ configuration->sync_freq = yyvsp[-1].num; ;
-    break;}
+#line 549 "cfg-grammar.y"
+{ yyval.num = LOG_CONN_CATCHALL; }
+break;
 case 153:
-#line 541 "cfg-grammar.y"
-{ configuration->stats_freq = yyvsp[-1].num; ;
-    break;}
+#line 550 "cfg-grammar.y"
+{ yyval.num = LOG_CONN_FALLBACK; }
+break;
 case 154:
-#line 542 "cfg-grammar.y"
-{ configuration->chain_hostnames = yyvsp[-1].num; ;
-    break;}
+#line 551 "cfg-grammar.y"
+{ yyval.num = LOG_CONN_FINAL; }
+break;
 case 155:
-#line 543 "cfg-grammar.y"
-{ configuration->keep_hostname = yyvsp[-1].num; ;
-    break;}
+#line 555 "cfg-grammar.y"
+{ yyval.ptr = yyvsp[-2].ptr; }
+break;
 case 156:
-#line 544 "cfg-grammar.y"
-{ configuration->use_time_recvd = yyvsp[-1].num; ;
-    break;}
+#line 556 "cfg-grammar.y"
+{ yyval.ptr = NULL; }
+break;
 case 157:
-#line 545 "cfg-grammar.y"
-{ configuration->use_fqdn = yyvsp[-1].num; ;
-    break;}
+#line 560 "cfg-grammar.y"
+{ configuration->mark_freq = yyvsp[-1].num; }
+break;
 case 158:
-#line 546 "cfg-grammar.y"
-{ configuration->use_dns = yyvsp[-1].num; ;
-    break;}
+#line 561 "cfg-grammar.y"
+{ configuration->sync_freq = yyvsp[-1].num; }
+break;
 case 159:
-#line 547 "cfg-grammar.y"
-{ configuration->time_reopen = yyvsp[-1].num; ;
-    break;}
+#line 562 "cfg-grammar.y"
+{ configuration->stats_freq = yyvsp[-1].num; }
+break;
 case 160:
-#line 548 "cfg-grammar.y"
-{ configuration->time_reap = yyvsp[-1].num; ;
-    break;}
+#line 563 "cfg-grammar.y"
+{ configuration->chain_hostnames = yyvsp[-1].num; }
+break;
 case 161:
-#line 549 "cfg-grammar.y"
-{ configuration->log_fifo_size = yyvsp[-1].num; ;
-    break;}
+#line 564 "cfg-grammar.y"
+{ configuration->keep_hostname = yyvsp[-1].num; }
+break;
 case 162:
-#line 550 "cfg-grammar.y"
-{ configuration->gc_busy_threshold = yyvsp[-1].num; ;
-    break;}
+#line 565 "cfg-grammar.y"
+{ configuration->use_time_recvd = yyvsp[-1].num; }
+break;
 case 163:
-#line 551 "cfg-grammar.y"
-{ configuration->gc_idle_threshold = yyvsp[-1].num; ;
-    break;}
+#line 566 "cfg-grammar.y"
+{ configuration->use_fqdn = yyvsp[-1].num; }
+break;
 case 164:
-#line 552 "cfg-grammar.y"
-{ configuration->create_dirs = yyvsp[-1].num; ;
-    break;}
+#line 567 "cfg-grammar.y"
+{ configuration->use_dns = yyvsp[-1].num; }
+break;
 case 165:
-#line 553 "cfg-grammar.y"
-{ cfg_set_owner(yyvsp[-1].cptr); free(yyvsp[-1].cptr); ;
-    break;}
+#line 568 "cfg-grammar.y"
+{ configuration->time_reopen = yyvsp[-1].num; }
+break;
 case 166:
-#line 554 "cfg-grammar.y"
-{ cfg_set_group(yyvsp[-1].cptr); free(yyvsp[-1].cptr); ;
-    break;}
+#line 569 "cfg-grammar.y"
+{ configuration->time_reap = yyvsp[-1].num; }
+break;
 case 167:
-#line 555 "cfg-grammar.y"
-{ cfg_set_perm(yyvsp[-1].num); ;
-    break;}
+#line 570 "cfg-grammar.y"
+{ configuration->log_fifo_size = yyvsp[-1].num; }
+break;
 case 168:
-#line 556 "cfg-grammar.y"
-{ cfg_set_dir_owner(yyvsp[-1].cptr); free(yyvsp[-1].cptr); ;
-    break;}
+#line 571 "cfg-grammar.y"
+{ configuration->gc_busy_threshold = yyvsp[-1].num; }
+break;
 case 169:
-#line 557 "cfg-grammar.y"
-{ cfg_set_dir_group(yyvsp[-1].cptr); free(yyvsp[-1].cptr); ;
-    break;}
+#line 572 "cfg-grammar.y"
+{ configuration->gc_idle_threshold = yyvsp[-1].num; }
+break;
 case 170:
-#line 558 "cfg-grammar.y"
-{ cfg_set_dir_perm(yyvsp[-1].num); ;
-    break;}
+#line 573 "cfg-grammar.y"
+{ configuration->create_dirs = yyvsp[-1].num; }
+break;
 case 171:
-#line 559 "cfg-grammar.y"
-{ configuration->dns_cache = yyvsp[-1].num; ;
-    break;}
+#line 574 "cfg-grammar.y"
+{ cfg_set_owner(yyvsp[-1].cptr); free(yyvsp[-1].cptr); }
+break;
 case 172:
-#line 560 "cfg-grammar.y"
-{ configuration->dns_cache_size = yyvsp[-1].num; ;
-    break;}
+#line 575 "cfg-grammar.y"
+{ cfg_set_group(yyvsp[-1].cptr); free(yyvsp[-1].cptr); }
+break;
 case 173:
-#line 561 "cfg-grammar.y"
-{ configuration->dns_cache_expire = yyvsp[-1].num; ;
-    break;}
+#line 576 "cfg-grammar.y"
+{ cfg_set_perm(yyvsp[-1].num); }
+break;
 case 174:
-#line 563 "cfg-grammar.y"
-{ configuration->dns_cache_expire_failed = yyvsp[-1].num; ;
-    break;}
+#line 577 "cfg-grammar.y"
+{ cfg_set_dir_owner(yyvsp[-1].cptr); free(yyvsp[-1].cptr); }
+break;
 case 175:
-#line 567 "cfg-grammar.y"
-{ yyval.ptr = make_filter_rule(yyvsp[-4].cptr, yyvsp[-2].node); free(yyvsp[-4].cptr); ;
-    break;}
+#line 578 "cfg-grammar.y"
+{ cfg_set_dir_group(yyvsp[-1].cptr); free(yyvsp[-1].cptr); }
+break;
 case 176:
-#line 571 "cfg-grammar.y"
-{ yyval.node = yyvsp[0].node; if (!yyvsp[0].node) return 1; ;
-    break;}
+#line 579 "cfg-grammar.y"
+{ cfg_set_dir_perm(yyvsp[-1].num); }
+break;
 case 177:
-#line 572 "cfg-grammar.y"
-{ yyvsp[0].node->comp = !(yyvsp[0].node->comp); yyval.node = yyvsp[0].node; ;
-    break;}
+#line 580 "cfg-grammar.y"
+{ configuration->dns_cache = yyvsp[-1].num; }
+break;
 case 178:
-#line 573 "cfg-grammar.y"
-{ yyval.node = make_filter_or(yyvsp[-2].node, yyvsp[0].node); ;
-    break;}
+#line 581 "cfg-grammar.y"
+{ configuration->dns_cache_size = yyvsp[-1].num; }
+break;
 case 179:
-#line 574 "cfg-grammar.y"
-{ yyval.node = make_filter_and(yyvsp[-2].node, yyvsp[0].node); ;
-    break;}
+#line 582 "cfg-grammar.y"
+{ configuration->dns_cache_expire = yyvsp[-1].num; }
+break;
 case 180:
-#line 575 "cfg-grammar.y"
-{ yyval.node = yyvsp[-1].node; ;
-    break;}
+#line 584 "cfg-grammar.y"
+{ configuration->dns_cache_expire_failed = yyvsp[-1].num; }
+break;
 case 181:
-#line 579 "cfg-grammar.y"
-{ yyval.node = make_filter_facility(yyvsp[-1].num);  ;
-    break;}
+#line 588 "cfg-grammar.y"
+{ yyval.ptr = make_filter_rule(yyvsp[-4].cptr, yyvsp[-2].node); free(yyvsp[-4].cptr); }
+break;
 case 182:
-#line 580 "cfg-grammar.y"
-{ yyval.node = make_filter_facility(0x80000000 | yyvsp[-1].num); ;
-    break;}
+#line 592 "cfg-grammar.y"
+{ yyval.node = yyvsp[0].node; if (!yyvsp[0].node) return 1; }
+break;
 case 183:
-#line 581 "cfg-grammar.y"
-{ yyval.node = make_filter_level(yyvsp[-1].num); ;
-    break;}
+#line 593 "cfg-grammar.y"
+{ yyvsp[0].node->comp = !(yyvsp[0].node->comp); yyval.node = yyvsp[0].node; }
+break;
 case 184:
-#line 582 "cfg-grammar.y"
-{ yyval.node = make_filter_prog(yyvsp[-1].cptr); free(yyvsp[-1].cptr); ;
-    break;}
+#line 594 "cfg-grammar.y"
+{ yyval.node = make_filter_or(yyvsp[-2].node, yyvsp[0].node); }
+break;
 case 185:
-#line 583 "cfg-grammar.y"
-{ yyval.node = make_filter_host(yyvsp[-1].cptr); free(yyvsp[-1].cptr); ;
-    break;}
+#line 595 "cfg-grammar.y"
+{ yyval.node = make_filter_and(yyvsp[-2].node, yyvsp[0].node); }
+break;
 case 186:
-#line 584 "cfg-grammar.y"
-{ yyval.node = make_filter_match(yyvsp[-1].cptr); free(yyvsp[-1].cptr); ;
-    break;}
+#line 596 "cfg-grammar.y"
+{ yyval.node = yyvsp[-1].node; }
+break;
 case 187:
-#line 585 "cfg-grammar.y"
-{ yyval.node = make_filter_call(yyvsp[-1].cptr); free(yyvsp[-1].cptr); ;
-    break;}
+#line 600 "cfg-grammar.y"
+{ yyval.node = make_filter_facility(yyvsp[-1].num);  }
+break;
 case 188:
-#line 589 "cfg-grammar.y"
-{ yyval.num = yyvsp[-1].num + yyvsp[0].num; ;
-    break;}
+#line 601 "cfg-grammar.y"
+{ yyval.node = make_filter_facility(0x80000000 | yyvsp[-1].num); }
+break;
 case 189:
-#line 590 "cfg-grammar.y"
-{ yyval.num = yyvsp[0].num; ;
-    break;}
+#line 602 "cfg-grammar.y"
+{ yyval.node = make_filter_level(yyvsp[-1].num); }
+break;
 case 190:
-#line 595 "cfg-grammar.y"
+#line 603 "cfg-grammar.y"
+{ yyval.node = make_filter_prog(yyvsp[-1].cptr); free(yyvsp[-1].cptr); }
+break;
+case 191:
+#line 604 "cfg-grammar.y"
+{ yyval.node = make_filter_host(yyvsp[-1].cptr); free(yyvsp[-1].cptr); }
+break;
+case 192:
+#line 605 "cfg-grammar.y"
+{ yyval.node = make_filter_match(yyvsp[-1].cptr); free(yyvsp[-1].cptr); }
+break;
+case 193:
+#line 606 "cfg-grammar.y"
+{ yyval.node = make_filter_call(yyvsp[-1].cptr); free(yyvsp[-1].cptr); }
+break;
+case 194:
+#line 610 "cfg-grammar.y"
+{ yyval.num = yyvsp[-1].num + yyvsp[0].num; }
+break;
+case 195:
+#line 611 "cfg-grammar.y"
+{ yyval.num = yyvsp[0].num; }
+break;
+case 196:
+#line 616 "cfg-grammar.y"
 { 
 	    int n = syslog_lookup_facility(yyvsp[0].cptr);
 	    if (n == -1)
@@ -1871,18 +1601,18 @@
 	    else
 	      yyval.num = (1 << n); 
 	    free(yyvsp[0].cptr); 
-	  ;
-    break;}
-case 191:
-#line 609 "cfg-grammar.y"
-{ yyval.num = yyvsp[-1].num + yyvsp[0].num; ;
-    break;}
-case 192:
-#line 610 "cfg-grammar.y"
-{ yyval.num = yyvsp[0].num; ;
-    break;}
-case 193:
-#line 615 "cfg-grammar.y"
+	  }
+break;
+case 197:
+#line 630 "cfg-grammar.y"
+{ yyval.num = yyvsp[-1].num + yyvsp[0].num; }
+break;
+case 198:
+#line 631 "cfg-grammar.y"
+{ yyval.num = yyvsp[0].num; }
+break;
+case 199:
+#line 636 "cfg-grammar.y"
 { 
 	    int r1, r2;
 	    r1 = syslog_lookup_level(yyvsp[-2].cptr);
@@ -1901,10 +1631,10 @@
 	      yyval.num = 0;
 	    free(yyvsp[-2].cptr); 
 	    free(yyvsp[0].cptr); 
-	  ;
-    break;}
-case 194:
-#line 635 "cfg-grammar.y"
+	  }
+break;
+case 200:
+#line 656 "cfg-grammar.y"
 { 
 	    int n = syslog_lookup_level(yyvsp[0].cptr); 
 	    if (n == -1)
@@ -1915,260 +1645,86 @@
 	    else
 	      yyval.num = 1 << sl_levels[n].value; 
 	    free(yyvsp[0].cptr); 
-	  ;
-    break;}
-case 195:
-#line 649 "cfg-grammar.y"
-{ yyval.num = 1; ;
-    break;}
-case 196:
-#line 650 "cfg-grammar.y"
-{ yyval.num = 0; ;
-    break;}
-case 197:
-#line 651 "cfg-grammar.y"
-{ yyval.num = yyvsp[0].num; ;
-    break;}
-case 198:
-#line 655 "cfg-grammar.y"
-{ yyval.num = 2; ;
-    break;}
-case 199:
-#line 656 "cfg-grammar.y"
-{ yyval.num = 1; ;
-    break;}
-case 200:
-#line 657 "cfg-grammar.y"
-{ yyval.num = 0; ;
-    break;}
-}
-   /* the action file gets copied in in place of this dollarsign */
-#line 543 "/usr/share/misc/bison.simple"
-
-  yyvsp -= yylen;
-  yyssp -= yylen;
-#ifdef YYLSP_NEEDED
-  yylsp -= yylen;
-#endif
-
-#if YYDEBUG != 0
-  if (yydebug)
-    {
-      short *ssp1 = yyss - 1;
-      fprintf (stderr, "state stack now");
-      while (ssp1 != yyssp)
-	fprintf (stderr, " %d", *++ssp1);
-      fprintf (stderr, "\n");
+	  }
+break;
+case 201:
+#line 670 "cfg-grammar.y"
+{ yyval.num = 1; }
+break;
+case 202:
+#line 671 "cfg-grammar.y"
+{ yyval.num = 0; }
+break;
+case 203:
+#line 672 "cfg-grammar.y"
+{ yyval.num = yyvsp[0].num; }
+break;
+case 204:
+#line 676 "cfg-grammar.y"
+{ yyval.num = 2; }
+break;
+case 205:
+#line 677 "cfg-grammar.y"
+{ yyval.num = 1; }
+break;
+case 206:
+#line 678 "cfg-grammar.y"
+{ yyval.num = 0; }
+break;
+#line 1675 "y.tab.c"
     }
-#endif
-
-  *++yyvsp = yyval;
-
-#ifdef YYLSP_NEEDED
-  yylsp++;
-  if (yylen == 0)
+    yyssp -= yym;
+    yystate = *yyssp;
+    yyvsp -= yym;
+    yym = yylhs[yyn];
+    if (yystate == 0 && yym == 0)
     {
-      yylsp->first_line = yylloc.first_line;
-      yylsp->first_column = yylloc.first_column;
-      yylsp->last_line = (yylsp-1)->last_line;
-      yylsp->last_column = (yylsp-1)->last_column;
-      yylsp->text = 0;
-    }
-  else
-    {
-      yylsp->last_line = (yylsp+yylen-1)->last_line;
-      yylsp->last_column = (yylsp+yylen-1)->last_column;
+#if YYDEBUG
+        if (yydebug)
+            printf("%sdebug: after reduction, shifting from state 0 to\
+ state %d\n", YYPREFIX, YYFINAL);
+#endif
+        yystate = YYFINAL;
+        *++yyssp = YYFINAL;
+        *++yyvsp = yyval;
+        if (yychar < 0)
+        {
+            if ((yychar = yylex()) < 0) yychar = 0;
+#if YYDEBUG
+            if (yydebug)
+            {
+                yys = 0;
+                if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
+                if (!yys) yys = "illegal-symbol";
+                printf("%sdebug: state %d, reading %d (%s)\n",
+                        YYPREFIX, YYFINAL, yychar, yys);
+            }
+#endif
+        }
+        if (yychar == 0) goto yyaccept;
+        goto yyloop;
     }
+    if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&
+            yyn <= YYTABLESIZE && yycheck[yyn] == yystate)
+        yystate = yytable[yyn];
+    else
+        yystate = yydgoto[yym];
+#if YYDEBUG
+    if (yydebug)
+        printf("%sdebug: after reduction, shifting from state %d \
+to state %d\n", YYPREFIX, *yyssp, yystate);
 #endif
-
-  /* Now "shift" the result of the reduction.
-     Determine what state that goes to,
-     based on the state we popped back to
-     and the rule number reduced by.  */
-
-  yyn = yyr1[yyn];
-
-  yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
-  if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
-    yystate = yytable[yystate];
-  else
-    yystate = yydefgoto[yyn - YYNTBASE];
-
-  goto yynewstate;
-
-yyerrlab:   /* here on detecting error */
-
-  if (! yyerrstatus)
-    /* If not already recovering from an error, report this error.  */
+    if (yyssp >= yyss + yystacksize - 1)
     {
-      ++yynerrs;
-
-#ifdef YYERROR_VERBOSE
-      yyn = yypact[yystate];
-
-      if (yyn > YYFLAG && yyn < YYLAST)
-	{
-	  int size = 0;
-	  char *msg;
-	  int x, count;
-
-	  count = 0;
-	  /* Start X at -yyn if nec to avoid negative indexes in yycheck.  */
-	  for (x = (yyn < 0 ? -yyn : 0);
-	       x < (sizeof(yytname) / sizeof(char *)); x++)
-	    if (yycheck[x + yyn] == x)
-	      size += strlen(yytname[x]) + 15, count++;
-	  msg = (char *) malloc(size + 15);
-	  if (msg != 0)
-	    {
-	      strcpy(msg, "parse error");
-
-	      if (count < 5)
-		{
-		  count = 0;
-		  for (x = (yyn < 0 ? -yyn : 0);
-		       x < (sizeof(yytname) / sizeof(char *)); x++)
-		    if (yycheck[x + yyn] == x)
-		      {
-			strcat(msg, count == 0 ? ", expecting `" : " or `");
-			strcat(msg, yytname[x]);
-			strcat(msg, "'");
-			count++;
-		      }
-		}
-	      yyerror(msg);
-	      free(msg);
-	    }
-	  else
-	    yyerror ("parse error; also virtual memory exceeded");
-	}
-      else
-#endif /* YYERROR_VERBOSE */
-	yyerror("parse error");
+        goto yyoverflow;
     }
-
-  goto yyerrlab1;
-yyerrlab1:   /* here on error raised explicitly by an action */
-
-  if (yyerrstatus == 3)
-    {
-      /* if just tried and failed to reuse lookahead token after an error, discard it.  */
-
-      /* return failure if at end of input */
-      if (yychar == YYEOF)
-	YYABORT;
-
-#if YYDEBUG != 0
-      if (yydebug)
-	fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
-#endif
-
-      yychar = YYEMPTY;
-    }
-
-  /* Else will try to reuse lookahead token
-     after shifting the error token.  */
-
-  yyerrstatus = 3;		/* Each real token shifted decrements this */
-
-  goto yyerrhandle;
-
-yyerrdefault:  /* current state does not do anything special for the error token. */
-
-#if 0
-  /* This is wrong; only states that explicitly want error tokens
-     should shift them.  */
-  yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
-  if (yyn) goto yydefault;
-#endif
-
-yyerrpop:   /* pop the current state because it cannot handle the error token */
-
-  if (yyssp == yyss) YYABORT;
-  yyvsp--;
-  yystate = *--yyssp;
-#ifdef YYLSP_NEEDED
-  yylsp--;
-#endif
-
-#if YYDEBUG != 0
-  if (yydebug)
-    {
-      short *ssp1 = yyss - 1;
-      fprintf (stderr, "Error: state stack now");
-      while (ssp1 != yyssp)
-	fprintf (stderr, " %d", *++ssp1);
-      fprintf (stderr, "\n");
-    }
-#endif
-
-yyerrhandle:
-
-  yyn = yypact[yystate];
-  if (yyn == YYFLAG)
-    goto yyerrdefault;
-
-  yyn += YYTERROR;
-  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
-    goto yyerrdefault;
-
-  yyn = yytable[yyn];
-  if (yyn < 0)
-    {
-      if (yyn == YYFLAG)
-	goto yyerrpop;
-      yyn = -yyn;
-      goto yyreduce;
-    }
-  else if (yyn == 0)
-    goto yyerrpop;
-
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
-#if YYDEBUG != 0
-  if (yydebug)
-    fprintf(stderr, "Shifting error token, ");
-#endif
-
-  *++yyvsp = yylval;
-#ifdef YYLSP_NEEDED
-  *++yylsp = yylloc;
-#endif
-
-  yystate = yyn;
-  goto yynewstate;
-
- yyacceptlab:
-  /* YYACCEPT comes here.  */
-  if (yyfree_stacks)
-    {
-      free (yyss);
-      free (yyvs);
-#ifdef YYLSP_NEEDED
-      free (yyls);
-#endif
-    }
-  return 0;
-
- yyabortlab:
-  /* YYABORT comes here.  */
-  if (yyfree_stacks)
-    {
-      free (yyss);
-      free (yyvs);
-#ifdef YYLSP_NEEDED
-      free (yyls);
-#endif
-    }
-  return 1;
-}
-#line 665 "cfg-grammar.y"
-
-
-extern int linenum;
-
-void yyerror(char *msg)
-{
-	fprintf(stderr, "%s at %d\n", msg, linenum);
+    *++yyssp = yystate;
+    *++yyvsp = yyval;
+    goto yyloop;
+yyoverflow:
+    yyerror("yacc stack overflow");
+yyabort:
+    return (1);
+yyaccept:
+    return (0);
 }
diff -uNr syslog-ng-1.5.13.orig/src/cfg-grammar.h syslog-ng-1.5.13/src/cfg-grammar.h
--- syslog-ng-1.5.13.orig/src/cfg-grammar.h	Mon Sep  3 18:45:21 2001
+++ syslog-ng-1.5.13/src/cfg-grammar.h	Thu Apr 18 22:55:09 2002
@@ -1,84 +1,82 @@
+#define KW_SOURCE 257
+#define KW_DESTINATION 258
+#define KW_LOG 259
+#define KW_OPTIONS 260
+#define KW_FILTER 261
+#define KW_INTERNAL 262
+#define KW_FILE 263
+#define KW_PIPE 264
+#define KW_UNIX_STREAM 265
+#define KW_UNIX_DGRAM 266
+#define KW_UDP 267
+#define KW_TCP 268
+#define KW_USER 269
+#define KW_DOOR 270
+#define KW_SUN_STREAMS 271
+#define KW_PROGRAM 272
+#define KW_REMCTRL 273
+#define KW_FLAGS 274
+#define KW_CATCHALL 275
+#define KW_FALLBACK 276
+#define KW_FINAL 277
+#define KW_FSYNC 278
+#define KW_MARK_FREQ 279
+#define KW_SYNC_FREQ 280
+#define KW_STATS_FREQ 281
+#define KW_CHAIN_HOSTNAMES 282
+#define KW_KEEP_HOSTNAME 283
+#define KW_LOG_FIFO_SIZE 284
+#define KW_TIME_REOPEN 285
+#define KW_TIME_REAP 286
+#define KW_USE_TIME_RECVD 287
+#define KW_USE_DNS 288
+#define KW_USE_FQDN 289
+#define KW_GC_BUSY_THRESHOLD 290
+#define KW_GC_IDLE_THRESHOLD 291
+#define KW_CREATE_DIRS 292
+#define KW_DIR_OWNER 293
+#define KW_DIR_GROUP 294
+#define KW_DIR_PERM 295
+#define KW_FILE_TEMPLATE 296
+#define KW_TEMPLATE_ESCAPE 297
+#define KW_OWNER 298
+#define KW_GROUP 299
+#define KW_PERM 300
+#define KW_KEEP_ALIVE 301
+#define KW_MAX_CONNECTIONS 302
+#define KW_LOCALIP 303
+#define KW_IP 304
+#define KW_LOCALPORT 305
+#define KW_PORT 306
+#define KW_DESTPORT 307
+#define KW_COMPRESS 308
+#define KW_MAC 309
+#define KW_AUTH 310
+#define KW_ENCRYPT 311
+#define KW_DNS_CACHE 312
+#define KW_DNS_CACHE_SIZE 313
+#define KW_DNS_CACHE_EXPIRE 314
+#define KW_DNS_CACHE_EXPIRE_FAILED 315
+#define KW_FACILITY 316
+#define KW_LEVEL 317
+#define KW_HOST 318
+#define KW_MATCH 319
+#define KW_YES 320
+#define KW_NO 321
+#define KW_REQUIRED 322
+#define KW_ALLOW 323
+#define KW_DENY 324
+#define DOTDOT 325
+#define IDENTIFIER 326
+#define NUMBER 327
+#define STRING 328
+#define KW_OR 329
+#define KW_AND 330
+#define KW_NOT 331
 typedef union {
 	UINT32 num;
 	char *cptr;
 	void *ptr;
 	struct filter_expr_node *node;
 } YYSTYPE;
-#define	KW_SOURCE	257
-#define	KW_DESTINATION	258
-#define	KW_LOG	259
-#define	KW_OPTIONS	260
-#define	KW_FILTER	261
-#define	KW_INTERNAL	262
-#define	KW_FILE	263
-#define	KW_PIPE	264
-#define	KW_UNIX_STREAM	265
-#define	KW_UNIX_DGRAM	266
-#define	KW_UDP	267
-#define	KW_TCP	268
-#define	KW_USER	269
-#define	KW_DOOR	270
-#define	KW_SUN_STREAMS	271
-#define	KW_PROGRAM	272
-#define	KW_REMCTRL	273
-#define	KW_FLAGS	274
-#define	KW_CATCHALL	275
-#define	KW_FALLBACK	276
-#define	KW_FINAL	277
-#define	KW_FSYNC	278
-#define	KW_MARK_FREQ	279
-#define	KW_SYNC_FREQ	280
-#define	KW_STATS_FREQ	281
-#define	KW_CHAIN_HOSTNAMES	282
-#define	KW_KEEP_HOSTNAME	283
-#define	KW_LOG_FIFO_SIZE	284
-#define	KW_TIME_REOPEN	285
-#define	KW_TIME_REAP	286
-#define	KW_USE_TIME_RECVD	287
-#define	KW_USE_DNS	288
-#define	KW_USE_FQDN	289
-#define	KW_GC_BUSY_THRESHOLD	290
-#define	KW_GC_IDLE_THRESHOLD	291
-#define	KW_CREATE_DIRS	292
-#define	KW_DIR_OWNER	293
-#define	KW_DIR_GROUP	294
-#define	KW_DIR_PERM	295
-#define	KW_FILE_TEMPLATE	296
-#define	KW_TEMPLATE_ESCAPE	297
-#define	KW_OWNER	298
-#define	KW_GROUP	299
-#define	KW_PERM	300
-#define	KW_KEEP_ALIVE	301
-#define	KW_MAX_CONNECTIONS	302
-#define	KW_LOCALIP	303
-#define	KW_IP	304
-#define	KW_LOCALPORT	305
-#define	KW_PORT	306
-#define	KW_DESTPORT	307
-#define	KW_COMPRESS	308
-#define	KW_MAC	309
-#define	KW_AUTH	310
-#define	KW_ENCRYPT	311
-#define	KW_DNS_CACHE	312
-#define	KW_DNS_CACHE_SIZE	313
-#define	KW_DNS_CACHE_EXPIRE	314
-#define	KW_DNS_CACHE_EXPIRE_FAILED	315
-#define	KW_FACILITY	316
-#define	KW_LEVEL	317
-#define	KW_HOST	318
-#define	KW_MATCH	319
-#define	KW_YES	320
-#define	KW_NO	321
-#define	KW_REQUIRED	322
-#define	KW_ALLOW	323
-#define	KW_DENY	324
-#define	DOTDOT	325
-#define	IDENTIFIER	326
-#define	NUMBER	327
-#define	STRING	328
-#define	KW_OR	329
-#define	KW_AND	330
-#define	KW_NOT	331
-
-
 extern YYSTYPE yylval;
diff -uNr syslog-ng-1.5.13.orig/src/cfg-grammar.y syslog-ng-1.5.13/src/cfg-grammar.y
--- syslog-ng-1.5.13.orig/src/cfg-grammar.y	Mon Sep  3 18:46:01 2001
+++ syslog-ng-1.5.13/src/cfg-grammar.y	Thu Apr 18 22:55:03 2002
@@ -38,6 +38,7 @@
 #include "afremctrl.h"
 
 #include <netinet/in.h>
+#include <stdio.h>
 
 void yyerror(char *msg);
 int yylex();
@@ -125,6 +126,7 @@
 %type	<ptr> dest_afinet_tcp_params
 %type   <ptr> dest_afuser
 %type   <ptr> dest_afprogram
+%type   <ptr> dest_afprogram_params
 %type   <ptr> dest_afremctrl
 
 %type	<ptr> log_items
@@ -497,7 +499,26 @@
 	;
 
 dest_afprogram
-	: KW_PROGRAM '(' string ')' 		{ $$ = make_afprogram_dest($3); free($3); }
+	: KW_PROGRAM '(' dest_afprogram_params ')' 	{ $$ = $3; }
+
+dest_afprogram_params
+	: string 
+	  { 
+	    last_dest_driver = make_afprogram_dest($1);
+	    free($1); 
+	  } 
+	  dest_afprogram_options                   { $$ = last_dest_driver; }
+	;
+
+dest_afprogram_options
+	: dest_afprogram_option dest_afprogram_options
+	|
+	;
+
+dest_afprogram_option
+	: KW_FILE_TEMPLATE '(' string ')'       { afprogram_set_template(last_dest_driver, $3); free($3); }
+	| KW_TEMPLATE_ESCAPE '(' yesno ')'	{ afprogram_set_template_escape(last_dest_driver, $3); }
+	;
 
 dest_afremctrl
 	: KW_REMCTRL '(' ')'			{ $$ = make_afremctrl_dest(); }
