Commit graph

478 commits

Author SHA1 Message Date
zik.saleeba 4da8196e9d Fixed a problem with do..while() and breack/continue.
git-svn-id: http://picoc.googlecode.com/svn/trunk@510 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-11 06:32:52 +00:00
zik.saleeba b4f882354d Fixed a problem with nested while() loops not handling break and continue correctly.
Fixes issue #96.


git-svn-id: http://picoc.googlecode.com/svn/trunk@509 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-11 06:27:54 +00:00
zik.saleeba 318db09eb7 Now recognising and ignoring "register" and "extern".
git-svn-id: http://picoc.googlecode.com/svn/trunk@508 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-11 05:13:58 +00:00
zik.saleeba 806c546e06 Added LED test to the official tests
git-svn-id: http://picoc.googlecode.com/svn/trunk@507 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-11 05:04:49 +00:00
zik.saleeba e236537ab2 Fixed problem with returns inside switch() statements not working correctly outside the switch block.
Issue #116


git-svn-id: http://picoc.googlecode.com/svn/trunk@506 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-11 04:49:44 +00:00
zik.saleeba b6a760e554 Test for switch with return inside a case.
git-svn-id: http://picoc.googlecode.com/svn/trunk@505 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-11 04:20:45 +00:00
zik.saleeba ab677a0670 Fixed NO_FP support
git-svn-id: http://picoc.googlecode.com/svn/trunk@504 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-10 23:50:05 +00:00
zik.saleeba 29f48a2921 Added a tentative test for bug #108.
Fixed a comment problem (standard compliance).


git-svn-id: http://picoc.googlecode.com/svn/trunk@489 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-01-24 02:20:48 +00:00
zik.saleeba 543964f6f9 Reducing warnings about implicit definitions
git-svn-id: http://picoc.googlecode.com/svn/trunk@488 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-01-24 02:15:21 +00:00
zik.saleeba c2ba9f063c Fixed a problem with type printing in expression debug mode
git-svn-id: http://picoc.googlecode.com/svn/trunk@487 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-01-07 04:06:33 +00:00
zik.saleeba 9a1d4f7b5c Updated grammar and copyright
git-svn-id: http://picoc.googlecode.com/svn/trunk@486 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-01-06 19:55:21 +00:00
zik.saleeba 6f2c019a64 Added tests for left and right shift operators - issue #114.
git-svn-id: http://picoc.googlecode.com/svn/trunk@485 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-01-06 19:42:07 +00:00
zik.saleeba 129564b24a Problem with shift right operator fixed. Issue #114.
git-svn-id: http://picoc.googlecode.com/svn/trunk@484 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-01-06 19:36:40 +00:00
zik.saleeba b69b6d30cc Fixes a problem with casts not being accepted in function parameters.
Issue #111

git-svn-id: http://picoc.googlecode.com/svn/trunk@483 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-09-04 13:39:58 +00:00
zik.saleeba bb87abe223 Fixed a problem with IncludeLibList not being cleared when includes are
cleaned up.
Fixes issue 109.


git-svn-id: http://picoc.googlecode.com/svn/trunk@482 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-08-21 06:07:02 +00:00
zik.saleeba 15d5600c83 Fixed a problem with clibrary.c BUILTIN_MINI_STDLIB PlatformExit() not following the new function prototype. Fixes issue 107.
git-svn-id: http://picoc.googlecode.com/svn/trunk@481 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-08-08 11:42:18 +00:00
zik.saleeba 1301fe7a8f More intelligent allocation/deallocation of parser data. It should now be possible to report error messages from previously-parsed files.
git-svn-id: http://picoc.googlecode.com/svn/trunk@480 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-27 18:16:05 +00:00
zik.saleeba 43174676ca Now handling return values from main.
Changed to more strict handling of main() - if it's not defined in main-calling mode then the program will crash rather than ignoring the problem.
Tests changed to correspond to this approach.


git-svn-id: http://picoc.googlecode.com/svn/trunk@479 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-27 16:20:09 +00:00
zik.saleeba df9129b355 Calls to exit(n) now return the exit value n to the command line.
This fixes issue 100.


git-svn-id: http://picoc.googlecode.com/svn/trunk@478 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-27 15:35:25 +00:00
zik.saleeba 8e02f32095 Added the ability to select the stack size on UNIX platforms.
Fixes issue 92.


git-svn-id: http://picoc.googlecode.com/svn/trunk@477 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-27 14:03:06 +00:00
zik.saleeba 0ffbd21f2e When you're using a scripting mode - "-s", "-m" or "-i" - it now automatically includes all the system headers for you.
This fixes issue 101

git-svn-id: http://picoc.googlecode.com/svn/trunk@475 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-27 11:48:39 +00:00
zik.saleeba c0a21f5c37 Fixed for loops of the form:
for (;;)

Fixes issue 93


git-svn-id: http://picoc.googlecode.com/svn/trunk@474 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-27 11:34:24 +00:00
zik.saleeba e45e455b9b Now handling multi-line string constants correctly.
Also handling either LF newlines or CR/LF newlines in multi-line string constants correctly.
Changed handling of multi-line comments to use the new, simpler Lexer->EmitExtraNewlines field.
Made FANCY_ERROR_REPORTING standard to reduce code obfuscation.
Fixed issue 98.


git-svn-id: http://picoc.googlecode.com/svn/trunk@473 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-27 10:35:54 +00:00
zik.saleeba dc0b17c1a4 Fixed missing "unsigned long" handling in ExpressionAssignInt(). Fixes issue 91 reported by duncan.forster
git-svn-id: http://picoc.googlecode.com/svn/trunk@472 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-27 08:53:06 +00:00
zik.saleeba 4ecfc1c66b Fixed a problem where multi-line C comments with blank lines in them were causing incorrect line number reporting.
git-svn-id: http://picoc.googlecode.com/svn/trunk@471 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-24 16:49:27 +00:00
zik.saleeba 036f3efa8b Fixed a problem with variable declarations in inner blocks giving errors. bug#82.
git-svn-id: http://picoc.googlecode.com/svn/trunk@470 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-24 16:07:56 +00:00
zik.saleeba d87d25fede Removed unistd brk() support - it's pretty useless here anyway.
git-svn-id: http://picoc.googlecode.com/svn/trunk@469 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-21 05:47:43 +00:00
zik.saleeba 6cc5724395 Added fix from Duncan Forster for bug #85
git-svn-id: http://picoc.googlecode.com/svn/trunk@468 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-21 05:45:44 +00:00
zik.saleeba e744c816c5 test
git-svn-id: http://picoc.googlecode.com/svn/trunk@467 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-19 20:16:32 +00:00
zik.saleeba 3deb0908bb Now recognising and ignoring "static".
Recognising and ignoring 'L' following integer constants.
Tallying the line count in multi-line C-style comments more correctly.



git-svn-id: http://picoc.googlecode.com/svn/trunk@466 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-18 20:27:05 +00:00
zik.saleeba 809cdf5b94 Fixed issue with void parameters not being ignored
git-svn-id: http://picoc.googlecode.com/svn/trunk@465 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-18 17:01:00 +00:00
zik.saleeba 6d20f4b02f Support for #if, #ifdef, #ifndef, #else and #endif added
git-svn-id: http://picoc.googlecode.com/svn/trunk@464 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-18 13:42:07 +00:00
zik.saleeba 145a99a7b1 Completed parameterised macros
git-svn-id: http://picoc.googlecode.com/svn/trunk@463 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-11 18:44:07 +00:00
zik.saleeba 7c754bad48 Can now parse parameterised macros. Can't evaluate them yet though.
git-svn-id: http://picoc.googlecode.com/svn/trunk@462 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-08 04:52:05 +00:00
zik.saleeba e977f325ae Now has the ability to use GNU readline for input editing
git-svn-id: http://picoc.googlecode.com/svn/trunk@461 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-05 19:53:34 +00:00
zik.saleeba a365e1e993 Now calls main() if one has been defined, and not if one hasn't.
git-svn-id: http://picoc.googlecode.com/svn/trunk@460 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-05 19:00:29 +00:00
zik.saleeba fd3fad1784 Added missing file
git-svn-id: http://picoc.googlecode.com/svn/trunk@459 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-05 05:48:58 +00:00
zik.saleeba 8021fed051 Implemented the ternary operator
git-svn-id: http://picoc.googlecode.com/svn/trunk@458 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-04 19:52:52 +00:00
zik.saleeba d51b1d9726 Nicer line count
git-svn-id: http://picoc.googlecode.com/svn/trunk@457 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-03 21:17:51 +00:00
zik.saleeba ca35f78874 Added unistd.h interface module.
git-svn-id: http://picoc.googlecode.com/svn/trunk@456 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-03 21:07:47 +00:00
zik.saleeba ff7aadcc11 Fixed a little bit-rot in clibrary.c
git-svn-id: http://picoc.googlecode.com/svn/trunk@455 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-03 17:00:54 +00:00
zik.saleeba 73a5d6a11b Added non-working LED test
git-svn-id: http://picoc.googlecode.com/svn/trunk@454 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-03 16:33:57 +00:00
zik.saleeba 7700f11893 Can now call with command line arguments.
git-svn-id: http://picoc.googlecode.com/svn/trunk@453 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-03 16:10:15 +00:00
zik.saleeba b4b5594a5d Added hanoi test program.
Now programs can be run without having to explicitly call main().


git-svn-id: http://picoc.googlecode.com/svn/trunk@452 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-03 15:20:29 +00:00
zik.saleeba fcb9255ba9 Added stdbool.h module and removed old TRUE and FALSE defs which are not standard C
git-svn-id: http://picoc.googlecode.com/svn/trunk@451 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-03 14:26:04 +00:00
zik.saleeba d63865fd83 Fixed a problem where entering a single character on a line would cause
an assertion failure.


git-svn-id: http://picoc.googlecode.com/svn/trunk@450 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-03 13:09:37 +00:00
zik.saleeba 5efb924e6a Fixed a problem with declarations for libraries not being compatible with
some C90 compilers.


git-svn-id: http://picoc.googlecode.com/svn/trunk@449 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-01 19:48:04 +00:00
zik.saleeba b313de2aa1 Added ctype.h module
git-svn-id: http://picoc.googlecode.com/svn/trunk@448 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-06-29 20:25:34 +00:00
zik.saleeba 9969c4881a Added errno definition. Woops.
git-svn-id: http://picoc.googlecode.com/svn/trunk@447 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-06-29 19:54:30 +00:00
zik.saleeba 06acdabc6f Fixed compile on cygwin
git-svn-id: http://picoc.googlecode.com/svn/trunk@446 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-06-29 10:28:13 +00:00