MCPcopy Create free account

hub / github.com/elvin-du/tinyscript / functions

Functions285 in github.com/elvin-du/tinyscript

↓ 83 callersMethodrunOneStep
()
vm/vm.go:129
↓ 56 callersFunctionNewToken
(t TokenType, v string)
lexer/token.go:47
↓ 38 callersMethodGetChild
(uint)
parser/ast/ast.go:15
↓ 37 callersMethodString
()
gen/operand/oprand.go:4
↓ 29 callersMethodLexeme
get
parser/ast/ast.go:11
↓ 27 callersMethodGetOperand
(index int)
gen/instruction.go:190
↓ 24 callersMethodAddChild
set
parser/ast/ast.go:23
↓ 22 callersMethodNextMatch
下一个token的value匹配实参字符的话,返回这个token,否则panic
parser/ast/stream.go:52
↓ 21 callersMethodAdd
(instr *Instruction)
gen/opcode_program.go:19
↓ 21 callersFunctionassertToken
(t *testing.T, token *Token, wantValue string, wantType TokenType)
lexer/lexer_test.go:136
↓ 19 callersMethodAddOperand
(o operand.Operand)
gen/instruction.go:70
↓ 18 callersMethodPutBack
(e string)
lexer/util/stream.go:68
↓ 17 callersMethodGetSpMemory
(offset int)
vm/vm.go:124
↓ 17 callersMethodPeek
()
parser/ast/stream.go:33
↓ 16 callersFunctionNewTranslator
()
translator/translator.go:13
↓ 16 callersMethodNext
()
lexer/util/stream.go:22
↓ 15 callersMethodAdd
(instr *TAInstruction)
translator/taprogram.go:19
↓ 15 callersFunctionNewLexer
(r io.Reader, et string)
lexer/lexer.go:36
↓ 15 callersFunctionNewTAInstruction
(typ TAInstructionType, result *symbol.Symbol, op string, arg1 interface{}, arg2 interface{})
translator/tainstruction.go:17
↓ 15 callersMethodSetLabel
(string)
parser/ast/ast.go:27
↓ 15 callersMethodTranslate
* 符号表是辅助工具。对ast遍历的同时产生符号表,根据符号表的内容产生TAProgram。 */
translator/translator.go:20
↓ 14 callersFunctionNewOpCode
(addrType AddressingType, name string, value byte)
gen/opcode.go:35
↓ 14 callersMethodSetType
(NodeType)
parser/ast/ast.go:26
↓ 14 callersMethodType
ast节点对应的token是什么
parser/ast/ast.go:12
↓ 13 callersFunctionNewInstruction
(code *OpCode)
gen/instruction.go:26
↓ 13 callersMethodNext
()
parser/ast/stream.go:17
↓ 13 callersMethodToByteCode
()
gen/instruction.go:83
↓ 11 callersMethodAnalyse
()
lexer/lexer.go:41
↓ 11 callersMethodCreateSymbolByLexeme
(lexeme *lexer.Token)
translator/symbol/table.go:67
↓ 11 callersFunctionFromByCode
(code int)
gen/instruction.go:140
↓ 10 callersFunctionAssertSameInstruction
(t *testing.T, a, b *Instruction)
gen/opcode_test.go:80
↓ 10 callersMethodChildren
用字符串标识ast节点的含义,主要用于打印日志
parser/ast/ast.go:14
↓ 10 callersFunctionIsNumber
(c string)
lexer/alphabet.go:16
↓ 10 callersFunctionNewOffset
(offset int)
gen/operand/offset.go:11
↓ 10 callersFunctionNewTable
()
translator/symbol/table.go:19
↓ 10 callersFunctionParse
(source string)
parser/parser.go:12
↓ 10 callersMethodSetLexeme
(*lexer.Token)
parser/ast/ast.go:24
↓ 9 callersMethodHasNext
()
lexer/util/stream.go:37
↓ 9 callersFunctionNewRegister
(name string, addr byte)
gen/operand/register.go:28
↓ 8 callersFunctionExprParse
(stream *PeekTokenStream)
parser/ast/expr.go:167
↓ 8 callersMethodHasNext
()
parser/ast/stream.go:26
↓ 8 callersFunctionMakeStmt
()
parser/ast/stmt.go:9
↓ 8 callersFunctionNewPeekTokenStream
(tokens []*lexer.Token)
parser/ast/stream.go:13
↓ 8 callersFunctionToPostfixExpr
(node ASTNode)
parser/ast/util.go:8
↓ 7 callersFunctionIsOperator
(c string)
lexer/alphabet.go:24
↓ 7 callersFunctionLoadToRegister
(target *operand.Register, arg *symbol.Symbol)
gen/instruction.go:125
↓ 7 callersMethodLocalSize
()
translator/symbol/table.go:104
↓ 7 callersMethodPeek
()
lexer/util/stream.go:54
↓ 6 callersMethodCreateVariable
()
translator/symbol/table.go:89
↓ 6 callersFunctionMakeNode
()
parser/ast/ast.go:45
↓ 6 callersFunctionNewOffsetInstruction
(code *OpCode, r1, r2 *operand.Register, offset *operand.Offset)
gen/instruction.go:35
↓ 6 callersFunctionParseFromFile
(file string)
parser/parser.go:16
↓ 6 callersFunctionRegisterFromAddr
(reg int)
gen/operand/register.go:41
↓ 6 callersFunctionStmtParse
(stream *PeekTokenStream)
parser/ast/stmt.go:14
↓ 6 callersMethodTranslateExpr
* SDD: E -> E1 op E2 E -> F */
translator/translator.go:91
↓ 6 callersFunctionassertToken
(t *testing.T, token *lexer2.Token, wantValue string, wantType lexer2.TokenType)
parser/ast/stream_test.go:23
↓ 6 callersFunctioncreateExpr
(src string)
parser/parser_test.go:36
↓ 5 callersFunctionFactorParse
(stream *PeekTokenStream)
parser/ast/factor.go:32
↓ 5 callersMethodGen
(taProgram *translator.TAProgram)
gen/opcode_gen.go:17
↓ 5 callersFunctionNewLabel
(label string)
gen/operand/label.go:10
↓ 5 callersFunctionNewOpCodeGen
()
gen/opcode_gen.go:13
↓ 5 callersFunctionNewRegisterInstruction
(code *OpCode, r1, r2, r3 *operand.Register)
gen/instruction.go:43
↓ 4 callersMethodAddSymbol
(symbol *Symbol)
translator/symbol/table.go:26
↓ 4 callersFunctionBlockParse
(stream *PeekTokenStream)
parser/ast/block.go:16
↓ 4 callersFunctionE
left: E(k) -> E(k) op(k) E(k+1) | E(k+1) right: E(k) -> E(k+1) E_(k) E_(k) -> op(k) E(k+1) E_(k) | ⍷ 最高优先级: E(t) -> F E_(k) | U E_(k) E_(t) ->
parser/ast/expr.go:34
↓ 4 callersMethodExists
(lexeme *lexer.Token)
translator/symbol/table.go:40
↓ 4 callersFunctionFromFile
(path string)
lexer/lexer.go:18
↓ 4 callersMethodMakeVarOrKeyword
()
lexer/lexer.go:159
↓ 4 callersFunctionNewImmediateNumber
(value int)
gen/operand/immediate_number.go:11
↓ 4 callersMethodProp
(string)
parser/ast/ast.go:20
↓ 4 callersFunctionSaveToMemory
(source *operand.Register, arg *symbol.Symbol)
gen/instruction.go:136
↓ 4 callersFunctioncombine
(stream *PeekTokenStream, af ExprHOF, bf ExprHOF)
parser/ast/expr.go:141
↓ 3 callersMethodAddChild
(child *Table)
translator/symbol/table.go:98
↓ 3 callersMethodAddLabel
()
translator/taprogram.go:23
↓ 3 callersMethodArgs
()
parser/ast/stmt_func_declare.go:45
↓ 3 callersMethodBlock
()
parser/ast/stmt_func_declare.go:51
↓ 3 callersMethodCloneFromSymbolTree
(lexeme *lexer.Token, layoutOffset int)
translator/symbol/table.go:53
↓ 3 callersFunctionE_
(stream *PeekTokenStream, k int)
parser/ast/expr.go:106
↓ 3 callersMethodGetStaticArea
从三地址代码中获取静态符号表中的值,存起来在虚拟机实例化时写入内存静态区
gen/opcode_program.go:57
↓ 3 callersFunctionIfStmtParse
(stream *PeekTokenStream)
parser/ast/stmt_if.go:16
↓ 3 callersMethodIsScalar
()
lexer/token.go:55
↓ 3 callersFunctionMakeBlock
()
parser/ast/block.go:9
↓ 3 callersMethodMakeNumber
()
lexer/lexer.go:334
↓ 3 callersFunctionNewExpr
(typ NodeType, token *lexer.Token)
parser/ast/expr.go:16
↓ 3 callersFunctionNewImmediateInstruction
(code *OpCode, r1 *operand.Register, number *operand.ImmediateNumber)
gen/instruction.go:63
↓ 3 callersFunctionNewParser
(tokens []*lexer.Token)
parser/parser.go:21
↓ 3 callersFunctionNewSymbol
(typ SymbolType)
translator/symbol/symbol.go:14
↓ 3 callersFunctionNewVM
(staticArea []int, opcodes []int, entry *int)
vm/vm.go:16
↓ 3 callersMethodSetOffset
(offset int)
gen/operand/label.go:21
↓ 3 callersMethodSetProp
(string, interface{})
parser/ast/ast.go:29
↓ 3 callersFunctionToBFSString
(node ASTNode, max int)
parser/ast/util.go:42
↓ 3 callersMethodTranslateBlock
(program *TAProgram, node ast.ASTNode, parent *symbol.Table)
translator/translator.go:124
↓ 3 callersMethodTranslateStmt
(program *TAProgram, node ast.ASTNode, table *symbol.Table)
translator/translator.go:40
↓ 3 callersFunctionmain
()
main.go:3
↓ 3 callersMethodsymbolByLexeme
(lexeme *lexer.Token)
translator/symbol/table.go:31
↓ 2 callersFunctionAssignStmtParse
(stream *PeekTokenStream)
parser/ast/stmt_assign.go:16
↓ 2 callersMethodCreateLabel
(label string, lexeme *lexer.Token)
translator/symbol/table.go:108
↓ 2 callersFunctionDeclareStmtParse
(stream *PeekTokenStream)
parser/ast/stmt_declare.go:22
↓ 2 callersFunctionDecodeOffset
(offset int)
gen/operand/offset.go:26
↓ 2 callersMethodFuncVariable
()
parser/ast/stmt_func_declare.go:42
next →1–100 of 285, ranked by callers