zik.saleeba
8f6530b876
Updated tests with correct floating point printing
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@357 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-30 12:34:07 +00:00
zik.saleeba
b7eb4bee92
Fixed a couple of problems with floating point number printing.
...
Numbers outside the range 0 - 1e7 wouldn't print correct values.
git-svn-id: http://picoc.googlecode.com/svn/trunk@356 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-29 21:43:36 +00:00
zik.saleeba
172e6e5e8b
Fixed problem with negative exponents in floating point constants (issue #62 )
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@355 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-29 19:26:47 +00:00
zik.saleeba
7560c29942
Added test for defect #60
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@354 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-28 21:35:35 +00:00
zik.saleeba
50b45890bc
Fixed array indexing issue.
...
Fixed problem in index() and rindex() NULL pointer returns.
Nicer handling of printing NULL pointers.
New test suite for strings.
git-svn-id: http://picoc.googlecode.com/svn/trunk@353 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-28 21:34:51 +00:00
zik.saleeba
66f40f6310
Fixed issue #60 - addresses of array indexes not working correctly.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@352 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-28 20:55:51 +00:00
zik.saleeba
7a407782bb
Fixed a problem with indexing arrays of char.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@351 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-28 20:36:16 +00:00
zik.saleeba
b0c74d8c00
Fixed a bug in pointer coercion which was breaking string functions.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@350 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-26 20:00:01 +00:00
zik.saleeba
1239d6d8a8
Added some more string functions
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@349 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-25 21:12:06 +00:00
zik.saleeba
e577555218
Added string and memory functions to the C library.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@348 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-25 21:04:03 +00:00
zik.saleeba
ffd045f26f
Fixed a bug with defining void pointers.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@347 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-25 20:54:14 +00:00
zik.saleeba
24a601271a
malloc() and free() implemented.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@346 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-25 20:50:56 +00:00
zik.saleeba
c6d483ee6f
Unsigned types now exist. They're probably not handled quite correctly in expressions yet though.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@345 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-25 11:54:34 +00:00
zik.saleeba
8c7434424d
Native pointers no longer carry their size with them.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@344 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-23 19:01:32 +00:00
zik.saleeba
968fc12e69
Now printing '\n' on the srv-1 will send "\r\n" so it behaves as expected
...
rather than having to explicitly send '\r'.
git-svn-id: http://picoc.googlecode.com/svn/trunk@343 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-22 20:14:47 +00:00
zik.saleeba
d5811d37d5
printf() now supports field widths, zero-padding and left/right justification.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@342 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-22 20:08:43 +00:00
zik.saleeba
0d83e26880
Correct alignment of structure members
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@341 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-11 18:55:16 +00:00
zik.saleeba
196331d6ba
'short' data type added
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@340 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-11 11:09:07 +00:00
zik.saleeba
bb718dcf21
Turning on NATIVE_POINTERS by default.
...
Fixed a minor warning in pointer assignment.
git-svn-id: http://picoc.googlecode.com/svn/trunk@339 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-10 18:06:17 +00:00
zik.saleeba
8e735ef68f
First cut of casts completed but not debugged
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@338 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-10 17:59:55 +00:00
zik.saleeba
7d135bbdd5
Doing some work on casts and sizeof
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@337 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-10 14:49:49 +00:00
zik.saleeba
fcab11f844
Made both Val and Op co-exist in the ExpressionStack.
...
Some preliminary work for casts.
git-svn-id: http://picoc.googlecode.com/svn/trunk@336 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-04 16:22:19 +00:00
zik.saleeba
5785884764
Removed soft floating point library. Decided not to do this after all.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@335 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-04 14:53:31 +00:00
zik.saleeba
a739b40b2c
Fixed quicksort test
...
Fixed math library test
git-svn-id: http://picoc.googlecode.com/svn/trunk@334 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-17 10:39:32 +00:00
zik.saleeba
902aac9a94
Added support for '%x', '%u' and '%b' in printf formatting
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@333 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-15 15:08:05 +00:00
zik.saleeba
93713ed830
Removed asinh(), acosh(), atanh() as unnecessary.
...
Added exit().
git-svn-id: http://picoc.googlecode.com/svn/trunk@332 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-15 14:33:21 +00:00
zik.saleeba
32727cc365
Native pointers feature added
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@331 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-05 00:55:54 +00:00
zik.saleeba
3a1e39f9d3
New fancy error reporting feature makes nice error messages
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@330 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-04 07:41:06 +00:00
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
390ff153a1
printf() now handles various formats of strings
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@328 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-03 08:40:30 +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
b55ab05d48
Added support for octal and hex character constants
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@326 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-03 02:57:23 +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
9f9728dab5
Made it so a null character causes EOF. This shouldn't really be necessary but maybe it makes it easier for some implementations.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@317 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-02 06:40:47 +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
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
d2da61b81d
Added a quicksort test case
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@311 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-29 03:24:36 +00:00
zik.saleeba
5f0960d161
Added tests for new math library
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@310 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-29 01:01:07 +00:00
zik.saleeba
280458a7c6
Made Makefile consistent with options
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@309 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-29 00:51:48 +00:00
zik.saleeba
022e09a7a6
Fixed a bug which was causing decimal constants less than zero to be interpreted as octal
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@308 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-29 00:40:45 +00:00
zik.saleeba
c1381adae5
Fixed missing references to fdlibm functions.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@307 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-29 00:32:40 +00:00
zik.saleeba
4bc228c439
Fixed bogus references to native math library
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@306 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-29 00:21:58 +00:00