zik.saleeba
b23d1e8e06
Big reorganisation to make it easier to access picoc as a library.
...
Also moved most internal header stuff to the new header interpreter.h.
git-svn-id: http://picoc.googlecode.com/svn/trunk@549 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-17 07:11:20 +00:00
zik.saleeba
fbe799d63f
Fixed bug in static
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@548 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-17 06:19:08 +00:00
zik.saleeba
a2cb2e2efd
Support for static variables complete
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@547 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-17 03:17:35 +00:00
zik.saleeba
cab5e8b2d8
Added support for static type qualifiers.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@546 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-16 23:38:41 +00:00
zik.saleeba
bd601e45c3
Structure element access wasn't obeying precedence rules. It is now.
...
Fixed test case 50.
git-svn-id: http://picoc.googlecode.com/svn/trunk@545 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-16 04:46:04 +00:00
zik.saleeba
2de3aaba52
Fixed a bug in bracket evaluation - was collapsing the expression stack at the wrong precedence.
...
Fixed a bug in evaluation of logical operators where the RHS is not evaluated - off-by-one error in precedence.
git-svn-id: http://picoc.googlecode.com/svn/trunk@544 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-16 03:58:48 +00:00
zik.saleeba
ee2ba8a53c
Added logical_second_arg test to Makefile
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@543 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-16 00:19:07 +00:00
zik.saleeba
807b3d09ba
Logical operators now only evaluate the second argument if necessary, as specified in the C standard.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@542 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-16 00:13:11 +00:00
zik.saleeba
4919d40cd2
Removed superseded math library references.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@541 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-15 22:59:45 +00:00
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