Commit Graph

112 Commits

Author SHA1 Message Date
Nemo b0aa03980c [10] Finishes compiler implementation 2020-07-07 03:23:06 +05:30
Nemo 812c76e09a Remove old code 2020-07-06 21:44:41 +05:30
Nemo 02cb984fec Fix empty expression tags, and add directory support 2020-07-06 21:44:22 +05:30
Nemo a274797e58 Fixes <statements> opening after first statement 2020-07-06 21:15:19 +05:30
Nemo d25f7407da Got most of the Compilation Engine working
- Expressions aren't tested
- Some issues with xml ordering and empty tags
2020-07-06 21:12:00 +05:30
Nemo 703c5e467d New compiler is running now and giving some results 2020-07-06 17:21:13 +05:30
Nemo 48d72383fd Implement all grammar classes 2020-07-06 16:27:19 +05:30
Nemo e862b318ba Rename Elements to Atom 2020-07-06 15:00:36 +05:30
Nemo deeebda14d WIP at enginev2 2020-07-06 14:36:41 +05:30
Nemo 333484ce7f Various other WIP attempts 2020-06-24 18:12:36 +05:30
Nemo d209fabc9a Work from yesterday on the CompilationEngine
- Restructured the grammar into a separate python
  module today
- Doesn't cover array expressions and subroutine calls
  inside expressions
2020-06-18 18:21:06 +05:30
Nemo c71dd21128 Break up the file a bit, haven't committed compilation stuff yet 2020-06-18 17:26:32 +05:30
Nemo cece143368 Adds NOTES for compiler implementation 2020-06-16 03:20:29 +05:30
Nemo 19f0d670ac [10] Tokenizer works on all files correctly 2020-06-16 02:43:01 +05:30
Nemo c54e5ccaa4 [10] Adds XML output support 2020-06-16 02:05:33 +05:30
Nemo 8dedf23832 [10] Initial WIP Tokenizer
- Initial WIP
- Hated the comment parsing, need to figure that out better
- Strings are not yet supported
- Symbols and keywords are perfectly covered
2020-06-16 01:24:00 +05:30
Nemo 9e40244023 Adds grammar for Statements 2020-06-16 01:23:46 +05:30
Nemo 937db42830 transcript of the jack language grammar 2020-06-15 22:39:00 +05:30
Nemo 7fa3caef7d [10] Scaffold for Project 10 2020-06-10 02:35:09 +05:30
Nemo 43f982f06f [09] Wrote a Tic-Tac-Toe (2player) implementation 2020-06-10 02:01:57 +05:30
Nemo 23324814bd Compiled pre-programs 2020-06-10 02:01:46 +05:30
Nemo e1a278f4d9 [09] Adds notes on COMPILER specification 2020-06-09 01:08:36 +05:30
Nemo 7be5183fd0 Adds symlinks to the provided standard library for now 2020-06-09 01:08:03 +05:30
Nemo 2a27bff08c [08] Update notes 2020-06-09 00:00:12 +05:30
Nemo aed6f0a372 [08] Finishes VM Implementation
Lots of different changes:

- modular code with lots of helper methods
- fixed the return jump address getting overridden bug
2020-06-08 23:56:54 +05:30
Nemo 979976cb93 [docs] Fix chapter numbers 2020-06-04 15:48:52 +05:30
Nemo 286df5b147 [08] Finishes call/init implementation
Found 2 bugs:

0. ic+=10 is incorrect jump for the boolean compare methods
1. Another bug was in the write() method, which was increasing the instruction
counter even for label commands, which aren't supposed to do that.

Another minor issue in my interpretation of the "call" to `Sys.init`
which I was so far just doing via a jump. Changed that to a proper call
2020-06-04 15:48:49 +05:30
Nemo 4fdc98bb72 [08] Implemented call, but it is breaking somewhere 2020-06-04 15:48:44 +05:30
Nemo 5160559eff [08] Optimized function starts a little 2020-06-04 15:48:41 +05:30
Nemo 6bdbec501a [08] Init Use LC=300, ARG=400 as standard values for now 2020-06-04 15:48:38 +05:30
Nemo 91b8ef006e [08] Fixes frame restoration, so return works properly now 2020-06-04 15:48:35 +05:30
Nemo b052ab617c [08] Implement Return/Function/Init
Return isn't functional (yet)
Init isn't called (yet)
2020-06-04 15:48:32 +05:30
Nemo 2fbdba0cf2 [08] Goto is functional.
Wasted 15 minutes stepping through the assembly, only to find out I was
missing a $ in $globalLabel
2020-06-04 15:48:27 +05:30
Nemo b61d4c4339 [08] Adds support for label and if-goto commands 2020-06-04 15:48:20 +05:30
Nemo 91dd0bb102 Fix command symbols 2020-06-03 17:49:21 +05:30
Nemo 4e49913808 [07/Static] Implements static push/pop memory segment 2020-06-02 17:28:20 +05:30
Nemo 67b4e2653e [07/Pointers] Implemented pointer segment push/pop 2020-06-02 17:04:51 +05:30
Nemo 16e830851e Remove unused tests 2020-06-02 04:16:57 +05:30
Nemo c46f739aed Was missing an indirect lookup on segment pushes 2020-06-02 04:16:13 +05:30
Nemo 32242242cb I think the bug is somewhere in segment based pushes 2020-06-02 04:00:35 +05:30
Nemo 777523c24f Write Limited tests for segment pops 2020-06-02 03:51:40 +05:30
Nemo 551546c953 Break into multiple files for easier navigation 2020-06-02 03:19:28 +05:30
Nemo 9782ba7e4d [07] Almost done with BasicTest implementation 2020-06-02 01:42:15 +05:30
Nemo 3fa5a5c07a [07] StackTest passes 2020-06-02 00:12:41 +05:30
Nemo be69ac321d Reduce stack manipulation (use M instead of A) 2020-06-01 23:05:42 +05:30
Nemo b186ee7df1 [07/SimpleAdd] Partial working implementation
Implemented right now:

- push constant
- add
2020-06-01 21:47:50 +05:30
Nemo e596fbe028 [07] Fix a bit of parsing 2020-06-01 19:56:37 +05:30
Nemo c1cac6ad6f [07] Initial work on VM Translator 2020-06-01 19:49:55 +05:30
Nemo 1966f8b673 Adds notes on Assembler 2020-06-01 18:14:46 +05:30
Nemo 09cd6d9eb0 [07] scaffold 2020-05-31 03:31:27 +05:30