2 Unix SMB/CIFS implementation.
3 Copyright (C) 2006 Wilco Baan Hofman <wilco@baanhofman.nl>
4 Copyright (C) 2006 Jelmer Vernooij <jelmer@samba.org>
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 For more information on the .ADM file format:
21 http://msdn2.microsoft.com/en-us/library/aa372405.aspx
26 void error_message (const char *format, ...);
28 void yyerror (const char *s);
29 extern int yylex (void);
46 %token VALUEON VALUEOFF
50 %token VALUE VALUEPREFIX
51 %token NUMERIC EDITTEXT TEXT DROPDOWNLIST CHECKBOX LISTBOX
52 %token MINIMUM MAXIMUM DEFAULT
54 %token ACTIONLIST ACTIONLISTON ACTIONLISTOFF
59 %token <integer> INTEGER
60 %token <text> LOOKUPLITERAL
63 %token NOSORT ADDITIVE
71 %token DEFCHECKED EXPANDABLETEXT
77 admfile: classes sections;
79 classes: /* empty */ | class classes;
81 class: CLASS classvalue categories;
82 classvalue: CLASS_USER|CLASS_MACHINE;
84 categories: /* empty */ | category categories;
86 string: LITERAL | LOOKUPLITERAL;
88 category: CATEGORY string categoryitems END CATEGORY;
90 categoryitem: explain | category | policy | keyname;
91 categoryitems: categoryitem categoryitems | /* empty */ ;
93 policy: POLICY string policyitems END POLICY;
94 policyitem: explain | keyname | valuename | valueon | valueoff | min | max | defaultvalue | supported | part | DEFCHECKED | actionliston | actionlistoff | EXPLICITVALUE | valueprefix | clientext | NOSORT | ADDITIVE | maxlen | EXPANDABLETEXT | TXTCONVERT;
95 policyitems: policyitem policyitems | /* empty */;
97 valuetype: NUMERIC | EDITTEXT | TEXT | DROPDOWNLIST | CHECKBOX | LISTBOX;
99 part: PART string valuetype partitems END PART;
103 partitem: keyname | valuename | valueon | valueoff | min | max | defaultvalue | itemlist | REQUIRED | spin | DEFCHECKED | actionliston | actionlistoff | EXPLICITVALUE | valueprefix | clientext | NOSORT | ADDITIVE | maxlen | EXPANDABLETEXT |TXTCONVERT;
104 partitems: partitem partitems | /* empty */;
106 clientext: CLIENTEXT LITERAL;
107 maxlen: MAXLEN INTEGER;
108 min: MINIMUM INTEGER;
109 max: MAXIMUM INTEGER;
110 defaultvalue: DEFAULT INTEGER | DEFAULT LOOKUPLITERAL | DEFAULT LITERAL;
112 explain: EXPLAIN string;
113 value: DEL | INTEGER | NUMERIC INTEGER | LITERAL | LOOKUPLITERAL;
115 valueon: VALUEON value;
116 valueoff: VALUEOFF value;
117 valueprefix: VALUEPREFIX LITERAL;
119 valuename: VALUENAME string;
120 keyname: KEYNAME string;
122 itemlist: ITEMLIST items END ITEMLIST;
123 itemname: NAME string;
124 itemvalue: VALUE value;
126 item: itemname | itemvalue | DEFAULT | actionlist;
127 items: /* empty */ | item items;
129 supported: SUPPORTED string;
131 actionlist: ACTIONLIST actions END ACTIONLIST;
132 actionliston: ACTIONLISTON actions END ACTIONLISTON;
133 actionlistoff: ACTIONLISTOFF actions END ACTIONLISTOFF;
134 actions: keyname actions | valuename actions | itemvalue actions | /* empty */;
136 variable: LITERAL EQUALS;
137 variables: variable variables | /* empty */;
138 sections: section sections | /* empty */;
139 section: SECTION variables;
144 yyerror (const char *s)
146 error_message ("%s\n", s);