Changeset 12317 for src/Pugs/Lexer.hs
- Timestamp:
- 08/16/06 19:28:24 (2 years ago)
- Files:
-
- 1 modified
-
src/Pugs/Lexer.hs (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/Lexer.hs
r12268 r12317 31 31 import Pugs.Types 32 32 import Pugs.Parser.Types 33 import qualified Text.ParserCombinators.Parsec.Char as C (satisfy) 34 33 34 identStart, identLetter :: RuleParser Char 35 35 identStart = satisfy isWordAlpha 36 36 identLetter = satisfy isWordAny … … 49 49 maybeParens p = choice [ parens p, p ] 50 50 51 parens, braces, angles, brackets :: RuleParser a -> RuleParser a 51 52 parens p = between (symbol "(") (symbol ")") p 52 53 braces p = between (symbol "{") (symbol "}") p … … 132 133 133 134 -- The \b rule. 134 ruleWordBoundary :: RuleParser ()135 ruleWordBoundary = do135 _ruleWordBoundary :: RuleParser () 136 _ruleWordBoundary = do 136 137 prev <- getPrevCharClass 137 138 case prev of … … 236 237 = homogenConcat (Val (VStr (x ++ y)) : xs) 237 238 homogenConcat (x:xs) 238 = App ( Var "&infix:~") Nothing [x, homogenConcat xs]239 = App (_Var "&infix:~") Nothing [x, homogenConcat xs] 239 240 240 241 stringList :: Int -> RuleParser [Exp] … … 451 452 ----------------------------------------------------------- 452 453 -- naturalOrFloat :: CharParser st (Either Integer Double) 453 naturalOrFloat = lexeme (natFloat)<?> "number"454 naturalOrFloat = lexeme natFloat <?> "number" 454 455 455 456 float = lexeme floating <?> "float"
