Commit graph

525 commits

Author SHA1 Message Date
zik.saleeba 8038424d1a Removed diagnostics
git-svn-id: http://picoc.googlecode.com/svn/trunk@225 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-11 06:36:40 +00:00
zik.saleeba 15aa51e08d Fixed an annoying problem with HeapFree() which was causing occasional instability.
This fixes Howard's problem with peek()/poke().


git-svn-id: http://picoc.googlecode.com/svn/trunk@224 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-10 09:35:10 +00:00
surveyor.com 888db91168 fixed problems with iodir(), ioread() and iowrite() functions
git-svn-id: http://picoc.googlecode.com/svn/trunk@223 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-08 17:58:15 +00:00
zik.saleeba 9e75ab3760 Temporarily added some test for the parameter passing problem Howard found.
git-svn-id: http://picoc.googlecode.com/svn/trunk@222 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-08 12:00:45 +00:00
surveyor.com eed2b99515 minor edits to library_surveyor.c
git-svn-id: http://picoc.googlecode.com/svn/trunk@221 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-08 01:42:44 +00:00
surveyor.com 414ae8a3c2 added peek(), poke(), battery(), iodir(), ioread() and iowrite() to
Surveyor robot functions

full function list is now found at http://www.surveyor.com/C.html



git-svn-id: http://picoc.googlecode.com/svn/trunk@220 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-08 01:17:12 +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 61e93e4774 Working on a struct example for Howard
git-svn-id: http://picoc.googlecode.com/svn/trunk@218 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-07 06:36:06 +00:00
zik.saleeba 74673d965a More work on expressions. Trying to get variable lookups to work in the new system.
git-svn-id: http://picoc.googlecode.com/svn/trunk@217 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-05 02:24:00 +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 ccbf149212 Fixed a problem with interactive mode error handling.
Will need some extra work for Surveyor... tomorrow.


git-svn-id: http://picoc.googlecode.com/svn/trunk@215 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-31 11:08:29 +00:00
zik.saleeba 79c7619dab New expression system now handles simple numeric values
git-svn-id: http://picoc.googlecode.com/svn/trunk@214 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-30 11:16:40 +00:00
zik.saleeba 45a378231b More work on expressions
git-svn-id: http://picoc.googlecode.com/svn/trunk@213 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-29 11:08:03 +00:00
zik.saleeba 8baa2f71f7 Fixed a pile of compile errors
git-svn-id: http://picoc.googlecode.com/svn/trunk@212 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-28 11:10:34 +00:00
zik.saleeba 1ab28fcfb7 Took a first stab at implementing new/delete. Needs a bit more thought on how to handle dangling references to deallocated storage.
git-svn-id: http://picoc.googlecode.com/svn/trunk@211 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-16 04:25:58 +00:00
zik.saleeba 188eb93d43 Fixed a minor error in va_list handling
git-svn-id: http://picoc.googlecode.com/svn/trunk@210 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-16 00:47:01 +00:00
surveyor.com 4b8ad0526e added #include "../gps.h" to SURVEYOR_HOST
git-svn-id: http://picoc.googlecode.com/svn/trunk@209 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-15 21:26:03 +00:00
surveyor.com 9962bcc3cc added gps() parsing to SURVEYOR_HOST
git-svn-id: http://picoc.googlecode.com/svn/trunk@208 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-15 21:24:16 +00:00
zik.saleeba eff849ad28 Fixed a problem with function definition parsing which was causing
prompt2 to be displayed in error.


git-svn-id: http://picoc.googlecode.com/svn/trunk@207 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-15 10:52:48 +00:00
zik.saleeba ce80c66e8f Added new "delete" keyword, used for undefining variables or functions
in interactive mode.


git-svn-id: http://picoc.googlecode.com/svn/trunk@206 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-15 10:44:56 +00:00
zik.saleeba a414de85e5 getchar()/gets() implemented
git-svn-id: http://picoc.googlecode.com/svn/trunk@205 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-15 09:57:19 +00:00
zik.saleeba 70d48e75d7 Updated tests to reflect the removal of sayhello() and printint()
git-svn-id: http://picoc.googlecode.com/svn/trunk@204 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-15 09:09:38 +00:00
zik.saleeba 207549bf17 Reorganised platform/library stuff for better separation between
platforms.
Removed unnecessary union in pointers.


git-svn-id: http://picoc.googlecode.com/svn/trunk@203 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-15 07:07:21 +00:00
zik.saleeba 436b0cafc0 Conditional support for #include for surveyor
git-svn-id: http://picoc.googlecode.com/svn/trunk@202 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-12 20:44:50 +00:00
zik.saleeba c65cd8256b More work on the new expression evaluator
git-svn-id: http://picoc.googlecode.com/svn/trunk@201 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-12 10:49:57 +00:00
zik.saleeba 36e58ab475 Stack handling for new expression evaluator
git-svn-id: http://picoc.googlecode.com/svn/trunk@200 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-12 02:21: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 c403ddcd04 Updated TODO
git-svn-id: http://picoc.googlecode.com/svn/trunk@198 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-11 22:36:25 +00:00
zik.saleeba 0523bd570d String literal array values are now shared and deallocated cleanly
git-svn-id: http://picoc.googlecode.com/svn/trunk@197 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-11 22:28:42 +00:00
zik.saleeba 815dc75dbd Count now ignores comment and blank lines
git-svn-id: http://picoc.googlecode.com/svn/trunk@196 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-11 10:23:40 +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
zik.saleeba d48345a9ea Safety check for bucket sizes
git-svn-id: http://picoc.googlecode.com/svn/trunk@191 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-11 01:59:22 +00:00
zik.saleeba 8d315824b5 Fixed a problem with heap allocation when splitting large blocks from the free list
git-svn-id: http://picoc.googlecode.com/svn/trunk@190 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-10 23:32:36 +00:00
zik.saleeba 201019ce2d Removed debug which was accidentally checked in
git-svn-id: http://picoc.googlecode.com/svn/trunk@189 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-10 23:02:06 +00:00
zik.saleeba 7306924785 Fixed a null-termination bug in StrRegister()
git-svn-id: http://picoc.googlecode.com/svn/trunk@188 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-10 21:59:18 +00:00
zik.saleeba 6a586cee75 Fixed bug in enum declaration requiring a variable name
git-svn-id: http://picoc.googlecode.com/svn/trunk@187 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-10 08:03:10 +00:00
zik.saleeba 588353449e Updated TODO
git-svn-id: http://picoc.googlecode.com/svn/trunk@186 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-10 04:11:03 +00:00
zik.saleeba 9769bd432b Fixed problem with 'return' parsing which was causing the factorial example to fail
git-svn-id: http://picoc.googlecode.com/svn/trunk@185 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-10 02:18:17 +00:00
zik.saleeba bee7e23212 Functions with no parameters tested and passed
git-svn-id: http://picoc.googlecode.com/svn/trunk@184 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-10 02:04:19 +00:00
zik.saleeba b8aedfe050 Fixed bugs in LexCopyTokens() which were affecting multi-line function definitions in interactive mode
git-svn-id: http://picoc.googlecode.com/svn/trunk@183 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-10 02:01:12 +00:00
zik.saleeba 8d76edfe4b #include now works
git-svn-id: http://picoc.googlecode.com/svn/trunk@182 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-10 01:01:57 +00:00
zik.saleeba 456a83da75 '->' operator implemented
git-svn-id: http://picoc.googlecode.com/svn/trunk@181 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-09 23:18:04 +00:00
zik.saleeba 23bce9d38a enums implemented
git-svn-id: http://picoc.googlecode.com/svn/trunk@180 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-09 22:36:01 +00:00
zik.saleeba 2f5a46681e Nesting test added
git-svn-id: http://picoc.googlecode.com/svn/trunk@179 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-09 20:48:26 +00:00
zik.saleeba 460a8df81f Added missing tests
git-svn-id: http://picoc.googlecode.com/svn/trunk@178 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-09 00:49:01 +00:00
zik.saleeba 1fd07ea9a2 Corrected test
git-svn-id: http://picoc.googlecode.com/svn/trunk@177 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-09 00:45:33 +00:00
zik.saleeba b9990d2c39 Functions returning void fixed
git-svn-id: http://picoc.googlecode.com/svn/trunk@176 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-09 00:43:31 +00:00