Changeset 15230 for src/Pugs/Lexer.hs

Show
Ignore:
Timestamp:
02/09/07 05:06:31 (22 months ago)
Author:
audreyt
Message:

* Pugs.Lexer: Implement the <nofat> regex so:

use => 1

etc can work.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Lexer.hs

    r14439 r15230  
    207207symbol s = try $ do 
    208208    rv <- string s 
    209     let lastCh = last s 
    210         ahead  = if isWordAny lastCh then aheadWord else aheadSym 
    211     lookAhead (satisfy (ahead lastCh)) <|> (eof >> return ' ') 
    212     whiteSpace 
     209    let lastCh  = last s 
     210        ahead f = lookAhead (satisfy (f lastCh)) <|> (eof >> return ' ') 
     211    if isWordAny lastCh 
     212        then ahead aheadWord >> whiteSpace >> notFollowedBy (try (char '=' >> char '>')) 
     213        else ahead aheadSym >> whiteSpace 
    213214    return rv 
    214215    where