Neil Brown
9b96ea9899
Removed the C++CSP implementation of genVariable' by adding a new function (genDirectedVariable) that represents the only change from the C version (and added C and C++ version of genDirectedVariable accordingly)
2007-10-03 16:55:48 +00:00
Neil Brown
4111dd3cb7
Added a test for genArraySubscript, and made the C and C++ backends pass it
2007-10-03 16:43:07 +00:00
Neil Brown
e17367edfa
Simplified the GenOps by removing a function (genArrayAbbrev) that did not need to be in there
2007-10-03 15:23:32 +00:00
Neil Brown
8a2894893c
Changed the GenerateC[PPCSP] modules to pass the current tests (just a matter of changing the spacing in the output)
2007-10-03 14:08:34 +00:00
Neil Brown
639b662a98
Starting making the spacing in the generated C and C++ code consistent, so that it passes the tests
2007-10-02 14:50:04 +00:00
Neil Brown
15ecb2b178
Added the -fwarn-type-defaults compiler option (for when integer literals are given a default type) and fixed the few warnings that arose from doing so
2007-09-27 13:29:16 +00:00
Neil Brown
38c409d378
Added the -fwarn-unused-imports compiler option to warn about unused imports, and then set about pruning and ordering (mostly in my code) the import lists for all the modules
2007-09-27 13:13:46 +00:00
Neil Brown
4a0732629d
Added support for the new AlternativeWait guard to the C++ backend
2007-09-27 10:05:31 +00:00
Neil Brown
41d4923e9c
Added support for the new Wait process to the C and C++ backends
2007-09-26 23:18:21 +00:00
Neil Brown
b280158e26
Added code in the C and C++ backends for handling the new Time type and GetTime statements in the AST
2007-09-19 10:34:49 +00:00
Neil Brown
3e342a621c
Added ShowOccam and ShowRain type-classes, and changed existing code to use these new show methods in error messages
...
The function showCode shows code as either occam or Rain depending on the frontend. This is then used by a formatCode function that acts similar to
printf, which makes it easy to format error messages that use showCode.
2007-09-16 17:20:57 +00:00
Neil Brown
8af4a9f687
Added generation of forward declarations to the C and C++ backends.
...
These declarations are necessary for recursive functions/procs, so that the (forward) declarations are visible to the implementations.
Later on, the declarations could be moved into header files, which would allow multiple source files to be compiled (generating multiple header files) and linked together using the gcc linker. Alternatively, external C/C++ programs could use code originally written in occam/Rain by including the header files.
2007-09-12 12:09:35 +00:00
Neil Brown
aefb02caa6
Added missing cases for A.DirectedVariable in the C and C++ backends
2007-09-12 10:17:15 +00:00
Neil Brown
2ff46a9041
Rearranged the Rain source files, renamed a couple of Rain files, and changed the Makefile accordingly.
2007-09-10 17:28:57 +00:00