Commit Graph

47 Commits

Author SHA1 Message Date
Nathan Braswell
44d310c092 Got simple type inference for declaration statements working with test 2015-05-10 02:18:59 -04:00
Nathan Braswell
87e1853713 Wooo! Fixed up remaining bugs in new syntax! 2015-05-09 06:24:56 -04:00
Nathan Braswell
c22cadeed7 The template part of the new syntax! Gotta go transform all of stdlib and the tests now and see if any other bugs pop up 2015-05-09 03:13:40 -04:00
Nathan Braswell
08431aa748 New syntax starting to work! Not templates yet, that's next 2015-04-14 16:08:36 -04:00
Nathan Braswell
e3aa531856 Wooo actual scoping and better C interop 2015-04-10 00:37:31 -04:00
Nathan Braswell
e37836aea5 Working toward new C inline style 2015-04-04 01:32:40 -04:00
Nathan Braswell
639f4ff0fb Comments don't screw with as much now\! (and work with semicolon infrencing\!) 2015-03-25 15:59:49 -04:00
Nathan Braswell
b01078e7a0 If my measurements are right, WAYYYY better now. Missed a huge memory leak, now like 0.34147GB, I think 2015-03-23 15:52:25 -04:00
Nathan Braswell
6fa06f2b7e Removed LALR parser and an associated member from Symbol, which is used so much that actually got us down to ~3.42GB! 2015-03-23 15:28:03 -04:00
Nathan Braswell
2c4dbc60d1 Fixes for state generation to reduce memory usage - adding in optional semicolons balooned our memory usage to somewhere under 8 gigs, with some simple refactoring we're back down to a bit over 4. Needs to be smaller, but it's an improvement 2015-03-23 14:35:28 -04:00
Nathan Braswell
f8e82b5302 Added initial support for omitting semicolons! (the parser can now interpret either semicolons or linebreaks as the end of statements, but it can still interpret line breaks as white space too, so multi line statements still work.) You will need semicolons to break up multiple statements on the same line, however 2015-03-22 22:43:33 -04:00
Nathan Braswell
417e5ed898 Scope work progressing. Gotta fix bugs. Good save spot. 2014-12-19 18:29:33 -05:00
Nathan Braswell
5b57770774 Declarations are now written |type| identifier;, generally. Functions are similar |void| func() {}, etc. Special declarations still work, etc 2014-08-01 00:45:48 -07:00
Nathan Braswell
4cf8dbbd5b vector and vector test are finally working! Also found some bugs that I don't have time to fix before bed. Added file future_features.txt to keep track of bugs and features. 2014-07-28 01:52:15 -07:00
Nathan Braswell
87ad0c187e Fixed quite a few bugs, including makeing find template functions check for trait subset, not trait equality, and add the number required to the satisfied count. Based on what is now breaking, it looks like it's time to give the builtin functions types. 2014-07-23 02:23:21 -07:00
Nathan Braswell
eae538907d Fixed some mem things, found an odd parsing bug where a // comment before a function definition at top level does not parse. Deferring for now. 2014-07-20 20:42:26 -07:00
Nathan Braswell
64fcb6b0b7 Traits for function templates working! Need to finish for objects and specilizations, and I think also else statements. 2014-07-18 08:52:15 -07:00
Nathan Braswell
46b9fc8b7f Added ability to add commits the Kraken grammer file. Started work on class traits and else statements. 2014-07-06 23:42:25 -07:00
Nathan Braswell
91a68ac2b1 Fixed silly not bug - in one location ! was written \!, which made practically no difference to the regex, but made it so that the parser wouldn't match it to !. Also added else to grammer, but this needs work in the ASTTransformation and CGenerator. 2014-07-03 01:52:44 -07:00
Nathan Braswell
22fbd61360 Fixed a pretty bad error in isNullable logic, I must have been tired. Also, edited grammer to support a[n].b, which was previously done with wrong operator precedence so that that construction was illegal. vector.krak still doesn't quite parse, but that's because of some error with if (!name) which I will fix later. Bedtime. 2014-07-02 01:18:27 -07:00
Nathan Braswell
12f57f8ce8 Added support for destructors! This is done by making a void, parameterless member method called destruct which is called when a stack object falls out of scope, if it exists. This is implemented by the generator, in this case CGenerator. 2014-06-28 08:31:33 -07:00
Nathan Braswell
63d9ec66e1 Added "Init Position Call" (takes the place of implicit constructors) and the this keyword! This was the structure needed for more sensable memory management. At least delete will need some updating before it becomes very usable, though. (Figuring out the types for function template instantiation) Anyway, good progress here! 2014-06-26 01:45:44 -07:00
Nathan Braswell
82d8a15de0 Added (then fixed) templates with multiple parameters for both classes and functions! 2014-06-17 00:10:57 -07:00
Nathan Braswell
39f945940d Fixed a ton of stuff with function templates. Works well now. Next up: multiple template types and fixing object definition ordering (both where templates should go and objects with other pointers) 2014-05-19 20:00:35 -04:00
Nathan Braswell
b2c61b00f2 Function templates working\! 2014-05-15 17:58:41 -04:00
Nathan Braswell
6c3267a8b2 Some groundwork for templates 2014-05-07 02:33:04 -04:00
Nathan Braswell
209985310e Fixed type propagation for dereference and address-of, needs work for all the other operators also. Starting ground work for array notation 2014-05-05 13:52:12 -04:00
Nathan Braswell
3728a849de Work in progress commit. Working on method operator overloading, fixed c-style block comments. 2014-03-14 15:55:45 -04:00
Nathan Braswell
6eee808f96 Fixed a lot of stuff to do with objects and method calls. 2014-03-08 16:13:09 -05:00
Nathan Braswell
62933af8f8 Basic structures work, prep work for function pointers and other stuff,a couple of bugs fixed. 2014-01-19 18:20:52 -05:00
Nathan Braswell
00ef8f0a7c Fixed the triple string RegEx. Had included quotes in the main part of the RegEx by accident. 2014-01-07 21:43:39 -05:00
Nathan Braswell
0d47a03986 Fixed regex! Much simpler and sensible implementation too. 2014-01-07 21:31:56 -05:00
Nathan Braswell
0297f29dcd Save state before re-write of RegEx. 2014-01-07 13:14:58 -05:00
Nathan Braswell
dbf1820428 Can import other files now. (in same directory, use filename without .krak file extention) Right now, still need to compile both files with kraken. 2013-12-31 23:43:49 -06:00
Nathan Braswell
dd9c8059ff Clean up, some small additions. 2013-12-28 21:54:22 -05:00
Nathan Braswell
98b899b8a9 Added rough but working scoping. 2013-12-27 13:05:07 -06:00
Nathan Braswell
15674fec2a Added Type class, bettered types a bit, made address of and dereference operators work. 2013-12-23 01:26:24 -06:00
Nathan Braswell
935cc6f968 Added generator-dependent compilation and simple passthrough that allows us to have non-cheated emitted, printing c-code for the first time! (no typechecking or anything yet, but we'll get there). It's also still rough. 2013-12-22 01:34:59 -06:00
Nathan Braswell
6ad406e42d Small fixes to the grammer, ASTTransformation and CGenerator. Should now be ready to begin implementation of multiple files, conditional inclusion, and code passthrough. 2013-12-19 10:39:36 -06:00
Nathan Braswell
f273deaedc FINALLY fixed an error that took weeks. Turned out that the ParseRule was shallow copied, and the lookahead was not copied correctly. So it got extended and thus skipped over the state when it should have been redone. 2013-12-18 18:05:21 -06:00
Nathan Braswell
d38fd32323 More AST stuff. Now supports boolean stuff 2013-11-07 22:19:33 -05:00
Nathan Braswell
77f2b0a3e5 Lot's of work on a CGenerator, AST and language improvements 2013-11-01 02:52:18 -04:00
Nathan Braswell
ebe6b3520a More AST work. Getting close to fully transforming language as specified by current grammer. (which is a subset of what it will become) 2013-10-26 15:05:42 -04:00
Nathan Braswell
02fd878c92 Further work on AST transformation 2013-10-16 01:43:18 -04:00
Nathan Braswell
0110672f50 Added in structure for tree transformations. 2013-09-26 15:16:58 -04:00
Nathan Braswell
f07582e692 Fixed up grammer to resolve some ambiguities. 2013-08-27 16:47:33 -04:00
Nathan Braswell
e868c240d8 Added current, in progress grammer/ 2013-08-27 13:23:37 -04:00