repositories
/
cc1516.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
type instance for FunDecl
[cc1516.git]
/
spl.icl
diff --git
a/spl.icl
b/spl.icl
index
291b0bd
..
8004933
100644
(file)
--- a/
spl.icl
+++ b/
spl.icl
@@
-69,11
+69,16
@@
Start w
stdin <<< "//PARSER\n" <<< toString parseOut <<< "//PARSER\n")
= case sem parseOut of
(Left e) = snd $ fclose (stdin <<< join "\n" (map toString e)) w
stdin <<< "//PARSER\n" <<< toString parseOut <<< "//PARSER\n")
= 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")
+ (Right
constraints
)
+ # stdin = if (not args.sem) stdin (
stdin
+
<<< "//SEM G\n" <<< printConstraints constraints <<< "//SEMA
\n")
= snd $ fclose (stdin <<< "\n") w
where
= snd $ fclose (stdin <<< "\n") w
where
+ printConstraints :: Constraints -> String
+ printConstraints [] = ""
+ printConstraints [(t1, t2):ts] = concat [
+ "(", toString t1, ",", toString t2, ")"] +++ printConstraints ts
+
printTokens :: [Token] -> String
printTokens ts = concat $ flatten $ map pt ts
where
printTokens :: [Token] -> String
printTokens ts = concat $ flatten $ map pt ts
where