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
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
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
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
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
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
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
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
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
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
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
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
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
676c937a7b
Fixed bug in stdarg handling of non-stack values
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@142 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-02 22:13:47 +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
d98c55d5e5
Platform-shared global variables implemented
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@130 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-28 20:46:02 +00:00
zik.saleeba
b6b75396dd
Added all remaining operators with a view to completing expression evaluation
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@124 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-28 19:30:48 +00:00
zik.saleeba
6ce1662475
Platform-dependent exit() function for Surveyor
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@121 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-28 05:43:28 +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
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
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
zik.saleeba
7f6503d1e0
printf() now works!
...
Fixed a bug in pointer sizing.
git-svn-id: http://picoc.googlecode.com/svn/trunk@98 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-21 12:02:15 +00:00
zik.saleeba
4821d689ad
Big changes to string constants.
...
Got rid of str.c.
First attempt at stdarg params in printf()
git-svn-id: http://picoc.googlecode.com/svn/trunk@97 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-21 02:35:52 +00:00
zik.saleeba
2ac131247b
Fixed a lexer bug in memory allocation
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@96 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-20 09:46:46 +00:00
zik.saleeba
89e5c66189
Implemented ellipsis for stdargs and stdarg stack handling
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@95 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-20 09:04:45 +00:00
zik.saleeba
ebc32dc1f0
Removed unnecessary ResultOnHeap parameters - they just added code for no reason.
...
Arguments are now stored fully on the stack to fix a bug with nested function calls.
git-svn-id: http://picoc.googlecode.com/svn/trunk@91 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-19 23:29:35 +00:00
zik.saleeba
fdad9f8d30
Changes to help with implementing switch/case/break/continue/return
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@82 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-18 08:19:06 +00:00
zik.saleeba
d94b70212b
Syntax of "switch" is now handled. Not semantics though.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@81 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-17 23:36:09 +00:00
zik.saleeba
2e545deb6a
Arrays debugged and working
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@80 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-15 07:39:41 +00:00
zik.saleeba
b073f187f8
Revamped the way lvalues work. Now both structs and '.' should work.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@77 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-15 05:52:03 +00:00
zik.saleeba
bd5fe4b73c
Made a cleaner interface to creating shared values
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@74 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-11 06:47:36 +00:00
zik.saleeba
e348021c51
Fixed some egregious bugs
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@72 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-10 22:25:20 +00:00
zik.saleeba
a8b4b08d93
Implemented the '.' operator for struct/union member access
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@66 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-09 11:40:56 +00:00
zik.saleeba
943aa9cf97
Added some heap debug
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@61 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-03 06:27:34 +00:00
zik.saleeba
0547bcaff0
Increased heap size to 8k
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@55 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-02 22:35:59 +00:00
zik.saleeba
1389084b36
Fixed some egrerious bugs
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@49 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-02 11:50:55 +00:00
zik.saleeba
956efab67f
Parser is now updated to work with the new lexer and string system.
...
System now compiles - needs debug.
git-svn-id: http://picoc.googlecode.com/svn/trunk@48 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-02 11:08:36 +00:00