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
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
3c24084d94
Fixed an insidious bug in table lookups
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@133 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-28 22:13:55 +00:00
zik.saleeba
d6c73f42d4
Fixed lexer issue temporarily
...
Diked out failing pointer test case for now
Added platform return value example
git-svn-id: http://picoc.googlecode.com/svn/trunk@127 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-28 19:57:03 +00:00
zik.saleeba
84661d245c
Reverted broken lexer
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@126 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-28 19:48:01 +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
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
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
37c2364eff
Character constants now work
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@102 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-24 01:01:02 +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
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
834a6daca6
Added comment
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@86 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-19 04:55:52 +00:00
zik.saleeba
f45882e7e2
Now escaping character and string constants correctly
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@85 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-19 04:34:36 +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
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
36ce6f3b80
Fixed line numbering in error messages
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@75 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-12 09:34:16 +00:00
zik.saleeba
c9abac9fad
Fixed an EOF lexing problem.
...
Added some optional debug.
Turned debug off.
Fixed handling of LValues to work with stack frames better.
Fixed the handling of stack frames in function calls.
Fixed a bug in popping variable stack frames.
git-svn-id: http://picoc.googlecode.com/svn/trunk@65 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-04 00:17:30 +00:00
zik.saleeba
70cc4eae49
Fixed lexer EOF handling when whitespace at end of file
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@63 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-03 11:09:07 +00:00
zik.saleeba
bd30654f74
Fixed a problem with VariableAllocValueAndData() allocating the wrong amount of memory.
...
Fixed a problem with type parsing.
git-svn-id: http://picoc.googlecode.com/svn/trunk@62 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-03 10:39:48 +00:00
zik.saleeba
d95e7debf8
Fixed off-by-one error in LexGetToken()
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@59 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-03 00:43:13 +00:00
zik.saleeba
11fd7f0f16
Fixed handling of interactive input at EOF
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@58 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-03 00:23:13 +00:00
zik.saleeba
5b1d4a611f
More compact storage of lex token values
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@57 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-03 00:13:50 +00:00
zik.saleeba
44117cde04
Fixed fallthrough problem in lexer
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@56 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-02 23:45:34 +00:00
zik.saleeba
b0c3f9d63d
Uninitialised memory bug fixed
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@52 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-02 22:33:07 +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
0c0ac9b332
Lexer now supports interactive input.
...
Lexer now pre-scans the source and returns a buffer of tokens.
Heap can provide unallocated memory for a temporary buffer.
git-svn-id: http://picoc.googlecode.com/svn/trunk@46 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-02 04:53:45 +00:00
zik.saleeba
86af5318da
Bulko lexer change for more efficient pre-scanned tokens.
...
Removed Str type - replaced with standard C strings.
Added hashed string tables for efficient string storage.
git-svn-id: http://picoc.googlecode.com/svn/trunk@43 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-01 11:31:18 +00:00
zik.saleeba
75e45704e8
Bulk changes to accomodate the new storage model.
...
The system now compiles again (probably doesn't run though).
git-svn-id: http://picoc.googlecode.com/svn/trunk@38 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-01-26 08:57:32 +00:00
zik.saleeba
4524270e50
Changing everything to handled heap-allocated values
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@37 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-01-25 02:09:44 +00:00
zik.saleeba
fad5c6db69
Big changes and progress towards the new type system. Doesn't compile right now. Maybe tomorrow.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@35 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-01-23 11:34:12 +00:00
zik.saleeba
ef8969d975
Added lexer token caching for improved performance
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@29 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-01-05 04:52:33 +00:00
zik.saleeba
995266ce9c
Added test framework.
...
Implemented preprocessor-style directives (not finished yet).
git-svn-id: http://picoc.googlecode.com/svn/trunk@26 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-01-04 04:08:49 +00:00
zik.saleeba
704f20e1c4
Added floating point support
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@22 21eae674-98b7-11dd-bd71-f92a316d2d60
2008-12-27 02:25:49 +00:00
zik.saleeba
252e1339d6
Type and parameter parsing - working toward function handling.
...
"plain token" lexical analysis for brevity.
git-svn-id: http://picoc.googlecode.com/svn/trunk@19 21eae674-98b7-11dd-bd71-f92a316d2d60
2008-12-22 11:52:31 +00:00
zik.saleeba
eba1492fcb
Function definitions implemented.
...
Lexer changed to not carry values in LexState.
git-svn-id: http://picoc.googlecode.com/svn/trunk@15 21eae674-98b7-11dd-bd71-f92a316d2d60
2008-12-21 01:36:09 +00:00
zik.saleeba
19fbe151ff
Fixed a number lexing bug.
...
Fixed an assignment bug.
Beginnings of function handling.
Now can run a simple program for the first time.
git-svn-id: http://picoc.googlecode.com/svn/trunk@14 21eae674-98b7-11dd-bd71-f92a316d2d60
2008-12-20 11:46:21 +00:00
zik.saleeba
ead3f08671
Updated hello.c to current syntax.
...
Fixed a bug in string constant handling.
git-svn-id: http://picoc.googlecode.com/svn/trunk@11 21eae674-98b7-11dd-bd71-f92a316d2d60
2008-12-19 04:24:55 +00:00
zik.saleeba
a41ac67b50
Now compiles
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@10 21eae674-98b7-11dd-bd71-f92a316d2d60
2008-12-19 00:22:52 +00:00
zik.saleeba
8cfd9c6013
Wrote much of the parser
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@9 21eae674-98b7-11dd-bd71-f92a316d2d60
2008-11-22 02:56:08 +00:00
zik.saleeba
50c7494508
Starting the parser
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@8 21eae674-98b7-11dd-bd71-f92a316d2d60
2008-10-16 07:04:23 +00:00
zik.saleeba
5ddfcfd14a
Completed lexer.
...
Removed dependence on strtol()
git-svn-id: http://picoc.googlecode.com/svn/trunk@7 21eae674-98b7-11dd-bd71-f92a316d2d60
2008-10-15 02:09:47 +00:00
zik.saleeba
d89cc62990
More lexiness
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@6 21eae674-98b7-11dd-bd71-f92a316d2d60
2008-10-14 11:46:42 +00:00
zik.saleeba
b5f685e744
Now compiles cleanly
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@3 21eae674-98b7-11dd-bd71-f92a316d2d60
2008-10-13 10:53:25 +00:00
zik.saleeba
7bfc2c0be5
Initial checkin of picoc. Not working yet.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@2 21eae674-98b7-11dd-bd71-f92a316d2d60
2008-10-13 00:53:28 +00:00