1%union { 2 char *str; 3 int val; 4 struct file_list *file; 5} 6 7%token ARCH 8%token COMMA 9%token CONFIG 10%token CPU 11%token DEVICE |
12%token NODEVICE |
13%token ENV 14%token EQUALS 15%token HINTS 16%token IDENT 17%token MAXUSERS |
18%token PROFILE 19%token OPTIONS |
20%token NOOPTION |
21%token MAKEOPTIONS |
22%token NOMAKEOPTION |
23%token SEMICOLON 24%token INCLUDE 25 26%token <str> ID 27%token <val> NUMBER 28 29%type <str> Save_id 30%type <str> Opt_value --- 29 unchanged lines hidden (view full) --- 60 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 61 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 62 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 63 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 64 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 65 * SUCH DAMAGE. 66 * 67 * @(#)config.y 8.1 (Berkeley) 6/6/93 |
68 * $FreeBSD: head/usr.sbin/config/config.y 111582 2003-02-26 23:36:59Z ru $ |
69 */ 70 71#include <ctype.h> 72#include <err.h> 73#include <stdio.h> 74#include <string.h> 75 76#include "config.h" --- 56 unchanged lines hidden (view full) --- 133 struct cputype *cp = 134 (struct cputype *)malloc(sizeof (struct cputype)); 135 memset(cp, 0, sizeof(*cp)); 136 cp->cpu_name = $2; 137 SLIST_INSERT_HEAD(&cputype, cp, cpu_next); 138 } | 139 OPTIONS Opt_list 140 | |
141 NOOPTION Save_id 142 = { rmopt(&opt, $2); } | |
143 MAKEOPTIONS Mkopt_list 144 | |
145 NOMAKEOPTION Save_id 146 = { rmopt(&mkopt, $2); } | |
147 IDENT ID 148 = { ident = $2; } | 149 System_spec 150 | 151 MAXUSERS NUMBER 152 = { maxusers = $2; } | 153 PROFILE NUMBER 154 = { profiling = $2; } | --- 94 unchanged lines hidden (view full) --- 249 /* and the device part */ 250 newdev($2, $3); 251 if ($3 == 0) 252 errx(1, "%s:%d: devices with zero units are not " 253 "likely to be correct", yyfile, yyline); 254 } | 255 NODEVICE Dev 256 = { |
257 char *s = devopt($2); 258 259 rmopt(&opt, s); 260 free(s); |
261 /* and the device part */ 262 rmdev($2); 263 } ; 264 265%% 266 267void 268yyerror(const char *s) --- 73 unchanged lines hidden --- |