/* A Bison parser, made by GNU Bison 2.4.2. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
under terms of your choice, so long as that work isn't itself a
parser generator using the skeleton or a modified version thereof
as a parser skeleton. Alternatively, if you modify or redistribute
the parser skeleton itself, you may (at your option) remove this
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
/* C LALR(1) parser skeleton written by Richard Stallman, by
simplifying the original so-called "semantic" parser. */
/* All symbols defined below should begin with yy or YY, to avoid
infringing on user name space. This should be done even for local
variables, as they might otherwise be expanded by user macros.
There are some unavoidable exceptions within include files to
define necessary library symbols; they are noted "INFRINGES ON
USER NAME SPACE" below. */
/* Identify Bison output. */
#define YYBISON 1
/* Bison version. */
#define YYBISON_VERSION "2.4.2"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
/* Pure parsers. */
#define YYPURE 0
/* Push parsers. */
#define YYPUSH 0
/* Pull parsers. */
#define YYPULL 1
/* Using locations. */
#define YYLSP_NEEDED 0
/* Copy the first part of user declarations. */
/* Line 189 of yacc.c */
#line 5 "config.y"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
extern char *yytext;
extern int yyleng;
#define NIL (struct dev_ent *)0x00
#define CONFIGC "conf.c" /* name of .c output */
#define CONFIGH "conf.h" /* name of .h output */
#define CONFHREF "<conf.h>" /* how conf.h referenced */
#define CONFIGIN "Configuration" /* name of input file */
#define CONFMAXNM 24 /* max length of strings */
FILE *confc;
FILE *confh;
char *dbstr;
int ndevs = 0;
int currname = -1;
int currtname = -1;
int currdname = -1;
int brkcount = 0;
struct sym_ent { /* symbol table */
char *name;
int occurs;
} symtab[250];
int nsym = 0;
int linectr = 1;
char *doing = "device type declaration";
char *s;
struct dev_ent
{
char *name; /* device name (not used in types) */
char *tname; /* type name */
int tnum; /* symbol table index of type */
char *device; /* device name */
int csr; /* Control Status Register addr */
int irq; /* interrupt request */
char intr[CONFMAXNM]; /* interrupt routine */
char init[CONFMAXNM]; /* init routine name */
char open[CONFMAXNM]; /* open routine name */
char close[CONFMAXNM]; /* close routine name */
char read[CONFMAXNM]; /* read routine name */
char write[CONFMAXNM]; /* write routine name */
char control[CONFMAXNM]; /* control routine name */
char seek[CONFMAXNM]; /* seek routine name */
char getc[CONFMAXNM]; /* getc routine name */
char putc[CONFMAXNM]; /* putc routine name */
int minor; /* minor device number 0,1,... */
struct dev_ent *next; /* next node on the list */
};
struct dev_ent *ftypes = NIL; /* linked list of device types */
struct dev_ent *devs = NIL; /* linked list of device decls. */
struct dev_ent *lastdv = NIL;
struct dev_ent *currtype = NIL;
char *devstab[] =
{
"/* Device table entry */",
"struct\tdentry\t{",
"\tint32 dvnum;",
"\tint32 dvminor;",
"\tchar *dvname;",
"\tdevcall (*dvinit) (struct dentry *);",
"\tdevcall (*dvopen) (struct dentry *, char *, char *);",
"\tdevcall (*dvclose)(struct dentry *);",
"\tdevcall (*dvread) (struct dentry *, void *, uint32);",
"\tdevcall (*dvwrite)(struct dentry *, void *, uint32);",
"\tdevcall (*dvseek) (struct dentry *, int32);",
"\tdevcall (*dvgetc) (struct dentry *);",
"\tdevcall (*dvputc) (struct dentry *, char);",
"\tdevcall (*dvcntl) (struct dentry *, int32, int32, int32);",
"\tvoid *dvcsr;",
"\tvoid (*dvintr)(void);",
"\tbyte dvirq;",
"};\n",
"extern struct dentry devtab[]; /* one entry per device */",
NULL
};
/* Prototypes */
void yyerror(char *s);
int lookup(char *str, int len);
int config_atoi(char *p, int len);
void newattr(int tok, int val);
int cktname(int symid);
void mktype(int deviceid);
void initattr(struct dev_ent *fstr, int tnum, int deviceid);
void mkdev(int nameid, int typid, int deviceid);
int ckdname(int devid);
/* Line 189 of yacc.c */
#line 175 "y.tab.c"
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
/* Enabling verbose error messages. */
#ifdef YYERROR_VERBOSE
# undef YYERROR_VERBOSE
# define YYERROR_VERBOSE 1
#else
# define YYERROR_VERBOSE 0
#endif
/* Enabling the token table. */
#ifndef YYTOKEN_TABLE
# define YYTOKEN_TABLE 0
#endif
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
DEFBRK = 258,
COLON = 259,
OCTAL = 260,
INTEGER = 261,
IDENT = 262,
CSR = 263,
IRQ = 264,
INTR = 265,
INIT = 266,
OPEN = 267,
CLOSE = 268,
READ = 269,
WRITE = 270,
SEEK = 271,
CONTROL = 272,
IS = 273,
ON = 274,
GETC = 275,
PUTC = 276
};
#endif
/* Tokens. */
#define DEFBRK 258
#define COLON 259
#define OCTAL 260
#define INTEGER 261
#define IDENT 262
#define CSR 263
#define IRQ 264
#define INTR 265
#define INIT 266
#define OPEN 267
#define CLOSE 268
#define READ 269
#define WRITE 270
#define SEEK 271
#define CONTROL 272
#define IS 273
#define ON 274
#define GETC 275
#define PUTC 276
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif
/* Copy the second part of user declarations. */
/* Line 264 of yacc.c */
#line 259 "y.tab.c"
#ifdef short
# undef short
#endif
#ifdef YYTYPE_UINT8
typedef YYTYPE_UINT8 yytype_uint8;
#else
typedef unsigned char yytype_uint8;
#endif
#ifdef YYTYPE_INT8
typedef YYTYPE_INT8 yytype_int8;
#elif (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
typedef signed char yytype_int8;
#else
typedef short int yytype_int8;
#endif
#ifdef YYTYPE_UINT16
typedef YYTYPE_UINT16 yytype_uint16;
#else
typedef unsigned short int yytype_uint16;
#endif
#ifdef YYTYPE_INT16
typedef YYTYPE_INT16 yytype_int16;
#else
typedef short int yytype_int16;
#endif
#ifndef YYSIZE_T
# ifdef __SIZE_TYPE__
# define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
# define YYSIZE_T size_t
# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# else
# define YYSIZE_T unsigned int
# endif
#endif
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
# if defined YYENABLE_NLS && YYENABLE_NLS
# if
没有合适的资源?快使用搜索试试~ 我知道了~
网络安全技术-超级给力.zip
共1306个文件
c:468个
o:448个
h:104个
需积分: 1 0 下载量 31 浏览量
2019-07-22
11:44:49
上传
评论
收藏 31.9MB ZIP 举报
温馨提示
网络安全与网络攻防相关的网络技术ppt
资源推荐
资源详情
资源评论
收起资源包目录
网络安全技术-超级给力.zip (1306个子文件)
libxc.a 49KB
libxc.a 49KB
libxc.a 49KB
libxc.a 49KB
xinu.bin 138KB
xinu.bin 138KB
xinu.boot 138KB
xinu.boot 138KB
BOOT 33B
BOOT 33B
y.tab.c 58KB
y.tab.c 58KB
lex.yy.c 47KB
lex.yy.c 47KB
mkimage.c 21KB
mkimage.c 21KB
udp.c 10KB
udp.c 10KB
icmp.c 10KB
icmp.c 10KB
fdoprnt.c 8KB
fdoprnt.c 8KB
doprnt.c 8KB
doprnt.c 8KB
crc32.c 8KB
crc32.c 8KB
doscan.c 8KB
doscan.c 8KB
shell.c 8KB
shell.c 8KB
arp.c 8KB
arp.c 8KB
ttyInter_in.c 7KB
ttyInter_in.c 7KB
ascdate.c 5KB
ascdate.c 5KB
rdsprocess.c 5KB
rdsprocess.c 5KB
conf.c 5KB
conf.c 5KB
conf.c 5KB
conf.c 5KB
ethInit.c 5KB
ethInit.c 5KB
initialize.c 5KB
initialize.c 5KB
test_semaphore.c 5KB
test_semaphore.c 5KB
nvram.c 4KB
nvram.c 4KB
ethStat.c 4KB
ethStat.c 4KB
dhcp.c 4KB
dhcp.c 4KB
lfsOpen.c 4KB
lfsOpen.c 4KB
pdump.c 4KB
pdump.c 4KB
nammap.c 4KB
nammap.c 4KB
xsh_memdump.c 4KB
xsh_memdump.c 4KB
lfsetup.c 4KB
lfsetup.c 4KB
test_recursion.c 4KB
test_recursion.c 4KB
xsh_memstat.c 4KB
xsh_memstat.c 4KB
tar.c 4KB
tar.c 4KB
exception.c 4KB
exception.c 4KB
ethInterrupt.c 4KB
ethInterrupt.c 4KB
lexan.c 4KB
lexan.c 4KB
create.c 4KB
create.c 4KB
xsh_udpecho.c 3KB
xsh_udpecho.c 3KB
xsh_help.c 3KB
xsh_help.c 3KB
rdsRead.c 3KB
rdsRead.c 3KB
rdsInit.c 3KB
rdsInit.c 3KB
rdsControl.c 3KB
rdsControl.c 3KB
lftruncate.c 3KB
lftruncate.c 3KB
ttyInit.c 3KB
ttyInit.c 3KB
dispatch.c 3KB
dispatch.c 3KB
netin.c 3KB
netin.c 3KB
rfsOpen.c 3KB
rfsOpen.c 3KB
addargs.c 3KB
addargs.c 3KB
共 1306 条
- 1
- 2
- 3
- 4
- 5
- 6
- 14
资源评论
professionIT
- 粉丝: 14
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 论文(最终)_20240430235101.pdf
- 基于python编写的Keras深度学习框架开发,利用卷积神经网络CNN,快速识别图片并进行分类
- 最全空间计量实证方法(空间杜宾模型和检验以及结果解释文档).txt
- 5uonly.apk
- 蓝桥杯Python组的历年真题
- 2023-04-06-项目笔记 - 第一百十九阶段 - 4.4.2.117全局变量的作用域-117 -2024.04.30
- 2023-04-06-项目笔记 - 第一百十九阶段 - 4.4.2.117全局变量的作用域-117 -2024.04.30
- 前端开发技术实验报告:内含4四实验&实验报告
- Highlight Plus v20.0.1
- 林周瑜-论文.docx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功