Commit Graph
47 Commits
Author SHA1 Message Date
raymon e0257e3675 Implement addv and subv 2022-01-07 12:36:14 +01:00
raymon 3df579984b Extract pointing to mem_address to new instruction
- pointa, point now uses this instruction
2022-01-07 12:33:21 +01:00
raymon ce2da7ac89 Parse constants unsigned 2022-01-07 11:43:56 +01:00
raymon 1d5b4bf137 Remove field value from MemCell
- plans for a directly interpreted mblf mode have been scrapped
-  it's MBLF, not MBNF
2022-01-06 21:58:24 +01:00
raymon 8e4e1a8861 Remove addb and subb
- add and sub will be optimized based on the operand
2022-01-06 21:40:32 +01:00
raymon 1f18d080e1 Extract non-expanding instructions to to_bf 2022-01-06 20:39:12 +01:00
raymon 28524a075f Remove match on Rule::instruction 2022-01-06 20:07:34 +01:00
raymon bacee8fbd0 Implement #include 2022-01-06 19:55:44 +01:00
raymon fdc242a685 Implement loopBlock 2022-01-05 13:09:51 +01:00
raymon 65b2dd4f2f Implement print 2022-01-05 13:09:16 +01:00
raymon 077637fb12 Implement getchr 2022-01-05 13:08:55 +01:00
raymon c59dc8fad4 Implement setz 2022-01-05 13:07:36 +01:00
raymon 5ce39f26fd Implement basic add and sub 2022-01-05 13:04:14 +01:00
raymon c41b3535c6 Remove field is_allocated from MemCell 2022-01-05 12:58:49 +01:00
raymon 1bc631d061 Implement pointm 2022-01-05 12:26:27 +01:00
raymon 458c493504 Implement point 2022-01-05 12:26:17 +01:00
raymon 0360a852a5 Implement delvar 2022-01-04 23:25:10 +01:00
raymon dd0766ee97 Panic on duplicate variable creation 2022-01-04 10:18:53 +01:00
raymon 04e94b4934 Implement var 2022-01-04 10:02:47 +01:00
raymon be60afac3e Fill-in struct fields 2022-01-04 10:02:47 +01:00
raymon 448b2a151f Pass state to instruct
state will store:
- variable positions
2022-01-02 20:25:12 +01:00
raymon e96a4ae6fb Allow newlines between comments and statements 2022-01-01 18:40:15 +01:00
raymon 4c78808d90 Cleanup grammar file
- Formatting
- Remove generic `operator` and `operand`
  - used for testing
2022-01-01 18:31:06 +01:00
raymon c0b052cf5c Match macro #include 2022-01-01 18:29:00 +01:00
raymon df9ffbcf29 Explicitly allow spacing before loopBlockEnd
- Inherited prefixed `spacing*` only applied to loopBlockStart,
- as the rule from statement only allowed spacing before the entire loopBlock
2022-01-01 17:33:35 +01:00
raymon 1affaee503 Allow most common word separators for variables
- Also includes '?' suffix for bools
2021-12-31 09:24:14 +01:00
raymon a705d3a8df Correct example.mblf with no-arg print 2021-12-30 23:29:00 +01:00
raymon d271e313c5 Extend numeric operations to constant operations
- Besides decNums and hexNums, characters are also valid
2021-12-30 23:27:30 +01:00
raymon f1d35ff795 Match all instructions without arguments 2021-12-30 22:47:16 +01:00
raymon 94d89c51e8 Match all instructions with number argument 2021-12-30 22:46:04 +01:00
raymon 1430e51c11 Print other Rules to stdout
- Entire parsed file in readable form to stdout
2021-12-30 14:28:08 +01:00
raymon 11bdac46b9 Match all instructions with variable argument 2021-12-30 14:28:08 +01:00
raymon a25ad02b48 Use built-in NEWLINE Rule 2021-12-26 20:41:59 +01:00
raymon c2394eec38 Allow extra newlines between statements 2021-12-26 20:38:31 +01:00
raymon d7144383e7 Allow comments on their own line 2021-12-26 20:22:07 +01:00
raymon 2a7a4ca8b2 Allow indented statements 2021-12-26 20:22:07 +01:00
raymon 8b62a51a64 Allow either spaces or tabs as spacing 2021-12-26 19:47:40 +01:00
raymon f473c6b50d Extract newline grammar rule 2021-12-26 19:47:25 +01:00
raymon ff9fd2f311 Enforce newlines around body of loopBlock
- The start and end of the loopBlock should be on their own line
2021-12-26 19:42:53 +01:00
raymon 755e2f1b53 Ensure operand is optional: only 0 or 1 2021-12-26 19:31:06 +01:00
raymon 859f1df4b8 Allow nested loopBlocks
- loopBlocks now contain statements i.o. instructions
2021-12-26 19:23:37 +01:00
raymon 531d569d48 Extract IO out of instruct
- Attach fail case only once on main
2021-10-20 21:46:19 +02:00
raymon d80e6b9490 Formatting 2021-10-20 21:21:25 +02:00
raymon c57a9c2849 Parse till operators 2021-10-20 21:21:02 +02:00
raymon 3d60b6cb5d Start with Pest Parser 2021-10-19 12:19:08 +02:00
raymon 269bdf0389 Add CLI
- takes input-file, copies to output-file
2021-09-29 11:05:57 +02:00
raymon eae4045c28 Init 2021-09-29 11:03:59 +02:00