Changeset 15198 for src/Pugs/Parser

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

* Pugs.Parser.Operator: Add postfix "i" form

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Parser/Operator.hs

    r15165 r15198  
    6969termLevel = circumOps (Set.singleton (MkOpName (cast "\\( )"))) 
    7070methLevel = methOps (opWords " . .+ .? .* .+ .() .[] .{} .<<>> .= ") 
    71 incrLevel = postOps incrOps ++ preOps incrOps 
     71incrLevel = postOps incrOpsPost ++ preOps incrOpsPre 
    7272expoLevel = rightOps (opWords " ** ") 
    7373symbLevel = preSyn (Set.singleton (MkOpName (cast "|"))) ++ preOps symbPreops 
     
    7979symbPreops :: Set OpName 
    8080symbPreops = opWords " = ! + - ~ ? +^ ~^ ?^ \\ ^" 
    81 incrOps :: Set OpName 
    82 incrOps = opWords " ++ -- " 
     81 
     82incrOpsPre :: Set OpName 
     83incrOpsPre = opWords " ++ -- " 
     84 
     85incrOpsPost :: Set OpName 
     86incrOpsPost = opWords " ++ -- i " 
    8387 
    8488-- The lower levels of immutable ops.  This will be replaced once we have 
     
    354358        | otherwise 
    355359        = sigil ++ name 
    356     makeFileTestOp ch = conOp ("&prefix:-" ++ [ch]) 
    357360    conOp name = return $ \x -> case x of 
    358361        Syn "" []   -> con name [] 
     
    649652        parseFull   = expRule (buildExpressionParser opsFull tightExprs) 
    650653        parseLit    = expRule (buildExpressionParser opsLoose tightExprs) 
    651         parsePost   = pp "&postfix:" $ incrOps `Set.union` r_post tights 
     654        parsePost   = pp "&postfix:" $ incrOpsPost `Set.union` r_post tights 
    652655     -- parsePre    = pp "&prefix:"  $ symbPreops `Set.union` r_pre tights 
    653656     -- parsePreNam = pp "&"         $ r_named tights `Set.union` r_opt tights