osprey/kg++fe/gnu/cp/lex.c File Reference

#include "config.h"
#include "system.h"
#include "input.h"
#include "tree.h"
#include "cp-tree.h"
#include "cpplib.h"
#include "lex.h"
#include "parse.h"
#include "flags.h"
#include "c-pragma.h"
#include "toplev.h"
#include "output.h"
#include "ggc.h"
#include "tm_p.h"
#include "timevar.h"
#include "diagnostic.h"
#include "operators.def"

Include dependency graph for lex.c:

Go to the source code of this file.

Data Types

type  impl_files
type  resword

Defines

#define CONSTRAINT(name, expr)   extern int constraint_/**/name [(expr) ? 1 : -1]
#define DEF_OPERATOR(NAME, C, M, AR, AP)   CONSTRAINT (C, sizeof "operator " + sizeof NAME <= 256);
#define DEF_OPERATOR(NAME, CODE, MANGLING, ARITY, ASSN_P)
#define D_EXT   0x01
#define D_ASM   0x02

Functions/Subroutines

void yyprint PARAMS ((FILE *, int, YYSTYPE))
static int interface_strcmp PARAMS ((const char *))
static int *init_cpp_parse PARAMS ((void))
static tree parse_strconst_pragma PARAMS ((const char *, int))
static void handle_pragma_vtable PARAMS ((cpp_reader *))
static int is_global PARAMS ((tree))
tree make_pointer_declarator (tree cv_qualifiers, tree target)
tree make_reference_declarator (tree cv_qualifiers, tree target)
tree make_call_declarator (tree target, tree parms, tree cv_qualifiers, tree exception_specification)
void set_quals_and_spec (tree call_declarator, tree cv_qualifiers, tree exception_specification)
void cxx_init_options ()
void cxx_finish ()
static int * init_cpp_parse ()
static void init_operators ()
 CONSTRAINT (ridbits_fit, RID_LAST_MODIFIER< sizeof(unsigned long)*CHAR_BIT)
void init_reswords ()
static void init_cp_pragma ()
const char * cxx_init (char *filename) const
void yyprint (FILE *file, int yychar, YYSTYPE yylval)
void print_parse_statistics ()
void extract_interface_info ()
static int interface_strcmp (char *s) const
void check_for_missing_semicolon (tree type)
void note_got_semicolon (tree type)
void note_list_got_semicolon (tree declspecs)
static tree parse_strconst_pragma (char *name, int opt) const
static void handle_pragma_vtable (dfile)
static void handle_pragma_unit (dfile)
static void handle_pragma_interface (dfile)
static void handle_pragma_implementation (dfile)
static void handle_pragma_java_exceptions (dfile)
void do_pending_lang_change ()
static int is_global (tree d)
void unqualified_name_lookup_error (tree name)
tree do_identifier (tree token, int parsing, tree args)
tree do_scoped_id (tree token, tree id)
tree identifier_typedecl_value (tree node)
tree build_lang_decl (enum tree_code code, tree name, tree type)
void retrofit_lang_decl (tree t)
void cxx_dup_lang_specific_decl (tree node)
tree copy_decl (tree decl)
static void copy_lang_type (tree node)
tree copy_type (tree type)
tree cxx_make_type (enum tree_code code)
tree make_aggr_type (enum tree_code code)
int cp_type_qual_from_rid (tree rid)

Variables

int yychar
YYSTYPE yylval
tree lastiddecl
int * token_count
static struct impl_filesimpl_file_chain
int interface_only
int interface_unknown
operator_name_info_t operator_name_info [(int) LAST_CPLUS_TREE_CODE]
operator_name_info_t assignment_operator_name_info [(int) LAST_CPLUS_TREE_CODE]
static struct resword reswords []
const short rid_to_yy [RID_MAX]


Define Documentation

#define CONSTRAINT ( name,
expr   )     extern int constraint_/**/name [(expr) ? 1 : -1]

Definition at line 79 of file lex.c.

#define D_ASM   0x02

Definition at line 338 of file lex.c.

Referenced by init_reswords().

#define D_EXT   0x01

Definition at line 337 of file lex.c.

Referenced by c_parse_init(), and init_reswords().

#define DEF_OPERATOR ( NAME,
CODE,
MANGLING,
ARITY,
ASSN_P   ) 

Value:

sprintf (buffer, ISALPHA (NAME[0]) ? "operator %s" : "operator%s", NAME); \
  identifier = get_identifier (buffer);             \
  IDENTIFIER_OPNAME_P (identifier) = 1;             \
                      \
  oni = (ASSN_P                   \
   ? &assignment_operator_name_info[(int) CODE]         \
   : &operator_name_info[(int) CODE]);            \
  oni->identifier = identifier;               \
  oni->name = NAME;                 \
  oni->mangled_name = MANGLING;                                             \
  oni->arity = ARITY;

Definition at line 256 of file lex.c.

#define DEF_OPERATOR ( NAME,
C,
M,
AR,
AP   )     CONSTRAINT (C, sizeof "operator " + sizeof NAME <= 256);

Definition at line 256 of file lex.c.


Function Documentation

tree build_lang_decl ( enum tree_code  code,
tree  name,
tree  type 
)

void check_for_missing_semicolon ( tree  type  ) 

Definition at line 913 of file lex.c.

References build_tree_list, clear_anon_tags(), error(), shadow_tag(), TREE_CODE, TYPE_ANONYMOUS_P, and yylex.

Referenced by finish_class_definition().

CONSTRAINT ( ridbits_fit   ) 

tree copy_decl ( tree  decl  ) 

Definition at line 1458 of file lex.c.

Referenced by build_clone(), finish_struct_1(), and tsubst_decl().

static void copy_lang_type ( tree  node  )  [static]

Definition at line 1471 of file lex.c.

References ggc_alloc, int, lt, memcpy, size, tree_node_counts, tree_node_sizes, and TYPE_LANG_SPECIFIC.

Referenced by copy_type().

tree copy_type ( tree  type  ) 

Definition at line 1497 of file lex.c.

int cp_type_qual_from_rid ( tree  rid  ) 

void cxx_dup_lang_specific_decl ( tree  node  ) 

Definition at line 1432 of file lex.c.

Referenced by build_clone(), copy_decl(), GTY(), and make_thunk().

void cxx_finish ( void   ) 

Definition at line 230 of file lex.c.

const char* cxx_init ( char *  filename  )  const

void cxx_init_options (  ) 

tree cxx_make_type ( enum tree_code  code  ) 

Definition at line 1508 of file lex.c.

Referenced by make_aggr_type().

tree do_identifier ( tree  token,
int  parsing,
tree  args 
)

void do_pending_lang_change (  ) 

Definition at line 1111 of file lex.c.

References lang_name_c, pending_lang_change, pop_lang_context(), and push_lang_context().

tree do_scoped_id ( tree  token,
tree  id 
)

void extract_interface_info (  ) 

static void handle_pragma_implementation ( dfile   )  [static]

static void handle_pragma_interface ( dfile   )  [static]

static void handle_pragma_java_exceptions ( dfile   )  [static]

Definition at line 1100 of file lex.c.

References c_lex(), choose_personality_routine(), lang_java, warning, and x.

Referenced by init_cp_pragma().

static void handle_pragma_unit ( dfile   )  [static]

Definition at line 999 of file lex.c.

References parse_strconst_pragma().

Referenced by init_cp_pragma().

static void handle_pragma_vtable ( dfile   )  [static]

Definition at line 991 of file lex.c.

References parse_strconst_pragma(), and sorry().

Referenced by init_cp_pragma().

tree identifier_typedecl_value ( tree  node  ) 

static void init_cp_pragma ( void   )  [static]

static int* init_cpp_parse (  )  [static]

Definition at line 236 of file lex.c.

References xcalloc().

Referenced by cxx_init().

static void init_operators ( void   )  [static]

Definition at line 262 of file lex.c.

References assignment_operator_name_info, get_identifier(), and int.

Referenced by cxx_init().

void init_reswords ( void   ) 

Definition at line 595 of file lex.c.

Referenced by cxx_init().

static int interface_strcmp ( char *  s  )  const [static]

Definition at line 871 of file lex.c.

References impl_files::filename, impl_files::next, s1, strchr, and t1.

Referenced by handle_pragma_interface().

static int is_global ( tree  d  )  [static]

tree make_aggr_type ( enum tree_code  code  ) 

tree make_call_declarator ( tree  target,
tree  parms,
tree  cv_qualifiers,
tree  exception_specification 
)

tree make_pointer_declarator ( tree  cv_qualifiers,
tree  target 
)

Definition at line 139 of file lex.c.

References ANON_AGGRNAME_P, build_nt(), error(), TREE_CODE, and TREE_TYPE.

tree make_reference_declarator ( tree  cv_qualifiers,
tree  target 
)

void note_got_semicolon ( tree  type  ) 

Definition at line 939 of file lex.c.

References abort, CLASS_TYPE_P, CLASSTYPE_GOT_SEMICOLON, and TYPE_P.

Referenced by finish_class_definition(), and note_list_got_semicolon().

void note_list_got_semicolon ( tree  declspecs  ) 

Definition at line 949 of file lex.c.

References clear_anon_tags(), note_got_semicolon(), TREE_CHAIN, TREE_VALUE, and TYPE_P.

Referenced by finish_member_class_template().

static int is_global PARAMS ( (tree  )  [static]

static void handle_pragma_vtable PARAMS ( (cpp_reader *)   )  [static]

static tree parse_strconst_pragma PARAMS ( (const char *, int)   )  [static]

static int* init_cpp_parse PARAMS ( (void  )  [static, read]

Definition at line 77 of file cplus-dem.c.

static int interface_strcmp PARAMS ( (const char *)   )  [static]

Definition at line 635 of file mips-tfile.c.

void yyprint PARAMS ( (FILE *, int, YYSTYPE  ) 

static tree parse_strconst_pragma ( char *  name,
int  opt 
) const [static]

void print_parse_statistics (  ) 

Definition at line 796 of file lex.c.

References alloca, fprintf(), i, idx, qsort(), sorted, yyrline, yytname, and YYTRANSLATE.

void retrofit_lang_decl ( tree  t  ) 

void set_quals_and_spec ( tree  call_declarator,
tree  cv_qualifiers,
tree  exception_specification 
)

Definition at line 196 of file lex.c.

References CALL_DECLARATOR_EXCEPTION_SPEC, and CALL_DECLARATOR_QUALS.

void unqualified_name_lookup_error ( tree  name  ) 

void yyprint ( FILE file,
int  yychar,
YYSTYPE  yylval 
) [inline]


Variable Documentation

Definition at line 252 of file lex.c.

Definition at line 123 of file lex.c.

Definition at line 203 of file lex.c.

Definition at line 205 of file lex.c.

Definition at line 93 of file lex.c.

Referenced by frob_id(), and see_typename().

operator_name_info_t operator_name_info[(int) LAST_CPLUS_TREE_CODE]

Definition at line 250 of file lex.c.

struct resword reswords[] [static]

Definition at line 348 of file lex.c.

Referenced by c_parse_init(), and init_reswords().

const short rid_to_yy[RID_MAX]

Definition at line 463 of file lex.c.

int * token_count

Definition at line 763 of file lex.c.

int yychar


Generated on Wed Apr 8 14:44:37 2009 for Open64 by  doxygen 1.5.6