From d0213b4202ac12d7e92f7125e87c31d9ecb637dd Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Mon, 11 Apr 2022 18:50:08 -0400 Subject: Remove src folders --- libtnsl/algo/algo.tnsl | 29 ++++++++ libtnsl/algo/alloc.tnsl | 20 ++++++ libtnsl/algo/dealloc.tnsl | 20 ++++++ libtnsl/algo/math/math.tnsl | 26 +++++++ libtnsl/asm/asm.tnsl | 29 ++++++++ libtnsl/box/box.tnsl | 34 +++++++++ libtnsl/box/iterator.tnsl | 40 +++++++++++ libtnsl/box/map.tnsl | 20 ++++++ libtnsl/box/string.tnsl | 20 ++++++ libtnsl/box/tree.tnsl | 20 ++++++ libtnsl/box/vector.tnsl | 20 ++++++ libtnsl/io/block.tnsl | 20 ++++++ libtnsl/io/file.tnsl | 20 ++++++ libtnsl/io/io.tnsl | 33 +++++++++ libtnsl/io/std.tnsl | 20 ++++++ libtnsl/io/stream.tnsl | 20 ++++++ libtnsl/libtnsl.tnsl | 32 +++++++++ libtnsl/reflect/dispatch.tnsl | 20 ++++++ libtnsl/reflect/reflect.tnsl | 33 +++++++++ libtnsl/reflect/resolver.tnsl | 20 ++++++ libtnsl/reflect/type.tnsl | 71 +++++++++++++++++++ libtnsl/reflect/virtual.tnsl | 144 ++++++++++++++++++++++++++++++++++++++ libtnsl/src/algo/algo.tnsl | 29 -------- libtnsl/src/algo/alloc.tnsl | 20 ------ libtnsl/src/algo/dealloc.tnsl | 20 ------ libtnsl/src/algo/math/math.tnsl | 26 ------- libtnsl/src/asm/asm.tnsl | 29 -------- libtnsl/src/box/box.tnsl | 34 --------- libtnsl/src/box/iterator.tnsl | 40 ----------- libtnsl/src/box/map.tnsl | 20 ------ libtnsl/src/box/string.tnsl | 20 ------ libtnsl/src/box/tree.tnsl | 20 ------ libtnsl/src/box/vector.tnsl | 20 ------ libtnsl/src/io/block.tnsl | 20 ------ libtnsl/src/io/file.tnsl | 20 ------ libtnsl/src/io/io.tnsl | 33 --------- libtnsl/src/io/std.tnsl | 20 ------ libtnsl/src/io/stream.tnsl | 20 ------ libtnsl/src/libtnsl.tnsl | 32 --------- libtnsl/src/reflect/dispatch.tnsl | 20 ------ libtnsl/src/reflect/reflect.tnsl | 33 --------- libtnsl/src/reflect/resolver.tnsl | 20 ------ libtnsl/src/reflect/type.tnsl | 71 ------------------- libtnsl/src/reflect/virtual.tnsl | 144 -------------------------------------- libtnsl/src/time/alg.tnsl | 20 ------ libtnsl/src/time/conv.tnsl | 20 ------ libtnsl/src/time/parse.tnsl | 20 ------ libtnsl/src/time/time.tnsl | 27 ------- libtnsl/time/alg.tnsl | 20 ++++++ libtnsl/time/conv.tnsl | 20 ++++++ libtnsl/time/parse.tnsl | 20 ++++++ libtnsl/time/time.tnsl | 27 +++++++ 52 files changed, 798 insertions(+), 798 deletions(-) create mode 100644 libtnsl/algo/algo.tnsl create mode 100644 libtnsl/algo/alloc.tnsl create mode 100644 libtnsl/algo/dealloc.tnsl create mode 100644 libtnsl/algo/math/math.tnsl create mode 100644 libtnsl/asm/asm.tnsl create mode 100644 libtnsl/box/box.tnsl create mode 100644 libtnsl/box/iterator.tnsl create mode 100644 libtnsl/box/map.tnsl create mode 100644 libtnsl/box/string.tnsl create mode 100644 libtnsl/box/tree.tnsl create mode 100644 libtnsl/box/vector.tnsl create mode 100644 libtnsl/io/block.tnsl create mode 100644 libtnsl/io/file.tnsl create mode 100644 libtnsl/io/io.tnsl create mode 100644 libtnsl/io/std.tnsl create mode 100644 libtnsl/io/stream.tnsl create mode 100644 libtnsl/libtnsl.tnsl create mode 100644 libtnsl/reflect/dispatch.tnsl create mode 100644 libtnsl/reflect/reflect.tnsl create mode 100644 libtnsl/reflect/resolver.tnsl create mode 100644 libtnsl/reflect/type.tnsl create mode 100644 libtnsl/reflect/virtual.tnsl delete mode 100644 libtnsl/src/algo/algo.tnsl delete mode 100644 libtnsl/src/algo/alloc.tnsl delete mode 100644 libtnsl/src/algo/dealloc.tnsl delete mode 100644 libtnsl/src/algo/math/math.tnsl delete mode 100644 libtnsl/src/asm/asm.tnsl delete mode 100644 libtnsl/src/box/box.tnsl delete mode 100644 libtnsl/src/box/iterator.tnsl delete mode 100644 libtnsl/src/box/map.tnsl delete mode 100644 libtnsl/src/box/string.tnsl delete mode 100644 libtnsl/src/box/tree.tnsl delete mode 100644 libtnsl/src/box/vector.tnsl delete mode 100644 libtnsl/src/io/block.tnsl delete mode 100644 libtnsl/src/io/file.tnsl delete mode 100644 libtnsl/src/io/io.tnsl delete mode 100644 libtnsl/src/io/std.tnsl delete mode 100644 libtnsl/src/io/stream.tnsl delete mode 100644 libtnsl/src/libtnsl.tnsl delete mode 100644 libtnsl/src/reflect/dispatch.tnsl delete mode 100644 libtnsl/src/reflect/reflect.tnsl delete mode 100644 libtnsl/src/reflect/resolver.tnsl delete mode 100644 libtnsl/src/reflect/type.tnsl delete mode 100644 libtnsl/src/reflect/virtual.tnsl delete mode 100644 libtnsl/src/time/alg.tnsl delete mode 100644 libtnsl/src/time/conv.tnsl delete mode 100644 libtnsl/src/time/parse.tnsl delete mode 100644 libtnsl/src/time/time.tnsl create mode 100644 libtnsl/time/alg.tnsl create mode 100644 libtnsl/time/conv.tnsl create mode 100644 libtnsl/time/parse.tnsl create mode 100644 libtnsl/time/time.tnsl (limited to 'libtnsl') diff --git a/libtnsl/algo/algo.tnsl b/libtnsl/algo/algo.tnsl new file mode 100644 index 0000000..7df9198 --- /dev/null +++ b/libtnsl/algo/algo.tnsl @@ -0,0 +1,29 @@ +/## + Copyright 2021 Kyle Gunger + + Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. + + This file may only be used in accordance with one of the two + licenses. You should have received a copy of each license with + the source code. In the event that you did not recieve a copy + of the licenses, they may be found at the following URLs: + + CDDL 1.0: + https://opensource.org/licenses/CDDL-1.0 + + BSD 3-Clause: + https://opensource.org/licenses/BSD-3-Clause + + THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO + WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE + EXPRESS OR IMPLIED +#/ + +/; export module algo + /: include + "alloc.tnsl" + "dealloc.tnsl" + + "math" + :/ +;/ \ No newline at end of file diff --git a/libtnsl/algo/alloc.tnsl b/libtnsl/algo/alloc.tnsl new file mode 100644 index 0000000..d346464 --- /dev/null +++ b/libtnsl/algo/alloc.tnsl @@ -0,0 +1,20 @@ +/## + Copyright 2021 Kyle Gunger + + Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. + + This file may only be used in accordance with one of the two + licenses. You should have received a copy of each license with + the source code. In the event that you did not recieve a copy + of the licenses, they may be found at the following URLs: + + CDDL 1.0: + https://opensource.org/licenses/CDDL-1.0 + + BSD 3-Clause: + https://opensource.org/licenses/BSD-3-Clause + + THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO + WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE + EXPRESS OR IMPLIED +#/ \ No newline at end of file diff --git a/libtnsl/algo/dealloc.tnsl b/libtnsl/algo/dealloc.tnsl new file mode 100644 index 0000000..d346464 --- /dev/null +++ b/libtnsl/algo/dealloc.tnsl @@ -0,0 +1,20 @@ +/## + Copyright 2021 Kyle Gunger + + Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. + + This file may only be used in accordance with one of the two + licenses. You should have received a copy of each license with + the source code. In the event that you did not recieve a copy + of the licenses, they may be found at the following URLs: + + CDDL 1.0: + https://opensource.org/licenses/CDDL-1.0 + + BSD 3-Clause: + https://opensource.org/licenses/BSD-3-Clause + + THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO + WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE + EXPRESS OR IMPLIED +#/ \ No newline at end of file diff --git a/libtnsl/algo/math/math.tnsl b/libtnsl/algo/math/math.tnsl new file mode 100644 index 0000000..5676d09 --- /dev/null +++ b/libtnsl/algo/math/math.tnsl @@ -0,0 +1,26 @@ +/## + Copyright 2021 Kyle Gunger + + Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. + + This file may only be used in accordance with one of the two + licenses. You should have received a copy of each license with + the source code. In the event that you did not recieve a copy + of the licenses, they may be found at the following URLs: + + CDDL 1.0: + https://opensource.org/licenses/CDDL-1.0 + + BSD 3-Clause: + https://opensource.org/licenses/BSD-3-Clause + + THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO + WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE + EXPRESS OR IMPLIED +#/ + +/; export module math + /; include + + ;/ +;/ \ No newline at end of file diff --git a/libtnsl/asm/asm.tnsl b/libtnsl/asm/asm.tnsl new file mode 100644 index 0000000..d0da9a6 --- /dev/null +++ b/libtnsl/asm/asm.tnsl @@ -0,0 +1,29 @@ +/## + Copyright 2021 Kyle Gunger + + Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. + + This file may only be used in accordance with one of the two + licenses. You should have received a copy of each license with + the source code. In the event that you did not recieve a copy + of the licenses, they may be found at the following URLs: + + CDDL 1.0: + https://opensource.org/licenses/CDDL-1.0 + + BSD 3-Clause: + https://opensource.org/licenses/BSD-3-Clause + + THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO + WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE + EXPRESS OR IMPLIED +#/ + +/## tnsl.asm + + Unexported module for internal library use. Bridges + the gaps between the main language and assembly for + the selected ISA/OS combo. + +#; module asm +;/ \ No newline at end of file diff --git a/libtnsl/box/box.tnsl b/libtnsl/box/box.tnsl new file mode 100644 index 0000000..2f270b6 --- /dev/null +++ b/libtnsl/box/box.tnsl @@ -0,0 +1,34 @@ +/## + Copyright 2021 Kyle Gunger + + Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. + + This file may only be used in accordance with one of the two + licenses. You should have received a copy of each license with + the source code. In the event that you did not recieve a copy + of the licenses, they may be found at the following URLs: + + CDDL 1.0: + https://opensource.org/licenses/CDDL-1.0 + + BSD 3-Clause: + https://opensource.org/licenses/BSD-3-Clause + + THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO + WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE + EXPRESS OR IMPLIED +#/ + +/## + module tnsl.box + Containers and data management classes + +#; export module box + /: import + "iterator.tnsl" + "map.tnsl" + "string.tnsl" + "tree.tnsl" + "vector.tnsl" + :/ +;/ \ No newline at end of file diff --git a/libtnsl/box/iterator.tnsl b/libtnsl/box/iterator.tnsl new file mode 100644 index 0000000..13b9ef9 --- /dev/null +++ b/libtnsl/box/iterator.tnsl @@ -0,0 +1,40 @@ +/## + Copyright 2021 Kyle Gunger + + Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. + + This file may only be used in accordance with one of the two + licenses. You should have received a copy of each license with + the source code. In the event that you did not recieve a copy + of the licenses, they may be found at the following URLs: + + CDDL 1.0: + https://opensource.org/licenses/CDDL-1.0 + + BSD 3-Clause: + https://opensource.org/licenses/BSD-3-Clause + + THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO + WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE + EXPRESS OR IMPLIED +#/ + +# Interface for moving through a list +/; interface ForwardsIterator (type T) + + # Advance to the next element in the list + /; next [bool] + ;/ + + # Get the current element in the list + /; current [T] + ;/ +;/ + +# Interface for moving through a list forwards or backwards +/; interface TwoWayIterator (type T) extends ForwardsIterator(T) + + # Move to the previous element in the list + /; prev [bool] + ;/ +;/ \ No newline at end of file diff --git a/libtnsl/box/map.tnsl b/libtnsl/box/map.tnsl new file mode 100644 index 0000000..d346464 --- /dev/null +++ b/libtnsl/box/map.tnsl @@ -0,0 +1,20 @@ +/## + Copyright 2021 Kyle Gunger + + Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. + + This file may only be used in accordance with one of the two + licenses. You should have received a copy of each license with + the source code. In the event that you did not recieve a copy + of the licenses, they may be found at the following URLs: + + CDDL 1.0: + https://opensource.org/licenses/CDDL-1.0 + + BSD 3-Clause: + https://opensource.org/licenses/BSD-3-Clause + + THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO + WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE + EXPRESS OR IMPLIED +#/ \ No newline at end of file diff --git a/libtnsl/box/string.tnsl b/libtnsl/box/string.tnsl new file mode 100644 index 0000000..d346464 --- /dev/null +++ b/libtnsl/box/string.tnsl @@ -0,0 +1,20 @@ +/## + Copyright 2021 Kyle Gunger + + Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. + + This file may only be used in accordance with one of the two + licenses. You should have received a copy of each license with + the source code. In the event that you did not recieve a copy + of the licenses, they may be found at the following URLs: + + CDDL 1.0: + https://opensource.org/licenses/CDDL-1.0 + + BSD 3-Clause: + https://opensource.org/licenses/BSD-3-Clause + + THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO + WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE + EXPRESS OR IMPLIED +#/ \ No newline at end of file diff --git a/libtnsl/box/tree.tnsl b/libtnsl/box/tree.tnsl new file mode 100644 index 0000000..d346464 --- /dev/null +++ b/libtnsl/box/tree.tnsl @@ -0,0 +1,20 @@ +/## + Copyright 2021 Kyle Gunger + + Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. + + This file may only be used in accordance with one of the two + licenses. You should have received a copy of each license with + the source code. In the event that you did not recieve a copy + of the licenses, they may be found at the following URLs: + + CDDL 1.0: + https://opensource.org/licenses/CDDL-1.0 + + BSD 3-Clause: + https://opensource.org/licenses/BSD-3-Clause + + THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO + WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE + EXPRESS OR IMPLIED +#/ \ No newline at end of file diff --git a/libtnsl/box/vector.tnsl b/libtnsl/box/vector.tnsl new file mode 100644 index 0000000..d346464 --- /dev/null +++ b/libtnsl/box/vector.tnsl @@ -0,0 +1,20 @@ +/## + Copyright 2021 Kyle Gunger + + Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. + + This file may only be used in accordance with one of the two + licenses. You should have received a copy of each license with + the source code. In the event that you did not recieve a copy + of the licenses, they may be found at the following URLs: + + CDDL 1.0: + https://opensource.org/licenses/CDDL-1.0 + + BSD 3-Clause: + https://opensource.org/licenses/BSD-3-Clause + + THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO + WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE + EXPRESS OR IMPLIED +#/ \ No newline at end of file diff --git a/libtnsl/io/block.tnsl b/libtnsl/io/block.tnsl new file mode 100644 index 0000000..d346464 --- /dev/null +++ b/libtnsl/io/block.tnsl @@ -0,0 +1,20 @@ +/## + Copyright 2021 Kyle Gunger + + Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. + + This file may only be used in accordance with one of the two + licenses. You should have received a copy of each license with + the source code. In the event that you did not recieve a copy + of the licenses, they may be found at the following URLs: + + CDDL 1.0: + https://opensource.org/licenses/CDDL-1.0 + + BSD 3-Clause: + https://opensource.org/licenses/BSD-3-Clause + + THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO + WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE + EXPRESS OR IMPLIED +#/ \ No newline at end of file diff --git a/libtnsl/io/file.tnsl b/libtnsl/io/file.tnsl new file mode 100644 index 0000000..d346464 --- /dev/null +++ b/libtnsl/io/file.tnsl @@ -0,0 +1,20 @@ +/## + Copyright 2021 Kyle Gunger + + Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. + + This file may only be used in accordance with one of the two + licenses. You should have received a copy of each license with + the source code. In the event that you did not recieve a copy + of the licenses, they may be found at the following URLs: + + CDDL 1.0: + https://opensource.org/licenses/CDDL-1.0 + + BSD 3-Clause: + https://opensource.org/licenses/BSD-3-Clause + + THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO + WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE + EXPRESS OR IMPLIED +#/ \ No newline at end of file diff --git a/libtnsl/io/io.tnsl b/libtnsl/io/io.tnsl new file mode 100644 index 0000000..68e2fc0 --- /dev/null +++ b/libtnsl/io/io.tnsl @@ -0,0 +1,33 @@ +/## + Copyright 2021 Kyle Gunger + + Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. + + This file may only be used in accordance with one of the two + licenses. You should have received a copy of each license with + the source code. In the event that you did not recieve a copy + of the licenses, they may be found at the following URLs: + + CDDL 1.0: + https://opensource.org/licenses/CDDL-1.0 + + BSD 3-Clause: + https://opensource.org/licenses/BSD-3-Clause + + THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO + WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE + EXPRESS OR IMPLIED +#/ + +/## + module tnsl.io + Data management for input and output via blocks and streams, memory tools such as alloc and delete + +#; export module io + /: import + "block.tnsl" + "stream.tnsl" + "file.tnsl" + "std.tnsl" + :/ +;/ \ No newline at end of file diff --git a/libtnsl/io/std.tnsl b/libtnsl/io/std.tnsl new file mode 100644 index 0000000..d346464 --- /dev/null +++ b/libtnsl/io/std.tnsl @@ -0,0 +1,20 @@ +/## + Copyright 2021 Kyle Gunger + + Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. + + This file may only be used in accordance with one of the two + licenses. You should have received a copy of each license with + the source code. In the event that you did not recieve a copy + of the licenses, they may be found at the following URLs: + + CDDL 1.0: + https://opensource.org/licenses/CDDL-1.0 + + BSD 3-Clause: + https://opensource.org/licenses/BSD-3-Clause + + THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO + WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE + EXPRESS OR IMPLIED +#/ \ No newline at end of file diff --git a/libtnsl/io/stream.tnsl b/libtnsl/io/stream.tnsl new file mode 100644 index 0000000..d346464 --- /dev/null +++ b/libtnsl/io/stream.tnsl @@ -0,0 +1,20 @@ +/## + Copyright 2021 Kyle Gunger + + Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. + + This file may only be used in accordance with one of the two + licenses. You should have received a copy of each license with + the source code. In the event that you did not recieve a copy + of the licenses, they may be found at the following URLs: + + CDDL 1.0: + https://opensource.org/licenses/CDDL-1.0 + + BSD 3-Clause: + https://opensource.org/licenses/BSD-3-Clause + + THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO + WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE + EXPRESS OR IMPLIED +#/ \ No newline at end of file diff --git a/libtnsl/libtnsl.tnsl b/libtnsl/libtnsl.tnsl new file mode 100644 index 0000000..070bfd2 --- /dev/null +++ b/libtnsl/libtnsl.tnsl @@ -0,0 +1,32 @@ +/## + Copyright 2021 Kyle Gunger + + Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. + + This file may only be used in accordance with one of the two + licenses. You should have received a copy of each license with + the source code. In the event that you did not recieve a copy + of the licenses, they may be found at the following URLs: + + CDDL 1.0: + https://opensource.org/licenses/CDDL-1.0 + + BSD 3-Clause: + https://opensource.org/licenses/BSD-3-Clause + + THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO + WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE + EXPRESS OR IMPLIED +#/ + +/;export module tnsl + ; const ~void _null = 0x0 + + /: import + "algo" + "box" + "io" + "reflect" + "time" + :/ +;/ \ No newline at end of file diff --git a/libtnsl/reflect/dispatch.tnsl b/libtnsl/reflect/dispatch.tnsl new file mode 100644 index 0000000..d346464 --- /dev/null +++ b/libtnsl/reflect/dispatch.tnsl @@ -0,0 +1,20 @@ +/## + Copyright 2021 Kyle Gunger + + Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. + + This file may only be used in accordance with one of the two + licenses. You should have received a copy of each license with + the source code. In the event that you did not recieve a copy + of the licenses, they may be found at the following URLs: + + CDDL 1.0: + https://opensource.org/licenses/CDDL-1.0 + + BSD 3-Clause: + https://opensource.org/licenses/BSD-3-Clause + + THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO + WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE + EXPRESS OR IMPLIED +#/ \ No newline at end of file diff --git a/libtnsl/reflect/reflect.tnsl b/libtnsl/reflect/reflect.tnsl new file mode 100644 index 0000000..b3640c2 --- /dev/null +++ b/libtnsl/reflect/reflect.tnsl @@ -0,0 +1,33 @@ +/## + Copyright 2021 Kyle Gunger + + Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. + + This file may only be used in accordance with one of the two + licenses. You should have received a copy of each license with + the source code. In the event that you did not recieve a copy + of the licenses, they may be found at the following URLs: + + CDDL 1.0: + https://opensource.org/licenses/CDDL-1.0 + + BSD 3-Clause: + https://opensource.org/licenses/BSD-3-Clause + + THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO + WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE + EXPRESS OR IMPLIED +#/ + +/## + module tnsl.reflect + Type and method resolution, reflection and other required methods such as is + +#; export module reflect + /: import + "type.tnsl" + "virtual.tnsl" + "resolver.tnsl" + "dispatch.tnsl" + :/ +;/ \ No newline at end of file diff --git a/libtnsl/reflect/resolver.tnsl b/libtnsl/reflect/resolver.tnsl new file mode 100644 index 0000000..d346464 --- /dev/null +++ b/libtnsl/reflect/resolver.tnsl @@ -0,0 +1,20 @@ +/## + Copyright 2021 Kyle Gunger + + Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. + + This file may only be used in accordance with one of the two + licenses. You should have received a copy of each license with + the source code. In the event that you did not recieve a copy + of the licenses, they may be found at the following URLs: + + CDDL 1.0: + https://opensource.org/licenses/CDDL-1.0 + + BSD 3-Clause: + https://opensource.org/licenses/BSD-3-Clause + + THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO + WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE + EXPRESS OR IMPLIED +#/ \ No newline at end of file diff --git a/libtnsl/reflect/type.tnsl b/libtnsl/reflect/type.tnsl new file mode 100644 index 0000000..7a19b7d --- /dev/null +++ b/libtnsl/reflect/type.tnsl @@ -0,0 +1,71 @@ +/## + Copyright 2021 Kyle Gunger + + Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. + + This file may only be used in accordance with one of the two + licenses. You should have received a copy of each license with + the source code. In the event that you did not recieve a copy + of the licenses, they may be found at the following URLs: + + CDDL 1.0: + https://opensource.org/licenses/CDDL-1.0 + + BSD 3-Clause: + https://opensource.org/licenses/BSD-3-Clause + + THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO + WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE + EXPRESS OR IMPLIED +#/ + +/## tnsl.reflect._type + Header data which non-raw structs point to. + Upper limits for classes and libs defined here: + - Max 2^16 libraries + - Max 2^16 modules/sub-modules per library + - Max 2^16 classes per module + - Max 2^8 Generics per class +#/ +; raw struct _type() { + uint16 + _library_id, + _module_id, + _type_id, + + {uint8}_type + _generics +} + +/## tnsl.reflect._type_addresses + Metadata about where things are stored + in a class +#/ +; raw struct _type_addresses { + ~{}_type + _supers, + + ~{}uint + _super_offsets, + + ~{}_method + _methods, + + ~{}_member + _members +} + +/; method _type + + /; _is (_type base) [bool] + ;/ + + /; inline _get (_type t, ~void s, _member m) [~void] + ;/ + + /; inline raw _call (_type t, ~void s, _method m, ~void p) + ;/ + + /; _offset (_type cast) [uint] + ;/ +;/ \ No newline at end of file diff --git a/libtnsl/reflect/virtual.tnsl b/libtnsl/reflect/virtual.tnsl new file mode 100644 index 0000000..8891905 --- /dev/null +++ b/libtnsl/reflect/virtual.tnsl @@ -0,0 +1,144 @@ +/## + Copyright 2021 Kyle Gunger + + Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. + + This file may only be used in accordance with one of the two + licenses. You should have received a copy of each license with + the source code. In the event that you did not recieve a copy + of the licenses, they may be found at the following URLs: + + CDDL 1.0: + https://opensource.org/licenses/CDDL-1.0 + + BSD 3-Clause: + https://opensource.org/licenses/BSD-3-Clause + + THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO + WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE + EXPRESS OR IMPLIED +#/ + +/## _LIB_TABLE + The array of library export trees. + + Convention: + - index 0 is always reserved for language-specific types + libtnsl + - index 0 module 0 represents the fundimental in-built types like int +#/ +: extern const {}~library _LIB_TABLE + +; raw struct library { + # Version + uint16 + major, + minor, + patch + + ~sym_node + root_node +} + +/## tnsl.reflect._method + Metadata for methods (can be decoded from library + symbol tables). Limits for methods defined here: + - Max 2^8 inputs + - Max 2^8 outputs +#/ +; raw struct _method { + {uint8}charp + name, + + {uint8}~_type + inputs, + outputs, + + ~void + address +} + +/## tnsl.reflect._member + Metadata about struct members +#/ +; raw struct _member { + {uint8}charp + name, + + _type + member_type, + + uint + byte_offset +} + +/## tnsl.reflect.sym_node + Represents a module in a symbol tree +#/ +; raw struct sym_node { + {uint8}charp + name, + + uint16 + id, + + {}~sym_node + sub_modules, + + {}~sym_type + sub_types +} + +/## tnsl.reflect.sym_type + Represents a type in a symbol tree +#/ +; raw struct sym_type { + {uint8}charp + name, + + {uint8}~sym_type + super_types, + +} + +############################### +# Traverse the Library Tree # +############################### + +/; get_sym_node (~sym_node root, uint16 mod_id) [~sym_node] + /;loop (root != null) + /; loop (uint16 sub = 0; sub < len `root.sub_modules) [sub++] + /; if (mod_id < `root.sub_modules{sub}.id) + /; if (sub == 0) + ; return null + ;/ + ;root = `root.sub_modules{sub - 1} + ; continue 1 + ;; else if (mod_id == `root.sub_modules{sub}.id) + ; return `root.sub_modules{sub} + ;/ + ;/ + + ; break + ;/ + + ; return null +;/ + +/; get_sym_node (uint16 lib_id, mod_id) [~sym_node] + + ;~library lib = _LIB_TABLE{lib_id} + + ;return get_sym_node(`lib.root_node, mod_id) +;/ + +/; get_sym_type(uint16 lib_id, mod_id, typ_id) [~sym_type] + + ;~library lib = _LIB_TABLE{lib_id} + ;~sym_node mod = get_sym_node(`lib.root_node, mod_id) + + ;return `mod.sub_types{typ_id} +;/ + +/; get_sym_type(`const {}charp path) [~sym_type] + +;/ \ No newline at end of file diff --git a/libtnsl/src/algo/algo.tnsl b/libtnsl/src/algo/algo.tnsl deleted file mode 100644 index 7df9198..0000000 --- a/libtnsl/src/algo/algo.tnsl +++ /dev/null @@ -1,29 +0,0 @@ -/## - Copyright 2021 Kyle Gunger - - Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. - - This file may only be used in accordance with one of the two - licenses. You should have received a copy of each license with - the source code. In the event that you did not recieve a copy - of the licenses, they may be found at the following URLs: - - CDDL 1.0: - https://opensource.org/licenses/CDDL-1.0 - - BSD 3-Clause: - https://opensource.org/licenses/BSD-3-Clause - - THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO - WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE - EXPRESS OR IMPLIED -#/ - -/; export module algo - /: include - "alloc.tnsl" - "dealloc.tnsl" - - "math" - :/ -;/ \ No newline at end of file diff --git a/libtnsl/src/algo/alloc.tnsl b/libtnsl/src/algo/alloc.tnsl deleted file mode 100644 index d346464..0000000 --- a/libtnsl/src/algo/alloc.tnsl +++ /dev/null @@ -1,20 +0,0 @@ -/## - Copyright 2021 Kyle Gunger - - Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. - - This file may only be used in accordance with one of the two - licenses. You should have received a copy of each license with - the source code. In the event that you did not recieve a copy - of the licenses, they may be found at the following URLs: - - CDDL 1.0: - https://opensource.org/licenses/CDDL-1.0 - - BSD 3-Clause: - https://opensource.org/licenses/BSD-3-Clause - - THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO - WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE - EXPRESS OR IMPLIED -#/ \ No newline at end of file diff --git a/libtnsl/src/algo/dealloc.tnsl b/libtnsl/src/algo/dealloc.tnsl deleted file mode 100644 index d346464..0000000 --- a/libtnsl/src/algo/dealloc.tnsl +++ /dev/null @@ -1,20 +0,0 @@ -/## - Copyright 2021 Kyle Gunger - - Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. - - This file may only be used in accordance with one of the two - licenses. You should have received a copy of each license with - the source code. In the event that you did not recieve a copy - of the licenses, they may be found at the following URLs: - - CDDL 1.0: - https://opensource.org/licenses/CDDL-1.0 - - BSD 3-Clause: - https://opensource.org/licenses/BSD-3-Clause - - THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO - WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE - EXPRESS OR IMPLIED -#/ \ No newline at end of file diff --git a/libtnsl/src/algo/math/math.tnsl b/libtnsl/src/algo/math/math.tnsl deleted file mode 100644 index 5676d09..0000000 --- a/libtnsl/src/algo/math/math.tnsl +++ /dev/null @@ -1,26 +0,0 @@ -/## - Copyright 2021 Kyle Gunger - - Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. - - This file may only be used in accordance with one of the two - licenses. You should have received a copy of each license with - the source code. In the event that you did not recieve a copy - of the licenses, they may be found at the following URLs: - - CDDL 1.0: - https://opensource.org/licenses/CDDL-1.0 - - BSD 3-Clause: - https://opensource.org/licenses/BSD-3-Clause - - THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO - WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE - EXPRESS OR IMPLIED -#/ - -/; export module math - /; include - - ;/ -;/ \ No newline at end of file diff --git a/libtnsl/src/asm/asm.tnsl b/libtnsl/src/asm/asm.tnsl deleted file mode 100644 index d0da9a6..0000000 --- a/libtnsl/src/asm/asm.tnsl +++ /dev/null @@ -1,29 +0,0 @@ -/## - Copyright 2021 Kyle Gunger - - Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. - - This file may only be used in accordance with one of the two - licenses. You should have received a copy of each license with - the source code. In the event that you did not recieve a copy - of the licenses, they may be found at the following URLs: - - CDDL 1.0: - https://opensource.org/licenses/CDDL-1.0 - - BSD 3-Clause: - https://opensource.org/licenses/BSD-3-Clause - - THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO - WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE - EXPRESS OR IMPLIED -#/ - -/## tnsl.asm - - Unexported module for internal library use. Bridges - the gaps between the main language and assembly for - the selected ISA/OS combo. - -#; module asm -;/ \ No newline at end of file diff --git a/libtnsl/src/box/box.tnsl b/libtnsl/src/box/box.tnsl deleted file mode 100644 index 2f270b6..0000000 --- a/libtnsl/src/box/box.tnsl +++ /dev/null @@ -1,34 +0,0 @@ -/## - Copyright 2021 Kyle Gunger - - Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. - - This file may only be used in accordance with one of the two - licenses. You should have received a copy of each license with - the source code. In the event that you did not recieve a copy - of the licenses, they may be found at the following URLs: - - CDDL 1.0: - https://opensource.org/licenses/CDDL-1.0 - - BSD 3-Clause: - https://opensource.org/licenses/BSD-3-Clause - - THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO - WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE - EXPRESS OR IMPLIED -#/ - -/## - module tnsl.box - Containers and data management classes - -#; export module box - /: import - "iterator.tnsl" - "map.tnsl" - "string.tnsl" - "tree.tnsl" - "vector.tnsl" - :/ -;/ \ No newline at end of file diff --git a/libtnsl/src/box/iterator.tnsl b/libtnsl/src/box/iterator.tnsl deleted file mode 100644 index 13b9ef9..0000000 --- a/libtnsl/src/box/iterator.tnsl +++ /dev/null @@ -1,40 +0,0 @@ -/## - Copyright 2021 Kyle Gunger - - Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. - - This file may only be used in accordance with one of the two - licenses. You should have received a copy of each license with - the source code. In the event that you did not recieve a copy - of the licenses, they may be found at the following URLs: - - CDDL 1.0: - https://opensource.org/licenses/CDDL-1.0 - - BSD 3-Clause: - https://opensource.org/licenses/BSD-3-Clause - - THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO - WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE - EXPRESS OR IMPLIED -#/ - -# Interface for moving through a list -/; interface ForwardsIterator (type T) - - # Advance to the next element in the list - /; next [bool] - ;/ - - # Get the current element in the list - /; current [T] - ;/ -;/ - -# Interface for moving through a list forwards or backwards -/; interface TwoWayIterator (type T) extends ForwardsIterator(T) - - # Move to the previous element in the list - /; prev [bool] - ;/ -;/ \ No newline at end of file diff --git a/libtnsl/src/box/map.tnsl b/libtnsl/src/box/map.tnsl deleted file mode 100644 index d346464..0000000 --- a/libtnsl/src/box/map.tnsl +++ /dev/null @@ -1,20 +0,0 @@ -/## - Copyright 2021 Kyle Gunger - - Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. - - This file may only be used in accordance with one of the two - licenses. You should have received a copy of each license with - the source code. In the event that you did not recieve a copy - of the licenses, they may be found at the following URLs: - - CDDL 1.0: - https://opensource.org/licenses/CDDL-1.0 - - BSD 3-Clause: - https://opensource.org/licenses/BSD-3-Clause - - THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO - WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE - EXPRESS OR IMPLIED -#/ \ No newline at end of file diff --git a/libtnsl/src/box/string.tnsl b/libtnsl/src/box/string.tnsl deleted file mode 100644 index d346464..0000000 --- a/libtnsl/src/box/string.tnsl +++ /dev/null @@ -1,20 +0,0 @@ -/## - Copyright 2021 Kyle Gunger - - Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. - - This file may only be used in accordance with one of the two - licenses. You should have received a copy of each license with - the source code. In the event that you did not recieve a copy - of the licenses, they may be found at the following URLs: - - CDDL 1.0: - https://opensource.org/licenses/CDDL-1.0 - - BSD 3-Clause: - https://opensource.org/licenses/BSD-3-Clause - - THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO - WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE - EXPRESS OR IMPLIED -#/ \ No newline at end of file diff --git a/libtnsl/src/box/tree.tnsl b/libtnsl/src/box/tree.tnsl deleted file mode 100644 index d346464..0000000 --- a/libtnsl/src/box/tree.tnsl +++ /dev/null @@ -1,20 +0,0 @@ -/## - Copyright 2021 Kyle Gunger - - Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. - - This file may only be used in accordance with one of the two - licenses. You should have received a copy of each license with - the source code. In the event that you did not recieve a copy - of the licenses, they may be found at the following URLs: - - CDDL 1.0: - https://opensource.org/licenses/CDDL-1.0 - - BSD 3-Clause: - https://opensource.org/licenses/BSD-3-Clause - - THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO - WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE - EXPRESS OR IMPLIED -#/ \ No newline at end of file diff --git a/libtnsl/src/box/vector.tnsl b/libtnsl/src/box/vector.tnsl deleted file mode 100644 index d346464..0000000 --- a/libtnsl/src/box/vector.tnsl +++ /dev/null @@ -1,20 +0,0 @@ -/## - Copyright 2021 Kyle Gunger - - Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. - - This file may only be used in accordance with one of the two - licenses. You should have received a copy of each license with - the source code. In the event that you did not recieve a copy - of the licenses, they may be found at the following URLs: - - CDDL 1.0: - https://opensource.org/licenses/CDDL-1.0 - - BSD 3-Clause: - https://opensource.org/licenses/BSD-3-Clause - - THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO - WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE - EXPRESS OR IMPLIED -#/ \ No newline at end of file diff --git a/libtnsl/src/io/block.tnsl b/libtnsl/src/io/block.tnsl deleted file mode 100644 index d346464..0000000 --- a/libtnsl/src/io/block.tnsl +++ /dev/null @@ -1,20 +0,0 @@ -/## - Copyright 2021 Kyle Gunger - - Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. - - This file may only be used in accordance with one of the two - licenses. You should have received a copy of each license with - the source code. In the event that you did not recieve a copy - of the licenses, they may be found at the following URLs: - - CDDL 1.0: - https://opensource.org/licenses/CDDL-1.0 - - BSD 3-Clause: - https://opensource.org/licenses/BSD-3-Clause - - THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO - WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE - EXPRESS OR IMPLIED -#/ \ No newline at end of file diff --git a/libtnsl/src/io/file.tnsl b/libtnsl/src/io/file.tnsl deleted file mode 100644 index d346464..0000000 --- a/libtnsl/src/io/file.tnsl +++ /dev/null @@ -1,20 +0,0 @@ -/## - Copyright 2021 Kyle Gunger - - Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. - - This file may only be used in accordance with one of the two - licenses. You should have received a copy of each license with - the source code. In the event that you did not recieve a copy - of the licenses, they may be found at the following URLs: - - CDDL 1.0: - https://opensource.org/licenses/CDDL-1.0 - - BSD 3-Clause: - https://opensource.org/licenses/BSD-3-Clause - - THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO - WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE - EXPRESS OR IMPLIED -#/ \ No newline at end of file diff --git a/libtnsl/src/io/io.tnsl b/libtnsl/src/io/io.tnsl deleted file mode 100644 index 68e2fc0..0000000 --- a/libtnsl/src/io/io.tnsl +++ /dev/null @@ -1,33 +0,0 @@ -/## - Copyright 2021 Kyle Gunger - - Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. - - This file may only be used in accordance with one of the two - licenses. You should have received a copy of each license with - the source code. In the event that you did not recieve a copy - of the licenses, they may be found at the following URLs: - - CDDL 1.0: - https://opensource.org/licenses/CDDL-1.0 - - BSD 3-Clause: - https://opensource.org/licenses/BSD-3-Clause - - THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO - WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE - EXPRESS OR IMPLIED -#/ - -/## - module tnsl.io - Data management for input and output via blocks and streams, memory tools such as alloc and delete - -#; export module io - /: import - "block.tnsl" - "stream.tnsl" - "file.tnsl" - "std.tnsl" - :/ -;/ \ No newline at end of file diff --git a/libtnsl/src/io/std.tnsl b/libtnsl/src/io/std.tnsl deleted file mode 100644 index d346464..0000000 --- a/libtnsl/src/io/std.tnsl +++ /dev/null @@ -1,20 +0,0 @@ -/## - Copyright 2021 Kyle Gunger - - Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. - - This file may only be used in accordance with one of the two - licenses. You should have received a copy of each license with - the source code. In the event that you did not recieve a copy - of the licenses, they may be found at the following URLs: - - CDDL 1.0: - https://opensource.org/licenses/CDDL-1.0 - - BSD 3-Clause: - https://opensource.org/licenses/BSD-3-Clause - - THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO - WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE - EXPRESS OR IMPLIED -#/ \ No newline at end of file diff --git a/libtnsl/src/io/stream.tnsl b/libtnsl/src/io/stream.tnsl deleted file mode 100644 index d346464..0000000 --- a/libtnsl/src/io/stream.tnsl +++ /dev/null @@ -1,20 +0,0 @@ -/## - Copyright 2021 Kyle Gunger - - Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. - - This file may only be used in accordance with one of the two - licenses. You should have received a copy of each license with - the source code. In the event that you did not recieve a copy - of the licenses, they may be found at the following URLs: - - CDDL 1.0: - https://opensource.org/licenses/CDDL-1.0 - - BSD 3-Clause: - https://opensource.org/licenses/BSD-3-Clause - - THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO - WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE - EXPRESS OR IMPLIED -#/ \ No newline at end of file diff --git a/libtnsl/src/libtnsl.tnsl b/libtnsl/src/libtnsl.tnsl deleted file mode 100644 index 070bfd2..0000000 --- a/libtnsl/src/libtnsl.tnsl +++ /dev/null @@ -1,32 +0,0 @@ -/## - Copyright 2021 Kyle Gunger - - Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. - - This file may only be used in accordance with one of the two - licenses. You should have received a copy of each license with - the source code. In the event that you did not recieve a copy - of the licenses, they may be found at the following URLs: - - CDDL 1.0: - https://opensource.org/licenses/CDDL-1.0 - - BSD 3-Clause: - https://opensource.org/licenses/BSD-3-Clause - - THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO - WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE - EXPRESS OR IMPLIED -#/ - -/;export module tnsl - ; const ~void _null = 0x0 - - /: import - "algo" - "box" - "io" - "reflect" - "time" - :/ -;/ \ No newline at end of file diff --git a/libtnsl/src/reflect/dispatch.tnsl b/libtnsl/src/reflect/dispatch.tnsl deleted file mode 100644 index d346464..0000000 --- a/libtnsl/src/reflect/dispatch.tnsl +++ /dev/null @@ -1,20 +0,0 @@ -/## - Copyright 2021 Kyle Gunger - - Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. - - This file may only be used in accordance with one of the two - licenses. You should have received a copy of each license with - the source code. In the event that you did not recieve a copy - of the licenses, they may be found at the following URLs: - - CDDL 1.0: - https://opensource.org/licenses/CDDL-1.0 - - BSD 3-Clause: - https://opensource.org/licenses/BSD-3-Clause - - THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO - WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE - EXPRESS OR IMPLIED -#/ \ No newline at end of file diff --git a/libtnsl/src/reflect/reflect.tnsl b/libtnsl/src/reflect/reflect.tnsl deleted file mode 100644 index b3640c2..0000000 --- a/libtnsl/src/reflect/reflect.tnsl +++ /dev/null @@ -1,33 +0,0 @@ -/## - Copyright 2021 Kyle Gunger - - Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. - - This file may only be used in accordance with one of the two - licenses. You should have received a copy of each license with - the source code. In the event that you did not recieve a copy - of the licenses, they may be found at the following URLs: - - CDDL 1.0: - https://opensource.org/licenses/CDDL-1.0 - - BSD 3-Clause: - https://opensource.org/licenses/BSD-3-Clause - - THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO - WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE - EXPRESS OR IMPLIED -#/ - -/## - module tnsl.reflect - Type and method resolution, reflection and other required methods such as is - -#; export module reflect - /: import - "type.tnsl" - "virtual.tnsl" - "resolver.tnsl" - "dispatch.tnsl" - :/ -;/ \ No newline at end of file diff --git a/libtnsl/src/reflect/resolver.tnsl b/libtnsl/src/reflect/resolver.tnsl deleted file mode 100644 index d346464..0000000 --- a/libtnsl/src/reflect/resolver.tnsl +++ /dev/null @@ -1,20 +0,0 @@ -/## - Copyright 2021 Kyle Gunger - - Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. - - This file may only be used in accordance with one of the two - licenses. You should have received a copy of each license with - the source code. In the event that you did not recieve a copy - of the licenses, they may be found at the following URLs: - - CDDL 1.0: - https://opensource.org/licenses/CDDL-1.0 - - BSD 3-Clause: - https://opensource.org/licenses/BSD-3-Clause - - THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO - WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE - EXPRESS OR IMPLIED -#/ \ No newline at end of file diff --git a/libtnsl/src/reflect/type.tnsl b/libtnsl/src/reflect/type.tnsl deleted file mode 100644 index 7a19b7d..0000000 --- a/libtnsl/src/reflect/type.tnsl +++ /dev/null @@ -1,71 +0,0 @@ -/## - Copyright 2021 Kyle Gunger - - Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. - - This file may only be used in accordance with one of the two - licenses. You should have received a copy of each license with - the source code. In the event that you did not recieve a copy - of the licenses, they may be found at the following URLs: - - CDDL 1.0: - https://opensource.org/licenses/CDDL-1.0 - - BSD 3-Clause: - https://opensource.org/licenses/BSD-3-Clause - - THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO - WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE - EXPRESS OR IMPLIED -#/ - -/## tnsl.reflect._type - Header data which non-raw structs point to. - Upper limits for classes and libs defined here: - - Max 2^16 libraries - - Max 2^16 modules/sub-modules per library - - Max 2^16 classes per module - - Max 2^8 Generics per class -#/ -; raw struct _type() { - uint16 - _library_id, - _module_id, - _type_id, - - {uint8}_type - _generics -} - -/## tnsl.reflect._type_addresses - Metadata about where things are stored - in a class -#/ -; raw struct _type_addresses { - ~{}_type - _supers, - - ~{}uint - _super_offsets, - - ~{}_method - _methods, - - ~{}_member - _members -} - -/; method _type - - /; _is (_type base) [bool] - ;/ - - /; inline _get (_type t, ~void s, _member m) [~void] - ;/ - - /; inline raw _call (_type t, ~void s, _method m, ~void p) - ;/ - - /; _offset (_type cast) [uint] - ;/ -;/ \ No newline at end of file diff --git a/libtnsl/src/reflect/virtual.tnsl b/libtnsl/src/reflect/virtual.tnsl deleted file mode 100644 index 8891905..0000000 --- a/libtnsl/src/reflect/virtual.tnsl +++ /dev/null @@ -1,144 +0,0 @@ -/## - Copyright 2021 Kyle Gunger - - Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. - - This file may only be used in accordance with one of the two - licenses. You should have received a copy of each license with - the source code. In the event that you did not recieve a copy - of the licenses, they may be found at the following URLs: - - CDDL 1.0: - https://opensource.org/licenses/CDDL-1.0 - - BSD 3-Clause: - https://opensource.org/licenses/BSD-3-Clause - - THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO - WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE - EXPRESS OR IMPLIED -#/ - -/## _LIB_TABLE - The array of library export trees. - - Convention: - - index 0 is always reserved for language-specific types + libtnsl - - index 0 module 0 represents the fundimental in-built types like int -#/ -: extern const {}~library _LIB_TABLE - -; raw struct library { - # Version - uint16 - major, - minor, - patch - - ~sym_node - root_node -} - -/## tnsl.reflect._method - Metadata for methods (can be decoded from library - symbol tables). Limits for methods defined here: - - Max 2^8 inputs - - Max 2^8 outputs -#/ -; raw struct _method { - {uint8}charp - name, - - {uint8}~_type - inputs, - outputs, - - ~void - address -} - -/## tnsl.reflect._member - Metadata about struct members -#/ -; raw struct _member { - {uint8}charp - name, - - _type - member_type, - - uint - byte_offset -} - -/## tnsl.reflect.sym_node - Represents a module in a symbol tree -#/ -; raw struct sym_node { - {uint8}charp - name, - - uint16 - id, - - {}~sym_node - sub_modules, - - {}~sym_type - sub_types -} - -/## tnsl.reflect.sym_type - Represents a type in a symbol tree -#/ -; raw struct sym_type { - {uint8}charp - name, - - {uint8}~sym_type - super_types, - -} - -############################### -# Traverse the Library Tree # -############################### - -/; get_sym_node (~sym_node root, uint16 mod_id) [~sym_node] - /;loop (root != null) - /; loop (uint16 sub = 0; sub < len `root.sub_modules) [sub++] - /; if (mod_id < `root.sub_modules{sub}.id) - /; if (sub == 0) - ; return null - ;/ - ;root = `root.sub_modules{sub - 1} - ; continue 1 - ;; else if (mod_id == `root.sub_modules{sub}.id) - ; return `root.sub_modules{sub} - ;/ - ;/ - - ; break - ;/ - - ; return null -;/ - -/; get_sym_node (uint16 lib_id, mod_id) [~sym_node] - - ;~library lib = _LIB_TABLE{lib_id} - - ;return get_sym_node(`lib.root_node, mod_id) -;/ - -/; get_sym_type(uint16 lib_id, mod_id, typ_id) [~sym_type] - - ;~library lib = _LIB_TABLE{lib_id} - ;~sym_node mod = get_sym_node(`lib.root_node, mod_id) - - ;return `mod.sub_types{typ_id} -;/ - -/; get_sym_type(`const {}charp path) [~sym_type] - -;/ \ No newline at end of file diff --git a/libtnsl/src/time/alg.tnsl b/libtnsl/src/time/alg.tnsl deleted file mode 100644 index d346464..0000000 --- a/libtnsl/src/time/alg.tnsl +++ /dev/null @@ -1,20 +0,0 @@ -/## - Copyright 2021 Kyle Gunger - - Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. - - This file may only be used in accordance with one of the two - licenses. You should have received a copy of each license with - the source code. In the event that you did not recieve a copy - of the licenses, they may be found at the following URLs: - - CDDL 1.0: - https://opensource.org/licenses/CDDL-1.0 - - BSD 3-Clause: - https://opensource.org/licenses/BSD-3-Clause - - THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO - WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE - EXPRESS OR IMPLIED -#/ \ No newline at end of file diff --git a/libtnsl/src/time/conv.tnsl b/libtnsl/src/time/conv.tnsl deleted file mode 100644 index d346464..0000000 --- a/libtnsl/src/time/conv.tnsl +++ /dev/null @@ -1,20 +0,0 @@ -/## - Copyright 2021 Kyle Gunger - - Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. - - This file may only be used in accordance with one of the two - licenses. You should have received a copy of each license with - the source code. In the event that you did not recieve a copy - of the licenses, they may be found at the following URLs: - - CDDL 1.0: - https://opensource.org/licenses/CDDL-1.0 - - BSD 3-Clause: - https://opensource.org/licenses/BSD-3-Clause - - THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO - WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE - EXPRESS OR IMPLIED -#/ \ No newline at end of file diff --git a/libtnsl/src/time/parse.tnsl b/libtnsl/src/time/parse.tnsl deleted file mode 100644 index d346464..0000000 --- a/libtnsl/src/time/parse.tnsl +++ /dev/null @@ -1,20 +0,0 @@ -/## - Copyright 2021 Kyle Gunger - - Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. - - This file may only be used in accordance with one of the two - licenses. You should have received a copy of each license with - the source code. In the event that you did not recieve a copy - of the licenses, they may be found at the following URLs: - - CDDL 1.0: - https://opensource.org/licenses/CDDL-1.0 - - BSD 3-Clause: - https://opensource.org/licenses/BSD-3-Clause - - THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO - WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE - EXPRESS OR IMPLIED -#/ \ No newline at end of file diff --git a/libtnsl/src/time/time.tnsl b/libtnsl/src/time/time.tnsl deleted file mode 100644 index dc24369..0000000 --- a/libtnsl/src/time/time.tnsl +++ /dev/null @@ -1,27 +0,0 @@ -/## - Copyright 2021 Kyle Gunger - - Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. - - This file may only be used in accordance with one of the two - licenses. You should have received a copy of each license with - the source code. In the event that you did not recieve a copy - of the licenses, they may be found at the following URLs: - - CDDL 1.0: - https://opensource.org/licenses/CDDL-1.0 - - BSD 3-Clause: - https://opensource.org/licenses/BSD-3-Clause - - THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO - WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE - EXPRESS OR IMPLIED -#/ - -/## - module tnsl.time - Functionality for conversion, parsing, printing, and measuring of time - -#; export module time -;/ \ No newline at end of file diff --git a/libtnsl/time/alg.tnsl b/libtnsl/time/alg.tnsl new file mode 100644 index 0000000..d346464 --- /dev/null +++ b/libtnsl/time/alg.tnsl @@ -0,0 +1,20 @@ +/## + Copyright 2021 Kyle Gunger + + Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. + + This file may only be used in accordance with one of the two + licenses. You should have received a copy of each license with + the source code. In the event that you did not recieve a copy + of the licenses, they may be found at the following URLs: + + CDDL 1.0: + https://opensource.org/licenses/CDDL-1.0 + + BSD 3-Clause: + https://opensource.org/licenses/BSD-3-Clause + + THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO + WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE + EXPRESS OR IMPLIED +#/ \ No newline at end of file diff --git a/libtnsl/time/conv.tnsl b/libtnsl/time/conv.tnsl new file mode 100644 index 0000000..d346464 --- /dev/null +++ b/libtnsl/time/conv.tnsl @@ -0,0 +1,20 @@ +/## + Copyright 2021 Kyle Gunger + + Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. + + This file may only be used in accordance with one of the two + licenses. You should have received a copy of each license with + the source code. In the event that you did not recieve a copy + of the licenses, they may be found at the following URLs: + + CDDL 1.0: + https://opensource.org/licenses/CDDL-1.0 + + BSD 3-Clause: + https://opensource.org/licenses/BSD-3-Clause + + THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO + WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE + EXPRESS OR IMPLIED +#/ \ No newline at end of file diff --git a/libtnsl/time/parse.tnsl b/libtnsl/time/parse.tnsl new file mode 100644 index 0000000..d346464 --- /dev/null +++ b/libtnsl/time/parse.tnsl @@ -0,0 +1,20 @@ +/## + Copyright 2021 Kyle Gunger + + Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. + + This file may only be used in accordance with one of the two + licenses. You should have received a copy of each license with + the source code. In the event that you did not recieve a copy + of the licenses, they may be found at the following URLs: + + CDDL 1.0: + https://opensource.org/licenses/CDDL-1.0 + + BSD 3-Clause: + https://opensource.org/licenses/BSD-3-Clause + + THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO + WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE + EXPRESS OR IMPLIED +#/ \ No newline at end of file diff --git a/libtnsl/time/time.tnsl b/libtnsl/time/time.tnsl new file mode 100644 index 0000000..dc24369 --- /dev/null +++ b/libtnsl/time/time.tnsl @@ -0,0 +1,27 @@ +/## + Copyright 2021 Kyle Gunger + + Dual licensed under the CDDL 1.0 and BSD 3-Clause licenses. + + This file may only be used in accordance with one of the two + licenses. You should have received a copy of each license with + the source code. In the event that you did not recieve a copy + of the licenses, they may be found at the following URLs: + + CDDL 1.0: + https://opensource.org/licenses/CDDL-1.0 + + BSD 3-Clause: + https://opensource.org/licenses/BSD-3-Clause + + THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO + WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE + EXPRESS OR IMPLIED +#/ + +/## + module tnsl.time + Functionality for conversion, parsing, printing, and measuring of time + +#; export module time +;/ \ No newline at end of file -- cgit v1.2.3