Commit graph

497 commits

Author SHA1 Message Date
zik.saleeba e6f78cff7e Moved the picoc version string into picoc.h so it can be referenced outside picoc.
git-svn-id: http://picoc.googlecode.com/svn/trunk@540 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-15 22:47:28 +00:00
zik.saleeba 704238f926 Fixed references to LibraryInit
git-svn-id: http://picoc.googlecode.com/svn/trunk@539 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-15 22:35:13 +00:00
zik.saleeba 7d99861752 Removed references to version.h
git-svn-id: http://picoc.googlecode.com/svn/trunk@538 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-15 21:47:54 +00:00
zik.saleeba 88cf377659 Changes for a clean compile on the SRV
git-svn-id: http://picoc.googlecode.com/svn/trunk@537 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-15 21:06:47 +00:00
zik.saleeba 8ed04e3729 Fixed a dependency issue with the simplified revision stuff.
git-svn-id: http://picoc.googlecode.com/svn/trunk@536 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-15 05:01:55 +00:00
zik.saleeba 4adb99fff6 Implemented LITTLE_ENDIAN and BIG_ENDIAN macros as requested in issue #106.
git-svn-id: http://picoc.googlecode.com/svn/trunk@533 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-15 04:48:18 +00:00
zik.saleeba e44b198946 Added a new alignment system which should correspond to the struct alignments of most processors. This means that picoc struct members should match up with native C structs in most cases. I hope.
git-svn-id: http://picoc.googlecode.com/svn/trunk@532 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-15 04:25:09 +00:00
zik.saleeba 4751cfd15c Fixed a problem with build on cygwin related to the svnversion stuff.
git-svn-id: http://picoc.googlecode.com/svn/trunk@530 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-15 04:00:53 +00:00
zik.saleeba de95adb36a Fixed a bug where function prototypes were not being deallocated
correctly when they were overridden by the actual function.



git-svn-id: http://picoc.googlecode.com/svn/trunk@529 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-15 01:21:27 +00:00
zik.saleeba e17f6f955f PICOC_VERSION is now defined as a macro in picoc
git-svn-id: http://picoc.googlecode.com/svn/trunk@528 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-14 23:42:54 +00:00
zik.saleeba ea6f2c006a Fixes the order of declaration of array bounds - they were previously reversed.
git-svn-id: http://picoc.googlecode.com/svn/trunk@524 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-14 22:53:10 +00:00
zik.saleeba b2c4d6ce83 Fixed bug108 - brackets were not collapsing the expression stack
as they should have.
Now more permissive in declarations of void main()


git-svn-id: http://picoc.googlecode.com/svn/trunk@520 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-14 06:05:53 +00:00
zik.saleeba 3893e46c26 Fixed a problem with invalid memory access during macro definition.
git-svn-id: http://picoc.googlecode.com/svn/trunk@519 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-14 06:04:29 +00:00
zik.saleeba 19b22261d3 Now checks for correct parameters to main()
git-svn-id: http://picoc.googlecode.com/svn/trunk@517 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-12 04:52:45 +00:00
zik.saleeba 6dd3e69fa5 Fixes for Brian Schmalz for the surveyor platform.
git-svn-id: http://picoc.googlecode.com/svn/trunk@516 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-12 04:23:37 +00:00
zik.saleeba eb7010d292 Now avoiding structure assignment since it seems to cause problems on blackfin processors. Urk!
git-svn-id: http://picoc.googlecode.com/svn/trunk@515 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-12 04:04:51 +00:00
zik.saleeba e847dc045c Fixed a bug in argument parsing.
git-svn-id: http://picoc.googlecode.com/svn/trunk@514 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-12 03:31:28 +00:00
zik.saleeba e7456d9c81 Fixed return type of gets().
Fixes issue #110.


git-svn-id: http://picoc.googlecode.com/svn/trunk@513 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-12 03:14:23 +00:00
zik.saleeba 235736ed93 Fixed some problems with getc() not removing EOL as it should.
git-svn-id: http://picoc.googlecode.com/svn/trunk@512 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-12 02:42:17 +00:00
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