easycoder 250611.3__py2.py3-none-any.whl → 250611.4__py2.py3-none-any.whl
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.
Potentially problematic release.
This version of easycoder might be problematic. Click here for more details.
- easycoder/__init__.py +1 -1
- easycoder/ec_compiler.py +5 -2
- easycoder/ec_core.py +38 -36
- easycoder/ec_handler.py +1 -2
- easycoder/ec_program.py +0 -4
- easycoder/ec_pyside.py +7 -7
- {easycoder-250611.3.dist-info → easycoder-250611.4.dist-info}/METADATA +1 -1
- easycoder-250611.4.dist-info/RECORD +16 -0
- easycoder-250611.3.dist-info/RECORD +0 -16
- {easycoder-250611.3.dist-info → easycoder-250611.4.dist-info}/LICENSE +0 -0
- {easycoder-250611.3.dist-info → easycoder-250611.4.dist-info}/WHEEL +0 -0
- {easycoder-250611.3.dist-info → easycoder-250611.4.dist-info}/entry_points.txt +0 -0
easycoder/__init__.py
CHANGED
easycoder/ec_compiler.py
CHANGED
|
@@ -14,7 +14,6 @@ class Compiler:
|
|
|
14
14
|
self.symbols = self.program.symbols
|
|
15
15
|
self.code = self.program.code
|
|
16
16
|
self.program.compiler = self
|
|
17
|
-
self.addCommand = self.program.add
|
|
18
17
|
self.compileConstant = self.value.compileConstant
|
|
19
18
|
self.debugCompile = False
|
|
20
19
|
|
|
@@ -77,6 +76,10 @@ class Compiler:
|
|
|
77
76
|
def getCommandAt(self, pc):
|
|
78
77
|
return self.program.code[pc]
|
|
79
78
|
|
|
79
|
+
# Add a command to the code list
|
|
80
|
+
def add(self, command):
|
|
81
|
+
self.code.append(command)
|
|
82
|
+
|
|
80
83
|
def isSymbol(self):
|
|
81
84
|
token=self.getToken()
|
|
82
85
|
try:
|
|
@@ -148,7 +151,7 @@ class Compiler:
|
|
|
148
151
|
command['import'] = None
|
|
149
152
|
command['locked'] = False
|
|
150
153
|
command['extra'] = extra
|
|
151
|
-
self.
|
|
154
|
+
self.add(command)
|
|
152
155
|
return True
|
|
153
156
|
|
|
154
157
|
# Compile the current token
|
easycoder/ec_core.py
CHANGED
|
@@ -126,7 +126,7 @@ class Core(Handler):
|
|
|
126
126
|
command['with'] = self.nextValue()
|
|
127
127
|
else:
|
|
128
128
|
command['with'] = None
|
|
129
|
-
self.
|
|
129
|
+
self.add(command)
|
|
130
130
|
return True
|
|
131
131
|
|
|
132
132
|
def r_assert(self, command):
|
|
@@ -143,7 +143,7 @@ class Core(Handler):
|
|
|
143
143
|
cmd['keyword'] = 'end'
|
|
144
144
|
cmd['debug'] = True
|
|
145
145
|
cmd['lino'] = command['lino']
|
|
146
|
-
self.
|
|
146
|
+
self.add(cmd)
|
|
147
147
|
return self.nextPC()
|
|
148
148
|
else:
|
|
149
149
|
return self.compileFromHere(['end'])
|
|
@@ -441,7 +441,7 @@ class Core(Handler):
|
|
|
441
441
|
timeout['type'] = 'int'
|
|
442
442
|
timeout['content'] = 5
|
|
443
443
|
command['timeout'] = timeout
|
|
444
|
-
self.
|
|
444
|
+
self.add(command)
|
|
445
445
|
if self.peek() == 'or':
|
|
446
446
|
self.nextToken()
|
|
447
447
|
self.nextToken()
|
|
@@ -453,7 +453,7 @@ class Core(Handler):
|
|
|
453
453
|
cmd['goto'] = 0
|
|
454
454
|
cmd['debug'] = False
|
|
455
455
|
skip = self.getPC()
|
|
456
|
-
self.
|
|
456
|
+
self.add(cmd)
|
|
457
457
|
# Process the 'or'
|
|
458
458
|
self.getCommandAt(get)['or'] = self.getPC()
|
|
459
459
|
self.compileOne()
|
|
@@ -535,7 +535,7 @@ class Core(Handler):
|
|
|
535
535
|
# if <condition> <action> [else <action>]
|
|
536
536
|
def k_if(self, command):
|
|
537
537
|
command['condition'] = self.nextCondition()
|
|
538
|
-
self.
|
|
538
|
+
self.add(command)
|
|
539
539
|
self.nextToken()
|
|
540
540
|
pcElse = self.getPC()
|
|
541
541
|
cmd = {}
|
|
@@ -544,7 +544,7 @@ class Core(Handler):
|
|
|
544
544
|
cmd['keyword'] = 'gotoPC'
|
|
545
545
|
cmd['goto'] = 0
|
|
546
546
|
cmd['debug'] = False
|
|
547
|
-
self.
|
|
547
|
+
self.add(cmd)
|
|
548
548
|
# Get the 'then' code
|
|
549
549
|
self.compileOne()
|
|
550
550
|
if self.peek() == 'else':
|
|
@@ -557,7 +557,7 @@ class Core(Handler):
|
|
|
557
557
|
cmd['keyword'] = 'gotoPC'
|
|
558
558
|
cmd['goto'] = 0
|
|
559
559
|
cmd['debug'] = False
|
|
560
|
-
self.
|
|
560
|
+
self.add(cmd)
|
|
561
561
|
# Fixup the link to the 'else' branch
|
|
562
562
|
self.getCommandAt(pcElse)['goto'] = self.getPC()
|
|
563
563
|
# Process the 'else' branch
|
|
@@ -603,7 +603,7 @@ class Core(Handler):
|
|
|
603
603
|
variable['keyword'] = keyword
|
|
604
604
|
variable['import'] = None
|
|
605
605
|
variable['used'] = False
|
|
606
|
-
self.
|
|
606
|
+
self.add(variable)
|
|
607
607
|
if self.peek() != 'and':
|
|
608
608
|
break
|
|
609
609
|
self.nextToken()
|
|
@@ -888,7 +888,7 @@ class Core(Handler):
|
|
|
888
888
|
cmd['keyword'] = 'gotoPC'
|
|
889
889
|
cmd['goto'] = 0
|
|
890
890
|
cmd['debug'] = False
|
|
891
|
-
self.
|
|
891
|
+
self.add(cmd)
|
|
892
892
|
# Add the action and a 'stop'
|
|
893
893
|
self.compileOne()
|
|
894
894
|
cmd = {}
|
|
@@ -896,7 +896,7 @@ class Core(Handler):
|
|
|
896
896
|
cmd['lino'] = command['lino']
|
|
897
897
|
cmd['keyword'] = 'stop'
|
|
898
898
|
cmd['debug'] = False
|
|
899
|
-
self.
|
|
899
|
+
self.add(cmd)
|
|
900
900
|
# Fixup the link
|
|
901
901
|
command['goto'] = self.getPC()
|
|
902
902
|
return True
|
|
@@ -990,7 +990,7 @@ class Core(Handler):
|
|
|
990
990
|
command['result'] = None
|
|
991
991
|
command['or'] = None
|
|
992
992
|
post = self.getPC()
|
|
993
|
-
self.
|
|
993
|
+
self.add(command)
|
|
994
994
|
if self.peek() == 'or':
|
|
995
995
|
self.nextToken()
|
|
996
996
|
self.nextToken()
|
|
@@ -1002,7 +1002,7 @@ class Core(Handler):
|
|
|
1002
1002
|
cmd['goto'] = 0
|
|
1003
1003
|
cmd['debug'] = False
|
|
1004
1004
|
skip = self.getPC()
|
|
1005
|
-
self.
|
|
1005
|
+
self.add(cmd)
|
|
1006
1006
|
# Process the 'or'
|
|
1007
1007
|
self.getCommandAt(post)['or'] = self.getPC()
|
|
1008
1008
|
self.compileOne()
|
|
@@ -1271,27 +1271,29 @@ class Core(Handler):
|
|
|
1271
1271
|
self.add(command)
|
|
1272
1272
|
else:
|
|
1273
1273
|
command['file'] = self.getValue()
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1274
|
+
else:
|
|
1275
|
+
command['file'] = self.getValue()
|
|
1276
|
+
command['or'] = None
|
|
1277
|
+
save = self.getPC()
|
|
1278
|
+
self.add(command)
|
|
1279
|
+
if self.peek() == 'or':
|
|
1280
|
+
self.nextToken()
|
|
1281
|
+
self.nextToken()
|
|
1282
|
+
# Add a 'goto' to skip the 'or'
|
|
1283
|
+
cmd = {}
|
|
1284
|
+
cmd['lino'] = command['lino']
|
|
1285
|
+
cmd['domain'] = 'core'
|
|
1286
|
+
cmd['keyword'] = 'gotoPC'
|
|
1287
|
+
cmd['goto'] = 0
|
|
1288
|
+
cmd['debug'] = False
|
|
1289
|
+
skip = self.getPC()
|
|
1290
|
+
self.add(cmd)
|
|
1291
|
+
# Process the 'or'
|
|
1292
|
+
self.getCommandAt(save)['or'] = self.getPC()
|
|
1293
|
+
self.compileOne()
|
|
1294
|
+
# Fixup the skip
|
|
1295
|
+
self.getCommandAt(skip)['goto'] = self.getPC()
|
|
1296
|
+
return True
|
|
1295
1297
|
return False
|
|
1296
1298
|
|
|
1297
1299
|
def r_save(self, command):
|
|
@@ -1792,7 +1794,7 @@ class Core(Handler):
|
|
|
1792
1794
|
# token = self.getToken()
|
|
1793
1795
|
command['condition'] = code
|
|
1794
1796
|
test = self.getPC()
|
|
1795
|
-
self.
|
|
1797
|
+
self.add(command)
|
|
1796
1798
|
# Set up a goto for when the test fails
|
|
1797
1799
|
fail = self.getPC()
|
|
1798
1800
|
cmd = {}
|
|
@@ -1801,7 +1803,7 @@ class Core(Handler):
|
|
|
1801
1803
|
cmd['keyword'] = 'gotoPC'
|
|
1802
1804
|
cmd['goto'] = 0
|
|
1803
1805
|
cmd['debug'] = False
|
|
1804
|
-
self.
|
|
1806
|
+
self.add(cmd)
|
|
1805
1807
|
# Do the body of the while
|
|
1806
1808
|
self.nextToken()
|
|
1807
1809
|
if self.compileOne() == False:
|
|
@@ -1813,7 +1815,7 @@ class Core(Handler):
|
|
|
1813
1815
|
cmd['keyword'] = 'gotoPC'
|
|
1814
1816
|
cmd['goto'] = test
|
|
1815
1817
|
cmd['debug'] = False
|
|
1816
|
-
self.
|
|
1818
|
+
self.add(cmd)
|
|
1817
1819
|
# Fixup the 'goto' on completion
|
|
1818
1820
|
self.getCommandAt(fail)['goto'] = self.getPC()
|
|
1819
1821
|
return True
|
easycoder/ec_handler.py
CHANGED
|
@@ -23,14 +23,13 @@ class Handler:
|
|
|
23
23
|
self.rewindTo = compiler.rewindTo
|
|
24
24
|
self.warning = compiler.warning
|
|
25
25
|
self.getPC = compiler.getPC
|
|
26
|
-
self.
|
|
26
|
+
self.add = compiler.add
|
|
27
27
|
self.getCommandAt = compiler.getCommandAt
|
|
28
28
|
self.compileOne = compiler.compileOne
|
|
29
29
|
self.compileFromHere = compiler.compileFromHere
|
|
30
30
|
self.compileConstant = compiler.compileConstant
|
|
31
31
|
|
|
32
32
|
self.code = self.program.code
|
|
33
|
-
self.add = self.program.add
|
|
34
33
|
self.evaluate = self.program.evaluate
|
|
35
34
|
self.getVariable = self.program.getSymbolRecord
|
|
36
35
|
self.getRuntimeValue = self.program.getRuntimeValue
|
easycoder/ec_program.py
CHANGED
|
@@ -116,10 +116,6 @@ class Program:
|
|
|
116
116
|
def getDomains(self):
|
|
117
117
|
return self.domains
|
|
118
118
|
|
|
119
|
-
# Add a command to the code list
|
|
120
|
-
def add(self, command):
|
|
121
|
-
self.code.append(command)
|
|
122
|
-
|
|
123
119
|
def getSymbolRecord(self, name):
|
|
124
120
|
try:
|
|
125
121
|
target = self.code[self.symbols[name]]
|
easycoder/ec_pyside.py
CHANGED
|
@@ -603,7 +603,7 @@ class Graphics(Handler):
|
|
|
603
603
|
cmd['keyword'] = 'gotoPC'
|
|
604
604
|
cmd['goto'] = 0
|
|
605
605
|
cmd['debug'] = False
|
|
606
|
-
self.
|
|
606
|
+
self.add(cmd)
|
|
607
607
|
# This is the click handler
|
|
608
608
|
self.compileOne()
|
|
609
609
|
cmd = {}
|
|
@@ -611,7 +611,7 @@ class Graphics(Handler):
|
|
|
611
611
|
cmd['lino'] = command['lino']
|
|
612
612
|
cmd['keyword'] = 'stop'
|
|
613
613
|
cmd['debug'] = False
|
|
614
|
-
self.
|
|
614
|
+
self.add(cmd)
|
|
615
615
|
# Fixup the goto
|
|
616
616
|
self.getCommandAt(pcNext)['goto'] = self.getPC()
|
|
617
617
|
|
|
@@ -634,7 +634,7 @@ class Graphics(Handler):
|
|
|
634
634
|
elif token == 'tick':
|
|
635
635
|
command['tick'] = True
|
|
636
636
|
command['runOnTick'] = self.getPC() + 2
|
|
637
|
-
self.
|
|
637
|
+
self.add(command)
|
|
638
638
|
self.nextToken()
|
|
639
639
|
# Step over the on tick action
|
|
640
640
|
pcNext = self.getPC()
|
|
@@ -644,7 +644,7 @@ class Graphics(Handler):
|
|
|
644
644
|
cmd['keyword'] = 'gotoPC'
|
|
645
645
|
cmd['goto'] = 0
|
|
646
646
|
cmd['debug'] = False
|
|
647
|
-
self.
|
|
647
|
+
self.add(cmd)
|
|
648
648
|
# This is the on tick handler
|
|
649
649
|
self.compileOne()
|
|
650
650
|
cmd = {}
|
|
@@ -652,7 +652,7 @@ class Graphics(Handler):
|
|
|
652
652
|
cmd['lino'] = command['lino']
|
|
653
653
|
cmd['keyword'] = 'stop'
|
|
654
654
|
cmd['debug'] = False
|
|
655
|
-
self.
|
|
655
|
+
self.add(cmd)
|
|
656
656
|
# Fixup the goto
|
|
657
657
|
self.getCommandAt(pcNext)['goto'] = self.getPC()
|
|
658
658
|
return True
|
|
@@ -692,12 +692,12 @@ class Graphics(Handler):
|
|
|
692
692
|
if record['keyword'] == 'combobox':
|
|
693
693
|
command['variant'] = 'current'
|
|
694
694
|
command['name'] = record['name']
|
|
695
|
-
self.
|
|
695
|
+
self.add(command)
|
|
696
696
|
return True
|
|
697
697
|
elif record['keyword'] == 'listbox':
|
|
698
698
|
command['variant'] = 'current'
|
|
699
699
|
command['name'] = record['name']
|
|
700
|
-
self.
|
|
700
|
+
self.add(command)
|
|
701
701
|
return True
|
|
702
702
|
return False
|
|
703
703
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: easycoder
|
|
3
|
-
Version: 250611.
|
|
3
|
+
Version: 250611.4
|
|
4
4
|
Summary: Rapid scripting in English
|
|
5
5
|
Keywords: compiler,scripting,prototyping,programming,coding,python,low code,hypertalk,computer language,learn to code
|
|
6
6
|
Author-email: Graham Trott <gtanyware@gmail.com>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
easycoder/README.md,sha256=BVXmYphcTJ6q6RN_9L6HtQukgCnOjSLVIsTM3lk-9aM,587
|
|
2
|
+
easycoder/__init__.py,sha256=AdVT4OQBBuFVstOgPo4xAUEyODopzqjXcBnad6K7lY0,262
|
|
3
|
+
easycoder/ec_classes.py,sha256=L6-6yWHDHw8yF9TGL4WWc4p1aUyXzYz6Gom7jJ43h8o,1823
|
|
4
|
+
easycoder/ec_compiler.py,sha256=6X9Sy5hr9-Ek36XqWrHJ8Ct1fE5sw2hBLKKFMh2RfRs,5130
|
|
5
|
+
easycoder/ec_condition.py,sha256=YXvSBQKEzKGCcgUGo3Qp8iHolXmm2BpEm0NimSDszIM,785
|
|
6
|
+
easycoder/ec_core.py,sha256=_1Gw58EhqPxtdGv5h4ftSd96pcOmorPszBlja-CSMnc,96944
|
|
7
|
+
easycoder/ec_handler.py,sha256=ohf3xUuWw_Qb5SZnulGtDhvCb11kvWtYfgbQTiOXpIY,2261
|
|
8
|
+
easycoder/ec_program.py,sha256=IDpfq9oghFJMJyRD9uab31VOP5MOF4M7kcUVfDn7d4I,9992
|
|
9
|
+
easycoder/ec_pyside.py,sha256=X84j4WC0n0p9PaoJI1W4dqDzAHTFD5izX2aLoPCQ8kE,39855
|
|
10
|
+
easycoder/ec_timestamp.py,sha256=myQnnF-mT31_1dpQKv2VEAu4BCcbypvMdzq7_DUi1xc,277
|
|
11
|
+
easycoder/ec_value.py,sha256=zgDJTJhIg3yOvmnnKIfccIizmIhGbtvL_ghLTL1T5fg,2516
|
|
12
|
+
easycoder-250611.4.dist-info/entry_points.txt,sha256=JXAZbenl0TnsIft2FcGJbJ-4qoztVu2FuT8PFmWFexM,44
|
|
13
|
+
easycoder-250611.4.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
14
|
+
easycoder-250611.4.dist-info/WHEEL,sha256=ssQ84EZ5gH1pCOujd3iW7HClo_O_aDaClUbX4B8bjKY,100
|
|
15
|
+
easycoder-250611.4.dist-info/METADATA,sha256=7Xtjc4wp4f_B7Du9x1lzBEjPQ8vYK_bnHjBCp8mVoWg,6853
|
|
16
|
+
easycoder-250611.4.dist-info/RECORD,,
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
easycoder/README.md,sha256=BVXmYphcTJ6q6RN_9L6HtQukgCnOjSLVIsTM3lk-9aM,587
|
|
2
|
-
easycoder/__init__.py,sha256=voy_RCKYvgiPjR7wwHHL7EoqTiEgVEaryG0X8grr938,262
|
|
3
|
-
easycoder/ec_classes.py,sha256=L6-6yWHDHw8yF9TGL4WWc4p1aUyXzYz6Gom7jJ43h8o,1823
|
|
4
|
-
easycoder/ec_compiler.py,sha256=zKZXXUrQyHbwZ1gJARnwfdAPHWTARa5SN9Y31iuty8o,5086
|
|
5
|
-
easycoder/ec_condition.py,sha256=YXvSBQKEzKGCcgUGo3Qp8iHolXmm2BpEm0NimSDszIM,785
|
|
6
|
-
easycoder/ec_core.py,sha256=7V6xpQQU_ytf0iyEA77Wgn0Cim6Gs04a35BOwQ-uq3c,97087
|
|
7
|
-
easycoder/ec_handler.py,sha256=zPDZ_hqdgNnkCd8B5HmSLkqsGgf4aDmqcUBOPHgo47U,2305
|
|
8
|
-
easycoder/ec_program.py,sha256=FmC9Oz4IpkmNq6D2TgMzVa3ha2TDv7jA15uwX_HFJVs,10080
|
|
9
|
-
easycoder/ec_pyside.py,sha256=I1y8QZgMHLWWxWbKLm_JzHJo6bwASak7tdnuAcuh66c,39904
|
|
10
|
-
easycoder/ec_timestamp.py,sha256=myQnnF-mT31_1dpQKv2VEAu4BCcbypvMdzq7_DUi1xc,277
|
|
11
|
-
easycoder/ec_value.py,sha256=zgDJTJhIg3yOvmnnKIfccIizmIhGbtvL_ghLTL1T5fg,2516
|
|
12
|
-
easycoder-250611.3.dist-info/entry_points.txt,sha256=JXAZbenl0TnsIft2FcGJbJ-4qoztVu2FuT8PFmWFexM,44
|
|
13
|
-
easycoder-250611.3.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
14
|
-
easycoder-250611.3.dist-info/WHEEL,sha256=ssQ84EZ5gH1pCOujd3iW7HClo_O_aDaClUbX4B8bjKY,100
|
|
15
|
-
easycoder-250611.3.dist-info/METADATA,sha256=5kidKl8I-UM7_tymVH_em9wZf5ktYgWFI-jUcD1Zo8U,6853
|
|
16
|
-
easycoder-250611.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|