Commit Graph

12 Commits

Author SHA1 Message Date
Adam Sampson
36262fc55e Rework the mechanism that GenerateC uses to get externs from AnalyseAsm.
Neil spotted that I'd broken the C++CSP backend with these changes, and I
wasn't very happy with what I'd done anyway, so this is take 2. Now there's a
separate pass that runs before GenerateC which builds a set of functions used
in PARs.
2007-08-22 22:26:26 +00:00
Adam Sampson
929745f05e Tidy up how Main decides which passes to run.
Since the set of passes that runs now depends on several variables, there's now
an expression which builds a list of passes to run; this should be easier to
extend in the future.
2007-08-22 22:24:08 +00:00
Adam Sampson
da89323dbc Rename Parse to ParseOccam. 2007-08-22 01:59:51 +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
Neil Brown
30816b60ac On Adam's suggestion, renamed the occam 2.1 frontend to simply occam 2007-08-20 22:37:21 +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
65d5fc450d Remove readSource in favour of readFile.
It turns out there's a Prelude function that does what readSource does already
-- so just use that. (I was in the process of moving readSource into Utils when
I found it, since I want to use it in other places.)
2007-08-19 18:21:23 +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
Adam Sampson
7bdbb3b729 Make csBackend a proper type, and make the options lowercase.
This is to match the handling of --mode.
2007-08-08 19:56:28 +00:00
Adam Sampson
6047836456 Add a first shot at the assembly analyser, and make GenerateC use it.
This does about the minimum necessary for assembly analysis to work. It assumes
that any function it hasn't been able to analyse itself needs 512 bytes (most
need far less); it doesn't do any flow analysis; it doesn't do a lot of sanity
checking. However, it produces sensible numbers, and works with the demos I've
tried so far.

I was originally going to make this a separate tool, but there are a number of
bits of the code can be nicely reused, so it's a separate "operating mode" in
the existing program (as is parse-only mode now).
2007-08-08 19:39:47 +00:00
Neil Brown
fa9c108e50 Added backend-selecting command-line options 2007-07-26 21:18: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