NAPA Compiler V4.50
Author: Yves Leduc, yves.leduc.be@gmail.com
|
Go to the source code of this file.
Macros | |
#define | EXTERN extern |
Functions | |
char * | build_name (const char *sgn, char *tok, long lr_type) |
void | build_pathname (const char *brc, char *tok, const char *path, const unsigned long *mlin, const unsigned long *mfil) |
void | resolve_pathnames (char *lin, long depth) |
void | extract_directory (char *pn, char *fn, long depth) |
void | clean_parentheses (char *tok) |
void | process_cell_line (char *buf, long d, const unsigned long *mlin, const unsigned long *mfil) |
void | expand_indirections (char *str) |
void | expand_iterative_identifiers (char *str, unsigned long *mlin, const unsigned long *mfil) |
char * | expand_nodeset (char *str, long n, long w, const unsigned long *mlin, const unsigned long *mfil) |
char * | get_function_identifier (char *str, char *fun_id, char *fun_parm) |
char * | get_output_and_scaling (char *str, char *sgn, char *out, char *scl) |
char * | extract_prefix (char *nam) |
char * | get_token_between_braces (char *str, char *brc, char *tok) |
char * | get_sign_and_token (char *str, char *sgn, char *tok) |
char * | get_token (char *str, char *tok, long keep_quotes) |
int | is_an_identifier (const char *tok) |
int | is_an_extended_identifier (const char *tok) |
int | is_a_string (char *str) |
int | is_an_integer_number (const char *str) |
void | clean_line (char *str) |
void | restore_line (char *lin) |
char * | compact_line (char *str1, char *str2) |
char * | extract_line (char *str1, char *str2) |
void | drop_filename (char *pnam) |
void | drop_pathname (char *pnam) |
void | simplify_pathname (char *pnam) |
void | strip_extension (char *fnam) |
void | strip_quotes (char *str) |
void | replace_parentheses (char *str) |
void | replace_dollar (char *tok) |
char * | format_suffixed_number (double value, long places, const char *unit) |
char * | unique_name (void) |
char * | upper_to_lower (char *s) |
char * | replace_char (char *s, char b, char a) |
char * | multiple (char c, long n) |
int | cistrcmp (const char *a, const char *b) |
int | fnstrcmp (char const *a, char const *b) |
int | f1flush (FILE *fp) |
char * build_name | ( | const char * | sgn, |
char * | tok, | ||
long | lr_type ) |
Definition at line 69 of file tk.c.
References ANALOG_DATA_TYPE, array_id(), Array_List, DIGITAL_DATA_TYPE, get_type(), HEX_DATA_TYPE, ISNOTEMPTY, LENGTH, LINLENGTH, node_id(), Node_List, print_error_banner_and_exit(), print_error_location(), print_limits(), record_id(), Record_List, RIGHT_VALUE, STDERR, STRING_DATA_TYPE, STRLENGTH, UNDEFINED, var_id(), and Var_List.
Referenced by build_condition(), build_input(), build_main_loop_conditions(), build_main_loop_inject(), build_main_loop_time(), build_output(), build_update(), call_postprocess_functions(), call_user_functions(), close_IO_files(), collect_export_definitions(), collect_string_of_options(), declare_a_digital_node(), declare_an_analog_node(), declare_arrays(), declare_records(), declare_vars(), define_directives(), dump_function(), open_IO_files(), open_ping_file(), prepare_tool_synchronization(), print_adc(), print_algebra(), print_alu(), print_average(), print_bshift(), print_btoi(), print_buf(), print_bwinv(), print_change(), print_check_arrays(), print_clip(), print_clock(), print_comp(), print_copy(), print_dac(), print_dc(), print_delay(), print_delay1(), print_delay2(), print_delay3(), print_differentiator(), print_dtoi(), print_dyadic0(), print_dyadic1(), print_dyadic2(), print_dyadic3(), print_dyadic4(), print_dyadic5(), print_dyadic6(), print_dyadic7(), print_equal(), print_fzbuf(), print_fzinv(), print_gain(), print_holdtrack(), print_integrator(), print_inv(), print_itob(), print_itod(), print_latch(), print_merge(), print_minmax(), print_muller(), print_mux(), print_node_width_postprocessing(), print_noise(), print_offset(), print_osc(), print_poly(), print_quant(), print_ram(), print_rect(), print_relay(), print_rip(), print_rlshift(), print_rom(), print_rshift1(), print_rshift2(), print_sign(), print_sincos(), print_square(), print_step(), print_terminate_condition(), print_test(), print_toggle(), print_triangle(), print_trig(), print_uadc(), print_udac(), print_usertool(), print_var_width_postprocessing(), print_wsum(), print_zero(), reset_a_command_line_parameter(), reset_a_dc_node(), reset_a_digital_node(), reset_an_analog_node(), reset_arrays_function(), reset_records_function(), and reset_user_variables().
void build_pathname | ( | const char * | brc, |
char * | tok, | ||
const char * | path, | ||
const unsigned long * | mlin, | ||
const unsigned long * | mfil ) |
Definition at line 230 of file tk.c.
References LENGTH, LINLENGTH, print_error_banner_and_exit(), print_error_location(), and STDERR.
Referenced by get_data(), get_header(), get_void(), process_cell(), and process_gen().
int cistrcmp | ( | const char * | a, |
const char * | b ) |
void clean_line | ( | char * | str | ) |
Definition at line 1397 of file tk.c.
Referenced by expand_records(), expand_update_definitions(), get_a_line(), rearrange_data_interfaces(), and reset_user_variables().
void clean_parentheses | ( | char * | tok | ) |
Definition at line 403 of file tk.c.
References clean_parentheses(), and LINLENGTH.
Referenced by build_condition(), build_main_loop_inject(), clean_parentheses(), get_assert(), get_declare(), get_drop(), get_dump(), get_init(), get_inject(), get_opcode(), get_sampling(), get_stuck(), get_terminate(), get_update(), get_var(), redefine_nodes(), reset_a_dc_node(), and stuck_nodes().
char * compact_line | ( | char * | str1, |
char * | str2 ) |
Definition at line 1468 of file tk.c.
Referenced by is_a_string(), and process_gen().
void drop_filename | ( | char * | pnam | ) |
void drop_pathname | ( | char * | pnam | ) |
Definition at line 1526 of file tk.c.
References LENGTH.
Referenced by define_macros(), extract_directory(), get_header(), line_parsing(), print_C_code_banner_b(), and process_command_line().
void expand_indirections | ( | char * | str | ) |
Definition at line 717 of file tk.c.
References ANALOG_DATA_TYPE, constant_type(), directive_id(), Directive_List, format_suffixed_number(), get_type(), ISNOTEMPTY, LINLENGTH, Periodic_Flag, Sampling_List, Seed_List, STRLENGTH, UNDEFINED, var_id(), and Var_List.
Referenced by expand_string_variables(), line_parsing(), and reset_user_variables().
void expand_iterative_identifiers | ( | char * | str, |
unsigned long * | mlin, | ||
const unsigned long * | mfil ) |
Definition at line 796 of file tk.c.
References ISEMPTY, LINLENGTH, print_error_banner_and_exit(), print_error_location(), STDERR, and STRLENGTH.
Referenced by get_a_line().
char * expand_nodeset | ( | char * | str, |
long | n, | ||
long | w, | ||
const unsigned long * | mlin, | ||
const unsigned long * | mfil ) |
Definition at line 969 of file tk.c.
References ISEMPTY, LINLENGTH, print_error_banner_and_exit(), print_error_location(), STDERR, and STRLENGTH.
Referenced by get_node().
void extract_directory | ( | char * | pn, |
char * | fn, | ||
long | depth ) |
Definition at line 339 of file tk.c.
References Cur_Lib_Name, drop_pathname(), LENGTH, LINLENGTH, and STDERR.
Referenced by get_data(), get_header(), get_void(), process_cell(), process_gen(), and resolve_pathnames().
char * extract_line | ( | char * | str1, |
char * | str2 ) |
Definition at line 1487 of file tk.c.
Referenced by command_line_usage_function(), print_C_code_banner_a(), and print_output_banner_4().
char * extract_prefix | ( | char * | nam | ) |
Definition at line 1086 of file tk.c.
References LENGTH.
int f1flush | ( | FILE * | fp | ) |
Definition at line 1843 of file tk.c.
References print_error_banner_and_exit(), print_error_location(), and STDERR.
Referenced by get_data(), last_message(), print_location(), process_cell(), process_error_if_any(), process_gen(), that_s_all(), and wall_clock().
int fnstrcmp | ( | char const * | a, |
char const * | b ) |
Definition at line 1828 of file tk.c.
Referenced by get_dump(), get_header(), get_input(), get_output(), get_post(), and record_file_nam().
char * format_suffixed_number | ( | double | value, |
long | places, | ||
const char * | unit ) |
Definition at line 1725 of file tk.c.
References _SMALL_, and ISNOTSMALL.
Referenced by build_main_loop_control1(), build_main_loop_segment_begin(), expand_indirections(), print_C_code_banner_b(), print_output_banner_1(), and that_s_all().
char * get_function_identifier | ( | char * | str, |
char * | fun_id, | ||
char * | fun_parm ) |
Definition at line 1036 of file tk.c.
References directive_id(), get_sign_and_token(), get_token_between_braces(), is_an_identifier(), ISNOTEMPTY, STRLENGTH, and UNDEFINED.
Referenced by collect_functions(), and get_node().
char * get_output_and_scaling | ( | char * | str, |
char * | sgn, | ||
char * | out, | ||
char * | scl ) |
Definition at line 1061 of file tk.c.
References get_sign_and_token(), get_token_between_braces(), is_an_identifier(), ISNOTEMPTY, and STRLENGTH.
Referenced by build_output(), print_output_banner_2(), and print_output_banner_function().
char * get_sign_and_token | ( | char * | str, |
char * | sgn, | ||
char * | tok ) |
Definition at line 1188 of file tk.c.
References get_token(), and STRLENGTH.
Referenced by authorize_option(), build_condition(), build_node_dependencies(), build_record_dependencies(), build_to_be_delayed_node_list(), build_update_dependencies(), build_var_dependencies(), call_postprocess_functions(), check_array_usage(), check_record_usage(), check_types(), collect_export_definitions(), create_nodes(), declaration_type_B(), declare_a_digital_node(), declare_an_analog_node(), declare_vars(), determine_output_segment_rate(), dump_function(), expand_records(), get_alias(), get_command_line(), get_debug(), get_decimate(), get_declare(), get_directive(), get_fs_ts(), get_function_identifier(), get_gateway(), get_inject(), get_interlude(), get_interpolate(), get_node(), get_nominal(), get_opcode(), get_output_and_scaling(), get_post(), get_stuck(), get_update(), get_var(), mark_directives(), name_mangling(), node_determination(), print_adc(), print_bshift(), print_btoi(), print_buf(), print_bwinv(), print_change(), print_clip(), print_clock(), print_comp(), print_dac(), print_delay(), print_delay1(), print_delay2(), print_delay3(), print_differentiator(), print_dtoi(), print_equal(), print_fzbuf(), print_fzinv(), print_gain(), print_holdtrack(), print_integrator(), print_inv(), print_itob(), print_itod(), print_latch(), print_merge(), print_mux(), print_noise(), print_offset(), print_osc(), print_poly(), print_quant(), print_rect(), print_relay(), print_rip(), print_rlshift(), print_rshift1(), print_rshift2(), print_sign(), print_sincos(), print_square(), print_step(), print_toggle(), print_triangle(), print_trig(), print_uadc(), print_udac(), print_wsum(), print_zero(), process_condition(), process_init(), purge_constants_in_ganging(), purge_constants_in_options(), redefine_nodes(), reset_an_analog_node(), reset_records_function(), syntax_nodes(), and syntax_records().
char * get_token | ( | char * | str, |
char * | tok, | ||
long | keep_quotes ) |
Definition at line 1210 of file tk.c.
Referenced by build_input(), build_main_loop_conditions(), build_main_loop_inject(), build_main_loop_time(), build_update(), call_user_functions(), check_array_usage(), check_record_usage(), collect_string_of_functions(), collect_string_of_options(), declare_a_digital_node(), define_directives(), dump_function(), expand_dump_definitions(), expand_IO_definitions(), expand_string_variables(), expand_update_definitions(), get_array(), get_data(), get_drop(), get_dump(), get_input(), get_load(), get_opcode(), get_output(), get_ping(), get_post(), get_sign_and_token(), get_title(), get_var(), line_parsing(), mark_updates_if_constant(), node_id(), print_algebra(), print_alu(), print_average(), print_C_code_banner_b(), print_copy(), print_dyadic0(), print_dyadic1(), print_dyadic2(), print_dyadic3(), print_dyadic4(), print_dyadic5(), print_dyadic6(), print_dyadic7(), print_minmax(), print_muller(), print_ram(), print_rom(), print_terminate_condition(), print_test(), print_usertool(), process_cell(), process_gen(), rearrange_data_interfaces(), redefine_node_segments(), redefine_nodes(), reset_a_dc_node(), reset_a_digital_node(), reset_an_analog_node(), reset_user_variables(), separe_qualifiers(), syntax_directives(), syntax_segment_value(), syntax_terminate(), syntax_updates(), syntax_variables(), and var_id().
char * get_token_between_braces | ( | char * | str, |
char * | brc, | ||
char * | tok ) |
Definition at line 1110 of file tk.c.
References LENGTH, and STRLENGTH.
Referenced by check_types(), get_array(), get_assert(), get_data(), get_declare(), get_directive(), get_dump(), get_format(), get_function_identifier(), get_header(), get_load(), get_node(), get_output_and_scaling(), get_synchronize(), get_update(), get_var(), get_void(), line_parsing(), node_determination(), print_ram(), print_rom(), process_cell(), process_condition(), process_gen(), read_doub_format(), read_hex_format(), read_int_format(), read_str_format(), redefine_nodes(), and syntax_nodes().
int is_a_string | ( | char * | str | ) |
Definition at line 1369 of file tk.c.
References compact_line(), LENGTH, and STRLENGTH.
Referenced by build_usage_comment(), and syntax_variables().
int is_an_extended_identifier | ( | const char * | tok | ) |
Definition at line 1348 of file tk.c.
References LENGTH, and STRLENGTH.
Referenced by process_cell().
int is_an_identifier | ( | const char * | tok | ) |
Definition at line 1327 of file tk.c.
References LENGTH, and STRLENGTH.
Referenced by collect_export_definitions(), get_alias(), get_array(), get_command_line(), get_data(), get_debug(), get_directive(), get_function_identifier(), get_inject(), get_node(), get_opcode(), get_output_and_scaling(), get_stuck(), get_update(), get_var(), line_parsing(), process_cell(), and syntax_records().
int is_an_integer_number | ( | const char * | str | ) |
Definition at line 1378 of file tk.c.
char * multiple | ( | char | c, |
long | n ) |
Definition at line 1801 of file tk.c.
Referenced by build_cross_reference(), check_directive_function(), check_option_function(), control_init_function(), declare_file_handles(), declare_function_pointers(), declare_global_values(), declare_prototypes(), define_directives(), define_macros(), include_ANSI_C_header_files(), include_napa_header_files(), line_parsing(), napa_data_record_function(), napa_exit_functions(), napa_IO_manager_function(), napa_timer_function(), open_main(), print_C_code_banner_a(), print_ping_function(), random_functions(), randomizer_functions(), and that_s_all().
void process_cell_line | ( | char * | buf, |
long | d, | ||
const unsigned long * | mlin, | ||
const unsigned long * | mfil ) |
Definition at line 441 of file tk.c.
References Cell_Name_Prefix, Cell_Num_Parms, Cell_Plist, Inst_Plist, ISEMPTY, LENGTH, LINLENGTH, print_error_banner_and_exit(), print_error_location(), print_limits(), STDERR, and STRLENGTH.
Referenced by line_parsing().
char * replace_char | ( | char * | s, |
char | b, | ||
char | a ) |
Definition at line 1788 of file tk.c.
Referenced by define_macros().
void replace_dollar | ( | char * | tok | ) |
Definition at line 1713 of file tk.c.
References LENGTH.
Referenced by call_postprocess_functions(), call_user_functions(), get_header(), print_usertool(), and syntax_nodes().
void replace_parentheses | ( | char * | str | ) |
Definition at line 1644 of file tk.c.
References LENGTH, and STRLENGTH.
Referenced by get_node(), and get_post().
void resolve_pathnames | ( | char * | lin, |
long | depth ) |
Definition at line 265 of file tk.c.
References Cur_Lib_Name, extract_directory(), ISEMPTY, LENGTH, and LINLENGTH.
Referenced by get_array(), get_assert(), get_call(), get_declare(), get_drop(), get_dump(), get_init(), get_inject(), get_input(), get_load(), get_node(), get_output(), get_ping(), get_post(), get_sampling(), get_stuck(), get_terminate(), get_title(), get_update(), get_var(), and process_gen().
void restore_line | ( | char * | lin | ) |
Definition at line 1452 of file tk.c.
Referenced by line_parsing().
void simplify_pathname | ( | char * | pnam | ) |
Definition at line 1543 of file tk.c.
Referenced by define_macros(), get_dump(), get_header(), get_input(), get_load(), get_output(), get_void(), process_cell(), and process_gen().
void strip_extension | ( | char * | fnam | ) |
Definition at line 1598 of file tk.c.
References LENGTH.
Referenced by define_macros(), and line_parsing().
void strip_quotes | ( | char * | str | ) |
Definition at line 1619 of file tk.c.
Referenced by syntax_command_line().
char * unique_name | ( | void | ) |
Definition at line 1766 of file tk.c.
References NAPA_Job_ID.
Referenced by get_var().
char * upper_to_lower | ( | char * | s | ) |
Definition at line 1775 of file tk.c.
Referenced by process_array_error(), process_instruction_error(), process_node_error(), process_node_kind_error(), process_record_error(), process_variable_error(), and syntax_command_line().