diff options
author | simonmar <unknown> | 2000-11-16 11:39:37 +0000 |
---|---|---|
committer | simonmar <unknown> | 2000-11-16 11:39:37 +0000 |
commit | 292c077de7dbe98eb44911648f16e243b40db2ac (patch) | |
tree | bede294fb08cdc88ca0ddba402b3e873602ea4d6 /ghc/compiler/parser/Parser.y | |
parent | 8894fd8508fc5ac3b793187c323e4732a73b4a24 (diff) | |
download | haskell-292c077de7dbe98eb44911648f16e243b40db2ac.tar.gz |
[project @ 2000-11-16 11:39:36 by simonmar]
Current state of the interactive system; can load packages (in theory).
Diffstat (limited to 'ghc/compiler/parser/Parser.y')
-rw-r--r-- | ghc/compiler/parser/Parser.y | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/ghc/compiler/parser/Parser.y b/ghc/compiler/parser/Parser.y index 779c235abe..9dc85a293c 100644 --- a/ghc/compiler/parser/Parser.y +++ b/ghc/compiler/parser/Parser.y @@ -1,6 +1,6 @@ {- ----------------------------------------------------------------------------- -$Id: Parser.y,v 1.47 2000/11/07 15:21:40 simonmar Exp $ +$Id: Parser.y,v 1.48 2000/11/16 11:39:37 simonmar Exp $ Haskell grammar. @@ -9,7 +9,7 @@ Author(s): Simon Marlow, Sven Panne 1997, 1998, 1999 -} { -module Parser ( parse ) where +module Parser ( ParseStuff(..), parse ) where import HsSyn import HsTypes ( mkHsTupCon ) @@ -113,6 +113,8 @@ Conflicts: 14 shift/reduce '{-# DEPRECATED' { ITdeprecated_prag } '#-}' { ITclose_prag } + '__expr' { ITexpr } + {- '__interface' { ITinterface } -- interface keywords '__export' { IT__export } @@ -202,6 +204,13 @@ Conflicts: 14 shift/reduce %% ----------------------------------------------------------------------------- +-- Entry points + +parse :: { ParseStuff } + : module { PModule $1 } + | '__expr' exp { PExpr $2 } + +----------------------------------------------------------------------------- -- Module Header -- The place for module deprecation is really too restrictive, but if it @@ -1096,6 +1105,8 @@ commas :: { Int } ----------------------------------------------------------------------------- { +data ParseStuff = PModule RdrNameHsModule | PExpr RdrNameHsExpr + happyError :: P a happyError buf PState{ loc = loc } = PFailed (srcParseErr buf loc) } |