Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/NishanthSpShetty/crust
/ functions
Functions
131 in github.com/NishanthSpShetty/crust
⨍
Functions
131
◇
Types & classes
20
↓ 139 callers
Method
get_token_type
(&self)
src/library/lexeme/token.rs:41
↓ 90 callers
Method
get_token_value
(&self)
src/library/lexeme/token.rs:49
↓ 88 callers
Method
clone
(&self)
src/library/parser/parser.rs:30
↓ 69 callers
Method
push_advance
Push and Advance pushes the current character into self.token updates the current_char with next character
src/library/lexer/tokenizer.rs:515
↓ 51 callers
Method
push_to_tok_buffer
Creates a Token from current token and pushes into Token buffer. Clear the current token
src/library/lexer/tokenizer.rs:502
↓ 28 callers
Function
init_parser
(lexeme: &[Token], strict_parser: bool)
src/library/parser/parser.rs:74
↓ 15 callers
Method
get_doc
(self)
src/library/doc/mod.rs:21
↓ 13 callers
Method
parse_program
(&mut self, lexeme: &[Token])
src/library/parser/parser.rs:104
↓ 12 callers
Function
skip_block
* skip_block: * forwards the lookahead by one block * returns the lookahead at the lexeme after the closing brace */
src/library/parser/helper.rs:21
↓ 12 callers
Function
skip_stmt
* skip_stmt: * forwards the lookahead by one statement * returns the lookahead at the lexeme after the semi-colon */
src/library/parser/helper.rs:9
↓ 10 callers
Method
get_token_kind
(&self)
src/library/lexeme/token.rs:45
↓ 10 callers
Function
parse_type
Takes the integer value of type Type returns either the equivalent Rust type as a string or None, if does not correspond to any c/c++ type
src/library/parser/rust_type.rs:15
↓ 8 callers
Method
get_next_char
Returns the next char in a input stream pointed by `pos` position null (\0) otherwise
src/library/lexer/tokenizer.rs:491
↓ 8 callers
Method
get_type
returns both token kind and token type.
src/library/lexeme/token.rs:38
↓ 5 callers
Method
parse_expr
parse_expr: * parse c/c++ expression statements into rust equivalent code */
src/library/parser/parser.rs:1615
↓ 4 callers
Method
clone
(&self)
src/library/lexeme/token.rs:14
↓ 4 callers
Method
parse_declaration
* parse_declaration: * parse c/c++ declaration into rust * equivalent statements */
src/library/parser/parser.rs:946
↓ 3 callers
Method
parse_assignment
parse_assignment: * parse c/c++ assignment statements into rust equivalent code * compound assignments must be converted to declarations
src/library/parser/parser.rs:1532
↓ 2 callers
Function
get_default_value_for
(c_type: TokenType)
src/library/parser/rust_type.rs:40
↓ 2 callers
Method
new_line
increment the line number
src/library/lexer/tokenizer.rs:36
↓ 2 callers
Method
parse_argument_declaration
(&mut self, lexeme: &[Token])
src/library/parser/parser.rs:899
↓ 2 callers
Method
parse_arguments
* parse-arguments: * parse c/c++ formal arguments in the function signature * into rust equivalent arguments */
src/library/parser/parser.rs:876
↓ 1 callers
Function
add_it
testset/func.cpp:1
↓ 1 callers
Method
getInt
testset/class.cpp:9
↓ 1 callers
Method
getInt
(&self)
testset/class.rs:27
↓ 1 callers
Function
get_operator_as_fucn_name
(token: &Token)
src/library/parser/helper.rs:38
↓ 1 callers
Function
get_settings_interactively
()
src/main.rs:60
↓ 1 callers
Function
identify_token_type
(tok: &[char])
src/library/lexer/helper.rs:3
↓ 1 callers
Function
invoke
(settings: &Settings)
src/main.rs:102
↓ 1 callers
Method
parse_array_declaration
(&mut self, lexeme: &[Token])
src/library/parser/parser.rs:1686
↓ 1 callers
Method
parse_case
(&mut self, lexeme: &[Token])
src/library/parser/parser.rs:1347
↓ 1 callers
Method
parse_class
not tested
src/library/parser/parser.rs:1934
↓ 1 callers
Method
parse_class_decl
not tested
src/library/parser/parser.rs:2143
↓ 1 callers
Method
parse_class_inbody_decl
not tested
src/library/parser/parser.rs:2096
↓ 1 callers
Method
parse_control_flow_statement
* parse_control_flow_statement: * Handle control flow statements: if, else, while, do-while, for, switch * Returns the updated head position
src/library/parser/parser.rs:367
↓ 1 callers
Method
parse_dowhile
* parse_dowhile: * parse c/c++ do while statements into rust * equivalent statements */
src/library/parser/parser.rs:1249
↓ 1 callers
Method
parse_for
* parse_for: * parse c/c++ do while statements into rust * equivalent statements * * Identify infinite loops and replace for with
src/library/parser/parser.rs:1411
↓ 1 callers
Method
parse_function
* parse_function: * parse c/c++ function into rust equivalent function */
src/library/parser/parser.rs:760
↓ 1 callers
Method
parse_identifier_statement
* parse_identifier_statement: * Handle identifier-based statements: assignments, function calls, operators * Returns the updated head positi
src/library/parser/parser.rs:623
↓ 1 callers
Method
parse_if
* parse_if: * parse c/c++ if statements into rust * equivalent statements */
src/library/parser/parser.rs:1149
↓ 1 callers
Method
parse_method_decl
not tested
src/library/parser/parser.rs:2036
↓ 1 callers
Method
parse_struct
not tested
src/library/parser/parser.rs:1745
↓ 1 callers
Method
parse_struct_decl
not tested
src/library/parser/parser.rs:1810
↓ 1 callers
Method
parse_struct_inbody_decl
not tested
src/library/parser/parser.rs:1772
↓ 1 callers
Method
parse_switch
(&mut self, lexeme: &[Token])
src/library/parser/parser.rs:1300
↓ 1 callers
Method
parse_typdef
parse simple typedef definition of form * typedef typename newtype; */
src/library/parser/parser.rs:1130
↓ 1 callers
Method
parse_type_definition
* parse_type_definition: * Handle type definitions: struct, union, class, enum * Returns the updated head position */
src/library/parser/parser.rs:514
↓ 1 callers
Method
parse_union
parse tagged union
src/library/parser/parser.rs:1838
↓ 1 callers
Method
parse_union_decl
parse union type declarations * input : union tag_name var [;= ...] * output : let [mut] variant_name = Sometype_variant */
src/library/parser/parser.rs:1868
↓ 1 callers
Method
parse_union_inbody_decl
parse union body into Some type body * return rust stream */
src/library/parser/parser.rs:1894
↓ 1 callers
Method
parse_while
* parse_while: * parse c/c++ while statements into rust * equivalent statements */
src/library/parser/parser.rs:1193
↓ 1 callers
Function
print_usage
(program: &str, opts: Options)
src/main.rs:25
↓ 1 callers
Method
set_base_type
(&mut self, typ: TokenKind)
src/library/lexeme/token.rs:69
↓ 1 callers
Method
set_token_id
(&mut self, id_: u32)
src/library/lexeme/token.rs:76
↓ 1 callers
Method
set_token_ln
(&mut self, ln: u32)
src/library/lexeme/token.rs:73
↓ 1 callers
Method
set_token_type
(&mut self, typ: TokenType)
src/library/lexeme/token.rs:65
↓ 1 callers
Method
set_token_value
(&mut self, val: &str)
src/library/lexeme/token.rs:61
↓ 1 callers
Method
tokenize
Walks over given text and returns the stream of tokens We will take ownership of Tokenizer, as we wont be needing after.
src/library/lexer/tokenizer.rs:42
Method
A
testset/class.cpp:11
Function
create_token
(value: &str, kind: TokenKind, typ: crate::library::lexeme::definition::TokenType)
src/library/parser/parser_test.rs:7
Method
fmt
(&self, f: &mut fmt::Formatter<'_>)
src/library/lexeme/token.rs:82
Method
get_token_id
(&self)
src/library/lexeme/token.rs:57
Method
get_token_line_num
(&self)
src/library/lexeme/token.rs:53
Method
getfloat
testset/class.cpp:6
Method
getfloat
Rust structures do not support constructors * Please handle them with static builder functions * >>>>>>>> A ( ) { a = 5 ; b = 6 ; } **/
testset/class.rs:20
Function
hello
()
testset/main.rs:18
Function
hello
testset/main.cpp:3
Function
main
* This file was generated by CRUST by an automated semantics preserving * translation from C/C++ to Rust * CRUST isn't perfect and may require manua
testset/while.rs:7
Function
main
* This file was generated by CRUST by an automated semantics preserving * translation from C/C++ to Rust * CRUST isn't perfect and may require manua
testset/if.rs:7
Function
main
testset/if.cpp:1
Function
main
testset/class.cpp:28
Function
main
* This file was generated by CRUST by an automated semantics preserving * translation from C/C++ to Rust * CRUST isn't perfect and may require manua
testset/main.rs:7
Function
main
testset/for.cpp:1
Function
main
* This file was generated by CRUST by an automated semantics preserving * translation from C/C++ to Rust * CRUST isn't perfect and may require manua
testset/for.rs:7
Function
main
* This file was generated by CRUST by an automated semantics preserving * translation from C/C++ to Rust * CRUST isn't perfect and may require manua
testset/prog.rs:7
Function
main
()
testset/struct.rs:19
Function
main
()
testset/class.rs:55
Function
main
testset/prog.cpp:1
Function
main
testset/struct.cpp:13
Function
main
testset/func.cpp:3
Function
main
testset/main.cpp:1
Function
main
testset/while.cpp:1
Function
main
()
src/main.rs:30
Method
new
(text: &str)
src/library/lexer/tokenizer.rs:19
Method
new
( token: String, token_kind: TokenKind, token_type: TokenType, line_number: u3
src/library/lexeme/token.rs:21
Method
print_lexemes
* print_lexemes: DEBUG_ONLY * prints the lexemes in the lexeme vector * from index start to end */
src/library/parser/parser.rs:748
Method
safe_get
Safe array access helper with bounds checking
src/library/parser/parser.rs:96
Function
test_char_declaration_full_output
()
src/library/parser/parser_test.rs:512
Function
test_comment_preservation
()
src/library/parser/parser_test.rs:277
Function
test_const_declaration
()
src/library/parser/parser_test.rs:76
Function
test_const_int_declaration_full_output
()
src/library/parser/parser_test.rs:465
Function
test_empty_input
()
src/library/parser/parser_test.rs:295
Function
test_expression_with_operators
()
src/library/parser/parser_test.rs:207
Function
test_float_declaration_full_output
()
src/library/parser/parser_test.rs:488
Function
test_for_loop
()
src/library/parser/parser_test.rs:142
Function
test_get_next_char
()
src/library/lexer/tokenizer.rs:527
Function
test_int_declaration_with_assignment
()
src/library/parser/parser_test.rs:31
Function
test_int_with_assignment_full_output
()
src/library/parser/parser_test.rs:338
Function
test_loose_mode_generates_mut
()
src/library/parser/parser_test.rs:227
Function
test_multiple_operations_full_output
()
src/library/parser/parser_test.rs:438
next →
1–100 of 131, ranked by callers