repositories
/
cc1516.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
stub voor parsen gemaakt
[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
= (parse (lexer toparse), w)
15
16
readEntireFile :: *File -> *([Char], *File)
17
readEntireFile f
18
# (b, c, f) = freadc f
19
| not b = ([], f)
20
# (cs, f) = readEntireFile f
21
= ([c:cs], f)