Changed numbertoken to Int
[cc1516.git] / main.icl
1 module main
2
3 import StdFile
4 import StdBool
5
6 import lex
7 import parse
8
9 //Start :: *World -> (ParserOutput, *World)
10 Start w
11 # (out, w) = stdio w
12 # (toparse, out) = readEntireFile out
13 # (_, w) = fclose out w
14 = (lexer toparse, w)
15 /*
16 Start :: *World -> (ParserOutput, *World)
17 Start w
18 # (out, w) = stdio w
19 # (toparse, out) = readEntireFile out
20 # (_, w) = fclose out w
21 = (parse (lexer toparse), w)
22 */
23
24 readEntireFile :: *File -> *([Char], *File)
25 readEntireFile f
26 # (b, c, f) = freadc f
27 | not b = ([], f)
28 # (cs, f) = readEntireFile f
29 = ([c:cs], f)