Changeset 18010 for src/Pugs/Parser

Show
Ignore:
Timestamp:
09/20/07 23:03:56 (14 months ago)
Author:
hoelzro
Message:

Added myself to the AUTHORS list, fixed a discrepancy in docs/SEEALSO, and
implemented the yada operators (..., !!!, ???). Tests are soon to follow...

Files:
1 modified

Legend:

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

    r17044 r18010  
    126126yadaLiteral = expRule $ do 
    127127    sym  <- choice . map symbol $ words " ... ??? !!! " 
    128     return $ App (_Var $ doYada sym) Nothing [Val $ VStr (sym ++ " - not yet implemented")] 
    129     where 
    130     doYada "..." = "&fail_" -- XXX rename to fail() eventually 
     128    exp <- option emptyExp ruleExpression 
     129    return $ App (_Var $ doYada sym) Nothing $ 
     130        if exp == emptyExp 
     131            then [(Val $ VStr "Unimplemented stub called")] 
     132            else [exp] 
     133    where 
     134    doYada "..." = "&fail" 
    131135    doYada "???" = "&warn" 
    132136    doYada "!!!" = "&die"