M2000 Compiler Task: Difference between revisions

Content added Content deleted
mNo edit summary
Line 677: Line 677:
Append func, prti_:=lambda->{Print #-2, str$(sint(eval(stack_,sp)),0);:sp++}
Append func, prti_:=lambda->{Print #-2, str$(sint(eval(stack_,sp)),0);:sp++}
Append func, prtc_:=lambda->{Print #-2, chrcode$(eval(stack_,sp));:sp++}
Append func, prtc_:=lambda->{Print #-2, chrcode$(eval(stack_,sp));:sp++}
Rem : Form 120, 60 ' change console width X height to run Ascii Mandlebrot examlpe
Rem : Form 120, 60 ' change console width X height to run Ascii Mandlebrot example
\\ change Report with Print #-2, (report stop when scrolling 3/4 of height of console, waiting key or mouse key to continue)
Report "Virtual Assembly Code:"+{
Print #-2, "Virtual Assembly Code:"+{
}+a$
}+a$
Print "Prepare Byte Code"
Print "Prepare Byte Code"
Line 783: Line 784:
}
}
Form 120, 60
Form ! 120, 60
Refresh
Refresh
Print "Lexical Analyzer" : Refresh
lexical_analyzer
lexical_analyzer
Print "Syntaxl Analyzer" : Refresh
syntax_analyzer
syntax_analyzer
Print "Code Generator" : Refresh
CodeGenerator
CodeGenerator
Virtual_Machine_Interpreter
Virtual_Machine_Interpreter