import StdBool
import lex
+import parse
-Start :: *World -> (LexerOutput, *World)
+Start :: *World -> (ParserOutput, *World)
Start w
# (out, w) = stdio w
# (toparse, out) = readEntireFile out
# (_, w) = fclose out w
-= (lexer toparse, w)
+= (parse (lexer toparse), w)
readEntireFile :: *File -> *([Char], *File)
readEntireFile f
ReadableABC: False
ReuseUniqueNodes: True
Fusion: False
+ Module
+ Name: parse
+ Dir: {Project}
+ Compiler
+ NeverMemoryProfile: False
+ NeverTimeProfile: False
+ StrictnessAnalysis: True
+ ListTypes: StrictExportTypes
+ ListAttributes: True
+ Warnings: True
+ Verbose: True
+ ReadableABC: False
+ ReuseUniqueNodes: True
+ Fusion: False
Module
Name: StdArray
Dir: {Application}/lib/StdEnv
--- /dev/null
+definition module parse
+
+import lex
+
+:: ParserOutput :== Either String AST
+:: AST = If | While //stub
+
+parse :: LexerOutput -> ParserOutput
--- /dev/null
+implementation module parse
+
+import StdString
+
+import lex
+
+parse :: LexerOutput -> ParserOutput
+parse (Left e) = Left ("Lexer error: " +++ e)
+parse (Right r) = Left "Parser not yet implemented"