yipl 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
yipl-1.0.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 SurfyGalaxy
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
yipl-1.0.0/PKG-INFO ADDED
@@ -0,0 +1,37 @@
1
+ Metadata-Version: 2.4
2
+ Name: yipl
3
+ Version: 1.0.0
4
+ Summary: A low level turing-complete interpreter for YAML
5
+ Author-email: SurfyGalaxy <surfygalaxy@proton.me>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2026 SurfyGalaxy
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Classifier: Programming Language :: Python :: 3
29
+ Classifier: License :: OSI Approved :: MIT License
30
+ Classifier: Operating System :: OS Independent
31
+ Requires-Python: >=3.8
32
+ Description-Content-Type: text/markdown
33
+ License-File: LICENSE
34
+ Requires-Dist: pyyaml
35
+ Dynamic: license-file
36
+
37
+ no
yipl-1.0.0/README.md ADDED
@@ -0,0 +1 @@
1
+ no
@@ -0,0 +1,35 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77.0.3", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "yipl"
7
+ version = "1.0.0"
8
+ authors = [
9
+ {name = "SurfyGalaxy", email = "surfygalaxy@proton.me"},
10
+ ]
11
+ description = "A low level turing-complete interpreter for YAML"
12
+ readme = "README.md"
13
+ requires-python = ">=3.8"
14
+ classifiers = [
15
+ "Programming Language :: Python :: 3",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Operating System :: OS Independent",
18
+ ]
19
+ license = {file = "LICENSE"}
20
+ dependencies = [
21
+ "pyyaml",
22
+ ]
23
+
24
+ [project.scripts]
25
+ yipl = "yipl.__main__:main"
26
+
27
+ [tool.setuptools]
28
+ packages = ["yipl"]
29
+ package-dir = {"" = "src"}
30
+
31
+ [tool.setuptools.package-data]
32
+ yipl = []
33
+
34
+ [tool.setuptools.exclude-package-data]
35
+ yipl = ["*.yaml", "*.txt", "*.md", "*.yml"] # Exclude these file types
yipl-1.0.0/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,63 @@
1
+ __version__ = "1.0.0"
2
+
3
+ from .functions import (
4
+ variables,
5
+ program_list,
6
+ pc,
7
+ init,
8
+ printy,
9
+ set,
10
+ equality,
11
+ greater,
12
+ less,
13
+ ory,
14
+ andy,
15
+ noty,
16
+ add,
17
+ minus,
18
+ multiply,
19
+ divide,
20
+ goto,
21
+ ify,
22
+ inputy,
23
+ cast,
24
+ blahaj,
25
+ list_length,
26
+ list_read_index,
27
+ list_delete,
28
+ list_append,
29
+ list_replace_index
30
+ )
31
+
32
+ from .index import findfunc
33
+
34
+ # Define what's available when someone does "from yipl import *"
35
+ __all__ = [
36
+ 'variables',
37
+ 'program_list',
38
+ 'pc',
39
+ 'init',
40
+ 'printy',
41
+ 'set',
42
+ 'equality',
43
+ 'greater',
44
+ 'less',
45
+ 'ory',
46
+ 'andy',
47
+ 'noty',
48
+ 'add',
49
+ 'minus',
50
+ 'multiply',
51
+ 'divide',
52
+ 'goto',
53
+ 'ify',
54
+ 'inputy',
55
+ 'cast',
56
+ 'blahaj',
57
+ 'list_length',
58
+ 'list_read_index',
59
+ 'list_delete',
60
+ 'list_append',
61
+ 'list_replace_index',
62
+ 'findfunc'
63
+ ]
@@ -0,0 +1,32 @@
1
+ import yaml
2
+ import sys
3
+ from . import functions as func
4
+ from . import index
5
+ if len(sys.argv) < 2:
6
+ print("Usage: yipl <filename.yaml>")
7
+ sys.exit()
8
+
9
+ file_path = sys.argv[1]
10
+ try:
11
+ with open(file_path, "r") as f:
12
+ instructions = yaml.safe_load(f)
13
+ except FileNotFoundError:
14
+ print(f"Error: File '{file_path}' not found.")
15
+ sys.exit(1)
16
+ except yaml.YAMLError as e:
17
+ print(f"Error parsing YAML: {e}")
18
+ sys.exit(1)
19
+
20
+ keys = []
21
+ values = []
22
+
23
+ for i in instructions:
24
+ keys.append(i)
25
+ values.append(instructions[i])
26
+
27
+ func.init(keys)
28
+
29
+ while func.pc < len(keys): #iterate over every key in instructions
30
+ index.findfunc(keys[func.pc], values[func.pc], False)
31
+
32
+ sys.exit()
@@ -0,0 +1,197 @@
1
+ variables = {}
2
+ program_list = []
3
+ pc = 0
4
+ def init(lists):
5
+ global program_list
6
+ program_list = lists
7
+
8
+ def printy(args):
9
+ global variables
10
+ try:
11
+ print(args)
12
+ return True
13
+ except Exception as e:
14
+ return e
15
+
16
+
17
+ def set(name, value):
18
+ global variables
19
+ try:
20
+ variables[name] = value
21
+ return True
22
+ except Exception as e:
23
+ return e
24
+
25
+
26
+ def equality(a, b):
27
+ global variables
28
+ try:
29
+ return a == b
30
+ except Exception as e:
31
+ return e
32
+
33
+ def greater(a, b):
34
+ global variables
35
+ try:
36
+ return a > b
37
+ except Exception as e:
38
+ return e
39
+
40
+ def less(a, b):
41
+ global variables
42
+ try:
43
+ return a < b
44
+ except Exception as e:
45
+ return e
46
+
47
+ def ory(a, b):
48
+ global variables
49
+ try:
50
+ return a or b
51
+ except Exception as e:
52
+ return e
53
+
54
+ def andy(a, b):
55
+ global variables
56
+ try:
57
+ return a and b
58
+ except Exception as e:
59
+ return e
60
+
61
+ def noty(a):
62
+ global variables
63
+ try:
64
+ return not a
65
+ except Exception as e:
66
+ return e
67
+
68
+ def add(a, b):
69
+ global variables
70
+ try:
71
+ return a + b
72
+ except Exception as e:
73
+ return e
74
+
75
+ def minus(a, b):
76
+ global variables
77
+ try:
78
+ return a - b
79
+ except Exception as e:
80
+ return e
81
+
82
+ def multiply(a, b):
83
+ global variables
84
+ try:
85
+ return a * b
86
+ except Exception as e:
87
+ return e
88
+
89
+ def divide(a, b):
90
+ global variables
91
+ try:
92
+ return a / b
93
+ except Exception as e:
94
+ return e
95
+
96
+ def goto(a):
97
+ global variables, program_list, pc
98
+ try:
99
+ position = next(i for i, k in enumerate(program_list) if k == a)
100
+ pc = position
101
+ return True
102
+ except Exception as e:
103
+ return e
104
+
105
+ def ify(a, b, c):
106
+ global variables, program_list
107
+ try:
108
+ if a == True:
109
+ return goto(b)
110
+ else:
111
+ return goto(c)
112
+ return True
113
+ except Exception as e:
114
+ return e
115
+
116
+ def inputy(a):
117
+ try:
118
+ return input(a)
119
+ except Exception as e:
120
+ return e
121
+
122
+ def cast(a, b): # A = type, B = data
123
+ try:
124
+ if a == "str":
125
+ output = str(b)
126
+ elif a == "int":
127
+ output = int(b)
128
+ elif a == "float":
129
+ output = float(b)
130
+ return output
131
+ except Exception as e:
132
+ return e
133
+
134
+ def blahaj(a): # Cheers @inw
135
+ try:
136
+ while a != 0:
137
+ if a > 0:
138
+ print("""
139
+ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣤⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
140
+ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
141
+ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⡿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
142
+ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
143
+ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
144
+ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣼⣿⣿⣿⣿⣿⣿⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣾⣧⢤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀
145
+ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⡀⢀⣀⡀⣤⣤⣤⣤⣤⣤⣤⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢻⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
146
+ ⠀⠀⢀⡀⣠⣤⣶⣴⣿⣿⣿⣾⢷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⡀⠀⠀⠀⠀⠀⠀⠀⣠⡀⠀⠀⣹⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀
147
+ ⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣶⣤⣄⣀⣠⣾⣿⡇⠀⠀⢹⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀
148
+ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⣄⣀⣘⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀
149
+ ⢹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣦⣄⣀⠀⠀
150
+ ⠀⢻⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠄
151
+ ⠀⠀⠳⣄⡀⠈⠉⠉⠉⠛⠛⠛⠿⠿⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠛⠛⠁⠀⠉⠉⠉⠉⠉⠀⠀⠀
152
+ ⠀⠀⠀⠀⠙⠲⣖⣤⣤⣆⣤⣀⣄⣄⣀⣀⣀⠀⠈⠉⠉⠛⠛⠻⠿⣿⣿⣿⣿⣿⣿⣿⣿⡿⡿⠿⠿⠿⠿⣿⣿⣿⠿⠿⠛⠛⠛⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
153
+ ⠀⠀⠀⠀⠀⠀⠀⠉⠛⠯⣍⣉⠉⠋⠝⠉⠋⠅⠐⠀⠀⠀⠀⠀⠀⠻⣿⣿⣿⣿⣿⣿⣿⣿⣶⣅⣰⠦⠗⠛⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
154
+ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠙⠒⣓⣒⣒⡒⠢⠤⠤⠦⠤⠦⠶⣬⡟⢿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
155
+ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠛⠿⠿⢿⣿⣿⣿⣿⣿⣿⡿⠆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
156
+
157
+ """)
158
+ a -= 1
159
+ else:
160
+ print("""
161
+ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣤⣶⣶⣾⣿⣿⣿⣿⣿⣿⣷⠆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
162
+ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣠⠤⡭⠭⠭⠥⠔⠒⠒⠖⠒⠖⠶⢛⣧⣾⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
163
+ ⠀⠀⠀⠀⠀⠀⠀⣀⣤⣖⣋⣉⣀⣄⣢⣀⣄⡂⠠⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⠿⡋⠹⠖⡦⣤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
164
+ ⠀⠀⠀⠀⣠⠴⠯⠛⠛⠏⠛⠉⠋⠋⠉⠉⠉⠀⢀⣀⣀⣤⣤⣴⣶⣿⣿⣿⣿⣿⣿⣿⣿⣷⣷⣶⣶⣶⣶⣿⣿⣿⣶⣶⣤⣤⣤⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
165
+ ⠀⠀⡴⠋⠁⢀⣀⣀⣀⣤⣤⣤⣶⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣤⣤⡀⠀⣀⣀⣀⣀⣀⠀⠀⠀
166
+ ⠀⣼⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠂
167
+ ⣸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠟⠋⠉⠀⠀
168
+ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠋⠉⢩⣿⣿⣿⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀
169
+ ⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⠛⠋⠉⠙⢿⣿⡇⠀⠀⣸⣿⣿⣿⡿⠁⠀⠀⠀⠀⠀⠀⠀⠀
170
+ ⠀⠀⠈⠁⠙⠛⠿⠻⣿⣿⣿⢿⡾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⠁⠀⠀⠀⠀⠀⠀⠀⠙⠁⠀⠀⣹⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀
171
+ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠁⠈⠉⠁⠛⠛⠛⠛⠛⠛⠛⠿⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣼⣿⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
172
+ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢻⣿⣿⣿⣿⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⢿⡟⠚⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀
173
+ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
174
+ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
175
+ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
176
+ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
177
+ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠛⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
178
+
179
+ """)
180
+ a += 1
181
+ return True
182
+ except Exception as e:
183
+ return e
184
+
185
+ def list_length(args):
186
+ return len(args)
187
+ def list_read_index(args, index):
188
+ return args[index]
189
+ def list_delete(args, index):
190
+ del args[index]
191
+ return True
192
+ def list_append(args, text):
193
+ args.append(text)
194
+ return True
195
+ def list_replace_index(args, index, text):
196
+ args[index] = text
197
+ return True
@@ -0,0 +1,285 @@
1
+ from . import functions as func
2
+
3
+ def handle_dependencies(args):
4
+ if isinstance(args, dict):
5
+ # For instances such as: {set: [$a, equality: [a, b]]} This has broken far too many times
6
+ nested_name = list(args.keys())[0] # 'equality'
7
+ nested_args = args[nested_name] # ['Yes', 'Yes']
8
+
9
+ result = findfunc(nested_name, nested_args, True)
10
+ else:
11
+ if type(args) == str:
12
+ if args.startswith('$'):
13
+ result = func.variables[args]
14
+ else:
15
+ result = args
16
+ else:
17
+ result = args
18
+ return result
19
+
20
+ def handle_dependencies_set(args):
21
+ if isinstance(args, dict):
22
+ # For instances such as: {set: [$a, equality: [a, b]]} This has broken far too many times
23
+ nested_name = list(args.keys())[0] # 'equality'
24
+ nested_args = args[nested_name] # ['Yes', 'Yes']
25
+ result = findfunc(nested_name, nested_args, True)
26
+ else:
27
+ if type(args) == str:
28
+ if not args.startswith('$'):
29
+ result = '$' + args
30
+ else:
31
+ result = args
32
+ else:
33
+ result = args
34
+ return result
35
+
36
+
37
+ def findfunc(keys: str | dict, values: any, is_nesting: bool) -> any:
38
+ if keys.startswith("print ") or keys == "print": # Equal to python print() operator
39
+ a = handle_dependencies(values[0])
40
+ x = func.printy(a)
41
+ if not isinstance(x, Exception):
42
+ increment(is_nesting)
43
+ return x
44
+ else:
45
+ print(f"Error in {keys}: {x}")
46
+ return None
47
+ increment(is_nesting)
48
+
49
+ elif keys.startswith("set ") or keys == "set": # Equal to python assignment ( x = "value" )
50
+ a = handle_dependencies_set(values[0])
51
+ b = handle_dependencies(values[1])
52
+ x = func.set(a, b)
53
+ if not isinstance(x, Exception):
54
+ increment(is_nesting)
55
+ return x
56
+ else:
57
+ print(f"Error in {keys}: {x}")
58
+ increment(is_nesting)
59
+ return None
60
+
61
+ elif keys.startswith("equality ") or keys == "equality":
62
+ a = handle_dependencies(values[0])
63
+ b = handle_dependencies(values[1])
64
+ x = func.equality(a, b)
65
+ if not isinstance(x, Exception):
66
+ increment(is_nesting)
67
+ return x
68
+ else:
69
+ print(f"Error in {keys}: {x}")
70
+ increment(is_nesting)
71
+ return None
72
+
73
+ elif keys.startswith("greater ") or keys == "greater":
74
+ a = handle_dependencies(values[0])
75
+ b = handle_dependencies(values[1])
76
+ x = func.greater(a, b)
77
+ if not isinstance(x, Exception):
78
+ increment(is_nesting)
79
+ return x
80
+ else:
81
+ print(f"Error in {keys}: {x}")
82
+ increment(is_nesting)
83
+ return None
84
+
85
+ elif keys.startswith("less ") or keys == "less":
86
+ a = handle_dependencies(values[0])
87
+ b = handle_dependencies(values[1])
88
+ x = func.less(a, b)
89
+ if not isinstance(x, Exception):
90
+ increment(is_nesting)
91
+ return x
92
+ else:
93
+ print(f"Error in {keys}: {x}")
94
+ increment(is_nesting)
95
+ return None
96
+
97
+ elif keys.startswith("or ") or keys == "or":
98
+ a = handle_dependencies(values[0])
99
+ b = handle_dependencies(values[1])
100
+ x = func.ory(a, b)
101
+ if not isinstance(x, Exception):
102
+ increment(is_nesting)
103
+ return x
104
+ else:
105
+ print(f"Error in {keys}: {x}")
106
+ increment(is_nesting)
107
+ return None
108
+
109
+ elif keys.startswith("and ") or keys == "and":
110
+ a = handle_dependencies(values[0])
111
+ b = handle_dependencies(values[1])
112
+ x = func.andy(a, b)
113
+ if not isinstance(x, Exception):
114
+ increment(is_nesting)
115
+ return x
116
+ else:
117
+ print(f"Error in {keys}: {x}")
118
+ increment(is_nesting)
119
+ return None
120
+
121
+ elif keys.startswith("not ") or keys == "not":
122
+ a = handle_dependencies(values[0])
123
+ x = func.noty(a)
124
+ if not isinstance(x, Exception):
125
+ increment(is_nesting)
126
+ return x
127
+ else:
128
+ print(f"Error in {keys}: {x}")
129
+ increment(is_nesting)
130
+ return None
131
+
132
+
133
+ elif keys.startswith("plus ") or keys == "plus":
134
+ a = handle_dependencies(values[0])
135
+ b = handle_dependencies(values[1])
136
+ x = func.add(a, b)
137
+ if not isinstance(x, Exception):
138
+ increment(is_nesting)
139
+ return x
140
+ else:
141
+ print(f"Error in {keys}: {x}")
142
+ increment(is_nesting)
143
+ return None
144
+
145
+ elif keys.startswith("minus ") or keys == "minus":
146
+ a = handle_dependencies(values[0])
147
+ b = handle_dependencies(values[1])
148
+ x = func.minus(a, b)
149
+ if not isinstance(x, Exception):
150
+ increment(is_nesting)
151
+ return x
152
+ else:
153
+ print(f"Error in {keys}: {x}")
154
+ increment(is_nesting)
155
+ return None
156
+
157
+ elif keys.startswith("multiply ") or keys == "multiply":
158
+ a = handle_dependencies(values[0])
159
+ b = handle_dependencies(values[1])
160
+ x = func.multiply(a, b)
161
+ if not isinstance(x, Exception):
162
+ increment(is_nesting)
163
+ return x
164
+ else:
165
+ print(f"Error in {keys}: {x}")
166
+ increment(is_nesting)
167
+ return None
168
+
169
+ elif keys.startswith("divide ") or keys == "divide":
170
+ a = handle_dependencies(values[0])
171
+ b = handle_dependencies(values[1])
172
+ x = func.divide(a, b)
173
+ if not isinstance(x, Exception):
174
+ increment(is_nesting)
175
+ return x
176
+ else:
177
+ print(f"Error in {keys}: {x}")
178
+ increment(is_nesting)
179
+ return None
180
+
181
+ elif keys.startswith("goto ") or keys == "goto":
182
+ a = handle_dependencies(values[0])
183
+ x = func.goto(a)
184
+ if not isinstance(x, Exception):
185
+ increment(is_nesting)
186
+ return x
187
+ else:
188
+ print(f"Error in {keys}: {x}")
189
+ increment(is_nesting)
190
+ return None
191
+
192
+ elif keys.startswith("if ") or keys == "if":
193
+ a = handle_dependencies(values[0])
194
+ b = handle_dependencies(values[1])
195
+ c = handle_dependencies(values[2])
196
+ x = func.ify(a, b, c)
197
+ if not isinstance(x, Exception):
198
+ increment(is_nesting)
199
+ return x
200
+ else:
201
+ print(f"Error in {keys}: {x}")
202
+ increment(is_nesting)
203
+ return None
204
+
205
+ elif keys.startswith("input ") or keys == "input":
206
+ a = handle_dependencies(values[0])
207
+ x = func.inputy(a)
208
+ if not isinstance(x, Exception):
209
+ increment(is_nesting)
210
+ return x
211
+ else:
212
+ print(f"Error in {keys}: {x}")
213
+ increment(is_nesting)
214
+ return None
215
+
216
+ elif keys.startswith("cast ") or keys == "cast":
217
+ a = handle_dependencies(values[0]) # What to cast into (int, str or float)
218
+ b = handle_dependencies(values[1]) # the data
219
+ x = func.cast(a, b)
220
+ if not isinstance(x, Exception):
221
+ increment(is_nesting)
222
+ return x
223
+ else:
224
+ print(f"Error in {keys}: {x}")
225
+ increment(is_nesting)
226
+ return None
227
+
228
+ elif keys.startswith("blahaj ") or keys == "blahaj":
229
+ a = handle_dependencies(values[0])
230
+ x = func.blahaj(a)
231
+ if not isinstance(x, Exception):
232
+ increment(is_nesting)
233
+ return x
234
+ else:
235
+ print(f"Error in {keys}: {x}")
236
+ increment(is_nesting)
237
+ return None
238
+
239
+ elif keys.startswith("list ") or keys == "list":
240
+ a = handle_dependencies(values[0])
241
+ b = handle_dependencies(values[1])
242
+ if len(values) <= 2: # len(x)
243
+ if a == "length":
244
+ x = func.list_length(b)
245
+ else:
246
+ x = f"{a} is an invalid operation"
247
+ elif len(values) == 3: # list.append
248
+ c = handle_dependencies(values[2])
249
+ if a == "append":
250
+ x = func.list_append(b, c)
251
+ elif a == "read":
252
+ x = func.list_read_index(b, c)
253
+ elif a == "delete":
254
+ x = func.list_delete(b, c)
255
+ else:
256
+ x = f"{a} is an invalid operation"
257
+ else:
258
+ d = handle_dependencies(values[3])
259
+ if a == "replace":
260
+ x = func.list_replace_index(b, c, d)
261
+ else:
262
+ x = f"{a} is an invalid operation"
263
+ if not isinstance(x, Exception):
264
+ increment(is_nesting)
265
+ return x
266
+ else:
267
+ increment(is_nesting)
268
+ print(f"Error in {keys}: {x}")
269
+ return None
270
+
271
+
272
+
273
+
274
+
275
+ else:
276
+ if keys.startswith('^'): # Intended tag
277
+ increment(is_nesting)
278
+ else:
279
+ increment(is_nesting)
280
+ print(f"Unknown Keyword: {keys}")
281
+
282
+
283
+ def increment(is_nesting):
284
+ if is_nesting == False:
285
+ func.pc += 1
@@ -0,0 +1,37 @@
1
+ Metadata-Version: 2.4
2
+ Name: yipl
3
+ Version: 1.0.0
4
+ Summary: A low level turing-complete interpreter for YAML
5
+ Author-email: SurfyGalaxy <surfygalaxy@proton.me>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2026 SurfyGalaxy
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Classifier: Programming Language :: Python :: 3
29
+ Classifier: License :: OSI Approved :: MIT License
30
+ Classifier: Operating System :: OS Independent
31
+ Requires-Python: >=3.8
32
+ Description-Content-Type: text/markdown
33
+ License-File: LICENSE
34
+ Requires-Dist: pyyaml
35
+ Dynamic: license-file
36
+
37
+ no
@@ -0,0 +1,13 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ src/yipl/__init__.py
5
+ src/yipl/__main__.py
6
+ src/yipl/functions.py
7
+ src/yipl/index.py
8
+ src/yipl.egg-info/PKG-INFO
9
+ src/yipl.egg-info/SOURCES.txt
10
+ src/yipl.egg-info/dependency_links.txt
11
+ src/yipl.egg-info/entry_points.txt
12
+ src/yipl.egg-info/requires.txt
13
+ src/yipl.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ yipl = yipl.__main__:main
@@ -0,0 +1 @@
1
+ pyyaml
@@ -0,0 +1 @@
1
+ yipl