Re: [Haskell-cafe] Parsec Problem

--- haskell@alias.spaceandtime.org wrote: I wish I knew what that meant. If someone could explain it and tell me what's wrong, I'd appreciate it. --- end of quote --- Lexeme is actually a selector function over the TokenParser record. In the previous section (also on lexical analysis), he included the code: module Main where import Parsec import qualified ParsecToken as P import ParsecLanguage( haskellStyle ) lexer :: TokenParser () lexer = makeTokenParser (haskellDef { reservedOpNames = ["*","/","+","-"] }) whiteSpace= P.whiteSpace lexer lexeme = P.lexeme lexer -- <-- here's lexeme symbol = P.symbol lexer natural = P.natural lexer parens = P.parens lexer semi = P.semi lexer identifier= P.identifier lexer reserved = P.reserved lexer reservedOp= P.reservedOp lexer Once you've done that, the sample code should work fine. /gXm
participants (1)
-
J.Garrett.Morris@Dartmouth.EDU