/* A Bison parser, made by GNU Bison 3.0.4. */
/* Bison implementation for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2015 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 "3.0.4"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
/* Pure parsers. */
#define YYPURE 0
/* Push parsers. */
#define YYPUSH 0
/* Pull parsers. */
#define YYPULL 1
/* Copy the first part of user declarations. */
#line 25 "parser.y" /* yacc.c:339 */
#define yylex yylex
#include "swig.h"
#include "cparse.h"
#include "preprocessor.h"
#include <ctype.h>
/* We do this for portability */
#undef alloca
#define alloca malloc
/* -----------------------------------------------------------------------------
* Externals
* ----------------------------------------------------------------------------- */
int yyparse();
/* NEW Variables */
static Node *top = 0; /* Top of the generated parse tree */
static int unnamed = 0; /* Unnamed datatype counter */
static Hash *classes = 0; /* Hash table of classes */
static Hash *classes_typedefs = 0; /* Hash table of typedef classes: typedef struct X {...} Y; */
static Symtab *prev_symtab = 0;
static Node *current_class = 0;
String *ModuleName = 0;
static Node *module_node = 0;
static String *Classprefix = 0;
static String *Namespaceprefix = 0;
static int inclass = 0;
static Node *currentOuterClass = 0; /* for nested classes */
static const char *last_cpptype = 0;
static int inherit_list = 0;
static Parm *template_parameters = 0;
static int parsing_template_declaration = 0;
static int extendmode = 0;
static int compact_default_args = 0;
static int template_reduce = 0;
static int cparse_externc = 0;
int ignore_nested_classes = 0;
int kwargs_supported = 0;
/* -----------------------------------------------------------------------------
* Assist Functions
* ----------------------------------------------------------------------------- */
/* Called by the parser (yyparse) when an error is found.*/
static void yyerror (const char *e) {
(void)e;
}
/* Copies a node. Does not copy tree links or symbol table data (except for
sym:name) */
static Node *copy_node(Node *n) {
Node *nn;
Iterator k;
nn = NewHash();
Setfile(nn,Getfile(n));
Setline(nn,Getline(n));
for (k = First(n); k.key; k = Next(k)) {
String *ci;
String *key = k.key;
char *ckey = Char(key);
if ((strcmp(ckey,"nextSibling") == 0) ||
(strcmp(ckey,"previousSibling") == 0) ||
(strcmp(ckey,"parentNode") == 0) ||
(strcmp(ckey,"lastChild") == 0)) {
continue;
}
if (Strncmp(key,"csym:",5) == 0) continue;
/* We do copy sym:name. For templates */
if ((strcmp(ckey,"sym:name") == 0) ||
(strcmp(ckey,"sym:weak") == 0) ||
(strcmp(ckey,"sym:typename") == 0)) {
String *ci = Copy(k.item);
Setattr(nn,key, ci);
Delete(ci);
continue;
}
if (strcmp(ckey,"sym:symtab") == 0) {
Setattr(nn,"sym:needs_symtab", "1");
}
/* We don't copy any other symbol table attributes */
if (strncmp(ckey,"sym:",4) == 0) {
continue;
}
/* If children. We copy them recursively using this function */
if (strcmp(ckey,"firstChild") == 0) {
/* Copy children */
Node *cn = k.item;
while (cn) {
Node *copy = copy_node(cn);
appendChild(nn,copy);
Delete(copy);
cn = nextSibling(cn);
}
continue;
}
/* We don't copy the symbol table. But we drop an attribute
requires_symtab so that functions know it needs to be built */
if (strcmp(ckey,"symtab") == 0) {
/* Node defined a symbol table. */
Setattr(nn,"requires_symtab","1");
continue;
}
/* Can't copy nodes */
if (strcmp(ckey,"node") == 0) {
continue;
}
if ((strcmp(ckey,"parms") == 0) || (strcmp(ckey,"pattern") == 0) || (strcmp(ckey,"throws") == 0)
|| (strcmp(ckey,"kwargs") == 0)) {
ParmList *pl = CopyParmList(k.item);
Setattr(nn,key,pl);
Delete(pl);
continue;
}
if (strcmp(ckey,"nested:outer") == 0) { /* don't copy outer classes links, they will be updated later */
Setattr(nn, key, k.item);
continue;
}
/* defaultargs will be patched back in later in update_defaultargs() */
if (strcmp(ckey,"defaultargs") == 0) {
Setattr(nn, "needs_defaultargs", "1");
continue;
}
/* Looks okay. Just copy the data using Copy */
ci = Copy(k.item);
Setattr(nn, key, ci);
Delete(ci);
}
return nn;
}
/* -----------------------------------------------------------------------------
* Variables
* ----------------------------------------------------------------------------- */
static char *typemap_lang = 0; /* Current language setting */
static int cplus_mode = 0;
/* C++ modes */
#define CPLUS_PUBLIC 1
#define CPLUS_PRIVATE 2
#define CPLUS_PROTECTED 3
/* include types */
static int import_mode = 0;
void SWIG_typemap_lang(const char *tm_lang) {
typemap_lang = Swig_copy_string(tm_lang);
}
void SWIG_cparse_set_compact_default_args(int defargs) {
compact_default_args = defargs;
}
int SWIG_cparse_template_reduce(int treduce) {
template_reduce = treduce;
return treduce;
}
/* -----------------------------------------------------------------------------
* Assist functions
* ----------------------------------------------------------------------------- */
static int promote_type(int t) {
if (t <= T_UCHAR || t == T_CHAR) return T_INT;
return t;
}
/* Perform type-promotion for binary operators */
static int promote(int t1, int t2) {
t1 = promote_type(t1);
t2 = promote_type(t2);
return t1 > t2 ? t1 : t2;
}
static String *yyrename = 0;
/* Forward renaming operator */
static String *resolve_create_node_scope(String *cname);
Hash *Swig_cparse_features(void) {
static Hash *features_hash = 0;
if (!features_hash) features_hash = NewHash();
return features_hash;
}
没有合适的资源?快使用搜索试试~ 我知道了~
qt + vs obs的二次开发项目
共2000个文件
h:1387个
i:900个
ini:855个
8 下载量 124 浏览量
2022-10-27
11:18:11
上传
评论 2
收藏 83.47MB ZIP 举报
温馨提示
qt控制台项目 -- ffmpeg 的推流方式,更改flv url的地址 完成obs录制以及推流的功能 控制台窗口的开关在属性--链接器-系统-子系统 窗口和控制台的切换
资源推荐
资源详情
资源评论
收起资源包目录
qt + vs obs的二次开发项目 (2000个子文件)
configure.ac 93KB
configure.ac 93KB
configure.ac 2KB
configure.ac 2KB
Makefile.am 5KB
Makefile.am 5KB
Makefile.am 722B
ANNOUNCE 1KB
ANNOUNCE 1KB
AUTHORS 33KB
brew-install 647B
brew-install 647B
parser.c 423KB
parser.c 423KB
typemap.c 64KB
typemap.c 64KB
symbol.c 62KB
symbol.c 62KB
typesys.c 60KB
typesys.c 60KB
cpp.c 51KB
cpp.c 51KB
naming.c 49KB
naming.c 49KB
cwrap.c 49KB
cwrap.c 49KB
scanner.c 43KB
scanner.c 43KB
misc.c 39KB
misc.c 39KB
stype.c 35KB
stype.c 35KB
ccache.c 34KB
ccache.c 34KB
typeobj.c 32KB
typeobj.c 32KB
string.c 28KB
string.c 28KB
templ.c 27KB
templ.c 27KB
base.c 27KB
base.c 27KB
cscanner.c 25KB
cscanner.c 25KB
snprintf.c 22KB
snprintf.c 22KB
util.c 17KB
util.c 17KB
hash.c 14KB
hash.c 14KB
fio.c 13KB
fio.c 13KB
wrapfunc.c 13KB
wrapfunc.c 13KB
expr.c 12KB
expr.c 12KB
include.c 11KB
include.c 11KB
tree.c 10KB
tree.c 10KB
error.c 10KB
error.c 10KB
list.c 9KB
list.c 9KB
stats.c 9KB
stats.c 9KB
file.c 8KB
file.c 8KB
parms.c 7KB
parms.c 7KB
unify.c 7KB
unify.c 7KB
memory.c 6KB
memory.c 6KB
execute.c 6KB
execute.c 6KB
mdfour.c 6KB
mdfour.c 6KB
fragment.c 5KB
fragment.c 5KB
mactkinit.c 5KB
mactkinit.c 5KB
cleanup.c 5KB
cleanup.c 5KB
extend.c 5KB
extend.c 5KB
deprecate.c 4KB
deprecate.c 4KB
util.c 4KB
util.c 4KB
getopt.c 4KB
getopt.c 4KB
void.c 3KB
void.c 3KB
args.c 2KB
args.c 2KB
hash.c 2KB
hash.c 2KB
linkruntime.c 512B
linkruntime.c 512B
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
帅气转身而过
- 粉丝: 33
- 资源: 13
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功