Commit Graph

3037 Commits

Author SHA1 Message Date
Irmen de Jong
68037e4425 implemented while and repeat loops 2018-09-23 02:04:45 +02:00
Irmen de Jong
cfd63dc42a more opcodes unit tested 2018-09-22 14:16:48 +02:00
Irmen de Jong
4174d49fb3 for loop generates working code for the most often occurring loop scenarios 2018-09-22 02:43:10 +02:00
Irmen de Jong
f84e06bdeb tweak branches 2018-09-22 00:33:25 +02:00
Irmen de Jong
0137478ad4 tweaks 2018-09-21 22:43:29 +02:00
Irmen de Jong
2f48406aad unit tests for most of the StackVM opcodes. Fixed some opcode behaviors. 2018-09-21 02:20:37 +02:00
Irmen de Jong
455f60fb84 for loop and comparison expression fixes 2018-09-20 01:13:21 +02:00
Irmen de Jong
b72bd805e1 sub decl checking 2018-09-19 02:41:35 +02:00
Irmen de Jong
cba9e7670e added floordivision operator // 2018-09-19 01:24:28 +02:00
Irmen de Jong
00d74551b3 fix for loop code generation.
added flt conversion function.
attempt at implementing break and continue.
var initializer value can be omitted for numeric vars (and default to 0)
subroutine return statement not needed when no return values.
2018-09-18 23:14:32 +02:00
Irmen de Jong
63492a1805 stackvm functions 2018-09-18 00:38:29 +02:00
Irmen de Jong
54aeee2676 for translation improvements 2018-09-17 22:22:41 +02:00
Irmen de Jong
dd96ef8ef2 simple for loop (with constant ranges) is now compiled 2018-09-16 22:00:19 +02:00
Irmen de Jong
326e5cd81a restructure compiler 2018-09-16 20:36:02 +02:00
Irmen de Jong
88a9f2d493 stackvm program tweaks 2018-09-16 17:48:13 +02:00
Irmen de Jong
719a446d19 syntaxcheck for loop 2018-09-16 16:37:28 +02:00
Irmen de Jong
004776d0d8 added char symbols in petscii source code 2018-09-16 16:07:35 +02:00
Irmen de Jong
3c7a233b43 improved handling of range and range type checks 2018-09-16 15:40:28 +02:00
Irmen de Jong
266f98a888 doc 2018-09-16 11:25:37 +02:00
Irmen de Jong
2591f4e27e forloop in grammar 2018-09-16 03:00:32 +02:00
Irmen de Jong
19cedf91ff prog8 logos 2018-09-16 01:28:07 +02:00
Irmen de Jong
1a40a88103 added remainder operator '%' 2018-09-16 00:59:12 +02:00
Irmen de Jong
3426593a06 fixed a load of type checks regarding arrays and matrixes and strings
added more builtin functions to the compiler to access the syscalls in the stackVm
2018-09-16 00:06:06 +02:00
Irmen de Jong
c05cd72d23 vm tweaks 2018-09-15 18:43:23 +02:00
Irmen de Jong
e382be89db changed source file suffix to .p8 2018-09-15 16:35:15 +02:00
Irmen de Jong
8ff72167a4 renamed project to Prog8 2018-09-15 16:21:05 +02:00
Irmen de Jong
f3532e9014 restructure 2018-09-15 15:11:17 +02:00
Irmen de Jong
6da048ba4c some type conversion opcodes added 2018-09-15 04:07:42 +02:00
Irmen de Jong
70fe43a6ac improved type checking of builtin functions 2018-09-15 03:12:30 +02:00
Irmen de Jong
28aaf38f22 made position required to avoid some bugs where it was not specified
fixed some type checking bugs
2018-09-15 01:28:01 +02:00
Irmen de Jong
ba81f32080 expression datatype checks improvements 2018-09-14 19:38:22 +02:00
Irmen de Jong
3228fa4c76 stuff 2018-09-14 01:24:12 +02:00
Irmen de Jong
ea94063689 now explicit separation between byte and word literal integers 2018-09-13 23:39:54 +02:00
Irmen de Jong
949e468543 more stackvm opcodes, and sort of finished the stackvm compiler 2018-09-13 03:16:44 +02:00
Irmen de Jong
efd3b1f5c6 matrix decl parsing and fixes 2018-09-12 03:07:49 +02:00
Irmen de Jong
e71fef709a screen added to vm, some new opcodes 2018-09-11 23:44:07 +02:00
Irmen de Jong
af7103f0f7 screen 2018-09-08 17:21:22 +02:00
Irmen de Jong
8ef61ffc88 various syntax checks added
first steps code generation
2018-09-08 00:07:25 +02:00
Irmen de Jong
e928997193 arrays are now a datatype as well
fixed array initializer checks
2018-09-06 22:28:37 +02:00
Irmen de Jong
3933fdab13 added lsb, msb functions.
fixed missing errormessages.
changed some zp options.
2018-09-06 21:13:49 +02:00
Irmen de Jong
0b4135698e reorder statments to please the compiler later 2018-09-06 01:35:26 +02:00
Irmen de Jong
1a60119fde check assignment targets 2018-09-06 01:02:36 +02:00
Irmen de Jong
f23808eaae improve undefined symbol error reporting 2018-09-06 00:08:16 +02:00
Irmen de Jong
831d41dbc6 fix symbol usage tracking, also track scopes themselves.
Fix directive option comparisons.
Vars cannot overwrite builtin functions.
2018-09-05 23:14:08 +02:00
Irmen de Jong
28ab7bbe34 fix symbol usage tracking, also track scopes themselves. Fix directive option comparisons. 2018-09-05 23:07:23 +02:00
Irmen de Jong
cd6327850e improve datatype checks, auto convert some value types 2018-09-05 02:23:49 +02:00
Irmen de Jong
a81c1485d7 fix globalnamespace after change 2018-09-05 00:11:52 +02:00
Irmen de Jong
d9865a4b97 bunch of new builtin functions, const expression evaluation now also done for array literals 2018-09-04 23:37:21 +02:00
Irmen de Jong
76d07a2de8 recursion checking and bugfix in subroutine usage determination 2018-09-03 23:19:25 +02:00
Irmen de Jong
6ed6a3a552 stackvm program parser 2018-09-03 15:36:19 +02:00