mirror of
https://github.com/pret/agbcc.git
synced 2026-04-25 07:19:40 -05:00
get it to compile
This commit is contained in:
parent
be8b044963
commit
476b5c86e5
|
|
@ -10,10 +10,8 @@ struct resword { char *name; short token; enum rid rid; };
|
|||
#define MAX_HASH_VALUE 141
|
||||
/* maximum key range = 134, duplicates = 0 */
|
||||
|
||||
#ifdef __GNUC__
|
||||
__inline
|
||||
#endif
|
||||
static unsigned int
|
||||
|
||||
static inline unsigned int
|
||||
hash (str, len)
|
||||
register char *str;
|
||||
register unsigned int len;
|
||||
|
|
@ -172,10 +170,8 @@ static struct resword wordlist[] =
|
|||
{"char", TYPESPEC, RID_CHAR}
|
||||
};
|
||||
|
||||
#ifdef __GNUC__
|
||||
__inline
|
||||
#endif
|
||||
struct resword *
|
||||
|
||||
static inline struct resword *
|
||||
is_reserved_word (str, len)
|
||||
register char *str;
|
||||
register unsigned int len;
|
||||
|
|
|
|||
5101
gcc/c-parse.c
Normal file
5101
gcc/c-parse.c
Normal file
File diff suppressed because it is too large
Load Diff
114
gcc/c-parse.h
Normal file
114
gcc/c-parse.h
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
/* A Bison parser, made by GNU Bison 2.3. */
|
||||
|
||||
/* Skeleton interface for Bison's Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
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 2, 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, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* 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. */
|
||||
|
||||
/* Tokens. */
|
||||
#define IDENTIFIER 258
|
||||
#define TYPENAME 259
|
||||
#define SCSPEC 260
|
||||
#define TYPESPEC 261
|
||||
#define TYPE_QUAL 262
|
||||
#define CONSTANT 263
|
||||
#define STRING 264
|
||||
#define ELLIPSIS 265
|
||||
#define SIZEOF 266
|
||||
#define ENUM 267
|
||||
#define STRUCT 268
|
||||
#define UNION 269
|
||||
#define IF 270
|
||||
#define ELSE 271
|
||||
#define WHILE 272
|
||||
#define DO 273
|
||||
#define FOR 274
|
||||
#define SWITCH 275
|
||||
#define CASE 276
|
||||
#define DEFAULT 277
|
||||
#define BREAK 278
|
||||
#define CONTINUE 279
|
||||
#define RETURN 280
|
||||
#define GOTO 281
|
||||
#define ASM_KEYWORD 282
|
||||
#define TYPEOF 283
|
||||
#define ALIGNOF 284
|
||||
#define ATTRIBUTE 285
|
||||
#define EXTENSION 286
|
||||
#define LABEL 287
|
||||
#define REALPART 288
|
||||
#define IMAGPART 289
|
||||
#define ASSIGN 290
|
||||
#define OROR 291
|
||||
#define ANDAND 292
|
||||
#define EQCOMPARE 293
|
||||
#define ARITHCOMPARE 294
|
||||
#define RSHIFT 295
|
||||
#define LSHIFT 296
|
||||
#define MINUSMINUS 297
|
||||
#define PLUSPLUS 298
|
||||
#define UNARY 299
|
||||
#define HYPERUNARY 300
|
||||
#define POINTSAT 301
|
||||
#define INTERFACE 302
|
||||
#define IMPLEMENTATION 303
|
||||
#define END 304
|
||||
#define SELECTOR 305
|
||||
#define DEFS 306
|
||||
#define ENCODE 307
|
||||
#define CLASSNAME 308
|
||||
#define PUBLIC 309
|
||||
#define PRIVATE 310
|
||||
#define PROTECTED 311
|
||||
#define PROTOCOL 312
|
||||
#define OBJECTNAME 313
|
||||
#define CLASS 314
|
||||
#define ALIAS 315
|
||||
#define OBJC_STRING 316
|
||||
|
||||
|
||||
|
||||
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE
|
||||
#line 87 "c-parse.y"
|
||||
{long itype; tree ttype; enum tree_code code;
|
||||
char *filename; int lineno; int ends_in_label; }
|
||||
/* Line 1489 of yacc.c. */
|
||||
#line 174 "c-parse.h"
|
||||
YYSTYPE;
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
#endif
|
||||
|
||||
extern YYSTYPE yylval;
|
||||
|
||||
|
|
@ -1486,38 +1486,38 @@ enum_head:
|
|||
|
||||
structsp:
|
||||
struct_head identifier '{'
|
||||
{ $$ = start_struct (RECORD_TYPE, $2);
|
||||
{ $<ttype>$ = start_struct (RECORD_TYPE, $2);
|
||||
/* Start scope of tag before parsing components. */
|
||||
}
|
||||
component_decl_list '}' maybe_attribute
|
||||
{ $$ = finish_struct ($<ttype>4, $5, chainon ($1, $7)); }
|
||||
{ $<ttype>$ = finish_struct ($<ttype>4, $5, chainon ($1, $7)); }
|
||||
| struct_head '{' component_decl_list '}' maybe_attribute
|
||||
{ $$ = finish_struct (start_struct (RECORD_TYPE, NULL_TREE),
|
||||
{ $<ttype>$ = finish_struct (start_struct (RECORD_TYPE, NULL_TREE),
|
||||
$3, chainon ($1, $5));
|
||||
}
|
||||
| struct_head identifier
|
||||
{ $$ = xref_tag (RECORD_TYPE, $2); }
|
||||
| union_head identifier '{'
|
||||
{ $$ = start_struct (UNION_TYPE, $2); }
|
||||
{ $<ttype>$ = start_struct (UNION_TYPE, $2); }
|
||||
component_decl_list '}' maybe_attribute
|
||||
{ $$ = finish_struct ($<ttype>4, $5, chainon ($1, $7)); }
|
||||
{ $<ttype>$ = finish_struct ($<ttype>4, $5, chainon ($1, $7)); }
|
||||
| union_head '{' component_decl_list '}' maybe_attribute
|
||||
{ $$ = finish_struct (start_struct (UNION_TYPE, NULL_TREE),
|
||||
{ $<ttype>$ = finish_struct (start_struct (UNION_TYPE, NULL_TREE),
|
||||
$3, chainon ($1, $5));
|
||||
}
|
||||
| union_head identifier
|
||||
{ $$ = xref_tag (UNION_TYPE, $2); }
|
||||
| enum_head identifier '{'
|
||||
{ $<itype>3 = suspend_momentary ();
|
||||
$$ = start_enum ($2); }
|
||||
$<ttype>$ = start_enum ($2); }
|
||||
enumlist maybecomma_warn '}' maybe_attribute
|
||||
{ $$= finish_enum ($<ttype>4, nreverse ($5), chainon ($1, $8));
|
||||
{ $<ttype>$= finish_enum ($<ttype>4, nreverse ($5), chainon ($1, $8));
|
||||
resume_momentary ($<itype>3); }
|
||||
| enum_head '{'
|
||||
{ $<itype>2 = suspend_momentary ();
|
||||
$$ = start_enum (NULL_TREE); }
|
||||
$<ttype>$ = start_enum (NULL_TREE); }
|
||||
enumlist maybecomma_warn '}' maybe_attribute
|
||||
{ $$= finish_enum ($<ttype>3, nreverse ($4), chainon ($1, $7));
|
||||
{ $<ttype>$= finish_enum ($<ttype>3, nreverse ($4), chainon ($1, $7));
|
||||
resume_momentary ($<itype>2); }
|
||||
| enum_head identifier
|
||||
{ $$ = xref_tag (ENUMERAL_TYPE, $2); }
|
||||
|
|
|
|||
|
|
@ -10,10 +10,7 @@ struct resword { char *name; short token; enum rid rid;};
|
|||
#define MAX_HASH_VALUE 250
|
||||
/* maximum key range = 247, duplicates = 0 */
|
||||
|
||||
#ifdef __GNUC__
|
||||
__inline
|
||||
#endif
|
||||
static unsigned int
|
||||
static inline unsigned int
|
||||
hash (str, len)
|
||||
register char *str;
|
||||
register unsigned int len;
|
||||
|
|
@ -67,10 +64,7 @@ hash (str, len)
|
|||
return hval + asso_values[(unsigned char)str[len - 1]];
|
||||
}
|
||||
|
||||
#ifdef __GNUC__
|
||||
__inline
|
||||
#endif
|
||||
struct resword *
|
||||
static inline struct resword *
|
||||
is_reserved_word (str, len)
|
||||
register char *str;
|
||||
register unsigned int len;
|
||||
|
|
|
|||
|
|
@ -3255,10 +3255,8 @@ identifier_typedecl_value (node)
|
|||
}
|
||||
|
||||
/* CYGNUS LOCAL Embedded C++ */
|
||||
#ifdef __GNUC__
|
||||
__inline
|
||||
#endif
|
||||
void
|
||||
|
||||
static inline void
|
||||
embedded_pedwarn (s)
|
||||
char *s;
|
||||
{
|
||||
|
|
|
|||
9814
gcc/cp/parse.c
Normal file
9814
gcc/cp/parse.c
Normal file
File diff suppressed because it is too large
Load Diff
140
gcc/cp/parse.h
Normal file
140
gcc/cp/parse.h
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
/* A Bison parser, made by GNU Bison 2.3. */
|
||||
|
||||
/* Skeleton interface for Bison's Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
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 2, 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, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* 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. */
|
||||
|
||||
/* Tokens. */
|
||||
#define IDENTIFIER 258
|
||||
#define TYPENAME 259
|
||||
#define SELFNAME 260
|
||||
#define PFUNCNAME 261
|
||||
#define SCSPEC 262
|
||||
#define TYPESPEC 263
|
||||
#define CV_QUALIFIER 264
|
||||
#define CONSTANT 265
|
||||
#define STRING 266
|
||||
#define ELLIPSIS 267
|
||||
#define SIZEOF 268
|
||||
#define ENUM 269
|
||||
#define IF 270
|
||||
#define ELSE 271
|
||||
#define WHILE 272
|
||||
#define DO 273
|
||||
#define FOR 274
|
||||
#define SWITCH 275
|
||||
#define CASE 276
|
||||
#define DEFAULT 277
|
||||
#define BREAK 278
|
||||
#define CONTINUE 279
|
||||
#define RETURN 280
|
||||
#define GOTO 281
|
||||
#define ASM_KEYWORD 282
|
||||
#define TYPEOF 283
|
||||
#define ALIGNOF 284
|
||||
#define SIGOF 285
|
||||
#define ATTRIBUTE 286
|
||||
#define EXTENSION 287
|
||||
#define LABEL 288
|
||||
#define REALPART 289
|
||||
#define IMAGPART 290
|
||||
#define AGGR 291
|
||||
#define VISSPEC 292
|
||||
#define DELETE 293
|
||||
#define NEW 294
|
||||
#define THIS 295
|
||||
#define OPERATOR 296
|
||||
#define CXX_TRUE 297
|
||||
#define CXX_FALSE 298
|
||||
#define NAMESPACE 299
|
||||
#define TYPENAME_KEYWORD 300
|
||||
#define USING 301
|
||||
#define LEFT_RIGHT 302
|
||||
#define TEMPLATE 303
|
||||
#define TYPEID 304
|
||||
#define DYNAMIC_CAST 305
|
||||
#define STATIC_CAST 306
|
||||
#define REINTERPRET_CAST 307
|
||||
#define CONST_CAST 308
|
||||
#define SCOPE 309
|
||||
#define EMPTY 310
|
||||
#define NSNAME 311
|
||||
#define PTYPENAME 312
|
||||
#define THROW 313
|
||||
#define ASSIGN 314
|
||||
#define OROR 315
|
||||
#define ANDAND 316
|
||||
#define MIN_MAX 317
|
||||
#define EQCOMPARE 318
|
||||
#define ARITHCOMPARE 319
|
||||
#define RSHIFT 320
|
||||
#define LSHIFT 321
|
||||
#define DOT_STAR 322
|
||||
#define POINTSAT_STAR 323
|
||||
#define MINUSMINUS 324
|
||||
#define PLUSPLUS 325
|
||||
#define UNARY 326
|
||||
#define HYPERUNARY 327
|
||||
#define PAREN_STAR_PAREN 328
|
||||
#define POINTSAT 329
|
||||
#define CATCH 330
|
||||
#define TRY 331
|
||||
#define PRE_PARSED_FUNCTION_DECL 332
|
||||
#define EXTERN_LANG_STRING 333
|
||||
#define ALL 334
|
||||
#define PRE_PARSED_CLASS_DECL 335
|
||||
#define DEFARG 336
|
||||
#define DEFARG_MARKER 337
|
||||
#define TYPENAME_DEFN 338
|
||||
#define IDENTIFIER_DEFN 339
|
||||
#define PTYPENAME_DEFN 340
|
||||
#define END_OF_LINE 341
|
||||
#define END_OF_SAVED_INPUT 342
|
||||
|
||||
|
||||
|
||||
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE
|
||||
#line 92 "../../../gbagnu/gcc/cp/parse.y"
|
||||
{long itype; tree ttype; char *strtype; enum tree_code code; flagged_type_tree ftype; }
|
||||
/* Line 1489 of yacc.c. */
|
||||
#line 225 "parse.h"
|
||||
YYSTYPE;
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
#endif
|
||||
|
||||
extern YYSTYPE yylval;
|
||||
|
||||
#define YYEMPTY (-2)
|
||||
|
|
@ -417,7 +417,8 @@ __extension__ \
|
|||
({ struct obstack *__o = (OBSTACK); \
|
||||
if (__o->next_free + sizeof (void *) > __o->chunk_limit) \
|
||||
_obstack_newchunk (__o, sizeof (void *)); \
|
||||
*((void **)__o->next_free)++ = ((void *)datum); \
|
||||
*((void **)__o->next_free) = ((void *)datum); \
|
||||
__o->next_free += sizeof (void *); \
|
||||
(void) 0; })
|
||||
|
||||
# define obstack_int_grow(OBSTACK,datum) \
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user