Commit Graph

6 Commits

Author SHA1 Message Date
Adam Sampson
51ecf04a90 Move assignment simplification into a pass.
This is the code that expands array and record assignments out into multiple
assignments. Having it done as a pass means it can do a better job -- this
fixes some problems with cgtest56 where the old version of the code couldn't
handle record assignments from literals.

This is the first pass that's had to add a replicator to the tree, so this also
introduces a helper function for generating new replicator counters.
2007-08-22 19:55:52 +00:00
Adam Sampson
95e01e54d5 Make underlyingType merge array dimensions.
This fixes a bug that cgtest56 exposed, where an array of a user-defined type
that was itself an array wound up being an array of arrays rather than a single
array.

As part of this, makeArrayType is now called addDimensions, and takes a list of
dimensions to add rather than just one.
2007-08-22 15:00:54 +00:00
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
Adam Sampson
1f490e9f7f Lex multiline strings as multiple tokens.
This is because the structure pass needs to be able to tell where new lines
start, and if the line number changes in the middle of a token then it'll get
confused.
2007-08-21 20:01:46 +00:00
Neil Brown
ba60da71d6 Protocol test case expanded
Added larger protocols to stress test the C++CSP backend with variant protocols that have many options, and sequential protocols that have many items
2007-07-26 21:17:27 +00:00
Adam Sampson
50731d0b75 Give tock its own repo -- i.e. remove everything else and move tock up 2007-07-16 21:48:55 +00:00