X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=spl.icl;h=28b95fb9af33f1a3e8752d3141ba1c5c7d5d8a7b;hb=022b8166504765b2c84138fc83dfdfaa23fe5774;hp=893d69932597be73b76f4e31e158fd37682f2446;hpb=fe40818bbc1d327f0adfbbbfe7ecfbe15d4eb053;p=cc1516.git diff --git a/spl.icl b/spl.icl index 893d699..28b95fb 100644 --- a/spl.icl +++ b/spl.icl @@ -57,19 +57,19 @@ Start w # lexOut = lexer cs # stdin = if (not args.lex) stdin (case lexOut of (Right toks) = - stdin <<< "---LEXER\n" <<< printTokens toks <<< "---LEXER\n" + stdin <<< "//LEXER\n" <<< printTokens toks <<< "//LEXER\n" _ = stdin) # parseOut = parser lexOut # stdin = if (not args.parse) stdin (case parser lexOut of (Right ast) = - stdin <<< "---PARSER\n" <<< toString ast <<< "---PARSER\n" + stdin <<< "//PARSER\n" <<< toString ast <<< "//PARSER\n" (Left parse) = stdin <<< toString parse) = snd $ fclose stdin w where printTokens :: [Token] -> String printTokens ts = concat $ flatten $ map pt ts where - pt ({line,col},token) = [toString line, ":", + pt ({line,col},token) = [toString line, ":", toString col, ": ", printToString token, "\n"] parseArgs :: *World -> (Opts, *World)