X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fparser%2FParser.y;h=da612d8d9cf47b0155b9039fc730d1bad4e77dd3;hb=e20dee90944fdf811b2e6c4ffbe790e4242b1410;hp=30a19507bc64fc2d337d0f50b5fc59a49df042a1;hpb=95c1df879b96a4a87076672207d47a8e0f3a98f4;p=ghc-hetmet.git diff --git a/ghc/compiler/parser/Parser.y b/ghc/compiler/parser/Parser.y index 30a1950..da612d8 100644 --- a/ghc/compiler/parser/Parser.y +++ b/ghc/compiler/parser/Parser.y @@ -1,6 +1,6 @@ {- ----------------------------------------------------------------------------- -$Id: Parser.y,v 1.72 2001/07/23 10:54:48 simonpj Exp $ +$Id: Parser.y,v 1.73 2001/08/20 10:19:47 simonmar Exp $ Haskell grammar. @@ -9,7 +9,7 @@ Author(s): Simon Marlow, Sven Panne 1997, 1998, 1999 -} { -module Parser ( parseModule, parseStmt ) where +module Parser ( parseModule, parseStmt, parseIdentifier ) where import HsSyn import HsTypes ( mkHsTupCon ) @@ -206,6 +206,7 @@ Conflicts: 14 shift/reduce %lexer { lexer } { ITeof } %name parseModule module %name parseStmt maybe_stmt +%name parseIdentifier identifier %tokentype { Token } %% @@ -923,6 +924,11 @@ dbind : ipvar '=' exp { ($1, $3) } ----------------------------------------------------------------------------- -- Variables, Constructors and Operators. +identifier :: { RdrName } + : qvar { $1 } + | gcon { $1 } + | qop { $1 } + depreclist :: { [RdrName] } depreclist : deprec_var { [$1] } | deprec_var ',' depreclist { $1 : $3 }