Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

lexer.c File Reference

Go to the source code of this file.

Functions

void start_lex_from_file (char *filename, FILE *already_opened_file)
void stop_lex_from_file (void)
void get_next_char (void)
void read_constituent_string (void)
void read_rest_of_floating_point_number (void)
void determine_type_of_constituent_string (void)
void do_fake_rparen (void)
void lexer_routines (void)
void lex_eof (void)
void lex_at (void)
void lex_tilde (void)
void lex_up_arrow (void)
void lex_lbrace (void)
void lex_rbrace (void)
void lex_exclamation_point (void)
void lex_comma (void)
void lex_equal (void)
void lex_ampersand (void)
void lex_lparen (void)
void lex_rparen (void)
void lex_greater (void)
void lex_less (void)
void lex_period (void)
void lex_plus (void)
void lex_minus (void)
void lex_digit (void)
void lex_unknown (void)
void lex_constituent_string (void)
void lex_vbar (void)
void lex_quote (void)
void lex_dollar (void)
void get_lexeme (void)
void init_lexer (void)
void print_location_of_most_recent_lexeme (void)
int current_lexer_parentheses_level (void)
void skip_ahead_to_balanced_parentheses (int parentheses_level)
void fake_rparen_at_next_end_of_line (void)
void set_lexer_allow_ids (bool allow_identifiers)
void determine_possible_symbol_types_for_string (char *s, int length_of_s, bool *possible_id, bool *possible_var, bool *possible_sc, bool *possible_ic, bool *possible_fc, bool *rereadable)

Variables

bool constituent_char [256]
bool whitespace [256]
bool number_starters [256]
char extra_constituents [] = "$%&*+-/:<=>?_"


Function Documentation

int current_lexer_parentheses_level void   ) 
 

Definition at line 1092 of file lexer.c.

Referenced by read_pattern_and_get_matching_wmes().

void determine_possible_symbol_types_for_string char *  s,
int  length_of_s,
bool possible_id,
bool possible_var,
bool possible_sc,
bool possible_ic,
bool possible_fc,
bool rereadable
 

Definition at line 1140 of file lexer.c.

References constituent_char, and number_starters.

Referenced by determine_type_of_constituent_string(), get_io_symbol_from_tio_constituent_string(), and print().

void determine_type_of_constituent_string void   ) 
 

Definition at line 318 of file lexer.c.

References determine_possible_symbol_types_for_string(), FLOAT_CONSTANT_LEXEME, IDENTIFIER_LEXEME, INT_CONSTANT_LEXEME, print(), print_location_of_most_recent_lexeme(), QUOTED_STRING_LEXEME, SYM_CONSTANT_LEXEME, and VARIABLE_LEXEME.

Referenced by get_lexeme_from_string(), lex_ampersand(), lex_constituent_string(), lex_digit(), lex_equal(), lex_greater(), lex_less(), lex_minus(), lex_period(), and lex_plus().

void do_fake_rparen void   ) 
 

Definition at line 424 of file lexer.c.

References R_PAREN_LEXEME.

Referenced by get_lexeme(), and lex_eof().

void fake_rparen_at_next_end_of_line void   ) 
 

Definition at line 1109 of file lexer.c.

void get_lexeme void   ) 
 

Definition at line 839 of file lexer.c.

References do_fake_rparen(), get_next_char(), lex_eof(), lexer_routines(), and whitespace.

Referenced by lex_unknown(), parse_attr_value_make(), parse_attr_value_tests(), parse_cond(), parse_disjunction_test(), parse_function_call_after_lparen(), parse_head_of_conds_for_one_id(), parse_preference_specifier_without_referent(), parse_preferences(), parse_preferences_soar8_non_operator(), parse_production(), parse_relational_test(), parse_rhs_action(), parse_rhs_value(), parse_tail_of_conds_for_one_id(), parse_test(), parse_value_test_star(), read_pattern_and_get_matching_wmes(), skip_ahead_to_balanced_parentheses(), soar_ecSp(), soar_Print(), and soar_ProductionFind().

void get_next_char void   ) 
 

Definition at line 152 of file lexer.c.

References abort_with_fatal_error(), control_c_handler(), print(), print_string_to_log_file_only(), and tell_printer_that_output_column_has_been_reset().

Referenced by get_lexeme(), lex_dollar(), lex_quote(), lex_unknown(), and lex_vbar().

void init_lexer void   ) 
 

Definition at line 945 of file lexer.c.

References constituent_char, extra_constituents, lex_ampersand(), lex_at(), lex_comma(), lex_constituent_string(), lex_digit(), lex_dollar(), lex_equal(), lex_exclamation_point(), lex_greater(), lex_lbrace(), lex_less(), lex_lparen(), lex_minus(), lex_period(), lex_plus(), lex_quote(), lex_rbrace(), lex_rparen(), lex_tilde(), lex_unknown(), lex_up_arrow(), lex_vbar(), lexer_routines(), number_starters, start_lex_from_file(), and whitespace.

Referenced by init_soar_agent().

void lex_ampersand void   ) 
 

Definition at line 520 of file lexer.c.

References AMPERSAND_LEXEME, determine_type_of_constituent_string(), and read_constituent_string().

Referenced by init_lexer().

void lex_at void   ) 
 

Definition at line 458 of file lexer.c.

References AT_LEXEME.

Referenced by init_lexer().

void lex_comma void   ) 
 

Definition at line 500 of file lexer.c.

References COMMA_LEXEME.

Referenced by init_lexer().

void lex_constituent_string void   ) 
 

Definition at line 722 of file lexer.c.

References determine_type_of_constituent_string(), and read_constituent_string().

Referenced by init_lexer().

void lex_digit void   ) 
 

Definition at line 678 of file lexer.c.

References determine_type_of_constituent_string(), read_constituent_string(), and read_rest_of_floating_point_number().

Referenced by init_lexer().

void lex_dollar void   ) 
 

Definition at line 807 of file lexer.c.

References DOLLAR_STRING_LEXEME, and get_next_char().

Referenced by init_lexer().

void lex_eof void   ) 
 

Definition at line 447 of file lexer.c.

References do_fake_rparen(), and EOF_LEXEME.

Referenced by get_lexeme().

void lex_equal void   ) 
 

Definition at line 507 of file lexer.c.

References determine_type_of_constituent_string(), EQUAL_LEXEME, and read_constituent_string().

Referenced by init_lexer().

void lex_exclamation_point void   ) 
 

Definition at line 493 of file lexer.c.

References EXCLAMATION_POINT_LEXEME.

Referenced by init_lexer().

void lex_greater void   ) 
 

Definition at line 550 of file lexer.c.

References determine_type_of_constituent_string(), GREATER_EQUAL_LEXEME, GREATER_GREATER_LEXEME, GREATER_LEXEME, and read_constituent_string().

Referenced by init_lexer().

void lex_lbrace void   ) 
 

Definition at line 479 of file lexer.c.

References L_BRACE_LEXEME.

Referenced by init_lexer().

void lex_less void   ) 
 

Definition at line 573 of file lexer.c.

References determine_type_of_constituent_string(), LESS_EQUAL_GREATER_LEXEME, LESS_EQUAL_LEXEME, LESS_LESS_LEXEME, LESS_LEXEME, NOT_EQUAL_LEXEME, and read_constituent_string().

Referenced by init_lexer().

void lex_lparen void   ) 
 

Definition at line 533 of file lexer.c.

References L_PAREN_LEXEME.

Referenced by init_lexer().

void lex_minus void   ) 
 

Definition at line 647 of file lexer.c.

References determine_type_of_constituent_string(), MINUS_LEXEME, read_constituent_string(), read_rest_of_floating_point_number(), and RIGHT_ARROW_LEXEME.

Referenced by init_lexer().

void lex_period void   ) 
 

Definition at line 607 of file lexer.c.

References determine_type_of_constituent_string(), PERIOD_LEXEME, and read_rest_of_floating_point_number().

Referenced by init_lexer().

void lex_plus void   ) 
 

Definition at line 622 of file lexer.c.

References determine_type_of_constituent_string(), PLUS_LEXEME, read_constituent_string(), and read_rest_of_floating_point_number().

Referenced by init_lexer().

void lex_quote void   ) 
 

Definition at line 760 of file lexer.c.

References EOF_LEXEME, get_next_char(), print(), print_location_of_most_recent_lexeme(), and QUOTED_STRING_LEXEME.

Referenced by init_lexer().

void lex_rbrace void   ) 
 

Definition at line 486 of file lexer.c.

References R_BRACE_LEXEME.

Referenced by init_lexer().

void lex_rparen void   ) 
 

Definition at line 541 of file lexer.c.

References R_PAREN_LEXEME.

Referenced by init_lexer().

void lex_tilde void   ) 
 

Definition at line 465 of file lexer.c.

References TILDE_LEXEME.

Referenced by init_lexer().

void lex_unknown void   ) 
 

Definition at line 697 of file lexer.c.

References get_lexeme(), get_next_char(), and print().

Referenced by init_lexer().

void lex_up_arrow void   ) 
 

Definition at line 472 of file lexer.c.

References UP_ARROW_LEXEME.

Referenced by init_lexer().

void lex_vbar void   ) 
 

Definition at line 728 of file lexer.c.

References EOF_LEXEME, get_next_char(), print(), print_location_of_most_recent_lexeme(), and SYM_CONSTANT_LEXEME.

Referenced by init_lexer().

void lexer_routines void   ) 
 

Referenced by get_lexeme(), and init_lexer().

void print_location_of_most_recent_lexeme void   ) 
 

Definition at line 1020 of file lexer.c.

References print(), and print_string().

Referenced by determine_type_of_constituent_string(), do_print_for_production_name(), lex_quote(), lex_vbar(), parse_attr_value_make(), parse_attr_value_tests(), parse_cond(), parse_disjunction_test(), parse_function_call_after_lparen(), parse_head_of_conds_for_one_id(), parse_preferences_soar8_non_operator(), parse_production(), parse_relational_test(), parse_rhs_action(), parse_rhs_value(), read_identifier_or_context_variable(), read_pattern_and_get_matching_wmes(), and read_pattern_component().

void read_constituent_string void   ) 
 

Definition at line 271 of file lexer.c.

References constituent_char.

Referenced by lex_ampersand(), lex_constituent_string(), lex_digit(), lex_equal(), lex_greater(), lex_less(), lex_minus(), and lex_plus().

void read_rest_of_floating_point_number void   ) 
 

Definition at line 284 of file lexer.c.

References allocate_memory(), and free_memory_block_for_string().

Referenced by lex_digit(), lex_minus(), lex_period(), and lex_plus().

void set_lexer_allow_ids bool  allow_identifiers  ) 
 

Definition at line 1123 of file lexer.c.

Referenced by soar_ecSp().

void skip_ahead_to_balanced_parentheses int  parentheses_level  ) 
 

Definition at line 1097 of file lexer.c.

References EOF_LEXEME, get_lexeme(), and R_PAREN_LEXEME.

Referenced by read_pattern_and_get_matching_wmes().

void start_lex_from_file char *  filename,
FILE *  already_opened_file
 

Definition at line 106 of file lexer.c.

References allocate_memory(), lexer_source_file_struct::allow_ids, lexer_source_file_struct::buffer, lexer_source_file_struct::column_of_start_of_last_lexeme, lexer_source_file_struct::current_column, lexer_source_file_struct::current_line, lexer_source_file_struct::fake_rparen_at_eol, lexer_source_file_struct::file, lexer_source_file_struct::filename, lexer_source_file, lexer_source_file_struct::line_of_start_of_last_lexeme, make_memory_block_for_string(), lexer_source_file_struct::parent_file, lexer_source_file_struct::parentheses_level, lexer_source_file_struct::saved_current_char, and lexer_source_file_struct::saved_lexeme.

Referenced by init_lexer().

void stop_lex_from_file void   ) 
 

Definition at line 128 of file lexer.c.

References lexer_source_file_struct::filename, free_memory(), free_memory_block_for_string(), lexer_source_file, print(), lexer_source_file_struct::saved_current_char, and lexer_source_file_struct::saved_lexeme.


Variable Documentation

bool constituent_char[256]
 

Definition at line 91 of file lexer.c.

Referenced by determine_possible_symbol_types_for_string(), init_lexer(), and read_constituent_string().

char extra_constituents[] = "$%&*+-/:<=>?_"
 

Definition at line 943 of file lexer.c.

Referenced by init_lexer().

bool number_starters[256]
 

Definition at line 93 of file lexer.c.

Referenced by determine_possible_symbol_types_for_string(), and init_lexer().

bool whitespace[256]
 

Definition at line 92 of file lexer.c.

Referenced by get_lexeme(), and init_lexer().


Generated on Thu Dec 11 13:00:27 2003 for Soar Kernel by doxygen 1.3.5