xref: /netbsd-src/usr.bin/msgc/msgparse.y (revision 40c86e8b4e752aadf4bfeedbb103e13ea3b560f9)
1*40c86e8bSmbalmer /*	$NetBSD: msgparse.y,v 1.5 2012/03/06 16:26:01 mbalmer Exp $	*/
2584c2298Sphil 
3584c2298Sphil /*
4584c2298Sphil  * Copyright 1997 Piermont Information Systems Inc.
5584c2298Sphil  * All rights reserved.
6584c2298Sphil  *
7584c2298Sphil  * Written by Philip A. Nelson for Piermont Information Systems Inc.
8584c2298Sphil  *
9584c2298Sphil  * Redistribution and use in source and binary forms, with or without
10584c2298Sphil  * modification, are permitted provided that the following conditions
11584c2298Sphil  * are met:
12584c2298Sphil  * 1. Redistributions of source code must retain the above copyright
13584c2298Sphil  *    notice, this list of conditions and the following disclaimer.
14584c2298Sphil  * 2. Redistributions in binary form must reproduce the above copyright
15584c2298Sphil  *    notice, this list of conditions and the following disclaimer in the
16584c2298Sphil  *    documentation and/or other materials provided with the distribution.
17*40c86e8bSmbalmer  * 3. The name of Piermont Information Systems Inc. may not be used to endorse
18584c2298Sphil  *    or promote products derived from this software without specific prior
19584c2298Sphil  *    written permission.
20584c2298Sphil  *
21584c2298Sphil  * THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
22584c2298Sphil  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23584c2298Sphil  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24584c2298Sphil  * ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
25584c2298Sphil  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26584c2298Sphil  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27584c2298Sphil  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28584c2298Sphil  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29584c2298Sphil  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30584c2298Sphil  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31584c2298Sphil  * THE POSSIBILITY OF SUCH DAMAGE.
32584c2298Sphil  *
33584c2298Sphil  */
34584c2298Sphil 
35584c2298Sphil %{
36584c2298Sphil 
37a8d6388eSagc #include <sys/cdefs.h>
38a8d6388eSagc 
39abcf838dSlukem #if defined(__RCSID) && !defined(lint)
40*40c86e8bSmbalmer __RCSID("$NetBSD: msgparse.y,v 1.5 2012/03/06 16:26:01 mbalmer Exp $");
41a8d6388eSagc #endif
42a8d6388eSagc 
43a8d6388eSagc 
44584c2298Sphil #include "defs.h"
45584c2298Sphil 
46584c2298Sphil %}
47584c2298Sphil 
48584c2298Sphil %union {
49584c2298Sphil 	char *s_value;
50584c2298Sphil }
51584c2298Sphil 
52584c2298Sphil 
53584c2298Sphil %token MESSAGE
54584c2298Sphil %token <s_value> NAME VALUE
55584c2298Sphil 
56584c2298Sphil %start list
57584c2298Sphil 
58584c2298Sphil %%
59584c2298Sphil 
60584c2298Sphil list	: /* empty */
61584c2298Sphil 	| list msg
62584c2298Sphil 	;
63584c2298Sphil 
64584c2298Sphil 
65584c2298Sphil msg	: MESSAGE NAME VALUE
66584c2298Sphil 		{ define_msg ($2, $3); }
67