packages feed

FM-SBLEX-3.0: src/lib/Dict/GetDict.hs

-- automatically generated by BNF Converter
module Dict.GetDict where

import IO ( stdin, hGetContents )
import System ( getArgs, getProgName )
import Dict.Lex
import Dict.Par
import Dict.Skel
import Dict.Print
import Dict.Abs
import Dict.ErrM

getDict :: String -> Err Dictionary
getDict s = let ts = myLexer s in pDictionary ts 

getEntry :: String -> Err Entry
getEntry s = let ts = myLexer s in 
              case pListEntry ts of
                Ok [x]   -> Ok x
                Ok  []   -> Bad []  
                Ok _     -> error "internal error in Dict.GetDict: multiple entries. this is a bug."
                Bad s    -> Bad s