monic part 5: writing C programs on the calculator
|
01-05-2021, 03:50 AM
Post: #3
|
|||
|
|||
RE: monic part 5: writing C programs on the calculator
(01-01-2021 01:35 AM)F-73P Wrote: the translator produces a sequence of codes. When the program is run the codes are fed to a switch statement, which executes the corresponding instruction. Does this make the translator a compiler, or is it an interpreter? Very nice work, judging from your description! This is not a trivial accomplishment. I assume you are lexing/parsing the source code just once, so this is a compiler that produces (byte) codes. Your virtual machine executes them in a loop with a switch statement. This approach is in principle similar to the JVM. Just to compare, I wrote a small C compiler that produces JVM class files from "mini C" source code. "I count on old friends to remain rational" |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 11 Guest(s)