Commit Graph

37 Commits

Author SHA1 Message Date
Kayne Ruse
7b8ff8f873 Tweaked error message 2024-09-30 15:32:49 +10:00
Kayne Ruse
8d6bdb88b4 Implemented and tested Toy_String, read more
Strings are needed for the handling of identifiers in the key/value
variable storage, so I've got them working first. I used the rope
pattern, which seems to be quite an interesting approach.

I'll add comparison checks later.

Adjusted how buckets are handled in all tests, could've been an issue
down the line.

Added the build instructions to README.md.
2024-09-30 15:22:00 +10:00
Kayne Ruse
c1f2e19e55 Added benchmark folder
It's just a reminder for later
2024-09-30 04:56:20 +10:00
Kayne Ruse
72cad02501 Squashed: Set up a pipeline for repl script testing
It's not ready yet, but considering how much crap this took to get
working... I'm done for the night.

commit 0f3ee91a0628654a61d47a0c41cd3e39c801b8f9
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 28 20:27:44 2024 +1000

    I have a titanic patience... but even the titanic sank

commit d606e0948b78bc0614c81bbea48abf5ffd9f2194
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 28 20:03:57 2024 +1000

    Terminated

commit 7b3b59321d349a8e361857ee3dbe955ec27cb38c
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 28 20:00:11 2024 +1000

    What the hell?

commit 36104b7b5a5d5487c84ab98fec1ae69487fd1a90
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 28 19:55:28 2024 +1000

    PLEASE

commit 0de373d10ad56cba228e9473509a527bf7a3208d
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 28 19:31:28 2024 +1000

    Remember to commit the file!

commit 1cb5780e2dc281ecc723b4042cd9ee1f9a3115ab
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 28 19:24:32 2024 +1000

    Please be correct

commit 2235d716c1d872db3744905fbd2305e65f96361a
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 28 18:58:00 2024 +1000

    Nearly there

commit eabe49130cfdbe93cc3a2056819e267f97304cf1
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 28 18:51:04 2024 +1000

    Oh green world, don't desert me now

commit f0127e2d4947ce47284f2ec72f41a5b6a62121b8
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 28 18:42:50 2024 +1000

    I'm on a highway to hell...

commit f96c0f51a48b080d11d15947940d678ae4f88024
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 28 18:41:01 2024 +1000

    OK, so there's a lot of security there.

commit af3645893a744b7cfa2638bf607373565b8e6ef9
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 28 18:33:51 2024 +1000

    I'm going to steal the declaration of independence

commit e71e1c1b4243e89a580d8b04b4d236ea66ded78c
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 28 18:27:11 2024 +1000

    Show me the money!

commit f29ba6eb96c31e9bbcf23b6ece137381f5be4050
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 28 18:12:23 2024 +1000

    Say hello to my little friend!

commit 3a5ee93884b1169abae48923161d7b47b8a45cdd
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 28 18:06:59 2024 +1000

    You had me at hello

commit 2901d92f24082173e7119a37baa12a6e968796c8
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 28 18:02:49 2024 +1000

    You and your little dog too!

commit 967194e0593233e17ea7737647dc8042ee3bf0aa
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 28 17:52:13 2024 +1000

    I'll get you my pretty!

commit ad48a7aec8ba7ab9e11d23104cd171169cc5ff45
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 28 17:50:14 2024 +1000

    Do you feel lucky, punk?

commit 13fa5c1e96fc7c64f71009f705b8bd69b8dfabf2
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 28 17:48:04 2024 +1000

    Frankly my dear, I don't give a damn

commit 2f15a5a7a71c22bd3f34f619887137c7cd09001b
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 28 17:20:06 2024 +1000

    One of us, one of us, one of us!

commit e696d15ea62cb5d965638e04e6f0458b19cf9e28
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 28 17:16:04 2024 +1000

    Why did it have to be snakes?

commit 90631eda6263c30b0643007fc2c7a84e5e08826d
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 28 17:07:11 2024 +1000

    No, I am your father!

commit 22e1d61caac3d37ce7fe9fc41bc3b60949fe5a81
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 28 17:00:18 2024 +1000

    I'm sorry Dave, I can't let you do that

commit 9aa17b8b04eb65c6c9bf8b015458f749db97494d
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 28 16:57:24 2024 +1000

    LIVE, DARN YOU, LIVE!

commit 1b7f0704d9a2744f10377384ff5f36ea7f61c2da
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 28 16:52:58 2024 +1000

    That's a whole lotta nothing

commit fd4001a9eb557afb3d6cbe409c72f7416b08db60
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 28 16:44:34 2024 +1000

    Here goes nothing

commit 7ba09ef0acda2fede952a912a8a1849e9b6c59b7
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 28 16:40:28 2024 +1000

    Oh, this is gonna be fun, trying to build on a machine I don't even have

commit 1155054552ef46ceb4c21117e35f8e5e46b26dbe
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 28 16:34:06 2024 +1000

    There is no repl-gdb in Ba Sing Se

commit 5361a31da1d9278972dcbe3c8a0ad59ea6e2ab41
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 28 16:31:05 2024 +1000

    Changed -R to -rpath

commit de982ce2846dd6ffe316648e32a8a04b9d7f242d
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 28 16:27:14 2024 +1000

    Fixed printf() string literal

commit 5ddec42af5b46a0c25f64b088a4992433e5a4116
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 28 16:24:05 2024 +1000

    Workflow experiment

commit 28570940b8758fc7f05c957055580e4286a887af
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 28 16:10:19 2024 +1000

    Fixed workflow for macos
2024-09-28 20:38:44 +10:00
Kayne Ruse
57fb1ece81 Basic infile reading is working, untested 2024-09-28 12:26:42 +10:00
Kayne Ruse
3d1d3b3b77 Working on repl, not fully working yet, read more
After a few hours struggling with the linker, I've got the main.c file
running correctly, with caveats:

- must be executed from out/
- only building on linux for the moment
- no tests written yet

I will write some CI jobs to see if the repl works eventually.
2024-09-27 22:53:10 +10:00
Kayne Ruse
c518960171 Toy_VM and Toy_Stack are working and tested, read more
At this point, only a minimal number of operations are working, and
after running any kind of source code, the 'result' is simply left on
the VM's stack. Still, it's awesome to see it reach this point.
2024-09-27 15:12:37 +10:00
Kayne Ruse
0504f4af8b Began writing Toy_VM, read more
Toy_VM and Toy_Stack are both considered WIP, and neither has any tests
yet.
2024-09-26 17:17:18 +10:00
Kayne Ruse
7d92101c1f Tweaked README.md 2024-09-22 15:20:08 +10:00
Kayne Ruse
c180984120 Tweaked build trigger 2024-09-22 15:03:34 +10:00
Kayne Ruse
a2625fa6d4 Implemented tests for Toy_Bytecode and Toy_Routine 2024-09-22 14:13:50 +10:00
Kayne Ruse
4567484038 Squashed: platform support, bugfixes, GH workflows, read more
I've expanded support to three major platforms:

- linux
- windows
- macos

The CI now runs the test suites for all of these, both under normal
conditions and under GDB (except for macos, which lacks GDB support).

TOY_BITNESS specifies the bit-width of the current platform, either 32
or 64. A value of -1 means the bit-width could not be determined. Some
tests will be disabled if the appropriate bit-width can't be determined,
and a warning is printed to stderr.

TOY_API has been tweaked, and is now dependant on different
preprocessor flags. It is defined as 'extern' on all supported
platforms except windows, which instead specifies DLL support. It
defaults to 'extern' if the platform can't be determined.

commit d0350998ecc80b8925a1962ceb2ab400da50be9d
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sun Sep 22 09:55:42 2024 +1000

    Expanded GDB tests using matrix strategy

commit dc2addacc52830227ddcd0f35997c0e1668b579c
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sun Sep 22 09:05:42 2024 +1000

    Reserved the yield keyword

commit f485c380f74a49092e0c5a41e599fbb06dbce235
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 21 15:17:11 2024 +1000

    Potential segfault fix

commit d8b19d21c92133feb071e631009a3cf99df0f068
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 21 14:25:47 2024 +1000

    Added testing on windows under GDB, read more

    I'm hunting a segfault that only appears on windows, but I lack a
    windows machine, so github's runners are all I have right now.

commit 8606db541fb5cbe91b16a39e9815fe4a27ba0c8a
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 21 13:12:02 2024 +1000

    DLL import/export macros tweaked for windows

    TOY_EXPORT for making a DLL
    TOY_IMPORT for using a DLL

    Defaults to 'extern' if neither option is present

commit a6929666401953a5b3a93dfe83c9398e012beefc
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 21 12:52:06 2024 +1000

    Investigating bitness issue on windows

commit 8f615f735868a316e8d5a6a77ed899e72fd537f8
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 21 12:32:55 2024 +1000

    Adjusting bitness tests in test_ast.c

commit 61694f2183ac84ee7c53c855f2f6aa29f360f16c
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Sat Sep 21 11:46:59 2024 +1000

    Added experimental macOS CI job
2024-09-22 11:27:08 +10:00
Kayne Ruse
ac89f80b5b Merge remote-tracking branch 'refs/remotes/origin/dev' into dev 2024-09-20 21:46:11 +10:00
Kayne Ruse
78320e53bb Multiple bugfixes, read more
* expand() will only touch the memory once
* fixed missing if-else cascade at toy_routine.c:90
* unary negate will not optimise numbers unless the '-' character is immediately prior
* fixed broken test for unary negation of groups
2024-09-20 21:39:02 +10:00
Kayne Ruse
84f26d83c8 Update README.md 2024-09-20 16:41:25 +10:00
Kayne Ruse
ad6f1c3067 Bytecode and Routine working, Routine tests incomplete
There may be a build issue on windows
2024-09-20 16:22:52 +10:00
Kayne Ruse
e35af3d84b Fixed buffer overflow, bytecode is WIP 2024-09-19 19:06:49 +10:00
Kayne Ruse
083ee950dd WIP bytecode and routine, read more
The tests are failing in a strange way, with the error message 'corrupted top size'. I don't know what it means, and it seems to be caused by a call to printf() within 'test_bytecode.c'. I need a break, as this is making me dizzy.
2024-09-19 12:45:35 +10:00
Kayne Ruse
47ac1c5b30 Removed Toy_AstGroup generation, as it isn't needed 2024-09-14 12:09:02 +10:00
Kayne Ruse
898b8efc04 Implemented tests for Toy_Parser
The parser now correctly produces a workable AST. I think I'll skip
over the optimizer, and begin on the compiler next session. The
optimizer will act directly on the AST, but it isn't totally necessary.

Other tools can also operate on the AST, such as for debugging - I'll
have to ask what kinds are out there.
2024-09-13 18:08:52 +10:00
Kayne Ruse
b00a6838be Wrote Toy_Parser with minimal features, tests missing
It's too late at night, so I'm packing this up with only a dummy warning
message for the tests. I'll keep going tomorrow, hopefully.
2024-09-12 20:53:34 +10:00
Kayne Ruse
eca3350c64 Tweaked platform support, disabled some tests based on platform 2024-09-10 21:08:05 +10:00
Kayne Ruse
5fd933a15e Implemented AST, ensured bucket memory worked 2024-09-10 20:25:01 +10:00
Kayne Ruse
81417e7f32 Implemented bucket memory structure for custom allocators 2024-09-07 19:47:02 +10:00
Kayne Ruse
023cf9c8b5 Wrote bytecode-format.txt
It's annoying that I can only work for two hours at a time
2024-08-31 21:27:50 +10:00
Kayne Ruse
65087b18bd Wrote SECD-concept.txt, probably overdid it 2024-08-30 20:25:36 +10:00
Kayne Ruse
e65555ca8a Added notes about opcodes 2024-08-29 20:08:59 +10:00
Kayne Ruse
0ed676d79b Added windows-latest build to CI 2024-08-13 23:55:58 +10:00
Kayne Ruse
e6ad46f1ff Wrote value, chunk, memory sections, tested value
chunk and memory remain untested for now
2024-08-13 23:42:14 +10:00
Kayne Ruse
190294e5d9 Rename continuous integration-v2.yml to continuous-integration-v2.yml 2024-08-11 21:28:08 +10:00
Kayne Ruse
2370d5dc83 Fixed CI 2024-08-11 21:12:35 +10:00
Kayne Ruse
a912b6a29c Added lexer, implemented tests build system 2024-08-11 20:15:09 +10:00
Kayne Ruse
82f63013d8 Squashed commit of the following:
commit 633500eeaf72e7e5aed90f3eb071f56d93e129eb
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Fri Aug 9 23:16:55 2024 +1000

    Please work...

commit 4b524a27fd1fe11e02206853b84bdfb349be5bf9
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Fri Aug 9 22:57:07 2024 +1000

    This is starting to get annoying.

commit 5e16a87f6cef7ca9eb536bcc172fd4a184c20124
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Fri Aug 9 22:38:31 2024 +1000

    Fixed workflow file

    Used this: https://rhysd.github.io/actionlint/

commit 7fd6dd610ee3e9327350859b047b0c4792e74f19
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Fri Aug 9 22:30:50 2024 +1000

    Let's try again

commit d83b42a894929f926ba5bf94dee8a2a495a4db86
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Fri Aug 9 22:27:36 2024 +1000

    Reworked the CI

    Also checked over the new code.
2024-08-09 23:22:54 +10:00
Ratstail91
0b8bf4119f Added lists of tokens and keywords, ready for use 2024-05-20 02:35:19 +10:00
Ratstail91
607dc2c22a Added tests-full workflow as a placeholder
This is mainly so github stops emailing me when I push to dev
2024-05-19 12:53:15 +10:00
Ratstail91
fbcb2e0331 Began picking through the old logic 2024-05-19 04:26:15 +10:00
Ratstail91
361fa78ffb Initial outline of non-code files 2024-05-19 03:50:57 +10:00