https://github.com/lynn/pmachine
Fork of the P-machine emulator, for UAntwerp’s Compilers course
https://github.com/lynn/pmachine
Last synced: about 1 month ago
JSON representation
Fork of the P-machine emulator, for UAntwerp’s Compilers course
- Host: GitHub
- URL: https://github.com/lynn/pmachine
- Owner: lynn
- Created: 2017-05-28T12:51:41.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-04T20:56:22.000Z (almost 8 years ago)
- Last Synced: 2025-02-14T08:24:02.949Z (3 months ago)
- Language: C++
- Size: 66.4 KB
- Stars: 2
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# P-machine interpreter
This is a fork of the P-machine interpreter used for the Compilers course at UAntwerp.
I’ve fixed [exactly one bug](https://github.com/lynn/Pmachine/commit/1578d2b5c3cff6c5f0135eec5e15f97d7976cb69#diff-e3eb7fc7b9bca70ab6b72a0eb8b4d96e), in the `sro` instruction’s implementation.
## Instructions
Install `flex` and `bison`, then run `make`. The resulting binary is called `Pmachine`:
USAGE: Pmachine [filename] <-s [numeric value]> <-t [numeric value]> <-h>
-s: stepsize
-t: number of stackplaces to show (by default all)
-h: show heapTry `echo 10 | ./Pmachine fibonacci.p`, for example.