1156230Smux%{
2156230Smux/*-
3156230Smux * Copyright (c) 2003-2004, Maxime Henrion <mux@FreeBSD.org>
4156230Smux * All rights reserved.
5156230Smux *
6156230Smux * Redistribution and use in source and binary forms, with or without
7156230Smux * modification, are permitted provided that the following conditions
8156230Smux * are met:
9156230Smux * 1. Redistributions of source code must retain the above copyright
10156230Smux *    notice, this list of conditions and the following disclaimer.
11156230Smux * 2. Redistributions in binary form must reproduce the above copyright
12156230Smux *    notice, this list of conditions and the following disclaimer in the
13156230Smux *    documentation and/or other materials provided with the distribution.
14156230Smux *
15156230Smux * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16156230Smux * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17156230Smux * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18156230Smux * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19156230Smux * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20156230Smux * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21156230Smux * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22156230Smux * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23156230Smux * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24156230Smux * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25156230Smux * SUCH DAMAGE.
26156230Smux *
27156230Smux * $FreeBSD$
28156230Smux */
29156230Smux
30156230Smux#include <sys/types.h>
31156230Smux
32156230Smux#include "config.h"
33156230Smux#include "token.h"
34156230Smux
35156230Smux%}
36156230Smux
37156230Smux%union {
38156230Smux	char *str;
39156230Smux	int i;
40156230Smux}
41156230Smux
42156230Smux%token DEFAULT
43156230Smux%token <i> NAME
44156230Smux%token <i> BOOLEAN
45156230Smux%token EQUAL
46156230Smux%token <str> STRING
47156230Smux
48156230Smux%%
49156230Smux
50156230Smuxconfig_file
51156230Smux	: config_list
52156230Smux       	|
53156230Smux       	;
54156230Smux
55156230Smuxconfig_list
56156230Smux        : config
57156230Smux        | config_list config
58156230Smux        ;
59156230Smux
60156230Smuxconfig
61156230Smux	: default_line
62156230Smux	| collection
63156230Smux	;
64156230Smux
65156230Smuxdefault_line
66156230Smux	: DEFAULT options
67156230Smux		{ coll_setdef(); }
68156230Smux	;
69156230Smux
70156230Smuxcollection
71156230Smux	: STRING options
72156230Smux		{ coll_add($1); }
73156230Smux	;
74156230Smux
75156230Smuxoptions
76156230Smux	:
77156230Smux	| options option
78156230Smux	;
79156230Smux
80156230Smuxoption
81156230Smux	: BOOLEAN
82156230Smux		{ coll_setopt($1, NULL); }
83156230Smux	| value
84156230Smux	;
85156230Smux
86156230Smuxvalue
87156230Smux	: NAME EQUAL STRING
88156230Smux		{ coll_setopt($1, $3); }
89156230Smux	;
90156230Smux
91156230Smux%%
92