Commit Graph

72 Commits

Author SHA1 Message Date
Adam Sampson
618ad6d55f Implement INLINE PROC and INLINE FUNCTION 2007-04-30 23:08:32 +00:00
Adam Sampson
b3b17f7611 occam BYTE is unsigned -- use uint8_t 2007-04-30 19:49:08 +00:00
Adam Sampson
db8782dfcf Don't blow up when taking 0-length slices 2007-04-30 19:41:09 +00:00
Adam Sampson
6c9293fa7b Do away with the Literal type, which makes subscripting much more straightforward 2007-04-30 02:16:10 +00:00
Adam Sampson
76865debc7 Implement PRI PAR (the priorities probably aren't very sensible at the moment) 2007-04-30 01:35:33 +00:00
Adam Sampson
7205272fa5 Use genStructured to do PAR -- which is much shorter 2007-04-30 01:28:17 +00:00
Adam Sampson
ace34232fd Conversions to and from and between reals 2007-04-29 22:35:07 +00:00
Adam Sampson
f7029f6312 Add a trivialSubscriptType function to avoid problems with 0-length slices 2007-04-29 21:43:22 +00:00
Adam Sampson
057a3a0a67 Better string literal handling: do away with StringLiteral in favour of arrays of ByteLiteral 2007-04-29 21:31:56 +00:00
Adam Sampson
d2c522bec0 Expression retyping 2007-04-29 17:22:13 +00:00
Adam Sampson
2be9b16cc7 Rebrand from FCO to Tock 2007-04-29 16:20:40 +00:00
Adam Sampson
1932ae534a Intrinsic functions (SQRT and DSQRT) 2007-04-29 16:10:29 +00:00
Adam Sampson
2d88249408 Intrinsic PROCs (ASSERT for now) 2007-04-29 14:46:19 +00:00
Adam Sampson
2bcdd7cd66 Big AST rework: all spec/rep stuff is now done with Structured 2007-04-27 21:49:34 +00:00
Adam Sampson
5a89e1722c Initial RETYPES/RESHAPES support 2007-04-27 03:01:32 +00:00
Adam Sampson
6e04185502 Fix channel array abbreviations 2007-04-26 22:54:01 +00:00
Adam Sampson
39bbc1e10e Support (but complain about!) empty versions of SEQ, IF, etc. 2007-04-26 21:56:05 +00:00
Adam Sampson
6cdfb98086 Strip leading zeros from decimal literals 2007-04-26 21:24:38 +00:00
Adam Sampson
f0223ec40a Get multidimensional array literals working (by changing their AST representation) 2007-04-26 21:21:35 +00:00
Adam Sampson
80bfdcd0a6 Make Dimension take an Int rather than an Expression 2007-04-26 20:21:03 +00:00
Adam Sampson
d20b113a00 Generate AFTER using > and MINUS 2007-04-25 21:24:20 +00:00
Adam Sampson
f8fa60d1ed Implement << and >> 2007-04-25 17:48:16 +00:00
Adam Sampson
94e3bcd7fe Recast the driver and most of the components into the PassM monad 2007-04-25 16:42:17 +00:00
Adam Sampson
a1f045260b Big parser rework: remove all the extraneous "try" calls in favour of more specific commits 2007-04-25 01:33:30 +00:00
Adam Sampson
2383345f88 Make all the Types functions monadic; make Errors useful 2007-04-24 21:49:03 +00:00
Adam Sampson
7d2013d3f1 Generate more natural replicator loops when base == 0 2007-04-24 13:03:08 +00:00
Adam Sampson
5120b2e112 Add a proper TLP interface checker 2007-04-24 00:07:35 +00:00
Adam Sampson
3d4a1d1020 Range check type conversions, and implement arithmetic ops for all basic types 2007-04-23 23:17:36 +00:00
Adam Sampson
408b8614e2 Add array bounds checking 2007-04-23 10:33:51 +00:00
Adam Sampson
432c89e625 Make STOPs report where and why they stopped 2007-04-21 03:15:38 +00:00
Adam Sampson
f38d548c33 Make Meta a simple structure 2007-04-21 02:54:08 +00:00
Adam Sampson
c3cbb46ba1 Give everything a 64k stack, because my q7 needs it 2007-04-21 00:08:57 +00:00
Adam Sampson
ff01ddc8c8 Support #INCLUDE and #USE 2007-04-20 23:44:38 +00:00
Adam Sampson
c39d7ee237 Constant expression evaluation 2007-04-20 21:15:36 +00:00
Adam Sampson
dfa1f6c5e6 Support array assignment (and check that assignments are sensible), and nested slicing 2007-04-20 16:01:15 +00:00
Adam Sampson
e8d61dcac7 Move parallel assignment handling into a pass 2007-04-20 13:16:29 +00:00
Adam Sampson
ca5c56f813 Move a lot of FIXMEs into the to-do list 2007-04-20 01:40:41 +00:00
Adam Sampson
aae24af5d5 Undo change that broke case input 2007-04-20 01:19:59 +00:00
Adam Sampson
23e3261e4d Use the new ALT interface in CIF, and have a generic function for Structureds 2007-04-20 01:13:00 +00:00
Adam Sampson
93a03af9ed Generate operators as unchecked versions when used on constants.
This isn't the right thing to do -- we need to fold constants properly.
2007-04-19 18:35:28 +00:00
Adam Sampson
a2f3c868d9 Generate array constants properly 2007-04-19 18:12:31 +00:00
Adam Sampson
4efde46770 Fix printf 2007-04-19 18:01:50 +00:00
Adam Sampson
618ded6afd Fix string/character literal escaping 2007-04-19 17:57:35 +00:00
Adam Sampson
ec8c4a1c48 Implement ALT (somewhat incompletely for now, owing to CIF limitations) 2007-04-19 17:30:11 +00:00
Adam Sampson
67e83ad801 Yet another fix for channel array reference generation 2007-04-19 17:19:20 +00:00
Adam Sampson
05aad0602c Allow SIZE cs, where cs is an array of channels or timers or ports
This isn't in the occam2 ordered syntax, but it's very common in occam2 code,
so I assume it's not an intentional omission.
2007-04-19 16:49:12 +00:00
Adam Sampson
3cfbcd6055 Fix for array abbreviations 2007-04-19 00:24:29 +00:00
Adam Sampson
9ed003f9e3 Add NoSpecification to AST, to make passes simpler 2007-04-18 23:13:56 +00:00
Adam Sampson
4c6cda3226 Make Specification a proper data type 2007-04-14 01:45:25 +00:00
Adam Sampson
23f656eb2b Nicer TIMERs 2007-04-14 00:29:02 +00:00