zik.saleeba
1301fe7a8f
More intelligent allocation/deallocation of parser data. It should now be possible to report error messages from previously-parsed files.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@480 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-27 18:16:05 +00:00
zik.saleeba
43174676ca
Now handling return values from main.
...
Changed to more strict handling of main() - if it's not defined in main-calling mode then the program will crash rather than ignoring the problem.
Tests changed to correspond to this approach.
git-svn-id: http://picoc.googlecode.com/svn/trunk@479 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-27 16:20:09 +00:00
zik.saleeba
df9129b355
Calls to exit(n) now return the exit value n to the command line.
...
This fixes issue 100.
git-svn-id: http://picoc.googlecode.com/svn/trunk@478 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-27 15:35:25 +00:00
zik.saleeba
8e02f32095
Added the ability to select the stack size on UNIX platforms.
...
Fixes issue 92.
git-svn-id: http://picoc.googlecode.com/svn/trunk@477 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-27 14:03:06 +00:00
zik.saleeba
0ffbd21f2e
When you're using a scripting mode - "-s", "-m" or "-i" - it now automatically includes all the system headers for you.
...
This fixes issue 101
git-svn-id: http://picoc.googlecode.com/svn/trunk@475 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-27 11:48:39 +00:00
zik.saleeba
e744c816c5
test
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@467 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-19 20:16:32 +00:00
zik.saleeba
a365e1e993
Now calls main() if one has been defined, and not if one hasn't.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@460 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-05 19:00:29 +00:00
zik.saleeba
ff7aadcc11
Fixed a little bit-rot in clibrary.c
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@455 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-03 17:00:54 +00:00
zik.saleeba
73a5d6a11b
Added non-working LED test
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@454 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-03 16:33:57 +00:00
zik.saleeba
7700f11893
Can now call with command line arguments.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@453 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-03 16:10:15 +00:00
zik.saleeba
b4b5594a5d
Added hanoi test program.
...
Now programs can be run without having to explicitly call main().
git-svn-id: http://picoc.googlecode.com/svn/trunk@452 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-03 15:20:29 +00:00
zik.saleeba
cda24bd46f
test
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@441 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-06-23 13:45:36 +00:00
zik.saleeba
985e6c960f
Platform libraries now require explicit #includes
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@440 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-06-13 20:47:17 +00:00
zik.saleeba
e564b173be
Some mods for the new SRV1_UNIX_HOST mode
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@439 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-06-13 17:23:10 +00:00
zik.saleeba
40e338b823
Added printf() and variants to stdio
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@424 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-06-11 17:12:49 +00:00
zik.saleeba
7c1bca8f41
Fix for comment incompatibility
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@372 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-04 01:19:10 +00:00
surveyor.com
2493d1ff01
resync to SURVEYOR_HOST changes
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@364 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-31 14:39:43 +00:00
zik.saleeba
bb0d19a733
Now conforms fully to the ISO C90 standard
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@320 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-02 07:50:46 +00:00
zik.saleeba
77c4b6e71b
Floating point evaluation implicit casting fixes.
...
Fixed a problem on UNIX where the program usage message couldn't be printed due to the platform output system not being initialised by that point in execution.
git-svn-id: http://picoc.googlecode.com/svn/trunk@290 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-27 03:02:30 +00:00
zik.saleeba
096def8f55
Pointer arithmetic and NULL pointer support added
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@255 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-19 11:49:01 +00:00
zik.saleeba
16922d2e73
library struct example for Howard
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@219 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-07 10:48:46 +00:00
zik.saleeba
61174fb115
Interactive mode error handling fixed for surveyor.
...
All surveyor warnings fixed.
git-svn-id: http://picoc.googlecode.com/svn/trunk@216 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-04 03:11:12 +00:00
zik.saleeba
48a6472c68
All allocations are now cleaned up neatly on exit. This is probably unnecessary given that we run our own heap but gives confidence that there are no internal memory leaks.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@199 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-11 23:49:10 +00:00
zik.saleeba
6f7daf0145
Now cleaning up types too
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@195 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-11 10:17:46 +00:00
zik.saleeba
028c98d665
Now cleaning up more stuff
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@194 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-11 10:01:32 +00:00
zik.saleeba
3448e70551
Memory cleanup now works
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@193 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-11 09:50:11 +00:00
zik.saleeba
a22c243c06
Doing some work on cleaning up more nicely on exit.
...
Also allowing the use of the native heap allocator as an option.
git-svn-id: http://picoc.googlecode.com/svn/trunk@192 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-11 02:19:18 +00:00
surveyor.com
0f5675271d
added support for interactive mode in SURVEYOR_HOST
...
added neural net functions for SURVEYOR_HOST
git-svn-id: http://picoc.googlecode.com/svn/trunk@173 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-08 23:53:19 +00:00
zik.saleeba
46c4bad533
Interactive mode now works.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@167 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-08 04:26:28 +00:00
zik.saleeba
05d377e49d
First stab at interactive mode needs debug.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@164 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-07 11:23:42 +00:00
surveyor.com
1940dd496f
added changes for SURVEYOR_HOST
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@136 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-01 21:09:42 +00:00
zik.saleeba
24b47c58f4
Added changes from Howard
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@135 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-01 10:07:01 +00:00
zik.saleeba
d98c55d5e5
Platform-shared global variables implemented
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@130 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-28 20:46:02 +00:00
zik.saleeba
9f8770047f
Fixed test program for Surveyor
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@122 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-28 05:49:14 +00:00
zik.saleeba
6ce1662475
Platform-dependent exit() function for Surveyor
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@121 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-28 05:43:28 +00:00
zik.saleeba
3558506261
Fiddling with pointers
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@115 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-25 11:14:46 +00:00
zik.saleeba
20fb2407ef
Big reorganisation to make it easier to port to different targets
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@110 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-24 11:16:37 +00:00
zik.saleeba
7f6503d1e0
printf() now works!
...
Fixed a bug in pointer sizing.
git-svn-id: http://picoc.googlecode.com/svn/trunk@98 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-21 12:02:15 +00:00
zik.saleeba
4821d689ad
Big changes to string constants.
...
Got rid of str.c.
First attempt at stdarg params in printf()
git-svn-id: http://picoc.googlecode.com/svn/trunk@97 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-21 02:35:52 +00:00
zik.saleeba
e267efdb96
Changed order of initialisation to fix reserved word bug
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@54 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-02 22:35:34 +00:00
zik.saleeba
0c0ac9b332
Lexer now supports interactive input.
...
Lexer now pre-scans the source and returns a buffer of tokens.
Heap can provide unallocated memory for a temporary buffer.
git-svn-id: http://picoc.googlecode.com/svn/trunk@46 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-02 04:53:45 +00:00
zik.saleeba
8bd1c18d24
Converting to use shared strings
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@45 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-02 03:27:05 +00:00
zik.saleeba
86af5318da
Bulko lexer change for more efficient pre-scanned tokens.
...
Removed Str type - replaced with standard C strings.
Added hashed string tables for efficient string storage.
git-svn-id: http://picoc.googlecode.com/svn/trunk@43 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-01 11:31:18 +00:00
zik.saleeba
2d7b467b96
Changed from a linear probing hash table to a hash chain method since we now have better storage allocation. This is more space efficient and removes the static limits on local variable table sizes.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@41 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-01-29 22:26:04 +00:00
zik.saleeba
a15cf7dd36
Fixed a problem with passing unnamed parameters.
...
Fixed a problem with file reading.
git-svn-id: http://picoc.googlecode.com/svn/trunk@30 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-01-05 05:50:04 +00:00
zik.saleeba
e5920c041c
Local variables implemented
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@18 21eae674-98b7-11dd-bd71-f92a316d2d60
2008-12-22 02:29:19 +00:00
zik.saleeba
42c28c78c7
Neatened calling and error handling.
...
Parser now handles assignment.
git-svn-id: http://picoc.googlecode.com/svn/trunk@13 21eae674-98b7-11dd-bd71-f92a316d2d60
2008-12-20 10:24:34 +00:00
zik.saleeba
a41ac67b50
Now compiles
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@10 21eae674-98b7-11dd-bd71-f92a316d2d60
2008-12-19 00:22:52 +00:00
zik.saleeba
96674aad41
Now uses internal printf
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@5 21eae674-98b7-11dd-bd71-f92a316d2d60
2008-10-14 11:18:43 +00:00
zik.saleeba
b5f685e744
Now compiles cleanly
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@3 21eae674-98b7-11dd-bd71-f92a316d2d60
2008-10-13 10:53:25 +00:00