Commit graph

457 commits

Author SHA1 Message Date
zik.saleeba f2f44b1bf7 Slightly neater and more general way of handling type coercion on parameter passing. Doesn't actually correct the Param->Typ any more but this shouldn't be necessary.
git-svn-id: http://picoc.googlecode.com/svn/trunk@267 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-23 22:46:32 +00:00
zik.saleeba 755cbd30b5 Added new char array test
git-svn-id: http://picoc.googlecode.com/svn/trunk@266 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-23 12:08:27 +00:00
zik.saleeba d06f2442fb Fixed int->char coercion error in parameter passing.
git-svn-id: http://picoc.googlecode.com/svn/trunk@265 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-23 11:57:45 +00:00
zik.saleeba 99656dc9fb Added NO_FP around new FP assign code
git-svn-id: http://picoc.googlecode.com/svn/trunk@264 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-22 22:28:30 +00:00
zik.saleeba 146a591ed0 Fixed a bug in char<->int coercion in parameter passing.
git-svn-id: http://picoc.googlecode.com/svn/trunk@263 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-22 22:05:27 +00:00
zik.saleeba 95f2b3e193 Characters are now actually stored as char and coerced to other types when necessary.
Parameters are passed as the requested types and coerced where appropriate.
Assignments are now a function rather than a macro.
Cleaned up some comments in lex.c.
Small valued integer constants are passed as char constants to save space.


git-svn-id: http://picoc.googlecode.com/svn/trunk@262 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-22 12:06:58 +00:00
zik.saleeba a55cbe0516 Added missing tests
git-svn-id: http://picoc.googlecode.com/svn/trunk@261 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-22 08:24:56 +00:00
zik.saleeba 16c5b72f4d Pointer comparison operations implemented
git-svn-id: http://picoc.googlecode.com/svn/trunk@260 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-22 08:19:52 +00:00
zik.saleeba e5fa7017f0 Better checks on pointers.
Pointer offsets are now honoured.


git-svn-id: http://picoc.googlecode.com/svn/trunk@259 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-22 07:23:26 +00:00
zik.saleeba 8c918707f2 Added checks for NULL pointer dereference
git-svn-id: http://picoc.googlecode.com/svn/trunk@258 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-22 01:58:03 +00:00
zik.saleeba f6d397211d Removed library_unix.c code used for tests and examples
git-svn-id: http://picoc.googlecode.com/svn/trunk@257 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-20 00:56:17 +00:00
zik.saleeba 6ff093bb16 Updated TODO
git-svn-id: http://picoc.googlecode.com/svn/trunk@256 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-19 12:00:53 +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
surveyor.com 88d904ada8 added support for LIS3LV02DQ 3-axis accelerometer. int data =
tilt(int); where tilt(1) is x-axis, tilt(2) is y-axis, tilt(3) is z-axis



git-svn-id: http://picoc.googlecode.com/svn/trunk@254 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-19 01:38:53 +00:00
zik.saleeba 7c2ce7290a Fixes for a clean surveyor compile
git-svn-id: http://picoc.googlecode.com/svn/trunk@253 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-19 01:15:01 +00:00
zik.saleeba a07c3ed286 Added some new pointer-related feature requests
git-svn-id: http://picoc.googlecode.com/svn/trunk@252 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-17 22:44:25 +00:00
zik.saleeba 5b16c5c793 Precedence test added
git-svn-id: http://picoc.googlecode.com/svn/trunk@250 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-15 10:56:02 +00:00
zik.saleeba 94e051c9c9 The new expression system is now the mainstream expression evaluator. Hoorah!
git-svn-id: http://picoc.googlecode.com/svn/trunk@249 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-15 10:49:22 +00:00
zik.saleeba 2e22614595 Final problems with the new expression system fixed
git-svn-id: http://picoc.googlecode.com/svn/trunk@248 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-15 10:47:51 +00:00
zik.saleeba fdbdb116b6 Just some handy examples
git-svn-id: http://picoc.googlecode.com/svn/trunk@247 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-15 10:46:52 +00:00
zik.saleeba 48dc9c02a8 updated TODO
git-svn-id: http://picoc.googlecode.com/svn/trunk@246 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-15 07:48:57 +00:00
zik.saleeba 7cb2079af4 Macros implemented
git-svn-id: http://picoc.googlecode.com/svn/trunk@245 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-15 06:57:02 +00:00
zik.saleeba 883db65e15 '->' now works in the new expression system.
git-svn-id: http://picoc.googlecode.com/svn/trunk@244 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-15 06:40:56 +00:00
zik.saleeba 8339e586d1 Fixed a problem with assignment of non-numeric types
git-svn-id: http://picoc.googlecode.com/svn/trunk@242 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-15 05:26:46 +00:00
zik.saleeba 031edfb7ab Problem with ending expressions fixed in new expression system.
Problem with handling ternary operators in case values fixed (those colons are tricky).


git-svn-id: http://picoc.googlecode.com/svn/trunk@233 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-14 23:44:49 +00:00
zik.saleeba 9fdee50576 Case expression handling fixed.
git-svn-id: http://picoc.googlecode.com/svn/trunk@232 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-14 08:44:47 +00:00
zik.saleeba ca628b8cb3 Array indexing now works in the new expression system.
git-svn-id: http://picoc.googlecode.com/svn/trunk@231 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-14 06:55:00 +00:00
zik.saleeba d034ded5fc Structs now work in the new expression system.
Tests 03 and 04 now pass.


git-svn-id: http://picoc.googlecode.com/svn/trunk@230 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-14 03:18:40 +00:00
zik.saleeba 9e24449497 Problems with increment/decrement operators fixed in new expression system.
Test 02_printf now works.


git-svn-id: http://picoc.googlecode.com/svn/trunk@229 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-13 09:02:45 +00:00
zik.saleeba 1877ab67aa New expression system now successfully evaluates simple expressions.
git-svn-id: http://picoc.googlecode.com/svn/trunk@228 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-13 06:57:32 +00:00
zik.saleeba 45054b4498 Fixed error in heap cleanup on UNIX.
git-svn-id: http://picoc.googlecode.com/svn/trunk@227 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-13 06:45:38 +00:00
surveyor.com 92e14727d7 added analog() function to support AD7998 8-channel 12-bit A/D converter
git-svn-id: http://picoc.googlecode.com/svn/trunk@226 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-11 22:50:38 +00:00
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