X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=utils%2Fhpc%2FHpcParser.y;h=74893e46eaec9860973b5df61f7d78dfdc4355e0;hb=e4417dcd4679da9c6b18c02ff667199c572bed89;hp=a6a095b9abdc8c44807e5d8a343a5ce3c19c21eb;hpb=4799dfb37be922c17451f8e0f7c8d765a7a7eaab;p=ghc-hetmet.git diff --git a/utils/hpc/HpcParser.y b/utils/hpc/HpcParser.y index a6a095b..74893e4 100644 --- a/utils/hpc/HpcParser.y +++ b/utils/hpc/HpcParser.y @@ -1,4 +1,11 @@ { +{-# OPTIONS -w #-} +-- The above warning supression flag is a temporary kludge. +-- While working on this module you are encouraged to remove it and fix +-- any warnings in the module. See +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings +-- for details + module HpcParser where import HpcLexer @@ -6,7 +13,6 @@ import HpcLexer %name parser %tokentype { Token } -%error { \ e -> error $ show (take 10 e) } %token MODULE { ID "module" } @@ -25,7 +31,7 @@ import HpcLexer '}' { SYM '}' } int { INT $$ } string { STR $$ } - cat { STR $$ } + cat { CAT $$ } %% Spec :: { Spec } @@ -102,5 +108,5 @@ hpcParser filename = do let tokens = initLexer txt return $ parser tokens - +happyError e = error $ show (take 10 e) }