Commit Graph

8 Commits

Author SHA1 Message Date
Adam Sampson
8f2575819b Initial implementation of the occam-pi preprocessor.
This implements #DEFINE, #UNDEF, #IF, #ELSE and #ENDIF, macro expansion with
##, and TRUE, FALSE, AND, OR, NOT and DEFINED within #IF expressions, with the
same semantics as occ21.

The macro COMPILER.TOCK is always defined by default, so you can now say things
like "#IF NOT DEFINED (COMPILER.TOCK) ... #ENDIF".
2008-02-28 20:27:30 +00:00
Neil Brown
035c526bef Changed the TLP and PrettyShow modules to use CSMR instead of CSM 2008-02-08 11:29:09 +00:00
Neil Brown
673d6a4f76 Reverted a change in the PrettyShow module because I'm no longer confident about it (original behaviour definitely worked) 2008-02-05 22:39:38 +00:00
Neil Brown
acd57d74de Changed the A.Structured type to be parameterised
This patch is actually an amalgam of multiple (already large) patches.  Those patches conflicted (parameterised Structured vs. changes to usage checking and FlowGraph) and encountered a nasty bug in darcs 1 involving exponential time (see http://wiki.darcs.net/DarcsWiki/ConflictsFAQ for more details).  Reasoning that half an hour (of 100% CPU use) was too long to apply patches, I opted to re-record the parameterised Structured changes as this new large patch.  Here are the commit messages originally used for the patches (which, as mentioned, were already large patches):

A gigantic patch switching all the non-test modules over to using parameterised A.Structured
Changed the FlowGraph module again to handle any sort of Structured you want to pass to it (mainly for testing)
A further gigantic patch changing all the tests to work with the new parameterised Structured
Fixed a nasty bug involving functions being named incorrectly inside transformInputCase
Added a hand-written instance of Data for Structured that allows us to use ext1M properly
Fixed a few warnings in the code
2008-02-05 19:40:27 +00:00
Neil Brown
093070454b Removed a use of the head function from PrettyShow 2008-02-05 16:19:00 +00:00
Neil Brown
deef9dd209 Added documentation to PrettyShow and ShowCode, along with an export list for the latter. 2007-09-17 17:51:49 +00:00
Neil Brown
1172bfd2a0 Added the pshowCode function that uses the ShowOccam and ShowRain classes to print out applicable parts of an AST 2007-09-17 10:38:30 +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