1 implementation module lex
6 import System.CommandLine
10 // Misschien moeten we hier continuation style van maken
11 instance toString lexerOutput where
12 toString l = "dit is een lexer output, danwel error\n"
14 lexer :: [Char] -> LexerOutput
15 lexer _ = Left "Not Implemented"
17 Start :: *World -> *World
19 # (args, w) = getCommandLine w // We lezen nu nog standaard van stdin
21 # (toparse, out) = readEntireFile out
22 # out = out <<< toString (lexer toparse)
23 # (b, w) = fclose out w
24 | not b = setReturnCode 1 w
27 readEntireFile :: *File -> *([Char], *File)
29 # (b, c, f) = freadc f
31 # (cs, f) = readEntireFile f