Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 34 lines (28 sloc) 0.905 kb
145bdd5f »
2011-05-03 {src/sa.sml,sa.sml} Fixed numerous bugs. Added stdlib bindings. Added…
1 structure TigerLrVals = TigerLrValsFun (structure Token = LrParser.Token)
2 structure TigerLex = TigerLexFun (structure Tokens = TigerLrVals.Tokens)
3 structure TigerParser =
4 Join
5 (structure ParserData = TigerLrVals.ParserData
6 structure Lex = TigerLex
7 structure LrParser = LrParser)
8
9 exception Parse
10
11 fun get n = TextIO.inputN(TextIO.stdIn,n)
12 fun eof tok = TigerParser.sameToken(tok,TigerLrVals.Tokens.Eof(0,0))
13 fun parse lexer = TigerParser.parse(0,lexer,(fn _=>raise Parse),())
14 val more = TigerParser.Stream.get
15 val lexer = TigerParser.makeLexer get
16
17 fun go' f =
18 let fun loop lex =
19 let val (r,lex') = parse lex
20 val (tok,lex'') = more lex'
21 in f r; if eof tok then () else loop lex''
22 end
23 in loop lexer
24 end
25
ad0b3140 »
2011-05-05 fixed some stuff.
26 fun go () = go' ( CIRPrint.printProg
27 o ToC.IRtoCIR.convertIR
28 o LL.lift
29 o Semantic.toIR
30 )
145bdd5f »
2011-05-03 {src/sa.sml,sa.sml} Fixed numerous bugs. Added stdlib bindings. Added…
31
32 ;
33 go();
Something went wrong with that request. Please try again.