osprey/kg++fe/gnu/cpphash.h File Reference

#include "hashtable.h"

Include dependency graph for cpphash.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Types

type  dummy
type  cpp_macro
type  _cpp_buff
type  search_path
union  utoken
type  tokenrun
type  cpp_context
type  lexer_state
type  spec_nodes
type  printer
type  cpp_buffer
type  cpp_reader

Defines

#define U   (const uchar *)
#define BITS_PER_CPPCHAR_T   (CHAR_BIT * sizeof (cppchar_t))
#define VALID_SIGN(c, prevc)
#define CPP_OPTION(PFILE, OPTION)   ((PFILE)->opts.OPTION)
#define CPP_BUFFER(PFILE)   ((PFILE)->buffer)
#define CPP_BUF_COLUMN(BUF, CUR)   ((CUR) - (BUF)->line_base + (BUF)->col_adjust)
#define CPP_BUF_COL(BUF)   CPP_BUF_COLUMN(BUF, (BUF)->cur)
#define CPP_STACK_MAX   200
#define DEFAULT_ALIGNMENT   offsetof (struct dummy, u)
#define CPP_ALIGN2(size, align)   (((size) + ((align) - 1)) & ~((align) - 1))
#define CPP_ALIGN(size)   CPP_ALIGN2 (size, DEFAULT_ALIGNMENT)
#define _cpp_mark_macro_used(NODE)
#define BUFF_ROOM(BUFF)   (size_t) ((BUFF)->limit - (BUFF)->cur)
#define BUFF_FRONT(BUFF)   ((BUFF)->cur)
#define BUFF_LIMIT(BUFF)   ((BUFF)->limit)
#define FIRST(c)   ((c)->u.iso.first)
#define LAST(c)   ((c)->u.iso.last)
#define CUR(c)   ((c)->u.trad.cur)
#define RLIMIT(c)   ((c)->u.trad.rlimit)
#define _dollar_ok(x)   ((x) == '$' && CPP_OPTION (pfile, dollars_in_ident))
#define is_idchar(x)   (ISIDNUM(x) || _dollar_ok(x))
#define is_numchar(x)   ISIDNUM(x)
#define is_idstart(x)   (ISIDST(x) || _dollar_ok(x))
#define is_numstart(x)   ISDIGIT(x)
#define is_hspace(x)   ISBLANK(x)
#define is_vspace(x)   IS_VSPACE(x)
#define is_nvspace(x)   IS_NVSPACE(x)
#define is_space(x)   IS_SPACE_OR_NUL(x)
#define CPP_IN_SYSTEM_HEADER(PFILE)   ((PFILE)->map && (PFILE)->map->sysp)
#define CPP_PEDANTIC(PF)   CPP_OPTION (PF, pedantic)
#define CPP_WTRADITIONAL(PF)   CPP_OPTION (PF, warn_traditional)
#define DSC(str)   (const uchar *)str, sizeof str - 1
#define xnew(T)   (T *) xmalloc (sizeof(T))
#define xcnew(T)   (T *) xcalloc (1, sizeof(T))
#define xnewvec(T, N)   (T *) xmalloc (sizeof(T) * (N))
#define xcnewvec(T, N)   (T *) xcalloc (N, sizeof(T))
#define xobnew(O, T)   (T *) obstack_alloc (O, sizeof(T))

Typedefs

typedef unsigned char uchar
typedef struct _cpp_buff _cpp_buff
typedef struct tokenrun tokenrun
typedef struct cpp_context cpp_context

Enumerations

enum  include_type {
  IT_INCLUDE, IT_INCLUDE_NEXT, IT_IMPORT, IT_CMDLINE,
  IT_INCLUDE, IT_INCLUDE_NEXT, IT_IMPORT, IT_CMDLINE,
  IT_INCLUDE, IT_INCLUDE_NEXT, IT_IMPORT, IT_CMDLINE,
  IT_INCLUDE, IT_INCLUDE_NEXT, IT_IMPORT, IT_CMDLINE
}

Functions/Subroutines

_cpp_buff *_cpp_get_buff PARAMS ((cpp_reader *, size_t))
void _cpp_release_buff PARAMS ((cpp_reader *, _cpp_buff *))
void _cpp_extend_buff PARAMS ((cpp_reader *, _cpp_buff **, size_t))
_cpp_buff *_cpp_append_extend_buff PARAMS ((cpp_reader *, _cpp_buff *, size_t))
void _cpp_free_buff PARAMS ((_cpp_buff *))
int _cpp_begin_message PARAMS ((cpp_reader *, int, unsigned int, unsigned int))
void _cpp_free_definition PARAMS ((cpp_hashnode *))
bool _cpp_create_definition PARAMS ((cpp_reader *, cpp_hashnode *))
void _cpp_pop_context PARAMS ((cpp_reader *))
void _cpp_push_text_context PARAMS ((cpp_reader *, cpp_hashnode *, const uchar *, size_t))
bool _cpp_save_parameter PARAMS ((cpp_reader *, cpp_macro *, cpp_hashnode *))
bool _cpp_arguments_ok PARAMS ((cpp_reader *, cpp_macro *, const cpp_hashnode *, unsigned int))
int _cpp_warn_if_unused_macro PARAMS ((cpp_reader *, cpp_hashnode *, void *))
void _cpp_init_hashtable PARAMS ((cpp_reader *, hash_table *))
void _cpp_fake_include PARAMS ((cpp_reader *, const char *))
void _cpp_never_reread PARAMS ((struct include_file *))
char *_cpp_simplify_pathname PARAMS ((char *))
bool _cpp_execute_include PARAMS ((cpp_reader *, const cpp_token *, enum include_type))
int _cpp_compare_file_date PARAMS ((cpp_reader *, const cpp_token *))
void _cpp_pop_file_buffer PARAMS ((cpp_reader *, struct include_file *))
int _cpp_equiv_tokens PARAMS ((const cpp_token *, const cpp_token *))
void _cpp_init_tokenrun PARAMS ((tokenrun *, unsigned int))
int _cpp_test_assertion PARAMS ((cpp_reader *, unsigned int *))
int _cpp_handle_directive PARAMS ((cpp_reader *, int))
void _cpp_do_file_change PARAMS ((cpp_reader *, enum lc_reason, const char *, unsigned int, unsigned int))
void _cpp_overlay_buffer PARAMS ((cpp_reader *pfile, const uchar *, size_t))
bool _cpp_create_trad_definition PARAMS ((cpp_reader *, cpp_macro *))
bool _cpp_expansions_different_trad PARAMS ((const cpp_macro *, const cpp_macro *))
uchar *_cpp_copy_replacement_text PARAMS ((const cpp_macro *, uchar *))
size_t _cpp_replacement_text_len PARAMS ((const cpp_macro *))
static int ustrcmp PARAMS ((const uchar *, const uchar *))
static int ustrncmp PARAMS ((const uchar *, const uchar *, size_t))
static size_t ustrlen PARAMS ((const uchar *))
static uchar *ustrchr PARAMS ((const uchar *, int))
static int ufputs PARAMS ((const uchar *, FILE *))
static int ustrcmp (s1, s2) const uchar *s1

Variables

unsigned char _cpp_trigraph_map [UCHAR_MAX+1]
static int * s2
size_t n
int c
FILEf


Define Documentation

#define _cpp_mark_macro_used ( NODE   ) 

Value:

do {          \
  if ((NODE)->type == NT_MACRO && !((NODE)->flags & NODE_BUILTIN))  \
    (NODE)->value.macro->used = 1; } while (0)

Definition at line 106 of file cpphash.h.

Referenced by do_ifdef(), do_ifndef(), and parse_defined().

#define _dollar_ok (  )     ((x) == '$' && CPP_OPTION (pfile, dollars_in_ident))

Definition at line 466 of file cpphash.h.

#define BITS_PER_CPPCHAR_T   (CHAR_BIT * sizeof (cppchar_t))

#define BUFF_FRONT ( BUFF   )     ((BUFF)->cur)

#define BUFF_LIMIT ( BUFF   )     ((BUFF)->limit)

Definition at line 129 of file cpphash.h.

Referenced by parse_string(), and stringify_arg().

#define BUFF_ROOM ( BUFF   )     (size_t) ((BUFF)->limit - (BUFF)->cur)

#define CPP_ALIGN ( size   )     CPP_ALIGN2 (size, DEFAULT_ALIGNMENT)

Definition at line 66 of file cpphash.h.

Referenced by new_buff().

#define CPP_ALIGN2 ( size,
align   )     (((size) + ((align) - 1)) & ~((align) - 1))

Definition at line 65 of file cpphash.h.

#define CPP_BUF_COL ( BUF   )     CPP_BUF_COLUMN(BUF, (BUF)->cur)

#define CPP_BUF_COLUMN ( BUF,
CUR   )     ((CUR) - (BUF)->line_base + (BUF)->col_adjust)

Definition at line 46 of file cpphash.h.

Referenced by _cpp_get_fresh_line(), _cpp_lex_direct(), and _cpp_process_line_notes().

#define CPP_BUFFER ( PFILE   )     ((PFILE)->buffer)

Definition at line 45 of file cpphash.h.

Referenced by do_pragma().

#define CPP_IN_SYSTEM_HEADER ( PFILE   )     ((PFILE)->map && (PFILE)->map->sysp)

Definition at line 488 of file cpphash.h.

Referenced by _cpp_begin_message(), _cpp_builtin_macro_text(), and _cpp_lex_direct().

#define CPP_OPTION ( PFILE,
OPTION   )     ((PFILE)->opts.OPTION)

Definition at line 44 of file cpphash.h.

Referenced by _cpp_begin_message(), _cpp_builtin_macro_text(), _cpp_clean_line(), _cpp_convert_input(), _cpp_create_definition(), _cpp_create_trad_definition(), _cpp_handle_directive(), _cpp_lex_direct(), _cpp_process_line_notes(), _cpp_scan_out_logical_line(), _cpp_skip_block_comment(), _cpp_stack_file(), _cpp_valid_ucn(), adjust_column(), cb_define(), cb_file_change(), cb_line_change(), check_promotion(), collect_args(), continue_after_nul(), convert_hex(), convert_oct(), copy_comment(), cpp_avoid_paste(), cpp_classify_number(), cpp_error(), cpp_handle_deferred_pragma(), cpp_included(), cpp_init_iconv(), cpp_interpret_charconst(), cpp_interpret_integer(), cpp_macro_definition(), cpp_parse_escape(), cpp_push_buffer(), cpp_read_state(), cpp_scan_nooutput(), cpp_valid_state(), create_iso_definition(), do_define(), do_else(), do_endif(), do_include_common(), do_line(), do_pragma(), do_pragma_once(), do_undef(), emit_numeric_escape(), end_directive(), eval_token(), find_file_in_dir(), find_include_file(), forms_identifier_p(), handle_missing_header(), maybe_read_ucs(), narrow_str_to_charconst(), num_binary_op(), num_div_op(), num_inequality_op(), num_mul(), num_unary_op(), open_file_failed(), parse_include(), parse_params(), parse_string(), paste_all_tokens(), paste_tokens(), print_line(), print_location(), read_file_guts(), read_name_map(), reduce(), run_directive(), s(), scan_out_logical_line(), scan_translation_unit_trad(), search_from(), skip_block_comment(), stack_include_file(), trigraph_p(), ucn_valid_in_identifier(), validate_pch(), VPARAMS(), warn_about_normalization(), warn_in_comment(), warn_of_redefinition(), and wide_str_to_charconst().

#define CPP_PEDANTIC ( PF   )     CPP_OPTION (PF, pedantic)

#define CPP_STACK_MAX   200

Definition at line 51 of file cpphash.h.

Referenced by do_include_common().

#define CPP_WTRADITIONAL ( PF   )     CPP_OPTION (PF, warn_traditional)

#define CUR ( c   )     ((c)->u.trad.cur)

#define DEFAULT_ALIGNMENT   offsetof (struct dummy, u)

Definition at line 64 of file cpphash.h.

#define DSC ( str   )     (const uchar *)str, sizeof str - 1

Definition at line 570 of file cpphash.h.

Referenced by _cpp_create_definition(), _cpp_init_hashtable(), cpp_read_state(), and eval_token().

#define FIRST ( c   )     ((c)->u.iso.first)

Definition at line 169 of file cpphash.h.

#define is_hspace (  )     ISBLANK(x)

Definition at line 472 of file cpphash.h.

Referenced by read_name_map().

#define is_idchar (  )     (ISIDNUM(x) || _dollar_ok(x))

#define is_idstart (  )     (ISIDST(x) || _dollar_ok(x))

#define is_numchar (  )     ISIDNUM(x)

Definition at line 469 of file cpphash.h.

Referenced by lex_identifier().

#define is_numstart (  )     ISDIGIT(x)

Definition at line 471 of file cpphash.h.

Referenced by _cpp_scan_out_logical_line(), and scan_out_logical_line().

#define is_nvspace (  )     IS_NVSPACE(x)

#define is_space (  )     IS_SPACE_OR_NUL(x)

#define is_vspace (  )     IS_VSPACE(x)

#define LAST ( c   )     ((c)->u.iso.last)

Definition at line 170 of file cpphash.h.

#define RLIMIT ( c   )     ((c)->u.trad.rlimit)

#define U   (const uchar *)

Definition at line 33 of file cpphash.h.

#define VALID_SIGN ( c,
prevc   ) 

Value:

(((c) == '+' || (c) == '-') && \
   ((prevc) == 'e' || (prevc) == 'E' \
    || (((prevc) == 'p' || (prevc) == 'P') \
        && CPP_OPTION (pfile, extended_numbers))))

Definition at line 38 of file cpphash.h.

Referenced by lex_number(), parse_number(), and parse_slow().

#define xcnew ( T   )     (T *) xcalloc (1, sizeof(T))

Definition at line 572 of file cpphash.h.

Referenced by find_or_create_entry().

#define xcnewvec ( T,
 )     (T *) xcalloc (N, sizeof(T))

Definition at line 574 of file cpphash.h.

#define xnew ( T   )     (T *) xmalloc (sizeof(T))

Definition at line 571 of file cpphash.h.

Referenced by destringize_and_run(), next_context(), and next_tokenrun().

#define xnewvec ( T,
 )     (T *) xmalloc (sizeof(T) * (N))

Definition at line 573 of file cpphash.h.

Referenced by _cpp_init_tokenrun().

#define xobnew ( O,
T   )     (T *) obstack_alloc (O, sizeof(T))

Definition at line 575 of file cpphash.h.

Referenced by cpp_push_buffer(), and push_conditional().


Typedef Documentation

Definition at line 111 of file cpphash.h.

Definition at line 174 of file cpphash.h.

Definition at line 161 of file cpphash.h.

typedef unsigned char uchar

Definition at line 30 of file cpphash.h.


Enumeration Type Documentation

Enumerator:
IT_INCLUDE 
IT_INCLUDE_NEXT 
IT_IMPORT 
IT_CMDLINE 
IT_INCLUDE 
IT_INCLUDE_NEXT 
IT_IMPORT 
IT_CMDLINE 
IT_INCLUDE 
IT_INCLUDE_NEXT 
IT_IMPORT 
IT_CMDLINE 
IT_INCLUDE 
IT_INCLUDE_NEXT 
IT_IMPORT 
IT_CMDLINE 

Definition at line 152 of file cpphash.h.


Function Documentation

static int ufputs PARAMS ( (const uchar *, FILE *)   )  [inline, static]

static uchar* ustrchr PARAMS ( (const uchar *, int)   )  [inline, static]

static size_t ustrlen PARAMS ( (const uchar *)   )  [inline, static]

static int ustrncmp PARAMS ( (const uchar *, const uchar *, size_t  )  [inline, static]

static int ustrcmp PARAMS ( (const uchar *, const uchar *)   )  [inline, static]

size_t _cpp_replacement_text_len PARAMS ( (const cpp_macro *)   ) 

uchar* _cpp_copy_replacement_text PARAMS ( (const cpp_macro *, uchar *)   ) 

bool _cpp_expansions_different_trad PARAMS ( (const cpp_macro *, const cpp_macro *)   ) 

bool _cpp_create_trad_definition PARAMS ( (cpp_reader *, cpp_macro *)   ) 

void _cpp_overlay_buffer PARAMS ( (cpp_reader *pfile, const uchar *, size_t  ) 

void _cpp_do_file_change PARAMS ( (cpp_reader *, enum lc_reason, const char *, unsigned int, unsigned int)   ) 

int _cpp_handle_directive PARAMS ( (cpp_reader *, int)   ) 

int _cpp_test_assertion PARAMS ( (cpp_reader *, unsigned int *)   ) 

void _cpp_init_tokenrun PARAMS ( (tokenrun *, unsigned int)   ) 

int _cpp_equiv_tokens PARAMS ( (const cpp_token *, const cpp_token *)   ) 

void _cpp_pop_file_buffer PARAMS ( (cpp_reader *, struct include_file *)   ) 

int _cpp_compare_file_date PARAMS ( (cpp_reader *, const cpp_token *)   ) 

bool _cpp_execute_include PARAMS ( (cpp_reader *, const cpp_token *, enum include_type  ) 

char* _cpp_simplify_pathname PARAMS ( (char *)   ) 

void _cpp_never_reread PARAMS ( (struct include_file *)   ) 

void _cpp_fake_include PARAMS ( (cpp_reader *, const char *)   ) 

void _cpp_init_hashtable PARAMS ( (cpp_reader *, hash_table *)   ) 

int _cpp_warn_if_unused_macro PARAMS ( (cpp_reader *, cpp_hashnode *, void *)   ) 

bool _cpp_arguments_ok PARAMS ( (cpp_reader *, cpp_macro *, const cpp_hashnode *, unsigned int)   ) 

bool _cpp_save_parameter PARAMS ( (cpp_reader *, cpp_macro *, cpp_hashnode *)   ) 

void _cpp_push_text_context PARAMS ( (cpp_reader *, cpp_hashnode *, const uchar *, size_t  ) 

void _cpp_pop_context PARAMS ( (cpp_reader *)   ) 

bool _cpp_create_definition PARAMS ( (cpp_reader *, cpp_hashnode *)   ) 

void _cpp_free_definition PARAMS ( (cpp_hashnode *)   ) 

int _cpp_begin_message PARAMS ( (cpp_reader *, int, unsigned int, unsigned int)   ) 

void _cpp_free_buff PARAMS ( (_cpp_buff *)   ) 

_cpp_buff* _cpp_append_extend_buff PARAMS ( (cpp_reader *, _cpp_buff *, size_t  ) 

void _cpp_extend_buff PARAMS ( (cpp_reader *, _cpp_buff **, size_t  ) 

void _cpp_release_buff PARAMS ( (cpp_reader *, _cpp_buff *)   ) 

_cpp_buff* _cpp_get_buff PARAMS ( (cpp_reader *, size_t  ) 

static int ustrcmp ( s1  ,
s2   
) const [inline, static]


Variable Documentation

unsigned char _cpp_trigraph_map[UCHAR_MAX+1]

int c

Definition at line 604 of file cpphash.h.

FILE* f

Definition at line 626 of file cpphash.h.

Definition at line 597 of file cpphash.h.

* s2


Generated on Wed Apr 8 15:30:09 2009 for Open64 by  doxygen 1.5.6