Tock (translator from occam to C from Kent) is a Haskell-based occam-to-C translator. It compiles -- currently -- occam 2.1 into C99, using the CCSP runtime via CIF. It's written in Haskell, making use of the Parsec parser combinator library.

(More information to follow once it's in more of a state for regular users to use.)

The source code is currently managed using Darcs. You can browse it with a web browser here:

To download a copy of the source to play with, install Darcs, then do darcs get; this will give you a tock directory containing the source code.

You'll need GHC (probably version 6.6 or later) to compile Tock itself; type make. To compile binaries with it, you'll need a working C compiler and a (post-2007-04-23) KRoC installation. You can then say make testcases/commstime-mini to compile one of the testcases.

There's inline documentation using Haddock (which you'll need to install); type make haddock to create HTML documentation in the doc directory.

Tock (last edited 2008-11-20 13:17:07 by ats)