Commit graph

510 commits

Author SHA1 Message Date
zik.saleeba e75518e139 Changed the way that arrays are represented to a simpler one without
the extra level of indirection.
Fixed various array-related problems, including array assignment
which is issue #49.


git-svn-id: http://picoc.googlecode.com/svn/trunk@373 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-04 02:02:37 +00:00
zik.saleeba 7c1bca8f41 Fix for comment incompatibility
git-svn-id: http://picoc.googlecode.com/svn/trunk@372 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-04 01:19:10 +00:00
zik.saleeba 2e07f89194 Possible fix for big-endian bug
git-svn-id: http://picoc.googlecode.com/svn/trunk@371 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-03 20:40:35 +00:00
zik.saleeba 274f21fdbc Removed "unsigned char" - now all chars are unsigned again.
git-svn-id: http://picoc.googlecode.com/svn/trunk@370 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-01 21:16:19 +00:00
zik.saleeba f1aeadb077 Removed redundant "struct ArrayValue"
git-svn-id: http://picoc.googlecode.com/svn/trunk@369 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-01 21:10:48 +00:00
zik.saleeba 18acb6dc1a Removed old pointer system. Now it's "native pointers" all the way.
git-svn-id: http://picoc.googlecode.com/svn/trunk@368 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-01 21:02:31 +00:00
zik.saleeba e44aca659f Fixed problem with using array index operator on pointers. Issue #61.
git-svn-id: http://picoc.googlecode.com/svn/trunk@367 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-01 20:49:23 +00:00
zik.saleeba be2ba2cb5f Check for function not returning a vlue when it should
git-svn-id: http://picoc.googlecode.com/svn/trunk@366 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-01 16:52:10 +00:00
zik.saleeba c920ea1771 Problems with "return" fixed.
Issue #50


git-svn-id: http://picoc.googlecode.com/svn/trunk@365 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-31 17:08:21 +00:00
surveyor.com 2493d1ff01 resync to SURVEYOR_HOST changes
git-svn-id: http://picoc.googlecode.com/svn/trunk@364 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-31 14:39:43 +00:00
zik.saleeba 425c86d365 Debug removed
git-svn-id: http://picoc.googlecode.com/svn/trunk@363 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-31 14:22:35 +00:00
zik.saleeba ed26e6716b Fixed an annoying problem with entering functions interactively.
Includes a heap of debug.


git-svn-id: http://picoc.googlecode.com/svn/trunk@362 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-31 14:18:46 +00:00
zik.saleeba 03cf6dcc90 Removed free()-like function of delete().
git-svn-id: http://picoc.googlecode.com/svn/trunk@361 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-31 14:17:45 +00:00
zik.saleeba 24ec7290ee Removed incorrect header
git-svn-id: http://picoc.googlecode.com/svn/trunk@360 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-31 14:15:57 +00:00
zik.saleeba 0df1958dfc Fix for NO_FP problem found by Ed.
git-svn-id: http://picoc.googlecode.com/svn/trunk@359 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-30 19:41:32 +00:00
zik.saleeba 0872369ead Fixed test for correct floating point display
git-svn-id: http://picoc.googlecode.com/svn/trunk@358 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-30 12:35:37 +00:00
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