Commit Graph

506 Commits

Author SHA1 Message Date
Adam Sampson
181a084ab7 First draft of presentation 2006-10-30 23:30:10 +00:00
Adam Sampson
99d43e1fba Another note 2006-10-30 23:29:40 +00:00
Adam Sampson
f7114b6c84 Include metadata in the AST 2006-10-18 17:09:35 +00:00
Adam Sampson
996f64702a Unique naming working nicely 2006-10-18 14:36:31 +00:00
Adam Sampson
763f735a37 Unique naming sort-of working 2006-10-18 03:35:13 +00:00
Adam Sampson
a2cf9c0939 Add a clean rule 2006-10-17 21:57:24 +00:00
Adam Sampson
5cb2b2d248 Make Structured non-parametric, and experiment with a traversal strategy for scope tracking 2006-10-08 16:48:08 +00:00
Adam Sampson
d895b72a2b More writeup 2006-10-08 16:47:35 +00:00
Adam Sampson
04ce526824 Remove Test.hs -- it's all in the main code now 2006-10-07 11:26:19 +00:00
Adam Sampson
4a99213bb3 Add first version of writeup 2006-10-06 22:57:20 +00:00
Adam Sampson
7b6258184e Add basic C output support (not compilable yet!) 2006-10-06 01:17:58 +00:00
Adam Sampson
7d4e79e56b Move testcases into their own directory, and give them better names 2006-10-05 12:52:40 +00:00
Adam Sampson
ed54025468 Fix the a[b] ambiguity by tweaking the parser; also make AST Conversions include the type 2006-10-05 12:45:30 +00:00
Adam Sampson
5f697e8286 Tag parse tree nodes with source position metadata while parsing 2006-10-05 00:08:57 +00:00
Adam Sampson
d82e37c111 Don't actually strip indentation off the source code 2006-10-04 22:44:25 +00:00
Adam Sampson
29073f87ad Doesn't need List any more 2006-10-04 22:31:22 +00:00
Adam Sampson
dcf10067b6 Add PrettyShow, and make all the output pretty-printed 2006-10-04 22:29:49 +00:00
Adam Sampson
b546c0fdcb Clean up PT 2006-10-04 17:10:52 +00:00
Adam Sampson
93fda75946 Scrap my boilerplate.
That is, convert this all to use Data.Generics, which makes the code a lot
cleaner and avoids needing to autogenerate passthrough functions.
Rename some modules too.
2006-10-04 17:08:14 +00:00
Adam Sampson
fb01714fc1 Parse tree to AST conversion (still some parser bugs) 2006-10-03 11:06:55 +00:00
Adam Sampson
6145c5aad2 Get N.Sub args the right way round 2006-10-03 10:44:50 +00:00
Adam Sampson
a503385f6f Update spec to match what the code now produces for inputs 2006-10-03 00:23:42 +00:00
Adam Sampson
eae0f9d1d8 Clean up the tree representation of inputs 2006-10-03 00:22:47 +00:00
Adam Sampson
0f5a6ae805 Represent formals with a list of names declared in Tree 2006-10-02 22:32:14 +00:00
Adam Sampson
51c1144ca7 Represent subscripts in a more general way in Tree 2006-10-02 22:31:32 +00:00
Adam Sampson
42e46b1d23 Make monadic and dyadic ops use a common node (rather than one per op) 2006-10-02 21:23:02 +00:00
Adam Sampson
acb785e85b Import Tree qualified, getting rid of the silly Oc prefix on all the types 2006-10-02 16:31:23 +00:00
Adam Sampson
792728b7aa Add nicer Haskell AST types, for use with Data.Generics 2006-10-02 16:23:03 +00:00
Adam Sampson
f1a63732b1 First (aborted) shot at marking declarations 2006-10-02 13:28:36 +00:00
Adam Sampson
f7651664ae Rename Pass -> Transform, and make transforms operate inside the State monad 2006-09-27 23:29:55 +00:00
Adam Sampson
60e2890233 Wrap string/byte literals in --parse-tree mode 2006-09-23 20:33:43 +00:00
Adam Sampson
2e9b2a711d Add soccam output 2006-09-23 18:33:35 +00:00
Adam Sampson
cb7b10d1b5 Add soccam2.1 spec 2006-09-23 17:28:58 +00:00
Adam Sampson
cc9de06860 Debugging information to stderr, and only shown if -v is given 2006-09-23 00:45:19 +00:00
Adam Sampson
82447416af When -p is given, dump parse tree as s-expression and exit 2006-09-23 00:20:33 +00:00
Adam Sampson
2ae397f1e6 OcMod and OcRem are actually the same operator; kill OcMod 2006-09-23 00:06:53 +00:00
Adam Sampson
963ab7ade1 More syntax tests 2006-09-07 15:03:11 +00:00
Adam Sampson
6baca4b641 Remove "unsure" comments
It's because I didn't understand properly how Parsec works -- when you say a
<|> b, everything in a runs (and fails) even if it didn't match...
2006-09-07 14:50:52 +00:00
Adam Sampson
b659d27f1f Add intermediate phase, and a pass to gather declarations 2006-09-07 12:41:35 +00:00
Adam Sampson
15974f8eb6 Move base passes to their own file 2006-09-07 12:21:49 +00:00
Adam Sampson
65d2e67846 Add another phase, and make the driver work with multiple phases 2006-09-07 03:11:03 +00:00
Adam Sampson
344add99e9 Rework parser to commit sooner
Essentially just move around a lot of "try"s, and make the flattening code
preserve lines. This lets it give more useful error messages when it can't
parse something.
2006-09-07 02:38:51 +00:00
Adam Sampson
02abee3d7f Allow empty arg lists 2006-09-06 21:58:20 +00:00
Adam Sampson
5abb9a60c4 Slightly less silly example pass 2006-09-06 21:58:10 +00:00
Adam Sampson
6ebc9cc13e Add code to autogenerate identity passes (and use it) 2006-09-06 21:34:54 +00:00
Adam Sampson
a093196b30 Add code to run trees through passes 2006-09-06 21:00:55 +00:00
Adam Sampson
85eb9fe33d Take a filename as a command-line arg, and use a marker process for main rather than SKIP 2006-09-06 19:56:16 +00:00
Adam Sampson
2e9d2123ad Add tree datatype, and rework parser to produce it instead of soccam 2006-09-06 17:38:57 +00:00
Adam Sampson
5429cfe2b8 Add Makefile 2006-09-06 13:57:27 +00:00
Adam Sampson
2f9fee375e Make usable as a filter. 2006-02-04 03:27:09 +00:00