Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ibara/pl0c
Self-hosting PL/0 to C compiler to teach basic compiler construction from a practical, hands-on perspective.
https://github.com/ibara/pl0c
c code-generation code-generator code-generators compilation compiler compilers compiling freebsd lexer linux netbsd openbsd parser pascal pl-0 recursive-descent recursive-descent-parser unix
Last synced: 3 months ago
JSON representation
Self-hosting PL/0 to C compiler to teach basic compiler construction from a practical, hands-on perspective.
- Host: GitHub
- URL: https://github.com/ibara/pl0c
- Owner: ibara
- License: isc
- Created: 2021-08-14T03:41:06.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-09-23T03:13:57.000Z (over 3 years ago)
- Last Synced: 2024-09-27T13:21:59.224Z (4 months ago)
- Topics: c, code-generation, code-generator, code-generators, compilation, compiler, compilers, compiling, freebsd, lexer, linux, netbsd, openbsd, parser, pascal, pl-0, recursive-descent, recursive-descent-parser, unix
- Language: C
- Homepage: https://briancallahan.net/blog/20210814.html
- Size: 405 KB
- Stars: 136
- Watchers: 7
- Forks: 14
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
pl0c
====
`pl0c` is a compiler for the
[PL/0](https://en.wikipedia.org/wiki/PL/0)
language. It reads in PL/0 source code and outputs
equivalent C source code.It was written to be the subject of a series of
[blog posts](https://briancallahan.net/blog/20210814.html)
on writing a compiler from a hands-on practical perspective
for the beginner.Building
--------
Just run `make`. Then (optionally) `make install`.If you are on a platform that does not include
[`strtonum(3)`](https://man.openbsd.org/strtonum.3)
in its libc, remove `-DHAVE_STRTONUM` from `CFLAGS`.
In this case, you'll have to put `strtonum.c` in the
same directory as `pl0c`. This will be improved.Version
-------
The current version is `1.0.2`.You can find a source tarball in the Releases tab.
Issues and Pull Requests
------------------------
Issues and Pull Requests are accepted at any time.If your Pull Request changes the compiler in any way, I ask
that you remember to update the bootstrap compiler using
`make genbootstrap` and including the updated bootstrap
compiler as part of the Pull Request.