MCPcopy Create free account

hub / github.com/cimplec/sim-c / functions

Functions66 in github.com/cimplec/sim-c

↓ 88 callersFunctionerror
Shows error message in red color and exits the current process Params ====== msg (string) = The message to be shown as error me
simc/global_helpers.py:26
↓ 42 callersMethodget_by_id
Returns symbol table entry by integer unique id Params ====== id (id) = Integer unique id of a symbol in the table
simc/symbol_table.py:96
↓ 33 callersFunctioncheck_if
Check if type matches what it should be otherwise throw an error and exit Params ====== given_type (string) = Type of toke
simc/global_helpers.py:5
↓ 32 callersMethod__update_source_index
Update current source index by an integer
simc/lexical_analyzer.py:117
↓ 20 callersMethodget_by_symbol
Returns unique id of a given value Params ====== value (string) = Value to be searched in the symbol table
simc/symbol_table.py:111
↓ 18 callersFunctionexpression
Parse and expression from tokens Params ====== tokens (list) = List of tokens i (st
simc/parser/simc_parser.py:19
↓ 10 callersMethod__check_next_token
Generates token based on value of next token Params ====== next_chars (list) = Characters to be checked in the
simc/lexical_analyzer.py:124
↓ 8 callersFunctionskip_all_nextlines
(tokens, i)
simc/parser/simc_parser.py:518
↓ 5 callersMethodentry
Returns id in symbol table after making an entry Params ====== value (string) = Value to be stored in symbol ta
simc/symbol_table.py:75
↓ 4 callersMethod__push_to_scope_stack
(self, val)
simc/scope_resolve.py:10
↓ 3 callersMethodresolve_dependency
Resolves the dependency relation between variables This is a recursive function, it is used when the parser discovers the type of a
simc/symbol_table.py:186
↓ 2 callersMethod__pop_from_scope_stack
(self)
simc/scope_resolve.py:13
↓ 2 callersMethod__string_val
Processes string values in the source code
simc/lexical_analyzer.py:242
↓ 2 callersFunctionarray_initializer
Parse array initializer list Params ====== tokens (list) = List of tokens i (string/list) = Curren
simc/parser/array_parser.py:6
↓ 2 callersFunctioncompile
Compiles opcodes produced by parser into C code Params ====== opcodes (list) = List of opcodes c_filename (string)
simc/compiler.py:73
↓ 2 callersFunctioncompile_func_main_code
Check which code should go in main and which outside of main Params ====== outside_code (string) = Code to be put outside mai
simc/compiler.py:45
↓ 2 callersFunctionfunction_call_statement
Parse function calling statement Params ====== tokens (list) = List of tokens i (int) = Curren
simc/parser/function_parser.py:6
↓ 2 callersFunctionfunction_parameter
Parse function parameter Params ====== tokens (list) = List of tokens i (int) = Current index i
simc/parser/function_parser.py:391
↓ 2 callersFunctionif_statement
Parse if statement Params ====== tokens (list) = List of tokens i (int) = Current index in tok
simc/parser/conditional_parser.py:6
↓ 2 callersFunctioninitializate_struct
Initialization of a struction when the variable instantiate is type of a declared struct Params ====== tokens (list) = List of t
simc/parser/struct_parser.py:6
↓ 2 callersFunctionis_alnum
Checks if character is alphabet or digit or none, checks if character is in a-z, 0-9, _, and . for alphanumeric character Params ======
simc/global_helpers.py:74
↓ 2 callersFunctionis_digit
Checks if character is digit or not, includes 0-9 and . Params ====== char (string) = Single character mostly part of a longer strin
simc/global_helpers.py:42
↓ 2 callersMethodlexical_analyze
Generate tokens from source code Returns ======== list: A list of tokens of the source code, if the code is lexicall
simc/lexical_analyzer.py:422
↓ 2 callersFunctionparse
Parse tokens and generate opcodes Params ====== tokens (list) = List of tokens Returns ======= list: The list of opcodes
simc/parser/simc_parser.py:526
↓ 2 callersFunctionprint_statement
Parse print statement Params ====== tokens (list) = List of tokens i (int) = Current index in t
simc/parser/simc_parser.py:328
↓ 2 callersMethodresolve_scope
(self, module_name)
simc/scope_resolve.py:16
↓ 2 callersFunctionunary_statement
Parse unary statement Params ====== tokens (list) = List of tokens i (int) = Current index in token table
simc/parser/simc_parser.py:400
↓ 1 callersMethod__get_raw_tokens
Makes RAW_C tokens for each line of C code written between BEGIN_C and END_C
simc/lexical_analyzer.py:395
↓ 1 callersMethod__initialize_flags_counters
Initialize flags and counter variables used for lexical analysis
simc/lexical_analyzer.py:148
↓ 1 callersMethod__is_keyword
Checks if string is keyword or not Params ====== value (string) = The string to be checked for keyword Retu
simc/lexical_analyzer.py:188
↓ 1 callersMethod__keyword_identifier
Process keywords and identifiers in source code
simc/lexical_analyzer.py:316
↓ 1 callersMethod__numeric_val
Processes numeric values in the source code
simc/lexical_analyzer.py:203
↓ 1 callersMethod__read_source_code
Read source code from source file path and return it in a string Returns ======= str: sim-C source code
simc/lexical_analyzer.py:89
↓ 1 callersMethodadd_dependency
Adds a relation of dependecy beetween two variables It is used when the variable is assigned to other varible before it is type had
simc/symbol_table.py:170
↓ 1 callersFunctionassign_statement
Parse assignment statement Params ====== tokens (list) = List of tokens i (int) = Current index in token tabl
simc/parser/variable_parser.py:291
↓ 1 callersFunctioncase_statement
Parse case statement Params ====== tokens (list) = List of tokens i (int) = Current index in t
simc/parser/conditional_parser.py:134
↓ 1 callersFunctioncheck_include
Checks if any opcode requires standard libraries to be included Params ====== opcodes (list) = List of opcodes Returns ====
simc/compiler.py:5
↓ 1 callersFunctioncheck_ptr
(tokens, i)
simc/parser/variable_parser.py:6
↓ 1 callersFunctionexit_statement
Parse exit statement Params ====== tokens (list) = List of tokens i (int) = Current index in token table
simc/parser/simc_parser.py:464
↓ 1 callersFunctionextract_func_typedata
Extract typedata of function Params ====== typedata (string) = Typedata of function in format "function---param1---param2-
simc/parser/function_parser.py:155
↓ 1 callersFunctionfill_missing_args_with_defaults
( op_value_list, default_values, num_actual_params, num_formal_params )
simc/parser/function_parser.py:185
↓ 1 callersFunctionfor_statement
Parse for for_loop Params ====== tokens (list) = List of tokens i (int) = Current index in token table
simc/parser/loop_parser.py:6
↓ 1 callersFunctionfunction_definition_statement
Parse function definition statement Params ====== tokens (list) = List of tokens i (int) = Current index in token
simc/parser/function_parser.py:208
↓ 1 callersFunctionfunction_parameters
Parse function parameters Params ====== tokens (list) = List of tokens i (int) = Current index in list
simc/parser/function_parser.py:327
↓ 1 callersFunctionget_version
(rel_path)
setup.py:19
↓ 1 callersFunctionread
(rel_path)
setup.py:13
↓ 1 callersMethodresolve_scope_for_id
(self, token, module_name)
simc/symbol_table.py:139
↓ 1 callersFunctionstruct_declaration_statement
Parse structure declaration statement Params ====== tokens (list) = List of tokens i (int) = Current index in tok
simc/parser/struct_parser.py:38
↓ 1 callersMethodswap_tokens_and_table
(self, tokens_list, table)
simc/scope_resolve.py:74
↓ 1 callersFunctionswitch_statement
Parse switch statement Params ====== tokens (list) = List of tokens i (int) = Current index in
simc/parser/conditional_parser.py:75
↓ 1 callersMethodupdate_filename
Update sim-C source file path Used during lexical analysis of module sources
simc/lexical_analyzer.py:108
↓ 1 callersFunctionvar_statement
Parse variable and array declaration [/initialization] statement Params ====== tokens (list) = List of tokens i (i
simc/parser/variable_parser.py:29
↓ 1 callersFunctionwhile_statement
Parse while statement Params ====== tokens (list) = List of tokens i (int) = Current index in token
simc/parser/loop_parser.py:107
Method__eq__
Check for equality of tokens Returns ======= bool: Whether a token object is equal to another or not
simc/token_class.py:33
Method__eq__
Check for equality of opcodes Returns ======= bool: Whether a token object is equal to another or not
simc/op_code.py:32
Method__init__
Class initializer Params ====== type (string) = Type of token as string val (string) = Value stored
simc/token_class.py:6
Method__init__
Initializer of OpCode class Params ====== opcode (string) = Type of opcode as string val (string) = Value
simc/op_code.py:6
Method__init__
Initializer of SymbolTable class
simc/symbol_table.py:6
Method__init__
(self, tokens_list, symbol_table)
simc/scope_resolve.py:5
Method__init__
Class initializer Params ====== source_filename (string) = Name of file containing sim-C sour
simc/lexical_analyzer.py:18
Method__str__
String representation of a Token Returns ======= string: The string representation of Token object, which can be use
simc/token_class.py:22
Method__str__
Returns string representation of OpCode Returns ======= string: The string representation of OpCode object, which ca
simc/op_code.py:21
Method__str__
String representation of SymbolTable Returns ======= string: The string representation of SymbolTable object - used
simc/symbol_table.py:14
Functionget_package
()
simc/simpack.py:12
Functionis_alpha
Checks if character is alphabet or not, includes a-z and _ Params ====== char (string) = Single character mostly part of a longer st
simc/global_helpers.py:58
Functionrun
()
simc/simc.py:24