summaryrefslogtreecommitdiff
path: root/src/GF/Grammar/Parser.y
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2009-09-14 12:16:02 +0000
committerkrasimir <krasimir@chalmers.se>2009-09-14 12:16:02 +0000
commit62ef772a2c996f2d7d17529eeee845be90586a78 (patch)
tree3d415cb7c1a10a98172fa2c1192b9ac353f5935e /src/GF/Grammar/Parser.y
parentcc151c42790e02d60d6a0ab18c9c56da76f0ea51 (diff)
CheckGrammar is now using the printer in GF.Grammar.Printer. Fixed bug that was hiding the warnings
Diffstat (limited to 'src/GF/Grammar/Parser.y')
-rw-r--r--src/GF/Grammar/Parser.y14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/GF/Grammar/Parser.y b/src/GF/Grammar/Parser.y
index c25693652..e08169a17 100644
--- a/src/GF/Grammar/Parser.y
+++ b/src/GF/Grammar/Parser.y
@@ -117,7 +117,7 @@ ModDef
Ok x -> return x
Bad msg -> fail msg
let poss = buildTree [(i,(fname,mkSrcSpan p)) | (i,p,_) <- jments]
- fname = prIdent id ++ ".gf"
+ fname = showIdent id ++ ".gf"
mkSrcSpan :: (Posn, Posn) -> (Int,Int)
mkSrcSpan (Pn l1 _, Pn l2 _) = (l1,l2)
@@ -278,7 +278,7 @@ TermDef
FlagDef :: { Options }
FlagDef
- : Posn Ident '=' Ident Posn {% case parseModuleOptions ["--" ++ prIdent $2 ++ "=" ++ prIdent $4] of
+ : Posn Ident '=' Ident Posn {% case parseModuleOptions ["--" ++ showIdent $2 ++ "=" ++ showIdent $4] of
Ok x -> return x
Bad msg -> failLoc $1 msg }
@@ -626,7 +626,7 @@ listCatDef id pos cont size = [catd,nilfund,consfund]
mkId x i = if isWildIdent x then (varX i) else x
tryLoc (c,mty,Just e) = return (c,(mty,e))
-tryLoc (c,_ ,_ ) = fail ("local definition of" +++ prIdent c +++ "without value")
+tryLoc (c,_ ,_ ) = fail ("local definition of" +++ showIdent c +++ "without value")
mkR [] = return $ RecType [] --- empty record always interpreted as record type
mkR fs@(f:_) =
@@ -635,10 +635,10 @@ mkR fs@(f:_) =
_ -> mapM tryR fs >>= return . R
where
tryRT (lab,Just ty,Nothing) = return (ident2label lab,ty)
- tryRT (lab,_ ,_ ) = fail $ "illegal record type field" +++ prIdent lab --- manifest fields ?!
+ tryRT (lab,_ ,_ ) = fail $ "illegal record type field" +++ showIdent lab --- manifest fields ?!
tryR (lab,mty,Just t) = return (ident2label lab,(mty,t))
- tryR (lab,_ ,_ ) = fail $ "illegal record field" +++ prIdent lab
+ tryR (lab,_ ,_ ) = fail $ "illegal record field" +++ showIdent lab
mkOverload pdt pdf@(Just df) =
case appForm df of
@@ -660,8 +660,8 @@ mkOverload pdt pdf = [ResOper pdt pdf]
isOverloading t =
case t of
- Vr keyw | prIdent keyw == "overload" -> True -- overload is a "soft keyword"
- _ -> False
+ Vr keyw | showIdent keyw == "overload" -> True -- overload is a "soft keyword"
+ _ -> False
type SrcSpan = (Posn,Posn)