zik.saleeba
2a69c48777
Fixed a bug in parsing "while ()" and "do..while()". I tried to be too clever. Bad idea.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@329 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-04 00:18:28 +00:00
zik.saleeba
d432ebf74a
Fixed a problem with returning void.
...
Updated quicksort test to be a real working test.
git-svn-id: http://picoc.googlecode.com/svn/trunk@327 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-03 05:24:41 +00:00
zik.saleeba
637e224fff
Now parses but ignores signed/unsigned declarations
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@325 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-03 02:31:43 +00:00
zik.saleeba
44eb3d3def
Now handles "4 = b;" correctly (ie. with an error message)
...
Also fixed a problem with prompting again for more input on EOF.
git-svn-id: http://picoc.googlecode.com/svn/trunk@324 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-03 02:15:25 +00:00
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
6f00c2a853
Added a check for rubbish after parameters in a function defintion.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@322 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-02 08:23:59 +00:00
zik.saleeba
eb6f323f06
HeapAlloc() changed to HeapAllocMem() to avoid clash with win32 namespace.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@321 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-02 08:00:02 +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
43cf4f5c9f
Permitting parsing of expressions which start with an asterisk prefix operator.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@319 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-02 07:10:35 +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
f4b2bdcc64
Fixed a bug which was causing declarations in functions to run even when just scanning.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@315 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-02 06:07:59 +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
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
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
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
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
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
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
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
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
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
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
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
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
zik.saleeba
1b312544d9
'else' fixed, along with semicolon handling
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@175 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-09 00:34:32 +00:00
zik.saleeba
1169e6f909
Prompt changes
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@172 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-08 23:03:59 +00:00
zik.saleeba
dc04ba8dd0
Split parsing across two files parse.c and the new expression.c
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@170 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-08 07:56:28 +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
zik.saleeba
f5fac3fdf2
First stab at making lists of tokens from interactive input. Not ready yet.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@162 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-07 07:49:17 +00:00
zik.saleeba
8a5ed05fd2
Now copying function tokens so when we're in interactive mode we can free the original tokens without
...
losing the box and dice.
git-svn-id: http://picoc.googlecode.com/svn/trunk@161 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-07 06:17:11 +00:00
zik.saleeba
86bb48b158
#define now works for simple unparameterised expression macros
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@159 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-06 07:27:45 +00:00
zik.saleeba
3bdbb51d5c
Now allowing multiple declarations in one statement
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@157 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-06 06:00:51 +00:00
zik.saleeba
8b410241ee
Declarations can now assign an initial value
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@156 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-06 04:55:11 +00:00
zik.saleeba
d137fdcbeb
More expression parser tinkering
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@154 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-05 04:05:15 +00:00
zik.saleeba
8020a9ca57
Expression fiddling
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@151 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-04 10:09:56 +00:00
zik.saleeba
a3ab81ca23
Starting to code the new expression system
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@148 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-03 10:53:45 +00:00
zik.saleeba
7003b55ead
Library functions now get Parser as a parameter
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@134 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-28 22:14:55 +00:00
zik.saleeba
cebff6d290
Thinking about pointers to struct and array elements
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@119 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-26 10:44:06 +00:00
zik.saleeba
71aa142c96
Pointers now work
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@118 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-26 10:16:49 +00:00
zik.saleeba
73d91b6202
Change to add extra lvalue information to values
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@117 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-26 09:56:22 +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
aa213f4129
Fixed local conflicts
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@108 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-24 08:00:53 +00:00
zik.saleeba
cf28c7513c
Fixed some inconsistencies in array handling
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@105 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-24 02:28:35 +00:00
zik.saleeba
e94767ba98
New NO_FP compile option allows removal of all floating point support
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@101 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-24 00:21:17 +00:00
zik.saleeba
93a6a0e9d0
Fixed a bug in array allocation (regression)
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@100 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-24 00:08:11 +00:00
zik.saleeba
4b11999dea
stdarg parameter type checking bug sorted
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@99 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-21 23:38:07 +00:00