Commit Graph
57 Commits
Author SHA1 Message Date
raymon 0e475a7460 Re-use memory with a free-list 2022-04-24 17:09:29 +02:00
raymon c08a2fafa7 Test parse_constant 2022-01-14 22:56:47 +01:00
raymon dd91bba51e CI_GH: use actions-rs 2022-01-07 16:58:51 +01:00
raymon 248be40f7d Add GitHub CI 2022-01-07 16:51:30 +01:00
raymon 13324d8dd4 Cleanup main.rs by fixing warnings 2022-01-07 16:47:56 +01:00
raymon e1b02df0af Complete crate info 2022-01-07 16:16:01 +01:00
raymon b2067582e0 Create README.md with LICENCES 2022-01-07 16:15:25 +01:00
raymon e9ed8b9df1 Cleanup errors 2022-01-07 14:49:02 +01:00
raymon 0cca5ebb67 Remove instruction prints 2022-01-07 14:10:04 +01:00
raymon 1dc545f072 Implement copy 2022-01-07 14:07:38 +01:00
raymon 45faa754bd Implement addv and subv 2022-01-07 12:36:14 +01:00
raymon 556a557aee Extract pointing to mem_address to new instruction
- pointa, point now uses this instruction
2022-01-07 12:33:21 +01:00
raymon 52acba8033 Parse constants unsigned 2022-01-07 11:43:56 +01:00
raymon b0d6627cbd 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 206b993b7b Remove addb and subb
- add and sub will be optimized based on the operand
2022-01-06 21:40:32 +01:00
raymon 6402f2b67d Extract non-expanding instructions to to_bf 2022-01-06 20:39:12 +01:00
raymon cdef5393de Remove match on Rule::instruction 2022-01-06 20:07:34 +01:00
raymon da6c7149f4 Implement #include 2022-01-06 19:55:44 +01:00
raymon 38c55102df Implement loopBlock 2022-01-05 13:09:51 +01:00
raymon 3dc0b970fe Implement print 2022-01-05 13:09:16 +01:00
raymon b84e897e29 Implement getchr 2022-01-05 13:08:55 +01:00
raymon 623f68673e Implement setz 2022-01-05 13:07:36 +01:00
raymon b27baf921b Implement basic add and sub 2022-01-05 13:04:14 +01:00
raymon 6abc8be2c6 Remove field is_allocated from MemCell 2022-01-05 12:58:49 +01:00
raymon 85cf8696db Implement pointm 2022-01-05 12:26:27 +01:00
raymon c2daea0085 Implement point 2022-01-05 12:26:17 +01:00
raymon 3c4307022d Implement delvar 2022-01-04 23:25:10 +01:00
raymon f0015441fd Panic on duplicate variable creation 2022-01-04 10:18:53 +01:00
raymon 5f46fbd760 Implement var 2022-01-04 10:02:47 +01:00
raymon 359f144e9a Fill-in struct fields 2022-01-04 10:02:47 +01:00
raymon 837b24e91d Pass state to instruct
state will store:
- variable positions
2022-01-02 20:25:12 +01:00
raymon d2bccced4e Allow newlines between comments and statements 2022-01-01 18:40:15 +01:00
raymon 0535251cda Cleanup grammar file
- Formatting
- Remove generic `operator` and `operand`
  - used for testing
2022-01-01 18:31:06 +01:00
raymon 06e72b9117 Match macro #include 2022-01-01 18:29:00 +01:00
raymon 27a7a009c1 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 6b0cb46bf6 Allow most common word separators for variables
- Also includes '?' suffix for bools
2021-12-31 09:24:14 +01:00
raymon 1e2eb0cc23 Correct example.mblf with no-arg print 2021-12-30 23:29:00 +01:00
raymon 226873e71c Extend numeric operations to constant operations
- Besides decNums and hexNums, characters are also valid
2021-12-30 23:27:30 +01:00
raymon 764b2d17b9 Match all instructions without arguments 2021-12-30 22:47:16 +01:00
raymon ea54bb404d Match all instructions with number argument 2021-12-30 22:46:04 +01:00
raymon db906d1f8a Print other Rules to stdout
- Entire parsed file in readable form to stdout
2021-12-30 14:28:08 +01:00
raymon 08df04a208 Match all instructions with variable argument 2021-12-30 14:28:08 +01:00
raymon 833e82d5ec Use built-in NEWLINE Rule 2021-12-26 20:41:59 +01:00
raymon 04b82f997d Allow extra newlines between statements 2021-12-26 20:38:31 +01:00
raymon 4f8b28f22d Allow comments on their own line 2021-12-26 20:22:07 +01:00
raymon 8d071dc6df Allow indented statements 2021-12-26 20:22:07 +01:00
raymon 6a82314e54 Allow either spaces or tabs as spacing 2021-12-26 19:47:40 +01:00
raymon 751dfcd5aa Extract newline grammar rule 2021-12-26 19:47:25 +01:00
raymon bc366b7e1d 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 a967f0649f Ensure operand is optional: only 0 or 1 2021-12-26 19:31:06 +01:00
raymon 9c60b4d6ac Allow nested loopBlocks
- loopBlocks now contain statements i.o. instructions
2021-12-26 19:23:37 +01:00
raymon f3a4b8d98f Extract IO out of instruct
- Attach fail case only once on main
2021-10-20 21:46:19 +02:00
raymon b338363aa5 Formatting 2021-10-20 21:21:25 +02:00
raymon 13b29b8bdc Parse till operators 2021-10-20 21:21:02 +02:00
raymon 8bd1224889 Start with Pest Parser 2021-10-19 12:19:08 +02:00
raymon b5599edd50 Add CLI
- takes input-file, copies to output-file
2021-09-29 11:05:57 +02:00
raymon a651f20078 Init 2021-09-29 11:03:59 +02:00