repositories
/
cc1516.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Presentation
[cc1516.git]
/
spl.icl
diff --git
a/spl.icl
b/spl.icl
index
2a4fb97
..
c42412c
100644
(file)
--- a/
spl.icl
+++ b/
spl.icl
@@
-51,7
+51,8
@@
Start w
<<< " --help Show this help\n"
<<< " --version Show the version\n"
<<< " --[no-]lex Lexer output(default: disabled)\n"
<<< " --help Show this help\n"
<<< " --version Show the version\n"
<<< " --[no-]lex Lexer output(default: disabled)\n"
- <<< " --[no-]parse Parser output(default: enabled)\n"
+ <<< " --[no-]parse Parser output(default: disabled)\n"
+ <<< " --[no-]sem Semantic analysis output(default: enabled)\n"
= snd $ fclose stdin w
# (contents, stdin, w) = readFileOrStdin stdin args.fp w
= case contents of
= snd $ fclose stdin w
# (contents, stdin, w) = readFileOrStdin stdin args.fp w
= case contents of
@@
-69,9
+70,10
@@
Start w
= case sem parseOut of
(Left e) = snd $ fclose (stdin <<< join "\n" (map toString e)) w
(Right (semOut, gamma))
= case sem parseOut of
(Left e) = snd $ fclose (stdin <<< join "\n" (map toString e)) w
(Right (semOut, gamma))
- # stdin = if (not args.sem) stdin (
- stdin <<< "//SEM\n" <<< toString gamma <<< "//SEM\n")
- = snd $ fclose stdin w
+ # stdin = if (not args.sem) stdin (stdin
+ <<< "//SEM G\n" <<< toString gamma <<< "//SEM A\n"
+ <<< "//SEM A\n" <<< toString semOut <<< "//SEM A\n")
+ = snd $ fclose (stdin <<< "\n") w
where
printTokens :: [Token] -> String
printTokens ts = concat $ flatten $ map pt ts
where
printTokens :: [Token] -> String
printTokens ts = concat $ flatten $ map pt ts