repositories
/
cc1516.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
negative numbers are lexed
[cc1516.git]
/
main.icl
1
module main
2
3
import StdFile
4
import StdBool
5
6
import lex
7
8
Start :: *World -> (LexerOutput, *World)
9
Start w
10
# (out, w) = stdio w
11
# (toparse, out) = readEntireFile out
12
# (_, w) = fclose out w
13
= (lexer toparse, w)
14
15
readEntireFile :: *File -> *([Char], *File)
16
readEntireFile f
17
# (b, c, f) = freadc f
18
| not b = ([], f)
19
# (cs, f) = readEntireFile f
20
= ([c:cs], f)