📄 yacc_config.c
字号:
#ifndef lintstatic char const yyrcsid[] = "$FreeBSD: src/usr.bin/yacc/skeleton.c,v 1.28 2000/01/17 02:04:06 bde Exp $";#endif#include <stdlib.h>#define YYBYACC 1#define YYMAJOR 1#define YYMINOR 9#define YYLEX yylex()#define YYEMPTY -1#define yyclearin (yychar=(YYEMPTY))#define yyerrok (yyerrflag=0)#define YYRECOVERING() (yyerrflag!=0)static int yygrowstack();#define YYPREFIX "yy"#line 2 "yacc_config.y"/* * yacc_config.y 1.56 2002/05/16 06:07:40 * * The contents of this file are subject to the Mozilla Public License * Version 1.1 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License * at http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See * the License for the specific language governing rights and * limitations under the License. * * The initial developer of the original code is David A. Hinds * <dahinds@users.sourceforge.net>. Portions created by David A. Hinds * are Copyright (C) 1999 David A. Hinds. All Rights Reserved. * * Alternatively, the contents of this file may be used under the * terms of the GNU General Public License version 2 (the "GPL"), in * which case the provisions of the GPL are applicable instead of the * above. If you wish to allow the use of your version of this file * only under the terms of the GPL and not to allow others to use * your version of this file under the MPL, indicate your decision by * deleting the provisions above and replace them with the notice and * other provisions required by the GPL. If you do not delete the * provisions above, a recipient may use your version of this file * under either the MPL or the GPL. */ #include <stdlib.h>#include <stdarg.h>#include <stdio.h>#include <string.h>#include <syslog.h>#include <sys/types.h>#include <pcmcia/cs_types.h>#include <pcmcia/cs.h>#include <pcmcia/cistpl.h>#include <pcmcia/ds.h> #include "cardmgr.h"/* If bison: generate nicer error messages */ #define YYERROR_VERBOSE 1 /* from lex_config, for nice error messages */extern char *current_file;extern int current_lineno;void yyerror(char *msg, ...);static int add_binding(card_info_t *card, char *name, int fn);static int add_module(device_info_t *card, char *name);#line 65 "yacc_config.y"typedef union { char *str; u_long num; struct device_info_t *device; struct card_info_t *card; struct mtd_ident_t *mtd; struct adjust_list_t *adjust;} YYSTYPE;#line 82 "y.tab.c"#define YYERRCODE 256#define DEVICE 257#define CARD 258#define ANONYMOUS 259#define TUPLE 260#define MANFID 261#define VERSION 262#define FUNCTION 263#define PCI 264#define BIND 265#define CIS 266#define TO 267#define NEEDS_MTD 268#define MODULE 269#define OPTS 270#define CLASS 271#define REGION 272#define JEDEC 273#define DTYPE 274#define DEFAULT 275#define MTD 276#define INCLUDE 277#define EXCLUDE 278#define RESERVE 279#define IRQ_NO 280#define PORT 281#define MEMORY 282#define STRING 283#define NUMBER 284#define SOURCE 285const short yylhs[] = { -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 9, 10, 11, 12, 12, 13, 15, 14, 14, 14, 14, 4, 21, 5, 5, 5, 6, 16, 16, 16, 16, 18, 17, 19, 20, 20, 22,};const short yylen[] = { 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 4, 4, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 7, 5, 5, 3, 3, 3, 3, 3, 5, 3, 5, 2, 4, 3, 3, 3, 3, 2, 1, 1, 1, 3, 4, 2, 3, 3, 4,};const short yydefred[] = { 1, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 18, 0, 20, 0, 22, 23, 24, 25, 0, 27, 0, 29, 0, 50, 49, 51, 0, 6, 7, 17, 21, 0, 48, 0, 0, 0, 0, 10, 11, 12, 0, 42, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 14, 0, 0, 13, 44, 47, 45, 46, 0, 0, 34, 36, 0, 0, 37, 35, 0, 0, 52, 55, 56, 43, 57, 0, 0, 0, 0, 0, 0, 0, 53, 15, 16, 0, 32, 33, 39, 41, 0, 31,};const short yydgoto[] = { 1, 12, 41, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,};const short yysindex[] = { 0, -252, 0, -276, -267, -261, -260, -255, -246, -246, -246, 0, -15, -250, 0, -44, 0, -251, 0, 0, 0, 0, -14, 0, -12, 0, -235, 0, 0, 0, -228, 0, 0, 0, 0, -227, 0, -226, -238, -237, -236, 0, 0, 0, -246, 0, -234, -233, -232, -231, 0, -230, -229, -225, -224, -222, -220, -219, -218, -217, -216, -215, 0, -213, -212, -211, -210, 0, 8, 11, 0, 0, 0, 0, 0, 13, 15, 0, 0, 23, -193, 0, 0, -191, -207, 0, 0, 0, 0, 0, -206, -205, -204, -203, -202, -201, -200, 0, 0, 0, 41, 0, 0, 0, 0, -197, 0,};const short yyrindex[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, 183, 0, 115, 0, 149, 0, 0, 0, 0, 61, 0, 91, 0, 0, 0, 0, 0, 166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,};const short yygindex[] = { 0, 0, -7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,};#define YYTABLESIZE 468const short yytable[] = { 49, 38, 42, 43, 2, 3, 4, 33, 50, 51, 52, 53, 54, 55, 56, 57, 34, 5, 45, 46, 6, 47, 35, 36, 7, 8, 9, 10, 37, 44, 58, 40, 59, 11, 38, 39, 40, 70, 60, 61, 62, 63, 64, 65, 66, 38, 67, 68, 69, 71, 72, 73, 74, 90, 75, 76, 91, 92, 77, 93, 78, 26, 79, 80, 81, 82, 83, 94, 84, 85, 86, 87, 88, 89, 95, 40, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 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, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 0, 0, 38, 0, 0, 38, 0, 0, 0, 38, 38, 38, 38, 0, 0, 0, 0, 0, 38, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 0, 0, 40, 0, 0, 40, 0, 0, 0, 40, 40, 40, 40, 0, 0, 0, 0, 0, 40, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 0, 0, 26, 0, 0, 26, 0, 0, 0, 26, 26, 26, 26, 0, 0, 0, 0, 0, 26, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 0, 0, 28, 0, 0, 28, 0, 0, 0, 28, 28, 28, 28, 19, 19, 19, 0, 0, 28, 0, 0, 0, 0, 0, 0, 19, 19, 0, 19, 19, 2, 2, 2, 19, 19, 19, 19, 0, 0, 0, 0, 0, 19, 2, 0, 0, 2, 5, 5, 5, 2, 2, 2, 2, 0, 0, 0, 0, 0, 2, 5, 0, 0, 5, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0, 0, 5, 4, 0, 0, 4, 3, 3, 3, 4, 4, 4, 4, 0, 0, 0, 0, 0, 4, 0, 0, 0, 3, 0, 0, 0, 3, 3, 3, 3, 0, 0, 0, 0, 0, 3,};const short yycheck[] = { 44, 0, 9, 10, 256, 257, 258, 283, 259, 260, 261, 262, 263, 264, 265, 266, 283, 269, 268, 269, 272, 271, 283, 283, 276, 277, 278, 279, 283, 44, 44, 0, 44, 285, 280, 281, 282, 44, 273, 274, 275, 276, 270, 270, 270, 44, 284, 284, 284, 283, 283, 283, 283, 45, 284, 284, 45, 44, 283, 44, 284, 0, 284, 283, 283, 283, 283, 44, 284, 284, 283, 283, 283, 283, 267, 44, 267, 284, 284, 284, 284, 284, 284, 284, 284, 44, 283, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 270, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, -1, -1, 269, -1, -1, 272, -1, -1, -1, 276, 277, 278, 279, -1, -1, -1, -1, -1, 285, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, -1, -1, 269, -1, -1, 272, -1, -1, -1, 276, 277, 278, 279, -1, -1, -1, -1, -1, 285, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, -1, -1, 269, -1, -1, 272, -1, -1, -1, 276, 277, 278, 279, -1, -1, -1, -1, -1, 285, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, -1, -1, 269, -1, -1, 272, -1, -1, -1, 276, 277, 278, 279, 256, 257, 258, -1, -1, 285, -1, -1, -1, -1, -1, -1, 268, 269, -1, 271, 272, 256, 257, 258, 276, 277, 278, 279, -1, -1, -1, -1, -1, 285, 269, -1, -1, 272, 256, 257, 258, 276, 277, 278, 279, -1, -1, -1, -1, -1, 285, 269, -1, -1, 272, 256, 257, 258, 276, 277, 278, 279, -1, -1, -1, -1, -1, 285, 269, -1, -1, 272, 256, 257, 258, 276, 277, 278, 279, -1, -1, -1, -1, -1, 285, -1, -1, -1, 272, -1, -1, -1, 276, 277, 278, 279, -1, -1, -1, -1, -1, 285,};#define YYFINAL 1#ifndef YYDEBUG#define YYDEBUG 0#endif#define YYMAXTOKEN 285#if YYDEBUGconst char * const 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,0,0,0,"DEVICE","CARD","ANONYMOUS","TUPLE","MANFID","VERSION","FUNCTION","PCI","BIND","CIS","TO","NEEDS_MTD","MODULE","OPTS","CLASS","REGION","JEDEC","DTYPE","DEFAULT","MTD","INCLUDE","EXCLUDE","RESERVE","IRQ_NO","PORT","MEMORY","STRING","NUMBER","SOURCE",};const char * const yyrule[] = {"$accept : list","list :","list : list adjust","list : list device","list : list mtd","list : list card","list : list opts","list : list mtd_opts","list : list SOURCE","list : list error","adjust : INCLUDE resource","adjust : EXCLUDE resource","adjust : RESERVE resource","adjust : adjust ',' resource","resource : IRQ_NO NUMBER","resource : PORT NUMBER '-' NUMBER","resource : MEMORY NUMBER '-' NUMBER","device : DEVICE STRING","device : needs_mtd","device : module","device : class","card : CARD STRING","card : anonymous","card : tuple","card : manfid","card : pci","card : version","card : function","card : bind","card : cis","anonymous : card ANONYMOUS","tuple : card TUPLE NUMBER ',' NUMBER ',' STRING","manfid : card MANFID NUMBER ',' NUMBER","pci : card PCI NUMBER ',' NUMBER","version : card VERSION STRING","version : version ',' STRING","function : card FUNCTION NUMBER","cis : card CIS STRING","bind : card BIND STRING","bind : card BIND STRING TO NUMBER","bind : bind ',' STRING","bind : bind ',' STRING TO NUMBER","needs_mtd : device NEEDS_MTD","opts : MODULE STRING OPTS STRING","module : device MODULE STRING","module : module OPTS STRING","module : module ',' STRING","class : device CLASS STRING","region : REGION STRING","region : dtype","region : jedec","region : default","dtype : region DTYPE NUMBER","jedec : region JEDEC NUMBER NUMBER","default : region DEFAULT","mtd : region MTD STRING","mtd : mtd OPTS STRING","mtd_opts : MTD STRING OPTS STRING",};#endif#if YYDEBUG#include <stdio.h>#endif#ifdef YYSTACKSIZE#undef YYMAXDEPTH#define YYMAXDEPTH YYSTACKSIZE#else#ifdef YYMAXDEPTH#define YYSTACKSIZE YYMAXDEPTH#else#define YYSTACKSIZE 10000
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -