Commit Graph

506 Commits

Author SHA1 Message Date
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
c40d94c655 Added a couple of passes that check the validity of the AST at the beginning and end of the Rain passes 2007-09-12 08:50:19 +00:00
Neil Brown
7ef6d7728f Added helper functions for converting constructors into Constr items 2007-09-12 08:49:14 +00:00
Neil Brown
9b1fbc3f8f Added a helper function for creating passes that check the validity of the AST 2007-09-12 08:45:23 +00:00
Neil Brown
ad8aab723b Added a function for searching for particular constructors in a tree, and an associated test 2007-09-12 00:11:22 +00:00
Neil Brown
000270f4a8 Created a new module for tests in the common directory (named CommonTest) and moved testIsSafeConversion across 2007-09-11 23:34:45 +00:00
Neil Brown
dbdef53e31 Added a short comment explaining the choice of AnyDataItem in TreeUtil 2007-09-11 22:58:58 +00:00
Neil Brown
8514823f1f Changed the Makefile to put the output files of GHC (*.o,*.hi) into an obj directory, to stop them cluttering up the source directories 2007-09-10 17:40:50 +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
Neil Brown
d39e2693cd Rain: added support for parsing character literals 2007-09-02 17:24:32 +00:00
Neil Brown
fa405e7e46 Rain: added a pass to transform functions into the occam form 2007-09-02 16:50:12 +00:00
Neil Brown
cd93b481f0 Rain: changed the matchParamPass function to also work for parameters to function calls 2007-09-02 16:17:15 +00:00
Neil Brown
c69b21dcbf Added a small helper function for testing functions 2007-09-02 16:16:43 +00:00
Neil Brown
9842fb2e2b Rain: changed the tests for matchParamPass to also test it for function call parameters 2007-09-02 16:15:53 +00:00
Neil Brown
d5cf98b2a8 Rain: refactored the tests for the matchParamPass pass to reduce shared code 2007-09-02 15:39:45 +00:00
Neil Brown
909fe0ea6b Rain: added parsing support for return statements 2007-09-02 15:07:51 +00:00
Neil Brown
989bb1c757 Rain: added parsing support for function declarations 2007-09-02 14:55:17 +00:00
Neil Brown
a14c33bc27 Rain: added another parse test for a process that has a par as its top-level element 2007-09-02 14:16:18 +00:00
Neil Brown
4fadab442d Rain: added a pass to turn range constructors into the more general array constructor form 2007-09-01 14:40:50 +00:00
Neil Brown
0392036322 Rain: added a pass that transforms ForEach replicators over simple ranges directly into For replicators 2007-09-01 14:35:46 +00:00
Neil Brown
e655c1412a Added a pass that transforms array constructors into a replicated loop that initialises the array 2007-08-29 14:18:07 +00:00
Neil Brown
1c155490c5 Added support for the array constructors to typeOfExpression 2007-08-29 14:07:52 +00:00
Neil Brown
ecad4e3abc Rain: added parsing of simple ranges (such as [0..100]) 2007-08-28 22:20:36 +00:00
Neil Brown
bcedd9af22 Added array constructors to the AST 2007-08-28 22:13:09 +00:00
Neil Brown
d9ae34c7a2 Added two new useful helper functions to TreeUtil that allow you to name a particular sub-pattern in a larger pattern 2007-08-29 13:53:03 +00:00
Neil Brown
8ecd472a2e Rain: added support for multiple declarations on the same line 2007-08-28 22:54:51 +00:00
Neil Brown
78b032ace9 Moved castADI into TreeUtil and added more tag helper functions that fill the parameters with DontCare (named tag1d, tag2d, etc) 2007-08-28 22:25:41 +00:00
Neil Brown
005dbd4d87 Rain: changed integer literals to allow negative literals 2007-08-28 20:40:41 +00:00
Neil Brown
96fc3a9983 Rain: added support for the modulo operator 2007-08-28 17:05:55 +00:00
Neil Brown
c8cf8a9963 Rain: indicated more clearly when a parse fails on lexing 2007-08-28 17:05:21 +00:00
Neil Brown
bf0dc577a8 Rain: changed the comment character for now 2007-08-28 17:04:18 +00:00
Neil Brown
6da26e5bf5 Added the first Rain program to the testcases directory and added Makefile rules for compiling *.rain into *x using the C++CSP backend 2007-08-28 16:02:22 +00:00
Neil Brown
15be4ddca9 Changed some instances of lookupName to lookupNameOrError to make it a little easier to track down internal compiler errors 2007-08-28 15:28:52 +00:00
Neil Brown
c09da951f0 Fixed the pass order in the Main module; the rain passes must be performed before the common passes, not afterwards 2007-08-28 15:28:02 +00:00
Neil Brown
99780d497b Added a Haddock ignore-exports declaration to RainPassTest 2007-08-28 15:27:29 +00:00
Neil Brown
63236cbc5a Rain: added another test for the unique pass 2007-08-28 15:27:03 +00:00
Neil Brown
c572dcb067 Fixed the findMeta function to return emptyMeta when no Meta exists in the given data 2007-08-28 15:23:50 +00:00
Neil Brown
1386dd6808 Turned whatever documentation I could find in GenerateCPPCSP into Haddock documentation, although it needs a more thorough pass to make the documentation better at some point. 2007-08-28 13:05:03 +00:00
Neil Brown
095b547f9e Added Haddock documentation to the TestMain module 2007-08-28 12:43:30 +00:00
Neil Brown
0887d1b87b Added the licence header to the Pattern module, and tidied up some of the Haddock documentation in Pattern 2007-08-28 12:38:36 +00:00
Neil Brown
d8a23fa40d Fixed some Haddock module references in TestUtil 2007-08-28 12:38:15 +00:00
Neil Brown
6a22e37589 Added Haddock documentation to all the functions in TestUtil, and tweaked the type of assertVarDef 2007-08-28 12:25:59 +00:00
Neil Brown
ffb75e0fc7 Removed an unused function from TestUtil 2007-08-28 11:57:02 +00:00
Neil Brown
06e321f973 Rain: removed the now-unnecessary pass that fixed up the types of the casts for channel-ends 2007-08-30 18:14:59 +00:00
Neil Brown
bd5e6759a2 Rain: changed the parser to convert ?c into a A.DirectedVariable instead of a cast 2007-08-30 18:01:43 +00:00
Neil Brown
9edea5d958 Added a new variable type, DirectedVariable, for using channel-end specifiers 2007-08-30 16:51:22 +00:00
Neil Brown
bfc7be2108 Added a description and diagram to the contents page of the haddock-generated documentation 2007-08-30 15:36:34 +00:00
Neil Brown
139cd17c56 Added more Haddock documentation to the RainPasses module. 2007-08-28 13:16:26 +00:00
Neil Brown
694ba1eca2 Replaced the use of m with emptyMeta in TestUtil 2007-08-28 11:19:51 +00:00
Neil Brown
f2cb0b7cce Rain: added a pass for fixing the types of channel-end casts and appropriate tests 2007-08-28 11:02:17 +00:00