Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
token_buffer.cxx File Reference
#include <stdio.h>
#include <string.h>
#include "defs.h"
#include "srcpos.h"
#include "token_buffer.h"
#include "errors.h"
#include "mempool.h"
#include "wn.h"
#include "ir_reader.h"
#include "unparse_target.h"
#include "token_names.h"
Include dependency graph for token_buffer.cxx:

Go to the source code of this file.

Classes

struct  String_Value
union  Token_Value
struct  Token
struct  Token_Sequence
struct  Token_Buffer

Defines

#define strcpy   DO_NOT_USE_STRCPY
#define TB_TYPE_ALLOC_N(type, count)   TYPE_MEM_POOL_ALLOC_N(type, Malloc_Mem_Pool, count)
#define TB_TYPE_REALLOC_N(type, old_ptr, old_count, new_count)
#define TB_FREE(ptr)   MEM_POOL_FREE(Malloc_Mem_Pool, ptr)
#define MAX_STRING_IDX   (STRING_IDX)0x7fffffffU /* max string buffer size */
#define MAX_TOKEN_IDX   (TOKEN_IDX)0x7fffffffU /* max token buffer size */
#define NO_STRING_IDX   (STRING_IDX)0xffffffffU /* Invalid string buffer index*/
#define NO_TOKEN_IDX   (TOKEN_IDX)0xffffffffU /* Invalid token buffer index*/
#define INIT_STRING_BUFFER_SIZE   1024
#define INIT_TOKEN_BUFFER_SIZE   512
#define TOKEN_kind(t)   (t)->kind
#define TOKEN_next(t)   (t)->next
#define TOKEN_srcpos(t)   (t)->value.srcpos
#define TOKEN_char(t)   (t)->value.str_val.string.ch[0]
#define TOKEN_short_string(t)   (t)->value.str_val.string.ch
#define TOKEN_string_idx(t)   (t)->value.str_val.string.idx
#define TOKEN_string_size(t)   (t)->value.str_val.size
#define TOKEN_is_short_string(t)   (TOKEN_string_size(t) <= sizeof(STRING_IDX))
#define TOKEN_is_string(t)
#define TOKEN_BUFFER_get_char_string(buf, a_token)
#define WRITE_BUFFER_SIZE   256
#define INVALID_SPLIT_PT   -1
#define MAX_INDENTATION   40
#define MAX_INDENTATION_STEP   10
#define USE_UNLIMITED_LINE_LENGTH   (Max_Line_Length == 0)
#define MAX_F77_DIRECTIVE_PREFIX_SIZE   24
#define DBGOUT   stderr /* debugging output file */
#define CAN_SPLIT_LINE   (last_split_pt != INVALID_SPLIT_PT)
#define NEED_TO_SPLIT_LINE   (!USE_UNLIMITED_LINE_LENGTH && Current_Output_Col > Max_Line_Length)
#define is_binary_or_tertiary_op(c)   W2X_Unparse_Target->Is_Binary_Or_Tertiary_Op(c)
#define is_begin_grouping(c)
#define is_end_grouping(c)
#define is_unary_op(c1, c2)
#define is_comma_or_semicolon(c)   (c==COMMA || c==SEMICOLON)

Typedefs

typedef mUINT32 STRING_IDX
typedef mUINT32 TOKEN_IDX
typedef enum Token_Kind TOKEN_KIND
typedef struct String_Value STRING_VALUE
typedef union Token_Value TOKEN_VALUE
typedef struct Token TOKEN
typedef struct Token_Sequence TOKEN_SEQUENCE

Enumerations

enum  Token_Kind {
  STRING_TOKEN = 0, SPECIAL_TOKEN = 1, SEPARATOR_TOKEN = 2, DIRECTIVE_TOKEN = 3,
  F77_SEQNO_TOKEN = 4, SRCPOS_MAP_TOKEN = 5, SRCPOS_DIRECTIVE_TOKEN = 6
}

Functions

void dbg_tokens (TOKEN_BUFFER buf, BOOL with_token_name)
static TOKEN_IDX get_new_tokens (TOKEN_BUFFER buf, INT number_of_tokens)
static STRING_IDX get_new_string (TOKEN_BUFFER buf, INT16 stringsize)
static char * Allocate_Token_String (TOKEN_BUFFER buf, TOKEN *a_token, STRING_IDX str_size)
static void free_buffer_list (TOKEN_BUFFER free_list)
static TOKEN_IDX indented_newline_token (TOKEN_BUFFER buffer, UINT num_lines, BOOL continuation, const char *label)
static TOKEN_IDX F77_comment_line_token (TOKEN_BUFFER buffer, UINT num_lines, const char *comment_prefix, BOOL indent_last_line)
static TOKEN_IDX F77_directive_line_token (TOKEN_BUFFER buffer, const char *directive_prefix)
static TOKEN_IDX string_token (TOKEN_BUFFER buffer, const char *string)
static TOKEN_IDX f77_seqno_token (TOKEN_BUFFER buffer, const char *seqno)
static TOKEN_IDX special_char_token (TOKEN_BUFFER buffer, char special)
static TOKEN_IDX Srcpos_Map_Token (TOKEN_BUFFER buffer, SRCPOS srcpos)
static TOKEN_IDX Srcpos_Directive_Token (TOKEN_BUFFER buffer, SRCPOS srcpos)
static TOKEN_SEQUENCE copy_token_list (TOKEN_BUFFER to_buffer, TOKEN_BUFFER from_buffer)
static void append_token_list (TOKEN_BUFFER buffer, TOKEN_SEQUENCE token_list)
static void prepend_token_list (TOKEN_BUFFER buffer, TOKEN_SEQUENCE token_list)
static void write_into_string_buf (const char *from, UINT from_size, char **into, UINT *into_size)
static void flush_write_buffer (FILE *ofile, char **buffer, UINT *buflen)
static void Output_Character (FILE *ofile, char **strbuf, UINT *strlen, char c)
static void Split_The_Current_Output_Line (FILE *ofile, char **strbuf, UINT *strlen)
static void Output_Srcpos_Map (FILE *mapfile, SRCPOS srcpos)
static void Output_Srcpos_Directive (FILE *ofile, char **strbuf, UINT *strlen, SRCPOS srcpos)
static void write_token (FILE *ofile, char **strbuf, UINT *strlen, TOKEN_BUFFER buffer, TOKEN_IDX this_token)
static void write_separator (FILE *ofile, char **strbuf, UINT *strlen, TOKEN_BUFFER buffer, TOKEN_IDX idx1, TOKEN_IDX idx2)
static void write_F77_separator (FILE *ofile, char **strbuf, UINT *strlen, TOKEN_BUFFER buffer, TOKEN_IDX idx1, TOKEN_IDX idx2)
static TOKEN_IDX Skip_Srcpos_Map (FILE *srcpos_map_file, TOKEN_BUFFER buf, TOKEN_IDX token_idx)
static TOKEN_IDX Str_Skip_Srcpos_Map (TOKEN_BUFFER buf, TOKEN_IDX token_idx)
static void Write_Srcpos_File_Map_Table (FILE *srcpos_map_file)
void Initialize_Token_Buffer (FORMAT_KIND output_format, BOOL prompf_srcmap_format)
void Terminate_Token_Buffer (FILE *srcpos_map_file)
void Set_Maximum_Linelength (UINT32 max_linelength)
BOOL HAS_Maximum_Linelength (void)
UINT32 Get_Maximum_Linelength (void)
void Free_Token_Buffer_Memory (void)
TOKEN_BUFFER New_Token_Buffer (void)
void Reclaim_Token_Buffer (TOKEN_BUFFER *tokens)
BOOL Is_Empty_Token_Buffer (TOKEN_BUFFER tokens)
BOOL Identical_Token_Lists (TOKEN_BUFFER tokens1, TOKEN_BUFFER tokens2)
UINT Current_Indentation (void)
void Set_Current_Indentation (UINT indent)
void Set_Indentation_Step (UINT num_spaces)
void Increment_Indentation (void)
void Decrement_Indentation (void)
void Zero_Indentation (void)
void Append_Indented_Newline (TOKEN_BUFFER tokens, UINT num_lines)
void Append_Token_String (TOKEN_BUFFER tokens, const char *string)
void Append_Token_Special (TOKEN_BUFFER tokens, char special)
void Append_And_Copy_Token_List (TOKEN_BUFFER result_tokens, TOKEN_BUFFER copy_tokens)
void Append_And_Reclaim_Token_List (TOKEN_BUFFER result_tokens, TOKEN_BUFFER *reclaim_tokens)
void Prepend_Indented_Newline (TOKEN_BUFFER tokens, UINT num_lines)
void Prepend_Token_String (TOKEN_BUFFER tokens, const char *string)
void Prepend_Token_Special (TOKEN_BUFFER tokens, char special)
void Prepend_And_Copy_Token_List (TOKEN_BUFFER result_tokens, TOKEN_BUFFER copy_tokens)
void Prepend_And_Reclaim_Token_List (TOKEN_BUFFER result_tokens, TOKEN_BUFFER *reclaim_tokens)
void Append_F77_Indented_Newline (TOKEN_BUFFER tokens, UINT num_lines, const char *label)
void Prepend_F77_Indented_Newline (TOKEN_BUFFER tokens, UINT num_lines, const char *label)
void Append_F77_Indented_Continuation (TOKEN_BUFFER tokens)
void Prepend_F77_Indented_Continuation (TOKEN_BUFFER tokens)
void Append_F77_Comment_Newline (TOKEN_BUFFER tokens, UINT num_lines, BOOL indent_last_line)
void Prepend_F77_Comment_Newline (TOKEN_BUFFER tokens, UINT num_lines, BOOL indent_last_line)
void Append_F77_Directive_Newline (TOKEN_BUFFER tokens, const char *directive_prefix)
void Prepend_F77_Directive_Newline (TOKEN_BUFFER tokens, const char *directive_prefix)
void Append_F77_Sequence_No (TOKEN_BUFFER tokens, const char *seq_no)
void Prepend_F77_Sequence_No (TOKEN_BUFFER tokens, const char *seq_no)
void Append_Srcpos_Map (TOKEN_BUFFER tokens, SRCPOS srcpos)
void Append_Srcpos_Directive (TOKEN_BUFFER tokens, SRCPOS srcpos)
void Prepend_Srcpos_Map (TOKEN_BUFFER tokens, SRCPOS srcpos)
void Prepend_Srcpos_Directive (TOKEN_BUFFER tokens, SRCPOS srcpos)
void Write_And_Reclaim_Tokens (FILE *ofile, FILE *srcpos_map_file, TOKEN_BUFFER *tokens)
void Str_Write_And_Reclaim_Tokens (char *strbuf, UINT32 buflen, TOKEN_BUFFER *tokens)
void Write_String (FILE *ofile, FILE *srcpos_map_file, const char *str)

Variables

static TOKEN_BUFFER buffer_free_list = NULL
static char write_buffer [WRITE_BUFFER_SIZE+1]
static INT32 write_buffer_next = 0
static INT32 last_split_pt = INVALID_SPLIT_PT
static UINT32 indentation_increment = 2
static INT32 current_indentation = 0
static INT32 requested_indentation = 0
static UINT32 Max_Line_Length = 0
static FORMAT_KIND Output_Format = FREE_FORMAT
static UINT32 Current_Output_Col = 1
static UINT32 Current_Output_Line = 1
static UINT32 Max_Srcpos_Map_Filenum = 0
static UINT32 Default_Max_Line_Length [NUM_FORMAT_KINDS+1]
static BOOL Inside_F77_Directive = FALSE
static UINT32 Max_Line_Length_Outside_F77_Directive
static char F77_Directive_Continuation [MAX_F77_DIRECTIVE_PREFIX_SIZE+1]
static BOOL Emit_Prompf_Srcpos_Map = FALSE

Define Documentation

Definition at line 379 of file token_buffer.cxx.

Referenced by Output_Character().

#define DBGOUT   stderr /* debugging output file */

Definition at line 288 of file token_buffer.cxx.

Referenced by dbg_tokens().

#define INIT_STRING_BUFFER_SIZE   1024

Definition at line 143 of file token_buffer.cxx.

Referenced by New_Token_Buffer().

#define INIT_TOKEN_BUFFER_SIZE   512

Definition at line 144 of file token_buffer.cxx.

Referenced by New_Token_Buffer().

#define is_begin_grouping (   c)
Value:
(c==LEFT_PAREN    || \
    c==LEFT_BRACKET  || \
    c==LEFT_BRACE)

Definition at line 386 of file token_buffer.cxx.

Referenced by write_separator().

#define is_binary_or_tertiary_op (   c)    W2X_Unparse_Target->Is_Binary_Or_Tertiary_Op(c)

Definition at line 383 of file token_buffer.cxx.

Referenced by write_separator().

#define is_comma_or_semicolon (   c)    (c==COMMA || c==SEMICOLON)

Definition at line 411 of file token_buffer.cxx.

Referenced by write_separator().

#define is_end_grouping (   c)
Value:

Definition at line 391 of file token_buffer.cxx.

Referenced by write_separator().

#define is_unary_op (   c1,
  c2 
)
Value:
((is_binary_or_tertiary_op(c1) || \
     is_begin_grouping(c1)        || \
     is_comma_or_semicolon(c1))     && \
    is_binary_or_tertiary_op(c2)    && \
    c1 != c2                        && \
    c2 != EQUAL                     && \
    !is_end_grouping(c1)            && \
    !(c1==MINUS && c2==LARGER_THAN))   /* Field selection */

Definition at line 400 of file token_buffer.cxx.

Referenced by write_separator().

Definition at line 275 of file token_buffer.cxx.

Referenced by write_token().

#define MAX_INDENTATION   40
#define MAX_INDENTATION_STEP   10

Definition at line 239 of file token_buffer.cxx.

Referenced by Set_Indentation_Step().

#define MAX_STRING_IDX   (STRING_IDX)0x7fffffffU /* max string buffer size */

Definition at line 139 of file token_buffer.cxx.

Referenced by get_new_string().

#define MAX_TOKEN_IDX   (TOKEN_IDX)0x7fffffffU /* max token buffer size */

Definition at line 140 of file token_buffer.cxx.

Referenced by get_new_tokens().

#define NO_STRING_IDX   (STRING_IDX)0xffffffffU /* Invalid string buffer index*/

Definition at line 141 of file token_buffer.cxx.

#define strcpy   DO_NOT_USE_STRCPY

Definition at line 120 of file token_buffer.cxx.

Referenced by _lmessage(), _rnl90to77(), Menu_info::Add(), add_unique_name(), AR_convert_float_to_str(), AR_convert_int_to_str(), ascii_BE_node(), ascii_c_const(), ascii_c_entry(), ascii_c_entry_end(), ascii_c_lint_directive(), ascii_c_macro_def(), ascii_c_object(), ascii_c_opts(), ascii_c_tag(), ascii_cc_entry(), ascii_cc_enum(), ascii_cc_obj(), ascii_cc_type(), ascii_cifhdr(), ascii_comblk(), ascii_const(), ascii_endunit(), ascii_entry(), ascii_f90_comblk(), ascii_f90_const(), ascii_f90_derived_type(), ascii_f90_entry(), ascii_f90_int_block(), ascii_f90_label(), ascii_f90_misc_opts(), ascii_f90_namelist(), ascii_f90_object(), ascii_f90_rename(), ascii_file(), ascii_geometry(), ascii_label(), ascii_mach_char(), ascii_message(), ascii_misc_opts(), ascii_namelist(), ascii_object(), ascii_orig_cmd(), ascii_summary(), ascii_unit(), block_err_string(), Build_Radio_Box(), check_cmic_blk_branches(), check_loop_bottom_nesting(), check_mp_dir_nesting(), check_section_headers(), cif_flush_include_recs(), complete_intrinsic_definition(), Concat2_Strings(), Cray_Woff(), create_mod_info_file(), Create_New_Relocation_Section(), create_temp_file(), cvrt_str_to_cn(), cwh_dst_get_command_line_options(), cwh_stab_adjust_name(), cwh_stab_split_ST(), cwh_types_mk_anon_name(), doall_cmic_semantics(), DRA_EC_Array_Portion_Parms(), DRA_Insert_Mangling_Sigs(), DRA_Make_File_Name(), DRA_Process_Commons(), DRA_Process_Globals(), DST_mk_name(), DST_mk_string(), enter_cmd_line_cc_define(), enter_predefined_macros(), f77_map_datapool_(), f77_map_datapool_pad_(), fei_end_ioblock(), fei_smt_parameter(), fei_start_ioblock(), find_files_in_directory(), find_prog_unit_tbl(), fixed_classify_line(), folder_driver(), free_classify_line(), gen_call_type_descriptor(), gen_loop_lbl_name(), Get_Irb_File_Name(), get_machine_chars(), get_operand_letter(), get_temp_file(), id_str(), init_cif(), init_compiler(), init_debug_file(), init_msg_processing(), init_release_level(), init_src_input(), label_ref_semantics(), load_so(), main(), make_table_changes(), merge_parameter(), mp_directive_semantics(), New_Extension(), ntr_file_in_fp_tbl(), ntr_msg_queue(), ntr_next_msg_queue(), open_arith_file(), open_include_file(), open_intrinsics_file(), parallel_cmic_semantics(), parse_case_stmt(), parse_data_stmt(), parse_deref(), parse_imp_do(), parse_initializer(), parse_open_mp_directives(), parse_openad_directives(), print_Dv_Whole_Def_Opr(), print_mp_dir_opr(), print_open_mp_dir_opr(), print_src_stk_entry(), Process_Command_Line(), Process_Control_Opt(), Process_Feedback_Options(), Process_Filename_Options(), PU_Profile_Handle::PU_Profile_Handle(), put_c_str_in_cn(), put_file_name_in_cn(), Remove_Extension(), resolve_ext_opr(), RiceWhirl2f(), RNL(), Save_Cur_PU_Name(), save_expr(), Save_Str2(), send_attr_ntry(), Menu_info::Set(), Set_Error_Source(), sgi_cmd_line(), ST2C_Get_Common_Block(), strlist(), TI_Initialize(), update_global_line(), ux_basename(), ux_dirname(), vstr_concat(), W2CF_Create_Symbol(), W2CF_Create_Symhdr(), W2CF_Get_Ftn_St_Name(), WHIRL2C_make_valid_c_name(), WHIRL2F_make_valid_name(), ANL_CBUF::Write_Char(), write_output(), and ANL_CBUF::Write_String().

#define TB_FREE (   ptr)    MEM_POOL_FREE(Malloc_Mem_Pool, ptr)

Definition at line 131 of file token_buffer.cxx.

Referenced by free_buffer_list().

#define TB_TYPE_ALLOC_N (   type,
  count 
)    TYPE_MEM_POOL_ALLOC_N(type, Malloc_Mem_Pool, count)

Definition at line 124 of file token_buffer.cxx.

Referenced by New_Token_Buffer().

#define TB_TYPE_REALLOC_N (   type,
  old_ptr,
  old_count,
  new_count 
)
Value:
TYPE_MEM_POOL_REALLOC_N(type, Malloc_Mem_Pool, old_ptr,\
                           old_count, new_count)

Definition at line 127 of file token_buffer.cxx.

Referenced by get_new_string(), and get_new_tokens().

#define TOKEN_BUFFER_get_char_string (   buf,
  a_token 
)
Value:
(TOKEN_is_short_string(a_token)? \
    TOKEN_short_string(a_token) : \
    &buf->strings[TOKEN_string_idx(a_token)])

Definition at line 222 of file token_buffer.cxx.

Referenced by Allocate_Token_String(), dbg_tokens(), Identical_Token_Lists(), and write_token().

#define TOKEN_char (   t)    (t)->value.str_val.string.ch[0]
#define TOKEN_is_short_string (   t)    (TOKEN_string_size(t) <= sizeof(STRING_IDX))

Definition at line 188 of file token_buffer.cxx.

Referenced by Allocate_Token_String(), and copy_token_list().

#define TOKEN_is_string (   t)
Value:
(TOKEN_kind(t) == STRING_TOKEN || \
    TOKEN_kind(t) == SPECIAL_TOKEN || \
    TOKEN_kind(t) == SEPARATOR_TOKEN || \
    TOKEN_kind(t) == DIRECTIVE_TOKEN || \
    TOKEN_kind(t) == F77_SEQNO_TOKEN)

Definition at line 189 of file token_buffer.cxx.

Referenced by copy_token_list().

#define TOKEN_short_string (   t)    (t)->value.str_val.string.ch

Definition at line 184 of file token_buffer.cxx.

Referenced by Allocate_Token_String().

#define TOKEN_srcpos (   t)    (t)->value.srcpos
#define TOKEN_string_idx (   t)    (t)->value.str_val.string.idx

Definition at line 185 of file token_buffer.cxx.

Referenced by Allocate_Token_String(), and copy_token_list().

Definition at line 246 of file token_buffer.cxx.

#define WRITE_BUFFER_SIZE   256

Definition at line 231 of file token_buffer.cxx.

Referenced by Output_Character(), and Split_The_Current_Output_Line().


Typedef Documentation

Definition at line 137 of file token_buffer.cxx.

typedef struct String_Value STRING_VALUE
typedef struct Token TOKEN
typedef mUINT32 TOKEN_IDX

Definition at line 138 of file token_buffer.cxx.

typedef enum Token_Kind TOKEN_KIND
typedef union Token_Value TOKEN_VALUE

Enumeration Type Documentation

enum Token_Kind
Enumerator:
STRING_TOKEN 
SPECIAL_TOKEN 
SEPARATOR_TOKEN 
DIRECTIVE_TOKEN 
F77_SEQNO_TOKEN 
SRCPOS_MAP_TOKEN 
SRCPOS_DIRECTIVE_TOKEN 

Definition at line 146 of file token_buffer.cxx.


Function Documentation

static char* Allocate_Token_String ( TOKEN_BUFFER  buf,
TOKEN a_token,
STRING_IDX  str_size 
) [static]
void Append_And_Copy_Token_List ( TOKEN_BUFFER  result_tokens,
TOKEN_BUFFER  copy_tokens 
)

Definition at line 1645 of file token_buffer.cxx.

References append_token_list(), copy_token_list(), Token_Sequence::first, Is_True, NO_TOKEN_IDX, and NULL.

Referenced by Append_And_Reclaim_Token_List(), and INIT2F_Translate_Array_Ref().

Here is the call graph for this function:

void Append_And_Reclaim_Token_List ( TOKEN_BUFFER  result_tokens,
TOKEN_BUFFER reclaim_tokens 
)

Definition at line 1659 of file token_buffer.cxx.

References Append_And_Copy_Token_List(), and Reclaim_Token_Buffer().

Referenced by Append_A_Clause_Symbol(), Append_Clause_Expressions(), Append_Nest_Clauses(), INIT2F_Append_Initializer(), INIT2F_Implied_DoLoop(), INITO2F_translate(), INITV2C_symoff(), INITV2C_val(), PARAMETER2F_translate(), ST2C_basic_decl(), ST2C_Declare_Tempvar(), ST2C_Define_A_Common_Block(), ST2C_Define_Preg(), ST2C_formal_ref_decl(), ST2C_func_header(), ST2F_decl_parameter(), ST2F_decl_type(), ST2F_decl_var(), ST2F_Declare_Return_Type(), ST2F_Declare_Tempvar(), ST2F_Define_Preg(), ST2F_func_header(), TY2C_prototype_params(), TY2C_Translate_Structure(), TY2F_Declare_Common_Flds(), TY2F_Translate_ArrayElt(), TY2F_Translate_Common(), TY2F_Translate_EquivCommon_PtrFld(), TY2F_Translate_Structure(), WN2C_address_add(), WN2C_append_addr_plus_expr(), WN2C_Append_Assignment(), WN2C_append_cast(), WN2C_Append_Preg(), WN2C_Append_Symtab_Consts(), WN2C_Append_Symtab_Types(), WN2C_Append_Symtab_Vars(), WN2C_array(), WN2C_based_lvalue(), WN2C_block(), WN2C_bnor(), WN2C_call(), WN2C_cvt(), WN2C_cvtl(), WN2C_Declare_Return_Variable(), WN2C_funcall_op(), WN2C_Function_Return_Value(), WN2C_iload(), WN2C_infix_op(), WN2C_intrinsic_op(), WN2C_lda(), WN2C_ldid(), WN2C_Load_From_PregIdx(), WN2C_Load_Return_Reg(), WN2C_madd(), WN2C_mload(), WN2C_msub(), WN2C_nmadd(), WN2C_nmsub(), WN2C_parm(), WN2C_Store_Return_Reg(), WN2C_tas(), WN2C_translate_purple_main(), WN2C_Value_Reference(), WN2F_Append_Block_Data(), WN2F_Append_IO_CtrlList(), WN2F_block(), WN2F_call(), WN2F_cvt(), WN2F_cvtl(), WN2F_Denormalize_Array_Idx(), WN2F_Exit_PU_Block(), WN2F_interface_blk(), WN2F_io(), WN2F_ios_inqlength(), WN2F_istore(), WN2F_Load_Return_Reg(), WN2F_mstore(), WN2F_OLD_Den_Arr_Idx(), WN2F_pstid(), WN2F_pstore(), WN2F_stid(), WN2F_tempvar_rhs(), WN2F_Translate_DoLoop_Bound(), and WN2F_translate_purple_main().

Here is the call graph for this function:

void Append_F77_Comment_Newline ( TOKEN_BUFFER  tokens,
UINT  num_lines,
BOOL  indent_last_line 
)
void Append_F77_Sequence_No ( TOKEN_BUFFER  tokens,
const char *  seq_no 
)

Definition at line 1864 of file token_buffer.cxx.

References append_token_list(), f77_seqno_token(), F77_TAB_FORMAT, Token_Sequence::first, Is_True, Token_Sequence::last, NULL, and Output_Format.

Here is the call graph for this function:

void Append_Srcpos_Directive ( TOKEN_BUFFER  tokens,
SRCPOS  srcpos 
)

Definition at line 1911 of file token_buffer.cxx.

References append_token_list(), Token_Sequence::first, Is_True, Token_Sequence::last, NULL, and Srcpos_Directive_Token().

Referenced by WN2C_Stmt_Newline(), and WN2F_Stmt_Newline().

Here is the call graph for this function:

void Append_Srcpos_Map ( TOKEN_BUFFER  tokens,
SRCPOS  srcpos 
)

Definition at line 1898 of file token_buffer.cxx.

References append_token_list(), Token_Sequence::first, Is_True, Token_Sequence::last, NULL, and Srcpos_Map_Token().

Referenced by WN2C_Stmt_Newline(), WN2F_Directive_Newline(), and WN2F_Stmt_Newline().

Here is the call graph for this function:

void Append_Token_Special ( TOKEN_BUFFER  tokens,
char  special 
)

Definition at line 1632 of file token_buffer.cxx.

References append_token_list(), Token_Sequence::first, Is_True, Token_Sequence::last, NULL, and special_char_token().

Referenced by Append_Arg_Numbers(), Append_Array_Segment(), Append_Clause_Expressions(), Append_Clause_Symbols(), Append_Distribution(), Append_Implicit_Locals(), Append_Nest_Clauses(), Append_Pragma_Clauses(), Append_Prefetch_Attributes(), Append_Reduction_Clause(), Append_Reduction_Operator(), INIT2F_Append_Initializer(), INIT2F_Implied_DoLoop(), INIT2F_Translate_Char_Ref(), INITO2C_translate(), INITO2F_translate(), INITV2C_array_dimension(), INITV2C_block_array(), INITV2C_block_struct(), INITV2C_block_union(), INITV2C_struct_fill(), INITV2C_symoff(), INITV2C_symoff_help(), INITV2C_val(), INITVKIND_val(), PARAMETER2F_translate(), ST2C_decl_const(), ST2C_decl_var(), ST2C_Declare_Tempvar(), ST2C_Define_A_Common_Block(), ST2C_Define_Preg(), ST2C_func_header(), ST2C_Get_Common_Ty2c_List(), ST2C_weakext_translate(), ST2F_decl_parameter(), ST2F_decl_var(), ST2F_func_header(), ST2F_use_var(), TCON2C_translate(), TCON2F_translate(), TY2C_array(), TY2C_function(), TY2C_Output_Struct_Type(), TY2C_prepend_filler_field(), TY2C_prepend_FLD_list(), TY2C_prototype_params(), TY2C_scalar(), TY2C_Translate_Structure(), TY2F_Append_ARB(), TY2F_Append_Assumed_Single_Dim(), TY2F_array(), TY2F_array_for_pointer(), TY2F_Equivalence(), TY2F_Fld_Separator(), TY2F_List_Common_Flds(), TY2F_pointer(), TY2F_Purple_Assumed_Sized_Array(), TY2F_Purple_Ptr_As_Array(), TY2F_Translate_ArrayElt(), TY2F_Translate_EquivCommon_PtrFld(), W2F_Outfile_Translate_Pu(), WHIRL2C_parenthesize(), WHIRL2F_Parenthesize(), WN2C_address_add(), WN2C_alloca(), WN2C_altentry(), WN2C_append_addr_plus_const(), WN2C_append_addr_plus_expr(), WN2C_Append_Assignment(), WN2C_Append_Purple_Funcinfo(), WN2C_Append_Symtab_Consts(), WN2C_Append_Symtab_Types(), WN2C_Append_Symtab_Vars(), WN2C_array(), WN2C_Assign_Complex_Const(), WN2C_based_lvalue(), WN2C_block(), WN2C_bnor(), WN2C_call(), WN2C_Callsite_Directives(), WN2C_comma(), WN2C_compgoto(), WN2C_complex(), WN2C_compose_bits(), WN2C_condbr(), WN2C_const(), WN2C_dealloca(), WN2C_Declare_Return_Parameter(), WN2C_Declare_Return_Variable(), WN2C_do_loop(), WN2C_do_while(), WN2C_extract_bits(), WN2C_func_entry(), WN2C_funcall_op(), WN2C_Function_Call_Lhs(), WN2C_generate_cast(), WN2C_if(), WN2C_imagpart(), WN2C_infix_op(), WN2C_intrinsic_op(), WN2C_label(), WN2C_lda(), WN2C_ldid(), WN2C_Load_Return_Reg(), WN2C_madd(), WN2C_mstore(), WN2C_msub(), WN2C_nmadd(), WN2C_nmsub(), WN2C_Normalize_Idx_To_Onedim(), WN2C_paren(), WN2C_pragma_list_end(), WN2C_prefetch(), WN2C_process_pragma(), WN2C_rcomma(), WN2C_realpart(), WN2C_return_val(), WN2C_select(), WN2C_Store_Return_Reg(), WN2C_switch(), WN2C_Translate_Comma_Sequence(), WN2C_translate_purple_main(), WN2C_Translate_Stmt_Sequence(), WN2C_while_do(), WN2F_Address_Of(), WN2F_alloca(), WN2F_Append_Block_Data(), WN2F_Append_IO_CtrlList(), WN2F_Append_IO_List(), WN2F_Append_Purple_Funcinfo(), WN2F_Append_Purple_Xsym(), WN2F_ar_construct(), WN2F_array(), WN2F_array_bounds(), WN2F_Array_Slots(), WN2F_arrsection(), WN2F_arrsection_bounds(), WN2F_Arrsection_Slots(), WN2F_ashr(), WN2F_Binary_Substr_Op(), WN2F_Block(), WN2F_bnor(), WN2F_call(), WN2F_Callsite_Directives(), WN2F_casegoto(), WN2F_compgoto(), WN2F_complex(), WN2F_condbr(), WN2F_const(), WN2F_Convert(), WN2F_dealloca(), WN2F_Denormalize_Array_Idx(), WN2F_do_loop(), WN2F_do_while(), WN2F_emit_ctrl(), WN2F_Emit_End_Stmt(), WN2F_End_Routine_Strings(), WN2F_eq(), WN2F_eval(), WN2F_Expr_Plus_Literal(), WN2F_Funcall_Op(), WN2F_if(), WN2F_iload(), WN2F_imagpart(), WN2F_implicit_bnd(), WN2F_implied_do(), WN2F_Infix_Op(), WN2F_intconst(), WN2F_interface_blk(), WN2F_Intr_Funcall(), WN2F_Intr_Infix(), WN2F_intrinsic_call(), WN2F_io_control(), WN2F_io_format(), WN2F_io_list(), WN2F_io_unit(), WN2F_ios_accept(), WN2F_ios_decode(), WN2F_ios_definefile(), WN2F_ios_encode(), WN2F_ios_inqlength(), WN2F_ios_namelist(), WN2F_ios_print(), WN2F_ios_read(), WN2F_ios_type(), WN2F_istore(), WN2F_Load_Return_Reg(), WN2F_lshr(), WN2F_madd(), WN2F_mstore(), WN2F_msub(), WN2F_nmadd(), WN2F_nmsub(), WN2F_noio_implied_do(), WN2F_Normalize_Idx_To_Onedim(), WN2F_nullify_stmt(), WN2F_Offset_Memref(), WN2F_Offset_Symref(), WN2F_OLD_Den_Arr_Idx(), WN2F_paren(), WN2F_parm(), WN2F_prefetch(), WN2F_process_pragma(), WN2F_pstid(), WN2F_pstore(), WN2F_realpart(), WN2F_recip(), WN2F_return(), WN2F_rsqrt(), WN2F_select(), WN2F_src_triplet(), WN2F_stid(), WN2F_strctfld(), WN2F_String_Argument(), WN2F_Substring(), WN2F_Translate_DoLoop_Bound(), WN2F_translate_purple_main(), WN2F_Translate_StringLEN(), WN2F_triplet(), WN2F_where(), WN2F_while_do(), Write_Scalar_Typedef(), and Write_Typedef().

Here is the call graph for this function:

void Append_Token_String ( TOKEN_BUFFER  tokens,
const char *  string 
)

Definition at line 1616 of file token_buffer.cxx.

References append_token_list(), Token_Sequence::first, Is_True, Token_Sequence::last, NULL, and string_token().

Referenced by Append_Arg_Numbers(), Append_Cplus_Initialization(), Append_Distribution(), Append_Implicit_Locals(), Append_MP_Schedtype(), Append_Nest_Clauses(), Append_Pragma_Clauses(), Append_Prefetch_Attributes(), Append_Reduction_Clause(), Append_Reduction_Operator(), Append_ST_String(), Emit_To_PUinfo_Pragmas(), INIT2F_Implied_DoLoop(), INIT2F_Translate_Char_Ref(), INITO2F_translate(), INITV2C_block_array(), INITV2C_block_struct(), INITV2C_struct_fill(), INITV2C_symoff(), INITVKIND_const(), PARAMETER2F_translate(), ST2C_basic_decl(), ST2C_Declare_Tempvar(), ST2C_Define_Preg(), ST2C_formal_ref_decl(), ST2C_func_header(), ST2C_Get_Common_Ty2c_List(), ST2C_use_const(), ST2C_use_func(), ST2C_Use_Preg(), ST2C_use_var(), ST2C_weakext_translate(), ST2F_decl_func(), ST2F_decl_parameter(), ST2F_decl_var(), ST2F_Declare_Return_Type(), ST2F_Declare_Tempvar(), ST2F_Define_Preg(), ST2F_deref_translate(), ST2F_func_header(), ST2F_output_keyword(), ST2F_use_block(), ST2F_use_func(), ST2F_Use_Preg(), ST2F_use_var(), TCON2C_Append_String_Const(), TCON2C_translate(), TCON2F_Append_String_Const(), TCON2F_hollerith(), TCON2F_translate(), TY2C_function(), TY2C_get_field_info(), TY2C_prepend_filler_field(), TY2C_prepend_FLD_list(), TY2C_prototype_params(), TY2C_Translate_Structure(), TY2F_Append_Array_Bnd_Ph(), TY2F_Append_Assumed_Single_Dim(), TY2F_Declare_Common_Flds(), TY2F_Equivalence(), TY2F_List_Common_Flds(), TY2F_Purple_Assumed_Sized_Array(), TY2F_Purple_Ptr_As_Array(), TY2F_Translate_ArrayElt(), TY2F_Translate_Common(), TY2F_Translate_EquivCommon_PtrFld(), TY2F_Translate_Fld_Path(), TY2F_Translate_Structure(), WHIRL2F_Append_Comment(), WN2C_alloca(), WN2C_altentry(), WN2C_Append_Assignment(), WN2C_append_label_name(), WN2C_Append_Pragma_Newline(), WN2C_Append_Purple_Funcinfo(), WN2C_Assign_Complex_Const(), WN2C_based_lvalue(), WN2C_block(), WN2C_call(), WN2C_Callsite_Directives(), WN2C_comment(), WN2C_compgoto(), WN2C_complex(), WN2C_compose_bits(), WN2C_condbr(), WN2C_const(), WN2C_dealloca(), WN2C_Declare_Return_Parameter(), WN2C_Declare_Return_Variable(), WN2C_do_loop(), WN2C_do_while(), WN2C_End_Prompf_Construct(), WN2C_exc_scope_begin(), WN2C_exc_scope_end(), WN2C_extract_bits(), WN2C_func_entry(), WN2C_funcall_op(), WN2C_Function_Call_Lhs(), WN2C_Function_Return_Value(), WN2C_goto(), WN2C_if(), WN2C_iload(), WN2C_imagpart(), WN2C_intrinsic_op(), WN2C_lda(), WN2C_ldid(), WN2C_Load_Return_Reg(), WN2C_lvalue_st(), WN2C_mload(), WN2C_mstore(), WN2C_Normalize_Idx_To_Onedim(), WN2C_pragma(), WN2C_prefetch(), WN2C_Prefetch_Map(), WN2C_process_pragma(), WN2C_Prompf_Construct_End(), WN2C_Prompf_Construct_Start(), WN2C_rcomma(), WN2C_realpart(), WN2C_region(), WN2C_return(), WN2C_return_val(), WN2C_Start_Prompf_Construct(), WN2C_Store_Return_Reg(), WN2C_switch(), WN2C_translate_purple_main(), WN2C_Translate_Stmt_Sequence(), WN2C_unsupported(), WN2C_while_do(), WN2F_agoto(), WN2F_alloca(), WN2F_Append_Block_Data(), WN2F_Append_Pragma_Preamble(), WN2F_Append_Prefetch_Map(), WN2F_Append_Purple_Funcinfo(), WN2F_Append_Purple_Xsym(), WN2F_array(), WN2F_array_bounds(), WN2F_arrsection(), WN2F_arrsection_bounds(), WN2F_ashr(), WN2F_Begin_Prompf_Transformed_Func(), WN2F_Binary_Substr_Op(), WN2F_block(), WN2F_Block(), WN2F_bnor(), WN2F_call(), WN2F_Callsite_Directives(), WN2F_casegoto(), WN2F_compgoto(), WN2F_complex(), WN2F_condbr(), WN2F_dealloca(), WN2F_do_loop(), WN2F_do_while(), WN2F_emit_ctrl(), WN2F_Emit_End_Stmt(), WN2F_End_Prompf_Construct(), WN2F_End_Prompf_Transformed_Func(), WN2F_End_Routine_Strings(), WN2F_eq(), WN2F_eval(), WN2F_Exit_PU_Block(), WN2F_Funcall_Op(), WN2F_Function_Call_Lhs(), WN2F_goto(), WN2F_idname(), WN2F_if(), WN2F_iload(), WN2F_iloadx(), WN2F_imagpart(), WN2F_Infix_Op(), WN2F_interface_blk(), WN2F_Intr_Funcall(), WN2F_Intr_Infix(), WN2F_intrinsic_call(), WN2F_io(), WN2F_io_control(), WN2F_io_format(), WN2F_io_list(), WN2F_io_unit(), WN2F_ios_accept(), WN2F_ios_backspace(), WN2F_ios_close(), WN2F_ios_cr(), WN2F_ios_decode(), WN2F_ios_definefile(), WN2F_ios_delete(), WN2F_ios_encode(), WN2F_ios_endfile(), WN2F_ios_find(), WN2F_ios_inqlength(), WN2F_ios_inquire(), WN2F_ios_namelist(), WN2F_ios_open(), WN2F_ios_print(), WN2F_ios_read(), WN2F_ios_rewind(), WN2F_ios_rewrite(), WN2F_ios_type(), WN2F_ios_unlock(), WN2F_ios_write(), WN2F_istorex(), WN2F_label(), WN2F_ldid(), WN2F_Load_Return_Reg(), WN2F_lshr(), WN2F_mload(), WN2F_namelist_stmt(), WN2F_nullify_stmt(), WN2F_Offset_Memref(), WN2F_Offset_Symref(), WN2F_pragma(), WN2F_pragma_list_end(), WN2F_prefetch(), WN2F_process_pragma(), WN2F_Prompf_Construct_End(), WN2F_Prompf_Construct_Start(), WN2F_pstid(), WN2F_pstore(), WN2F_realpart(), WN2F_recip(), WN2F_return(), WN2F_return_val(), WN2F_rsqrt(), WN2F_select(), WN2F_Start_Prompf_Construct(), WN2F_stid(), WN2F_strctfld(), WN2F_String_Argument(), WN2F_Translate_DoLoop_Bound(), WN2F_translate_purple_main(), WN2F_Translate_StringLEN(), WN2F_unsupported(), WN2F_where(), WN2F_while_do(), Write_Scalar_Typedef(), and Write_Typedef().

Here is the call graph for this function:

static TOKEN_IDX F77_comment_line_token ( TOKEN_BUFFER  buffer,
UINT  num_lines,
const char *  comment_prefix,
BOOL  indent_last_line 
) [static]
static TOKEN_IDX F77_directive_line_token ( TOKEN_BUFFER  buffer,
const char *  directive_prefix 
) [static]
static TOKEN_IDX f77_seqno_token ( TOKEN_BUFFER  buffer,
const char *  seqno 
) [static]

Definition at line 714 of file token_buffer.cxx.

References F77_SEQNO_TOKEN, idx, string_token(), TOKEN_kind, and Token_Buffer::tokens.

Referenced by Append_F77_Sequence_No(), and Prepend_F77_Sequence_No().

Here is the call graph for this function:

static void flush_write_buffer ( FILE *  ofile,
char **  buffer,
UINT buflen 
) [static]

Definition at line 878 of file token_buffer.cxx.

References INVALID_SPLIT_PT, last_split_pt, NULL, write_buffer, write_buffer_next, and write_into_string_buf().

Referenced by Output_Character(), Str_Write_And_Reclaim_Tokens(), and Write_And_Reclaim_Tokens().

Here is the call graph for this function:

static void free_buffer_list ( TOKEN_BUFFER  free_list) [static]
void Free_Token_Buffer_Memory ( void  )

Definition at line 1427 of file token_buffer.cxx.

References free_buffer_list().

Here is the call graph for this function:

Definition at line 1420 of file token_buffer.cxx.

References Max_Line_Length.

Referenced by TCON2C_translate(), and TCON2F_translate().

Definition at line 1413 of file token_buffer.cxx.

References Max_Line_Length.

Definition at line 1434 of file token_buffer.cxx.

References buffer_free_list, Token_Buffer::chars_allocated, Token_Buffer::chars_used, Token_Sequence::first, INIT_STRING_BUFFER_SIZE, INIT_TOKEN_BUFFER_SIZE, Token_Sequence::last, Token_Buffer::next, NO_TOKEN_IDX, NULL, Token_Buffer::strings, TB_TYPE_ALLOC_N, Token_Buffer::token_list, Token_Buffer::tokens, Token_Buffer::tokens_allocated, and Token_Buffer::tokens_used.

Referenced by Append_A_Clause_Symbol(), Append_Clause_Expressions(), Append_Nest_Clauses(), Emit_To_PUinfo_Pragmas(), INIT2F_Implied_DoLoop(), INIT2F_ptr_or_scalar(), INIT2F_substring(), INIT2F_Translate_Array_Ref(), INITO2F_translate(), INITV2C_symoff(), INITV2C_val(), INITVKIND_const(), INITVKIND_symoff(), INITVKIND_val(), write_st::operator()(), PARAMETER2F_translate(), PUinfo_init_pu(), ST2C_basic_decl(), ST2C_Declare_Tempvar(), ST2C_Define_A_Common_Block(), ST2C_Define_Preg(), ST2C_formal_ref_decl(), ST2C_func_header(), ST2C_Get_Common_Ty2c_List(), ST2F_decl_parameter(), ST2F_decl_type(), ST2F_decl_var(), ST2F_Declare_Return_Type(), ST2F_Declare_Tempvar(), ST2F_Define_Preg(), ST2F_func_header(), TY2C_get_field_info(), TY2C_Output_Struct_Type(), TY2C_prepend_filler_field(), TY2C_prepend_FLD_list(), TY2C_prototype_params(), TY2C_Translate_Structure(), TY2F_Declare_Common_Flds(), TY2F_Purple_Assumed_Sized_Array(), TY2F_Purple_Ptr_As_Array(), TY2F_Translate_ArrayElt(), TY2F_Translate_Common(), TY2F_Translate_EquivCommon_PtrFld(), TY2F_Translate_Structure(), W2C_def_TY(), W2C_Outfile_Fini(), W2C_Outfile_Translate_Pu(), W2C_Translate_Istore_Lhs(), W2C_Translate_Purple_Main(), W2C_Translate_Stid_Lhs(), W2C_Translate_Wn(), W2C_Translate_Wn_Str(), W2F_def_ST(), W2F_Outfile_Fini(), W2F_Outfile_Translate_Pu(), W2F_Translate_Istore_Lhs(), W2F_Translate_Purple_Main(), W2F_Translate_Stid_Lhs(), W2F_Translate_Wn(), W2F_Translate_Wn_Str(), WN2C_Append_Assignment(), WN2C_Append_Preg(), WN2C_Append_Symtab_Consts(), WN2C_Append_Symtab_Types(), WN2C_Append_Symtab_Vars(), WN2C_array(), WN2C_block(), WN2C_call(), WN2C_cvt(), WN2C_cvtl(), WN2C_Declare_Return_Variable(), WN2C_Function_Call_Lhs(), WN2C_Function_Return_Value(), WN2C_generate_cast(), WN2C_iload(), WN2C_intrinsic_op(), WN2C_istore(), WN2C_istorex(), WN2C_lda(), WN2C_ldid(), WN2C_Load_From_PregIdx(), WN2C_Load_Return_Reg(), WN2C_mload(), WN2C_mstore(), WN2C_parm(), WN2C_stid(), WN2C_Store_Return_Reg(), WN2C_tas(), WN2C_Translate_Arithmetic_Operand(), WN2C_translate_purple_main(), WN2C_Value_Reference(), WN2F_Append_Block_Data(), WN2F_Append_IO_CtrlList(), WN2F_Append_Symtab_Consts(), WN2F_block(), WN2F_call(), WN2F_cvt(), WN2F_cvtl(), WN2F_Denormalize_Array_Idx(), WN2F_Enter_PU_Block(), WN2F_Exit_PU_Block(), WN2F_Function_Call_Lhs(), WN2F_interface_blk(), WN2F_io(), WN2F_io_control(), WN2F_ios_inqlength(), WN2F_istore(), WN2F_Load_Return_Reg(), WN2F_mstore(), WN2F_OLD_Den_Arr_Idx(), WN2F_Prepend_Value_Reference(), WN2F_pstid(), WN2F_pstore(), WN2F_stid(), WN2F_tempvar_rhs(), WN2F_Translate_DoLoop_Bound(), WN2F_translate_purple_main(), Write_Scalar_Typedef(), and Write_Typedef().

static void Output_Srcpos_Directive ( FILE *  ofile,
char **  strbuf,
UINT strlen,
SRCPOS  srcpos 
) [static]

Definition at line 1076 of file token_buffer.cxx.

References IR_Srcpos_Filename(), NULL, Output_Character(), USRCPOS_linenum, and USRCPOS_srcpos.

Referenced by write_token().

Here is the call graph for this function:

static void Output_Srcpos_Map ( FILE *  mapfile,
SRCPOS  srcpos 
) [static]
void Prepend_And_Copy_Token_List ( TOKEN_BUFFER  result_tokens,
TOKEN_BUFFER  copy_tokens 
)

Definition at line 1710 of file token_buffer.cxx.

References copy_token_list(), Token_Sequence::first, Is_True, NO_TOKEN_IDX, NULL, and prepend_token_list().

Referenced by INIT2F_Prepend_Equivalence(), and Prepend_And_Reclaim_Token_List().

Here is the call graph for this function:

void Prepend_F77_Comment_Newline ( TOKEN_BUFFER  tokens,
UINT  num_lines,
BOOL  indent_last_line 
)

Definition at line 1814 of file token_buffer.cxx.

References F77_ANSI_FORMAT, F77_comment_line_token(), F77_TAB_FORMAT, Token_Sequence::first, Is_True, Token_Sequence::last, NULL, Output_Format, and prepend_token_list().

Here is the call graph for this function:

void Prepend_F77_Directive_Newline ( TOKEN_BUFFER  tokens,
const char *  directive_prefix 
)
void Prepend_F77_Indented_Newline ( TOKEN_BUFFER  tokens,
UINT  num_lines,
const char *  label 
)
void Prepend_F77_Sequence_No ( TOKEN_BUFFER  tokens,
const char *  seq_no 
)

Definition at line 1881 of file token_buffer.cxx.

References f77_seqno_token(), F77_TAB_FORMAT, Token_Sequence::first, Is_True, Token_Sequence::last, NULL, Output_Format, and prepend_token_list().

Here is the call graph for this function:

void Prepend_Srcpos_Directive ( TOKEN_BUFFER  tokens,
SRCPOS  srcpos 
)

Definition at line 1937 of file token_buffer.cxx.

References Token_Sequence::first, Is_True, Token_Sequence::last, NULL, prepend_token_list(), and Srcpos_Directive_Token().

Here is the call graph for this function:

void Prepend_Srcpos_Map ( TOKEN_BUFFER  tokens,
SRCPOS  srcpos 
)

Definition at line 1924 of file token_buffer.cxx.

References Token_Sequence::first, Is_True, Token_Sequence::last, NULL, prepend_token_list(), and Srcpos_Map_Token().

Here is the call graph for this function:

void Set_Indentation_Step ( UINT  num_spaces)

Definition at line 1561 of file token_buffer.cxx.

References indentation_increment, and MAX_INDENTATION_STEP.

void Set_Maximum_Linelength ( UINT32  max_linelength)

Definition at line 1403 of file token_buffer.cxx.

References Default_Max_Line_Length, Max_Line_Length, and Output_Format.

Referenced by W2C_Init(), and W2F_Init().

static TOKEN_IDX Skip_Srcpos_Map ( FILE *  srcpos_map_file,
TOKEN_BUFFER  buf,
TOKEN_IDX  token_idx 
) [static]

Definition at line 1290 of file token_buffer.cxx.

References NO_TOKEN_IDX, NULL, SRCPOS_MAP_TOKEN, TOKEN_kind, TOKEN_next, Token_Buffer::tokens, and write_token().

Referenced by Write_And_Reclaim_Tokens().

Here is the call graph for this function:

static TOKEN_IDX special_char_token ( TOKEN_BUFFER  buffer,
char  special 
) [static]

Definition at line 723 of file token_buffer.cxx.

References get_new_tokens(), NO_TOKEN_IDX, SPECIAL_TOKEN, TOKEN_char, TOKEN_kind, TOKEN_next, TOKEN_string_size, and Token_Buffer::tokens.

Referenced by Append_Token_Special(), and Prepend_Token_Special().

Here is the call graph for this function:

static void Split_The_Current_Output_Line ( FILE *  ofile,
char **  strbuf,
UINT strlen 
) [static]
static TOKEN_IDX Srcpos_Directive_Token ( TOKEN_BUFFER  buffer,
SRCPOS  srcpos 
) [static]

Definition at line 754 of file token_buffer.cxx.

References get_new_tokens(), NO_TOKEN_IDX, SRCPOS_DIRECTIVE_TOKEN, TOKEN_kind, TOKEN_next, TOKEN_srcpos, and Token_Buffer::tokens.

Referenced by Append_Srcpos_Directive(), and Prepend_Srcpos_Directive().

Here is the call graph for this function:

static TOKEN_IDX Srcpos_Map_Token ( TOKEN_BUFFER  buffer,
SRCPOS  srcpos 
) [static]

Definition at line 739 of file token_buffer.cxx.

References get_new_tokens(), NO_TOKEN_IDX, SRCPOS_MAP_TOKEN, TOKEN_kind, TOKEN_next, TOKEN_srcpos, and Token_Buffer::tokens.

Referenced by Append_Srcpos_Map(), and Prepend_Srcpos_Map().

Here is the call graph for this function:

static TOKEN_IDX Str_Skip_Srcpos_Map ( TOKEN_BUFFER  buf,
TOKEN_IDX  token_idx 
) [static]
static TOKEN_IDX string_token ( TOKEN_BUFFER  buffer,
const char *  string 
) [static]
void Terminate_Token_Buffer ( FILE *  srcpos_map_file)

Definition at line 1390 of file token_buffer.cxx.

References free_buffer_list(), Max_Srcpos_Map_Filenum, and Write_Srcpos_File_Map_Table().

Referenced by End_Locations_File(), W2C_Fini(), and W2F_Fini().

Here is the call graph for this function:

static void write_F77_separator ( FILE *  ofile,
char **  strbuf,
UINT strlen,
TOKEN_BUFFER  buffer,
TOKEN_IDX  idx1,
TOKEN_IDX  idx2 
) [static]

Definition at line 1275 of file token_buffer.cxx.

References write_separator().

Referenced by Str_Write_And_Reclaim_Tokens(), and Write_And_Reclaim_Tokens().

Here is the call graph for this function:

static void write_into_string_buf ( const char *  from,
UINT  from_size,
char **  into,
UINT into_size 
) [static]

Definition at line 852 of file token_buffer.cxx.

References fprintf().

Referenced by flush_write_buffer().

Here is the call graph for this function:

static void Write_Srcpos_File_Map_Table ( FILE *  srcpos_map_file) [static]

Definition at line 1327 of file token_buffer.cxx.

References Emit_Prompf_Srcpos_Map, fprintf(), IR_Srcpos_Filename(), Is_True, Max_Srcpos_Map_Filenum, NULL, USRCPOS_filenum, and USRCPOS_srcpos.

Referenced by Terminate_Token_Buffer().

Here is the call graph for this function:

void Write_String ( FILE *  ofile,
FILE *  srcpos_map_file,
const char *  str 
)
void Zero_Indentation ( void  )

Definition at line 1596 of file token_buffer.cxx.

References current_indentation, and requested_indentation.


Variable Documentation

Definition at line 228 of file token_buffer.cxx.

Referenced by New_Token_Buffer(), and Reclaim_Token_Buffer().

Initial value:
{
   0,  
   0,  
   72  
}

Definition at line 265 of file token_buffer.cxx.

Referenced by Initialize_Token_Buffer(), and Set_Maximum_Linelength().

Definition at line 277 of file token_buffer.cxx.

Referenced by Output_Character(), and write_token().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines