Commit Graph

15 Commits

Author SHA1 Message Date
Adam Sampson
1bac142a53 Rework the parser to use the new lexer.
The occam parser is now a GenParser Token OccState, rather than a GenParser
Char OccState, and a lot of now-redundant code has been removed. The parser is
also somewhat faster, which wasn't intended but is nice anyway.

I've also modified the Rain parser to not rely on the old preprocessing code;
it wasn't appropriate for Rain's syntax anyway, so I assume Neil will be
replacing it eventually.
2007-08-21 20:44:15 +00:00
Neil Brown
6afbb5ecf4 Rain: changed the top-level parser from the dummy value to the proper value (topLevelDecl) 2007-08-20 22:37:47 +00:00
Neil Brown
43c3ae4aa7 Rain: added the parsing of top-level declarations (and tuple definitions) 2007-08-20 22:08:24 +00:00
Neil Brown
eb4a629d57 Rain: Fixed the meta tags for each part of a block 2007-08-20 22:07:58 +00:00
Neil Brown
923eefe317 Rain: refactored the parsing of blocks 2007-08-20 22:06:56 +00:00
Neil Brown
34c61702de Rain: added a new test for testing the parsing of top-level declarations 2007-08-20 18:44:11 +00:00
Neil Brown
810dcbfbd9 Added Rain as a possible frontend for Tock, by adding a new command-line option. 2007-08-20 17:39:33 +00:00
Adam Sampson
c4a04675ad Make RainParse contain its own definition of RainParser.
It was previously defined in terms of OccParser, which I'm about to change.
2007-08-20 00:52:16 +00:00
Adam Sampson
c8d5a4ff40 Add licensing information.
The compiler itself is under the GPLv2+; the support code that gets built into
user programs is under the LGPLv2+. This matches the existing practice for the
KRoC project.

(As with Occade, I've used the new GPLv3-style license header in the source
files, though, since that avoids having to update the FSF's postal address.)
2007-08-18 20:42:11 +00:00
Neil Brown
d574ec8e3d Added ForEach to the replicator possibilities in the AST, and tested parsing Rain seqeach and pareach loops 2007-08-13 16:05:17 +00:00
Neil Brown
2902d085a4 Rain: added support for string and numerical literals 2007-08-13 16:03:22 +00:00
Neil Brown
38b0272555 Rain: changed the name parse function to not require the type of the name 2007-08-13 15:58:44 +00:00
Neil Brown
d2022defb0 Changed the Rain parser to use the CompState of the occam parser 2007-08-07 18:43:20 +00:00
Neil Brown
bed325beea Parallel Usage Checker and Test Rearrangement
This patch is a bit large, being as it encompasses two major changes:

1. The addition of the first version of a parallel usage checker.  The usage checker uses the generics library (like
   the other passes) to work out if the parallel usage rules are broken.  It mainly consists of:
     a) a function used to determine which variables are written to/read from in given bits of code, and 
     b) a function that applies a) across the members of any par construct in the file, and checks that
        the expected usage rules hold
   The parallel usage checker is in an early stage, but I think the design is sensible - at least for doing the variable
   and array usage.  The channel usage checker will require some slightly different functionality, and
   I am not considering the abbreviation checker yet.
2. As a consquence of adding a second test file (UsageCheckTest) alongside the first (RainParseTest), I have 
   created a TestMain class that is intended to run all tests for all parts of Tock.  I have also extracted some
   useful helper functions (for creating the expected results of tests) into a file named TestUtil.  I've also
   modified the Makefil accordingly.
   
There are a few other minor changes to RainParse/RainParseTest that are also included in the patch as separating them
would have been tricky.
2007-07-30 22:04:30 +00:00
Neil Brown
f997b823dc Rain: Parser and Parser-Test framework
Initial commit of the beginnings of a Rain parser (still using the original occam AST) and its test framework, using HUnit
2007-07-27 15:11:52 +00:00