Commit Graph

13 Commits

Author SHA1 Message Date
Neil Brown
8a36f6e96f Added support for parsing pragmas, for now just handling the SHARED pragma 2009-01-19 15:11:09 +00:00
Adam Sampson
ab416326ad Make Token a real data type.
Previously it was a tuple, which meant it couldn't have sensible
custom instances. Token and TokenType now have Show instances, so we
get more useful output when parsing fails.
2008-06-05 09:46:52 +00:00
Neil Brown
6f35e1e36c Added support for array constructors to the occam parser 2008-03-10 22:58:36 +00:00
Neil Brown
b83bcc0f34 Added INITIAL variable abbreviations (as specifications) to the occam parser 2008-03-10 22:55:57 +00:00
Adam Sampson
d021edbd48 Add some reserved words that show up in ASM blocks. 2008-02-29 17:11:17 +00:00
Adam Sampson
a2a15cab64 Split include file expansion out into a separate pass.
The order of initial passes is now:
  lex -> preprocess -> structure -> expand-include -> parse
which means that #IFing out structurally-invalid code (like inline VALOF) now
works.  This also cleans up the preprocessor code a bit.
2008-02-29 15:01:19 +00:00
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
1fd85fbe51 Added the -fwarn-missing-signatures option and added all missing type signatures for non-test modules (and most for test modules too) 2008-02-05 23:06:03 +00:00
Neil Brown
2120b830dc Corrected the use of the -fno-warn-tabs flag in the alex files so that it works under GHC 6.6.x 2008-01-28 12:03:03 +00:00
Neil Brown
34584130d4 Turned off tab warnings for the files auto-generated by Alex (which contain a lot of tabs) 2008-01-26 19:37:43 +00:00
Neil Brown
7d8f170b7d Added support for the #COMMENT directive to the occam parser 2007-10-15 17:12:53 +00:00
Neil Brown
38c409d378 Added the -fwarn-unused-imports compiler option to warn about unused imports, and then set about pruning and ordering (mostly in my code) the import lists for all the modules 2007-09-27 13:13:46 +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