Russell Joyce
7b43483f68
Added handling of "short int" type specifier
...
Just consumes and discards the "int" token and treats as if it was only
a "short".
2020-06-18 17:20:02 +01:00
Russell Joyce
d04337125e
Added support for extern variable declarations
...
Effectively just ignores any declarations as global scope is shared
across files in PicoC anyway, so the ultimate definition should be
enough.
2020-06-17 19:57:10 +01:00
Russell Joyce
5261facbd7
Fixed bug with typedef, introduced with extra type qualifier parsing
...
Caused by overwriting the value of the actual type token being parsed by
any following tokens that were examined or consumed, rather than just
ignoring their values.
2020-06-12 15:33:19 +01:00
Russell Joyce
62969cb0ee
Added handling of 'const' type qualifier keyword
...
There is currently no enforcement of a variable being constant, and the
actual type is the same as if 'const' wasn't present.
2020-06-11 11:30:51 +01:00
Russell Joyce
9fd31b6d37
Added handling of "long int" type specifier
...
Just consumes and discards the "int" token and treats as if it was only
a "long".
2020-06-10 18:24:12 +01:00
Russell Joyce
b403e76600
Added handling of trailing type qualifiers/storage classes
...
Handles situations such as `int volatile x` rather than `volatile int x`
by consuming the keywords as part of the type specifier.
2020-06-10 18:21:35 +01:00
Russell Joyce
45d85111f0
Added parsing of volatile qualifier
...
This doesn't affect code execution, but is exposed through TypeParse().
2020-06-09 12:30:47 +01:00
Joseph Poirier
6ed4aa1b63
formatting
2015-06-22 14:16:49 -05:00
Joseph Poirier
f551e28a49
formatting
2015-06-21 20:54:56 -05:00
Joseph Poirier
9c05060820
initialize
2015-06-18 22:49:47 -05:00
Joseph Poirier
0ac0f71fc0
proper static prototypes
2015-06-17 04:30:27 -05:00
Joseph Poirier
890694a14a
formatting
2015-06-14 04:46:15 -05:00
Joseph Poirier
463f086a33
changes after simple analysis, added FIXMEs
2015-06-14 02:08:10 -05:00
Joseph Poirier
9636ca0b2a
minor format changes
2015-06-13 19:06:23 -05:00
Joseph Poirier
8c18e1d061
respect 80 col mark when it makes sense
2015-06-10 19:27:30 -05:00
Joseph Poirier
e52188dcda
respect 80 col mark when it makes sense
2015-06-10 18:49:09 -05:00
Joseph Poirier
9293ed0443
use stdbool.h and convert TRUE/FALSE to true/false
2015-06-10 14:24:53 -05:00
Joseph Poirier
b2d468537e
remove NO_FP checks; assume at least softfp, remove NO_MODULUS
2015-06-10 13:38:54 -05:00
Joseph Poirier
c063462464
reorder types
2015-06-10 13:07:58 -05:00
Joseph Poirier
e0775801f9
formatting
2015-06-07 01:28:10 -05:00
Joseph Poirier
a61bd97d9b
formatting
2015-06-06 23:40:08 -05:00
zik.saleeba
b5a600a749
Merged in a pile of changes from broscutamaker
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@599 21eae674-98b7-11dd-bd71-f92a316d2d60
2013-03-16 07:39:34 +00:00
zik.saleeba
9ec50b6e49
Now handles forward declared structures correctly.
...
Issue #166
git-svn-id: http://picoc.googlecode.com/svn/trunk@583 21eae674-98b7-11dd-bd71-f92a316d2d60
2012-09-23 11:48:27 +00:00
zik.saleeba
62bc229f4a
Adapted to be fully re-entrant.
...
Issue #137
git-svn-id: http://picoc.googlecode.com/svn/trunk@581 21eae674-98b7-11dd-bd71-f92a316d2d60
2012-09-22 05:11:44 +00:00
zik.saleeba
10714186eb
Added the ability to declare unsized arrays which can then have a sized
...
value assigned to them. Part of #142
git-svn-id: http://picoc.googlecode.com/svn/trunk@577 21eae674-98b7-11dd-bd71-f92a316d2d60
2012-09-03 10:14:06 +00:00
zik.saleeba
853b6f6259
Added some more comments.
...
Added the beginnings of a debugger. It's not useful yet.
git-svn-id: http://picoc.googlecode.com/svn/trunk@570 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-05-01 06:50:00 +00:00
zik.saleeba
3d7eaa7da6
Added "goto" statement.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@560 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-21 04:44:16 +00:00
zik.saleeba
6b31113511
Unnamed enums, structs and unions implemented.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@553 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-18 03:30:34 +00:00
zik.saleeba
33985ad161
Working on enum issue
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@552 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-18 02:31:56 +00:00
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
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
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
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
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
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
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
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
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
a21f1d8a70
Implemented typedef
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@421 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-06-06 17:03:15 +00:00
zik.saleeba
a591133f35
Added support for #include of predefined libraries.
...
Created a stdio.h predefined library.
git-svn-id: http://picoc.googlecode.com/svn/trunk@420 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-06-05 19:00:46 +00:00
zik.saleeba
cd4bea4903
Fixed problems with struct references in functions
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@409 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-02-28 14:16:21 +00:00
zik.saleeba
c3dcac1812
Added long and unsigned long data types
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@392 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-07 21:05:15 +00:00
zik.saleeba
3377c3b568
Some alignment neatening
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@384 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-07 13:48:42 +00:00
zik.saleeba
9ea0dcee28
Varius fixes for 64 bit architectures
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@381 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-06 22:16:12 +00:00
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
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
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