Commit graph

30 commits

Author SHA1 Message Date
Michael Hope d60fb90b53 build: fix a type error. peek() returning !None means read() will return !None. 2018-10-22 12:30:17 +02:00
Michael Hope c9fa3c039f pl0: switch from tc to mypy for type checking. 2017-07-04 18:26:00 +02:00
Michael Hope 546c20c557 general: minor fixes to the language in the README. 2016-08-25 21:18:02 +02:00
Michael Hope deca1ced85 build: switch to the riscv backend as the C one is broken. 2016-07-03 21:29:21 +02:00
Michael Hope 51c06f2609 docs: added a README. 2016-06-06 22:21:59 +02:00
Michael Hope 27af6b9c37 driver: added a basic compiler driver. 2016-06-06 22:20:03 +02:00
Michael Hope cd7b1d16d3 codegen: sink output to a stream instead of stdout. 2016-06-06 22:19:19 +02:00
Michael Hope c5a4149d27 codegen: added a RISC-V generator (currently actually C). 2016-05-31 22:37:56 +02:00
Michael Hope 243c6148b7 ir: split the blocks in a program out into a list. 2016-05-31 22:37:24 +02:00
Michael Hope 2ab483e9ed lex: changed to the ReprMixin. 2016-05-31 22:35:50 +02:00
Michael Hope a880893277 util: split Node out into a utility class. 2016-05-31 22:34:58 +02:00
Michael Hope 0b6c03b99b general: ran pylint and tidied up. 2016-05-29 21:33:45 +02:00
Michael Hope 865433739e general: added copyright headers and license file. 2016-05-29 21:10:39 +02:00
Michael Hope 849c7fcc74 general: moved source under pl0/, and tests under tests/ 2016-05-29 21:05:00 +02:00
Michael Hope b12f942440 tests: deleted an intermediate file. 2016-05-29 21:04:43 +02:00
Michael Hope f14771fe15 tests: added expect style tests. 2016-05-29 20:56:46 +02:00
Michael Hope d32352ab54 build: updated the Makefile to build and run all examples. 2016-05-29 17:07:09 +02:00
Michael Hope 653d1172ba examples: added a selection of examples and tests. 2016-05-29 17:06:38 +02:00
Michael Hope 9adfa130c5 ir: added a three-address intermediate form and a C based codegen. 2016-05-29 17:05:44 +02:00
Michael Hope c047beb907 util: created a module for utility functions and classes. 2016-05-29 17:05:17 +02:00
Michael Hope 1300b00ab5 lib: added the runtime libraties. 2016-05-13 22:37:23 +02:00
Michael Hope 522a284f05 emit: split the C emitter out and added a p-Machine emitter. 2016-05-13 22:35:40 +02:00
Michael Hope fd84227472 general: ran yapf. 2016-05-13 21:09:35 +02:00
Michael Hope b60d7a56ad lex: add support for comments. 2016-05-13 21:06:50 +02:00
Michael Hope b93e0c7c0c examples: added muldiv and squares. 2016-05-12 22:52:00 +02:00
Michael Hope 2a0362a5e5 emit: flesh out the emitter. Now handles muldiv and squares. 2016-05-12 22:51:08 +02:00
Michael Hope 94c922ca53 emit: added a basic stack based emitter. 2016-05-01 20:29:02 +00:00
Michael Hope d052ef35f5 parser: re-work how the operands and operations are recorded. 2016-05-01 20:28:31 +00:00
Michael Hope 107420e991 parser: implemented more of the language. 2016-05-01 19:48:02 +00:00
Michael Hope 43e799402b Added an initial PL/0 lex and parser. 2016-05-01 19:06:57 +00:00