X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=parse.dcl;h=ad7edea3ad3fc20ce9645f38767015333544cfe5;hb=a8348a333a567e5a469d1e5f8ec6c3dafc051c91;hp=785dfbcc17603b92652cdc375a88d4e2c804b91f;hpb=4766205e7035a58c8a1fa1557b6e14577ed26f32;p=cc1516.git diff --git a/parse.dcl b/parse.dcl index 785dfbc..ad7edea 100644 --- a/parse.dcl +++ b/parse.dcl @@ -1,10 +1,12 @@ definition module parse from Data.Either import :: Either +from Data.Maybe import :: Maybe +from StdString import class toString -from lex import :: LexerOutput, :: Token, :: TokenValue +from lex import :: LexerOutput, :: Error, :: Token, :: TokenValue, :: Pos +from AST import :: AST -:: ParserOutput :== Either String AST -:: AST = If | While //stub +:: ParserOutput :== Either Error AST -parse :: LexerOutput -> ParserOutput +parser :: [Token] -> ParserOutput