--- [EMAIL PROTECTED] 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
_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to