osprey-gcc/gcc/pretty-print.h File Reference

#include "obstack.h"
#include "input.h"

Include dependency graph for pretty-print.h:

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

Go to the source code of this file.

Data Types

type  text_info
type  output_buffer
type  pretty_print_info

Defines

#define pp_format_decoder(PP)   pp_base (PP)->format_decoder
#define pp_needs_newline(PP)   pp_base (PP)->need_newline
#define pp_line_cutoff(PP)   pp_base (PP)->ideal_maximum_length
#define pp_is_wrapping_line(PP)   (pp_line_cutoff (PP) > 0)
#define pp_prefixing_rule(PP)   pp_base (PP)->prefixing_rule
#define pp_indentation(PP)   pp_base (PP)->indent_skip
#define pp_set_line_maximum_length(PP, L)   pp_base_set_line_maximum_length (pp_base (PP), L)
#define pp_set_prefix(PP, P)   pp_base_set_prefix (pp_base (PP), P)
#define pp_destroy_prefix(PP)   pp_base_destroy_prefix (pp_base (PP))
#define pp_remaining_character_count_for_line(PP)   pp_base_remaining_character_count_for_line (pp_base (PP))
#define pp_clear_output_area(PP)   pp_base_clear_output_area (pp_base (PP))
#define pp_formatted_text(PP)   pp_base_formatted_text (pp_base (PP))
#define pp_last_position_in_text(PP)   pp_base_last_position_in_text (pp_base (PP))
#define pp_emit_prefix(PP)   pp_base_emit_prefix (pp_base (PP))
#define pp_append_text(PP, B, E)   pp_base_append_text (pp_base (PP), B, E)
#define pp_flush(PP)   pp_base_flush (pp_base (PP))
#define pp_prepare_to_format(PP, TI, LOC)   pp_base_prepare_to_format (pp_base (PP), TI, LOC)
#define pp_format_text(PP, TI)   pp_base_format_text (pp_base (PP), TI)
#define pp_format_verbatim(PP, TI)   pp_base_format_verbatim (pp_base (PP), TI)
#define pp_character(PP, C)   pp_base_character (pp_base (PP), C)
#define pp_string(PP, S)   pp_base_string (pp_base (PP), S)
#define pp_newline(PP)   pp_base_newline (pp_base (PP))
#define pp_space(PP)   pp_character (PP, ' ')
#define pp_left_paren(PP)   pp_character (PP, '(')
#define pp_right_paren(PP)   pp_character (PP, ')')
#define pp_left_bracket(PP)   pp_character (PP, '[')
#define pp_right_bracket(PP)   pp_character (PP, ']')
#define pp_left_brace(PP)   pp_character (PP, '{')
#define pp_right_brace(PP)   pp_character (PP, '}')
#define pp_semicolon(PP)   pp_character (PP, ';')
#define pp_comma(PP)   pp_string (PP, ", ")
#define pp_dot(PP)   pp_character (PP, '.')
#define pp_colon(PP)   pp_character (PP, ':')
#define pp_colon_colon(PP)   pp_string (PP, "::")
#define pp_arrow(PP)   pp_string (PP, "->")
#define pp_equal(PP)   pp_character (PP, '=')
#define pp_question(PP)   pp_character (PP, '?')
#define pp_bar(PP)   pp_character (PP, '|')
#define pp_carret(PP)   pp_character (PP, '^')
#define pp_ampersand(PP)   pp_character (PP, '&')
#define pp_less(PP)   pp_character (PP, '<')
#define pp_greater(PP)   pp_character (PP, '>')
#define pp_plus(PP)   pp_character (PP, '+')
#define pp_minus(PP)   pp_character (PP, '-')
#define pp_star(PP)   pp_character (PP, '*')
#define pp_slash(PP)   pp_character (PP, '/')
#define pp_modulo(PP)   pp_character (PP, '%')
#define pp_exclamation(PP)   pp_character (PP, '!')
#define pp_complement(PP)   pp_character (PP, '~')
#define pp_quote(PP)   pp_character (PP, '\'')
#define pp_backquote(PP)   pp_character (PP, '`')
#define pp_doublequote(PP)   pp_character (PP, '"')
#define pp_newline_and_indent(PP, N)
#define pp_maybe_newline_and_indent(PP, N)   if (pp_needs_newline (PP)) pp_newline_and_indent (PP, N)
#define pp_maybe_space(PP)   pp_base_maybe_space (pp_base (PP))
#define pp_separate_with(PP, C)
#define pp_scalar(PP, FORMAT, SCALAR)
#define pp_decimal_int(PP, I)   pp_scalar (PP, "%d", I)
#define pp_wide_integer(PP, I)   pp_scalar (PP, HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT) I)
#define pp_pointer(PP, P)   pp_scalar (PP, "%p", P)
#define pp_identifier(PP, ID)   pp_string (PP, ID)
#define pp_tree_identifier(PP, T)
#define pp_unsupported_tree(PP, T)
#define pp_buffer(PP)   pp_base (PP)->buffer
#define pp_base(PP)   (PP)
#define ATTRIBUTE_GCC_PPDIAG(m, n)   ATTRIBUTE_NONNULL(m)

Typedefs

typedef unsigned int pp_flags
typedef struct pretty_print_info pretty_printer
typedef bool(* printer_fn )(pretty_printer *, text_info *)

Enumerations

enum  diagnostic_prefixing_rule_t {
  DIAGNOSTICS_SHOW_PREFIX_ONCE = 0x0, DIAGNOSTICS_SHOW_PREFIX_NEVER = 0x1, DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE = 0x2, DIAGNOSTICS_SHOW_PREFIX_ONCE = 0x0,
  DIAGNOSTICS_SHOW_PREFIX_NEVER = 0x1, DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE = 0x2, DIAGNOSTICS_SHOW_PREFIX_ONCE = 0x0, DIAGNOSTICS_SHOW_PREFIX_NEVER = 0x1,
  DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE = 0x2, DIAGNOSTICS_SHOW_PREFIX_ONCE = 0x0, DIAGNOSTICS_SHOW_PREFIX_NEVER = 0x1, DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE = 0x2
}
enum  pp_padding {
  pp_none, pp_before, pp_after, pp_none,
  pp_before, pp_after, pp_none, pp_before,
  pp_after, pp_none, pp_before, pp_after
}

Functions/Subroutines

void pp_construct (pretty_printer *, const char *, int)
void pp_base_set_line_maximum_length (pretty_printer *, int)
void pp_base_set_prefix (pretty_printer *, const char *)
void pp_base_destroy_prefix (pretty_printer *)
int pp_base_remaining_character_count_for_line (pretty_printer *)
void pp_base_clear_output_area (pretty_printer *)
const char * pp_base_formatted_text (pretty_printer *)
const char * pp_base_last_position_in_text (const pretty_printer *)
void pp_base_emit_prefix (pretty_printer *)
void pp_base_append_text (pretty_printer *, const char *, const char *)
void pp_printf (pretty_printer *, const char *,...) ATTRIBUTE_GCC_PPDIAG(2
void void pp_verbatim (pretty_printer *, const char *,...)
void pp_base_flush (pretty_printer *)
void pp_base_prepare_to_format (pretty_printer *, text_info *, location_t *)
void pp_base_format_text (pretty_printer *, text_info *)
void pp_base_format_verbatim (pretty_printer *, text_info *)
void pp_base_indent (pretty_printer *)
void pp_base_newline (pretty_printer *)
void pp_base_character (pretty_printer *, int)
void pp_base_string (pretty_printer *, const char *)
void pp_write_text_to_stream (pretty_printer *pp)
void pp_base_maybe_space (pretty_printer *)


Define Documentation

#define ATTRIBUTE_GCC_PPDIAG ( m,
n   )     ATTRIBUTE_NONNULL(m)

Definition at line 259 of file pretty-print.h.

#define pp_ampersand ( PP   )     pp_character (PP, '&')

Definition at line 188 of file pretty-print.h.

#define pp_append_text ( PP,
B,
 )     pp_base_append_text (pp_base (PP), B, E)

#define pp_arrow ( PP   )     pp_string (PP, "->")

Definition at line 183 of file pretty-print.h.

#define pp_backquote ( PP   )     pp_character (PP, '`')

Definition at line 199 of file pretty-print.h.

#define pp_bar ( PP   )     pp_character (PP, '|')

Definition at line 186 of file pretty-print.h.

#define pp_base ( PP   )     (PP)

Definition at line 241 of file pretty-print.h.

#define pp_buffer ( PP   )     pp_base (PP)->buffer

Definition at line 238 of file pretty-print.h.

#define pp_carret ( PP   )     pp_character (PP, '^')

Definition at line 187 of file pretty-print.h.

#define pp_character ( PP,
 )     pp_base_character (pp_base (PP), C)

Definition at line 167 of file pretty-print.h.

#define pp_clear_output_area ( PP   )     pp_base_clear_output_area (pp_base (PP))

Definition at line 152 of file pretty-print.h.

Referenced by mf_varname_tree(), pp_write_text_to_stream(), and reinit_cxx_pp().

#define pp_colon ( PP   )     pp_character (PP, ':')

Definition at line 181 of file pretty-print.h.

#define pp_colon_colon ( PP   )     pp_string (PP, "::")

Definition at line 182 of file pretty-print.h.

#define pp_comma ( PP   )     pp_string (PP, ", ")

Definition at line 179 of file pretty-print.h.

#define pp_complement ( PP   )     pp_character (PP, '~')

Definition at line 197 of file pretty-print.h.

#define pp_decimal_int ( PP,
 )     pp_scalar (PP, "%d", I)

#define pp_destroy_prefix ( PP   )     pp_base_destroy_prefix (pp_base (PP))

Definition at line 149 of file pretty-print.h.

Referenced by default_diagnostic_finalizer().

#define pp_dot ( PP   )     pp_character (PP, '.')

Definition at line 180 of file pretty-print.h.

#define pp_doublequote ( PP   )     pp_character (PP, '"')

Definition at line 200 of file pretty-print.h.

#define pp_emit_prefix ( PP   )     pp_base_emit_prefix (pp_base (PP))

Definition at line 157 of file pretty-print.h.

Referenced by pp_base_append_text().

#define pp_equal ( PP   )     pp_character (PP, '=')

Definition at line 184 of file pretty-print.h.

#define pp_exclamation ( PP   )     pp_character (PP, '!')

Definition at line 196 of file pretty-print.h.

#define pp_flush ( PP   )     pp_base_flush (pp_base (PP))

#define pp_format_decoder ( PP   )     pp_base (PP)->format_decoder

Definition at line 82 of file pretty-print.h.

Referenced by general_init(), pp_base_format(), and pp_base_format_text().

#define pp_format_text ( PP,
TI   )     pp_base_format_text (pp_base (PP), TI)

#define pp_format_verbatim ( PP,
TI   )     pp_base_format_verbatim (pp_base (PP), TI)

Definition at line 164 of file pretty-print.h.

Referenced by pp_verbatim(), and verbatim().

#define pp_formatted_text ( PP   )     pp_base_formatted_text (pp_base (PP))

#define pp_greater ( PP   )     pp_character (PP, '>')

Definition at line 190 of file pretty-print.h.

#define pp_identifier ( PP,
ID   )     pp_string (PP, ID)

Definition at line 228 of file pretty-print.h.

#define pp_indentation ( PP   )     pp_base (PP)->indent_skip

Definition at line 99 of file pretty-print.h.

#define pp_is_wrapping_line ( PP   )     (pp_line_cutoff (PP) > 0)

#define pp_last_position_in_text ( PP   )     pp_base_last_position_in_text (pp_base (PP))

Definition at line 155 of file pretty-print.h.

Referenced by pp_c_cv_qualifier(), and pp_cxx_nonconsecutive_character().

#define pp_left_brace ( PP   )     pp_character (PP, '{')

Definition at line 176 of file pretty-print.h.

#define pp_left_bracket ( PP   )     pp_character (PP, '[')

Definition at line 174 of file pretty-print.h.

#define pp_left_paren ( PP   )     pp_character (PP, '(')

Definition at line 172 of file pretty-print.h.

#define pp_less ( PP   )     pp_character (PP, '<')

Definition at line 189 of file pretty-print.h.

#define pp_line_cutoff ( PP   )     pp_base (PP)->ideal_maximum_length

#define pp_maybe_newline_and_indent ( PP,
 )     if (pp_needs_newline (PP)) pp_newline_and_indent (PP, N)

Definition at line 208 of file pretty-print.h.

Referenced by pp_cxx_statement(), and pp_cxx_template_declaration().

#define pp_maybe_space ( PP   )     pp_base_maybe_space (pp_base (PP))

Definition at line 210 of file pretty-print.h.

Referenced by dump_simple_decl(), dump_type_prefix(), and dump_type_suffix().

#define pp_minus ( PP   )     pp_character (PP, '-')

Definition at line 192 of file pretty-print.h.

#define pp_modulo ( PP   )     pp_character (PP, '%')

Definition at line 195 of file pretty-print.h.

#define pp_needs_newline ( PP   )     pp_base (PP)->need_newline

#define pp_newline ( PP   )     pp_base_newline (pp_base (PP))

Definition at line 169 of file pretty-print.h.

#define pp_newline_and_indent ( PP,
 ) 

Value:

do {                               \
    pp_indentation (PP) += N;        \
    pp_newline (PP);                 \
    pp_base_indent (pp_base (PP));   \
    pp_needs_newline (PP) = false;   \
  } while (0)

Definition at line 201 of file pretty-print.h.

#define pp_plus ( PP   )     pp_character (PP, '+')

Definition at line 191 of file pretty-print.h.

#define pp_pointer ( PP,
P   )     pp_scalar (PP, "%p", P)

Definition at line 226 of file pretty-print.h.

#define pp_prefixing_rule ( PP   )     pp_base (PP)->prefixing_rule

#define pp_prepare_to_format ( PP,
TI,
LOC   )     pp_base_prepare_to_format (pp_base (PP), TI, LOC)

Definition at line 161 of file pretty-print.h.

Referenced by diagnostic_report_diagnostic().

#define pp_question ( PP   )     pp_character (PP, '?')

Definition at line 185 of file pretty-print.h.

#define pp_quote ( PP   )     pp_character (PP, '\'')

Definition at line 198 of file pretty-print.h.

#define pp_remaining_character_count_for_line ( PP   )     pp_base_remaining_character_count_for_line (pp_base (PP))

Definition at line 150 of file pretty-print.h.

Referenced by pp_base_character(), and pp_wrap_text().

#define pp_right_brace ( PP   )     pp_character (PP, '}')

Definition at line 177 of file pretty-print.h.

#define pp_right_bracket ( PP   )     pp_character (PP, ']')

Definition at line 175 of file pretty-print.h.

#define pp_right_paren ( PP   )     pp_character (PP, ')')

Definition at line 173 of file pretty-print.h.

#define pp_scalar ( PP,
FORMAT,
SCALAR   ) 

Value:

do                          \
    {                         \
      sprintf (pp_buffer (PP)->digit_buffer, FORMAT, SCALAR); \
      pp_string (PP, pp_buffer (PP)->digit_buffer);           \
    }                         \
  while (0)

Definition at line 216 of file pretty-print.h.

Referenced by pp_base_format(), pp_base_format_text(), pp_c_char(), and pp_c_character_constant().

#define pp_semicolon ( PP   )     pp_character (PP, ';')

Definition at line 178 of file pretty-print.h.

#define pp_separate_with ( PP,
 ) 

Value:

do {                             \
     pp_character (PP, C);          \
     pp_space (PP);                 \
   } while (0)

Definition at line 211 of file pretty-print.h.

#define pp_set_line_maximum_length ( PP,
L   )     pp_base_set_line_maximum_length (pp_base (PP), L)

Definition at line 146 of file pretty-print.h.

Referenced by common_handle_option(), and pp_cxx_pretty_printer_init().

#define pp_set_prefix ( PP,
P   )     pp_base_set_prefix (pp_base (PP), P)

#define pp_slash ( PP   )     pp_character (PP, '/')

Definition at line 194 of file pretty-print.h.

#define pp_space ( PP   )     pp_character (PP, ' ')

#define pp_star ( PP   )     pp_character (PP, '*')

Definition at line 193 of file pretty-print.h.

#define pp_string ( PP,
S   )     pp_base_string (pp_base (PP), S)

#define pp_tree_identifier ( PP,
T   ) 

Value:

Definition at line 229 of file pretty-print.h.

#define pp_unsupported_tree ( PP,
T   ) 

Value:

pp_verbatim (pp_base (PP), "#%qs not supported by %s#", \
               tree_code_name[(int) TREE_CODE (T)], __FUNCTION__)

Definition at line 233 of file pretty-print.h.

#define pp_wide_integer ( PP,
 )     pp_scalar (PP, HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT) I)

Definition at line 224 of file pretty-print.h.


Typedef Documentation

typedef unsigned int pp_flags

Definition at line 68 of file pretty-print.h.

Definition at line 78 of file pretty-print.h.

Definition at line 79 of file pretty-print.h.


Enumeration Type Documentation

Enumerator:
DIAGNOSTICS_SHOW_PREFIX_ONCE 
DIAGNOSTICS_SHOW_PREFIX_NEVER 
DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE 
DIAGNOSTICS_SHOW_PREFIX_ONCE 
DIAGNOSTICS_SHOW_PREFIX_NEVER 
DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE 
DIAGNOSTICS_SHOW_PREFIX_ONCE 
DIAGNOSTICS_SHOW_PREFIX_NEVER 
DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE 
DIAGNOSTICS_SHOW_PREFIX_ONCE 
DIAGNOSTICS_SHOW_PREFIX_NEVER 
DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE 

Definition at line 42 of file pretty-print.h.

enum pp_padding

Enumerator:
pp_none 
pp_before 
pp_after 
pp_none 
pp_before 
pp_after 
pp_none 
pp_before 
pp_after 
pp_none 
pp_before 
pp_after 

Definition at line 70 of file pretty-print.h.


Function Documentation

void pp_base_append_text ( pretty_printer ,
const char *  ,
const char *   
)

Definition at line 502 of file pretty-print.c.

void pp_base_character ( pretty_printer ,
int   
)

Definition at line 589 of file pretty-print.c.

void pp_base_clear_output_area ( pretty_printer  ) 

Definition at line 423 of file pretty-print.c.

void pp_base_destroy_prefix ( pretty_printer  ) 

Definition at line 441 of file pretty-print.c.

void pp_base_emit_prefix ( pretty_printer  ) 

Definition at line 452 of file pretty-print.c.

void pp_base_flush ( pretty_printer  ) 

Definition at line 402 of file pretty-print.c.

void pp_base_format_text ( pretty_printer ,
text_info  
)

void pp_base_format_verbatim ( pretty_printer ,
text_info  
)

Definition at line 385 of file pretty-print.c.

const char* pp_base_formatted_text ( pretty_printer  ) 

Definition at line 518 of file pretty-print.c.

void pp_base_indent ( pretty_printer  ) 

Definition at line 160 of file pretty-print.c.

const char* pp_base_last_position_in_text ( const pretty_printer  ) 

Definition at line 527 of file pretty-print.c.

void pp_base_maybe_space ( pretty_printer  ) 

Definition at line 613 of file pretty-print.c.

void pp_base_newline ( pretty_printer  ) 

Definition at line 581 of file pretty-print.c.

void pp_base_prepare_to_format ( pretty_printer ,
text_info ,
location_t  
)

int pp_base_remaining_character_count_for_line ( pretty_printer  ) 

Definition at line 540 of file pretty-print.c.

void pp_base_set_line_maximum_length ( pretty_printer ,
int   
)

Definition at line 415 of file pretty-print.c.

void pp_base_set_prefix ( pretty_printer ,
const char *   
)

Definition at line 431 of file pretty-print.c.

void pp_base_string ( pretty_printer ,
const char *   
)

Definition at line 605 of file pretty-print.c.

void pp_construct ( pretty_printer ,
const char *  ,
int   
)

Definition at line 485 of file pretty-print.c.

void pp_printf ( pretty_printer ,
const char *  ,
  ... 
)

void void pp_verbatim ( pretty_printer ,
const char *  ,
  ... 
)

void pp_write_text_to_stream ( pretty_printer pp  ) 

Definition at line 97 of file pretty-print.c.


Generated on Wed Apr 8 15:41:53 2009 for Open64 by  doxygen 1.5.6