Commit graph

336 commits

Author SHA1 Message Date
zik.saleeba 8b2fd2c56a Added tests for FP type coercion
git-svn-id: http://picoc.googlecode.com/svn/trunk@296 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-27 05:06:36 +00:00
zik.saleeba 4949ad046a Added type coercion to floating point from numeric types in parameters.
git-svn-id: http://picoc.googlecode.com/svn/trunk@295 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-27 05:03:48 +00:00
zik.saleeba 83d6b9a6d3 Added a new math library.
Fixed printing of floating point 0.0.


git-svn-id: http://picoc.googlecode.com/svn/trunk@294 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-27 04:55:44 +00:00
zik.saleeba 2cb35ef26a Fixed a problem with floating point prefix expressions.
Added a regression test for floating point.

git-svn-id: http://picoc.googlecode.com/svn/trunk@293 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-27 04:01:52 +00:00
zik.saleeba 8092d67c70 Fixed a problem with printing negative floating point numbers
git-svn-id: http://picoc.googlecode.com/svn/trunk@292 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-27 03:43:37 +00:00
zik.saleeba da2cd4805d Fixed an annoying bug which looked like a floating point issue but was in fact a string lexer issue.
git-svn-id: http://picoc.googlecode.com/svn/trunk@291 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-27 03:23:41 +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 6015fc5694 Fixed return of floating point tokens
git-svn-id: http://picoc.googlecode.com/svn/trunk@289 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-27 00:06:09 +00:00
zik.saleeba 6c8d9ba4cb Fixed a floating point type error bug.
Re-ordered handling of infix floating point operators to handle them before integer coercion.

git-svn-id: http://picoc.googlecode.com/svn/trunk@288 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-27 00:05:31 +00:00
zik.saleeba eac072593c Nicer formatting of '.0'
git-svn-id: http://picoc.googlecode.com/svn/trunk@287 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-26 23:23:39 +00:00
zik.saleeba 758955fc11 A slightly better fix for the FP printing problem
git-svn-id: http://picoc.googlecode.com/svn/trunk@286 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-26 22:42:38 +00:00
zik.saleeba b9df205e6a Fixed a bug in floating point printing
git-svn-id: http://picoc.googlecode.com/svn/trunk@285 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-26 22:31:42 +00:00
surveyor.com 317c851f0d added support for gps waypoint navigation and wheel encoders in library_surveyor.c
git-svn-id: http://picoc.googlecode.com/svn/trunk@284 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-25 21:17:29 +00:00
zik.saleeba 207029259c Helpful comments added on tokens
git-svn-id: http://picoc.googlecode.com/svn/trunk@283 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-24 00:22:04 +00:00
surveyor.com db9219a324 fixed problem with signal() in SURVEYOR_HOST
git-svn-id: http://picoc.googlecode.com/svn/trunk@282 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-17 15:20:39 +00:00
zik.saleeba 5cece5090c Fixed a painful bug which was causing numbers to be corrupted on
the surveyor architecture. Why this didn't cause a problem on x86
I'll never know.


git-svn-id: http://picoc.googlecode.com/svn/trunk@281 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-16 12:51:55 +00:00
surveyor.com f4c00c74b4 added vscan() function for edge detection
git-svn-id: http://picoc.googlecode.com/svn/trunk@280 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-15 19:42:08 +00:00
zik.saleeba 5dcde3d5ea Fix for a bug where variables which were initialised on declaration weren't writable.
git-svn-id: http://picoc.googlecode.com/svn/trunk@279 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-14 00:21:29 +00:00
surveyor.com 6b851b88d2 added vcam() camera control and vfind() pixel search functions to SURVEYOR_HOST
git-svn-id: http://picoc.googlecode.com/svn/trunk@278 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-12 16:39:35 +00:00
zik.saleeba a76fc34881 By popular demand I'm adding support for native pointers. It's a work in progress - not working yet.
git-svn-id: http://picoc.googlecode.com/svn/trunk@277 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-06 00:25:09 +00:00
zik.saleeba 0acb79a9a5 Removed this "deliberate" mistake.
git-svn-id: http://picoc.googlecode.com/svn/trunk@276 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-05 22:19:13 +00:00
zik.saleeba 20c649d7ef Added some changes for umon suggested by Ed Sutter
git-svn-id: http://picoc.googlecode.com/svn/trunk@275 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-05 22:12:59 +00:00
zik.saleeba bd9cb90e02 Added the beginnings of flying fox platform support.
Removed some annoying debug.
Made it easier to compile unmodified on non-UNIX systems.


git-svn-id: http://picoc.googlecode.com/svn/trunk@274 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-04 12:02:16 +00:00
zik.saleeba 997f0c119f Fixed a char * arithmetic bug
git-svn-id: http://picoc.googlecode.com/svn/trunk@273 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-29 03:24:15 +00:00
zik.saleeba 5f09200360 Implementing variants on pointer assignment - assigning arrays and array
pointers to pointers to the array element type.


git-svn-id: http://picoc.googlecode.com/svn/trunk@272 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-27 12:19:36 +00:00
zik.saleeba b6e61dd8ab Created a stream output system.
Implemented sprintf().

git-svn-id: http://picoc.googlecode.com/svn/trunk@271 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-27 04:56:58 +00:00
zik.saleeba 647cc90999 Added pre/post inc/dec operators for pointers.
git-svn-id: http://picoc.googlecode.com/svn/trunk@270 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-26 11:39:16 +00:00
zik.saleeba 4ea76ea5b3 Changed dereferencing to handle arrays correctly.
git-svn-id: http://picoc.googlecode.com/svn/trunk@269 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-26 03:26:04 +00:00
zik.saleeba c805b3fdec Added ability to print types in error messages
git-svn-id: http://picoc.googlecode.com/svn/trunk@268 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-24 01:02:25 +00:00
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