PIPS
|
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
#include "genC.h"
#include "linear.h"
#include "misc.h"
#include "properties.h"
#include "ri.h"
#include "text-util.h"
Go to the source code of this file.
Functions | |
language | get_prettyprint_language () |
please avoid using this function directly, use predicate instead (see below) More... | |
enum language_utype | get_prettyprint_language_tag () |
bool | prettyprint_language_is_fortran_p () |
bool | prettyprint_language_is_fortran95_p () |
bool | prettyprint_language_is_c_p () |
void | set_prettyprint_language_from_property (enum language_utype native) |
set the prettyprint language according to the property PRETTYPRINT_LANGUAGE @description If the property PRETTYPRINT_LANGUAGE is set to the special value "native" then the language passed in arg is used, usually it's the module native language. More... | |
void | set_prettyprint_language (language lang) |
set the prettyprint language from a newgen language object More... | |
void | set_prettyprint_language_tag (enum language_utype lang) |
set the prettyprint language from a language_utype argument More... | |
string | get_C_label_printf_format (const char *label) |
Get the prettyprint format of a C label. More... | |
Variables | |
static language | prettyprint_language = language_undefined |
==================== Language management =========== More... | |
string get_C_label_printf_format | ( | const char * | label | ) |
Get the prettyprint format of a C label.
label | a string to render |
If the label begin with a digit, prefix it with a 'l' to be C compatible.
Hmmm, this does not verify that there is no such label in the program already... :-( Should be solved quite earlier anyway...
label | abel |
Definition at line 155 of file language.c.
Referenced by print_sentence().
language get_prettyprint_language | ( | void | ) |
please avoid using this function directly, use predicate instead (see below)
Definition at line 57 of file language.c.
References language_undefined, make_language_fortran(), and prettyprint_language.
Referenced by add_loop_parallel_threshold(), and merge_on_outer().
enum language_utype get_prettyprint_language_tag | ( | void | ) |
Definition at line 57 of file language.c.
Referenced by effect_words_reference(), ensure_comment_consistency(), generate_alternate_return_targets(), get_comment_continuation(), get_comment_sentinel(), loop_annotate(), loop_private_variables(), loop_test(), mark_block(), pragma_to_string(), prettyprint_language_is_c_p(), prettyprint_language_is_fortran95_p(), prettyprint_language_is_fortran_p(), print_code_or_source(), print_parallelized_code_common(), print_sentence(), sentence_head(), sentence_tail(), store_sc_text_line(), text_block_else(), text_block_elseif(), text_block_if(), text_block_ifthen(), text_directive(), text_instruction(), text_io_block_if(), text_logical_if(), text_loop_default(), text_omp_directive(), text_test(), text_trail(), text_whileloop(), this_entity_cdeclaration(), whileloop_test(), words_any_reference(), words_assign_op(), words_basic(), words_declaration(), words_dimension(), words_dimensions(), words_goto_label(), words_io_inst(), words_loop_list(), words_nullary_op(), words_parameters(), words_range(), words_regular_call(), words_subscript_range(), and words_test_list().
bool prettyprint_language_is_c_p | ( | void | ) |
Definition at line 91 of file language.c.
References get_prettyprint_language_tag(), and is_language_c.
Referenced by compilation_unit_text(), renamed_op_handling(), sentence_head(), text_block_elseif(), text_block_ifthen(), text_whileloop(), words_infix_binary_op(), words_io_inst(), words_prefix_unary_op(), and words_regular_call().
bool prettyprint_language_is_fortran95_p | ( | void | ) |
Definition at line 83 of file language.c.
References get_prettyprint_language_tag(), and is_language_fortran95.
Referenced by f77_f95_style_management(), text_entity_declaration(), and words_infix_binary_op().
bool prettyprint_language_is_fortran_p | ( | void | ) |
Definition at line 75 of file language.c.
References get_prettyprint_language_tag(), and is_language_fortran.
Referenced by close_pragma(), create_module_with_statement(), ensure_comment_consistency(), get_prettyprint_indentation(), marged(), omp_operator_entity(), omp_operator_str(), pragma_to_string(), print_sentence(), reductions_get_omp_pragma_str(), and text_instruction().
void set_prettyprint_language | ( | language | lang | ) |
set the prettyprint language from a newgen language object
lang,the | language to be used to set the prettyprint_language variable, content is copied so caller may free if it was malloced |
lang | ang |
Definition at line 130 of file language.c.
References language_undefined, make_language_fortran(), and prettyprint_language.
void set_prettyprint_language_from_property | ( | enum language_utype | native | ) |
set the prettyprint language according to the property PRETTYPRINT_LANGUAGE @description If the property PRETTYPRINT_LANGUAGE is set to the special value "native" then the language passed in arg is used, usually it's the module native language.
The user can set "F77", "F95", or "C" to force the prettyprint of a language.
native | ative |
Definition at line 103 of file language.c.
References get_string_property(), is_language_c, is_language_fortran, is_language_fortran95, language_tag, language_undefined, make_language_fortran(), pips_internal_error, and prettyprint_language.
Referenced by controlizer(), ensure_comment_consistency(), new_controlizer(), omp_loop_parallel_threshold_set(), omp_merge_pragma(), print_code_or_source(), and static_controlize().
void set_prettyprint_language_tag | ( | enum language_utype | lang | ) |
set the prettyprint language from a language_utype argument
lang,the | language to be used to set the prettyprint_language variable |
lang | ang |
Definition at line 143 of file language.c.
References language_tag, language_undefined, make_language_fortran(), and prettyprint_language.
Referenced by actual_c_parser(), actual_symbol_table_dump(), add_new_module_from_text(), MakeCaseStatement(), missing_file_initializer(), and this_entity_cdeclaration().
|
static |
==================== Language management ===========
The prettyprint language
Definition at line 51 of file language.c.
Referenced by get_prettyprint_language(), set_prettyprint_language(), set_prettyprint_language_from_property(), and set_prettyprint_language_tag().