osprey/kg++fe/gnu/cpptrad.c File Reference

#include "config.h"
#include "system.h"
#include "cpplib.h"
#include "cpphash.h"

Include dependency graph for cpptrad.c:

Go to the source code of this file.

Data Types

type  block
type  fun_macro

Defines

#define BLOCK_HEADER_LEN   offsetof (struct block, text)
#define BLOCK_LEN(TEXT_LEN)   CPP_ALIGN (BLOCK_HEADER_LEN + (TEXT_LEN))

Enumerations

enum  ls {
  ls_none = 0, ls_fun_open, ls_fun_close, ls_defined,
  ls_defined_close, ls_hash, ls_predicate, ls_answer,
  ls_none = 0, ls_fun_open, ls_fun_close, ls_defined,
  ls_defined_close, ls_hash, ls_predicate, ls_answer,
  ls_none = 0, ls_fun_open, ls_fun_close, ls_defined,
  ls_defined_close, ls_hash, ls_predicate, ls_answer,
  ls_none = 0, ls_fun_open, ls_fun_close, ls_defined,
  ls_defined_close, ls_hash, ls_predicate, ls_answer
}

Functions/Subroutines

static const uchar *handle_newline PARAMS ((cpp_reader *, const uchar *))
static const uchar *skip_whitespace PARAMS ((cpp_reader *, const uchar *, int))
static void scan_out_logical_line PARAMS ((cpp_reader *pfile, cpp_macro *))
static void check_output_buffer PARAMS ((cpp_reader *, size_t))
static void push_replacement_text PARAMS ((cpp_reader *, cpp_hashnode *))
static bool scan_parameters PARAMS ((cpp_reader *, cpp_macro *))
static void save_replacement_text PARAMS ((cpp_reader *, cpp_macro *, unsigned int))
static void maybe_start_funlike PARAMS ((cpp_reader *, cpp_hashnode *, const uchar *, struct fun_macro *))
static void save_argument PARAMS ((struct fun_macro *, size_t))
static void replace_args_and_push PARAMS ((cpp_reader *, struct fun_macro *))
static size_t canonicalize_text PARAMS ((uchar *, const uchar *, size_t, uchar *))
static void check_output_buffer (cpp_reader *pfile, size_t n)
static const ucharhandle_newline (cpp_reader *pfile, const uchar *cur)
static const ucharskip_escaped_newlines (cpp_reader *pfile, const uchar *cur)
static const ucharcopy_comment (cpp_reader *pfile, const uchar *cur, int in_define)
static const ucharskip_whitespace (cpp_reader *pfile, const uchar *cur, int skip_comments)
static cpp_hashnodelex_identifier (cpp_reader *pfile, const uchar *cur)
void _cpp_overlay_buffer (cpp_reader *pfile, const uchar *start, size_t len)
void _cpp_remove_overlay (cpp_reader *pfile)
bool _cpp_read_logical_line_trad (cpp_reader *pfile)
static void maybe_start_funlike (cpp_reader *pfile, cpp_hashnode *node, const uchar *start, struct fun_macro *macro)
static void save_argument (struct fun_macro *macro, size_t offset)
static void scan_out_logical_line (cpp_reader *pfile, cpp_macro *macro)
static void push_replacement_text (cpp_reader *pfile, cpp_hashnode *node)
static bool recursive_macro (cpp_reader *pfile, cpp_hashnode *node)
size_t _cpp_replacement_text_len (cpp_macro *macro) const
uchar_cpp_copy_replacement_text (cpp_macro *macro, uchar *dest) const
static void replace_args_and_push (cpp_reader *pfile, struct fun_macro *fmacro)
static bool scan_parameters (cpp_reader *pfile, cpp_macro *macro)
static void save_replacement_text (cpp_reader *pfile, cpp_macro *macro, unsigned int arg_index)
bool _cpp_create_trad_definition (cpp_reader *pfile, cpp_macro *macro)
static size_t canonicalize_text (uchar *dest, const uchar *src, size_t len, uchar *pquote)
bool _cpp_expansions_different_trad (cpp_macro *macro1, cpp_macro *macro2) const


Define Documentation

#define BLOCK_HEADER_LEN   offsetof (struct block, text)

Definition at line 40 of file cpptrad.c.

#define BLOCK_LEN ( TEXT_LEN   )     CPP_ALIGN (BLOCK_HEADER_LEN + (TEXT_LEN))


Enumeration Type Documentation

enum ls

Enumerator:
ls_none 
ls_fun_open 
ls_fun_close 
ls_defined 
ls_defined_close 
ls_hash 
ls_predicate 
ls_answer 
ls_none 
ls_fun_open 
ls_fun_close 
ls_defined 
ls_defined_close 
ls_hash 
ls_predicate 
ls_answer 
ls_none 
ls_fun_open 
ls_fun_close 
ls_defined 
ls_defined_close 
ls_hash 
ls_predicate 
ls_answer 
ls_none 
ls_fun_open 
ls_fun_close 
ls_defined 
ls_defined_close 
ls_hash 
ls_predicate 
ls_answer 

Definition at line 70 of file cpptrad.c.


Function Documentation

uchar* _cpp_copy_replacement_text ( cpp_macro macro,
uchar dest 
) const

Definition at line 881 of file cpptrad.c.

References block::arg_index, b, BLOCK_LEN, exp, memcpy, NODE_LEN, NODE_NAME, block::text, block::text_len, and uchar.

Referenced by cpp_macro_definition().

bool _cpp_create_trad_definition ( cpp_reader pfile,
cpp_macro macro 
)

Definition at line 1075 of file cpptrad.c.

Referenced by _cpp_create_definition().

bool _cpp_expansions_different_trad ( cpp_macro macro1,
cpp_macro macro2 
) const

void _cpp_overlay_buffer ( cpp_reader pfile,
const uchar start,
size_t  len 
)

Definition at line 331 of file cpptrad.c.

Referenced by continue_after_nul(), and prepare_directive_trad().

bool _cpp_read_logical_line_trad ( cpp_reader pfile  ) 

void _cpp_remove_overlay ( cpp_reader pfile  ) 

Definition at line 350 of file cpptrad.c.

Referenced by continue_after_nul(), and end_directive().

size_t _cpp_replacement_text_len ( cpp_macro macro  )  const

Definition at line 850 of file cpptrad.c.

References block::arg_index, b, BLOCK_LEN, exp, len, NODE_LEN, block::text_len, and uchar.

Referenced by cpp_macro_definition().

static size_t canonicalize_text ( uchar dest,
const uchar src,
size_t  len,
uchar pquote 
) [static]

Definition at line 1134 of file cpptrad.c.

References is_space, quote, and uchar.

Referenced by _cpp_expansions_different_trad(), and parse_assertion().

static void check_output_buffer ( cpp_reader pfile,
size_t  n 
) [static]

Definition at line 106 of file cpptrad.c.

References size, uchar, and xrealloc().

Referenced by _cpp_create_trad_definition(), _cpp_scan_out_logical_line(), and scan_out_logical_line().

static const uchar* copy_comment ( cpp_reader pfile,
const uchar cur,
int  in_define 
) [static]

static const uchar* handle_newline ( cpp_reader pfile,
const uchar cur 
) [static]

Definition at line 132 of file cpptrad.c.

static cpp_hashnode* lex_identifier ( cpp_reader pfile,
const uchar cur 
) [static]

static void maybe_start_funlike ( cpp_reader pfile,
cpp_hashnode node,
const uchar start,
struct fun_macro macro 
) [static]

static size_t canonicalize_text PARAMS ( (uchar *, const uchar *, size_t, uchar *)   )  [static]

static void replace_args_and_push PARAMS ( (cpp_reader *, struct fun_macro *)   )  [static]

static void save_argument PARAMS ( (struct fun_macro *, size_t  )  [static]

static void maybe_start_funlike PARAMS ( (cpp_reader *, cpp_hashnode *, const uchar *, struct fun_macro *)   )  [static]

static void save_replacement_text PARAMS ( (cpp_reader *, cpp_macro *, unsigned int)   )  [static]

static bool scan_parameters PARAMS ( (cpp_reader *, cpp_macro *)   )  [static]

static void push_replacement_text PARAMS ( (cpp_reader *, cpp_hashnode *)   )  [static]

static void check_output_buffer PARAMS ( (cpp_reader *, size_t  )  [static]

static void scan_out_logical_line PARAMS ( (cpp_reader *pfile, cpp_macro *)   )  [static]

static const uchar* skip_whitespace PARAMS ( (cpp_reader *, const uchar *, int)   )  [static]

static const uchar* handle_newline PARAMS ( (cpp_reader *, const uchar *)   )  [static]

static void push_replacement_text ( cpp_reader pfile,
cpp_hashnode node 
) [static]

static bool recursive_macro ( cpp_reader pfile,
cpp_hashnode node 
) [static]

static void replace_args_and_push ( cpp_reader pfile,
struct fun_macro fmacro 
) [static]

static void save_argument ( struct fun_macro macro,
size_t  offset 
) [static]

Definition at line 413 of file cpptrad.c.

Referenced by _cpp_scan_out_logical_line(), and scan_out_logical_line().

static void save_replacement_text ( cpp_reader pfile,
cpp_macro macro,
unsigned int  arg_index 
) [static]

static void scan_out_logical_line ( cpp_reader pfile,
cpp_macro macro 
) [static]

static bool scan_parameters ( cpp_reader pfile,
cpp_macro macro 
) [static]

static const uchar* skip_escaped_newlines ( cpp_reader pfile,
const uchar cur 
) [static]

Definition at line 148 of file cpptrad.c.

References cpp_error(), DL_PEDWARN, handle_newline(), is_vspace, RLIMIT, and uchar.

static const uchar* skip_whitespace ( cpp_reader pfile,
const uchar cur,
int  skip_comments 
) [static]

Definition at line 254 of file cpptrad.c.

References c, copy_comment(), is_nvspace, is_vspace, out, RLIMIT, skip_escaped_newlines(), tmp, and uchar.


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