summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Grammar/Macros.hs
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2011-10-20 14:25:31 +0000
committerhallgren <hallgren@chalmers.se>2011-10-20 14:25:31 +0000
commite5accc0d8d3c6d9cace9d4aff482ab285bf7e01b (patch)
treed197ab606e3f56cf0929fbf9f34fff405492014c /src/compiler/GF/Grammar/Macros.hs
parentef4fac9d829a354c0d1e4182a317b320328e9d7c (diff)
Some experiments with PSeq (left commented out)
Diffstat (limited to 'src/compiler/GF/Grammar/Macros.hs')
-rw-r--r--src/compiler/GF/Grammar/Macros.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/compiler/GF/Grammar/Macros.hs b/src/compiler/GF/Grammar/Macros.hs
index 3d8893b99..30795cecb 100644
--- a/src/compiler/GF/Grammar/Macros.hs
+++ b/src/compiler/GF/Grammar/Macros.hs
@@ -574,3 +574,14 @@ topoSortJments (m,mi) = do
(\cyc -> Bad (render (text "circular definitions:" <+> fsep (map ppIdent (head cyc)))))
(topoTest (allDependencies (==m) (jments mi)))
return (reverse [(i,info) | i <- is, Ok info <- [lookupTree showIdent i (jments mi)]])
+{-
+-- | Smart constructor for PSeq
+pSeq p1 p2 =
+ case (p1,p2) of
+ (PString s1,PString s2) -> PString (s1++s2)
+ (PSeq p11 (PString s1),PString s2) -> PSeq p11 (PString (s1++s2))
+ (PString s1,PSeq (PString s2) p22) -> PSeq (PString (s1++s2)) p22
+ (PSeq p11 (PString s1),PSeq (PString s2) p22) ->
+ PSeq p11 (PSeq (PString (s1++s2)) p22)
+ _ -> PSeq p1 p2
+-} \ No newline at end of file