zik.saleeba
d38b4fa617
Added nicer error reports to parameter assignment
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@323 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-03 00:26:14 +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
a4889edcf1
Fixes in handling void values.
...
Making quicksort test more real.
Better error reporting for invalid parameters.
git-svn-id: http://picoc.googlecode.com/svn/trunk@318 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-02 07:01:43 +00:00
zik.saleeba
2f8f365d46
"int a = *'" now reports an error
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@316 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-02 06:30:14 +00:00
zik.saleeba
825c393240
Reworking of how assignment works. Now all places which do assignment of values
...
should work the same.
git-svn-id: http://picoc.googlecode.com/svn/trunk@314 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-02 05:51:51 +00:00
zik.saleeba
d1d1b7e84e
Fixed a problem with type coercion on parameter passing.
...
Added a handy feature for better-than-C type coercion in printf().
Added a regression test for all sorts of type coercion.
git-svn-id: http://picoc.googlecode.com/svn/trunk@298 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-27 23:54:22 +00:00
zik.saleeba
4668c0a80e
Fixed a bug which caused a hang when a comma was omitted in a parameter list, followed by an identifier.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@297 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-27 05:59:44 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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