Ticket #7162: 7162.patch

File 7162.patch, 928 bytes (added by afarmer, 3 years ago)

Patch to parser to support specifying RULES that never automatically fire

  • compiler/parser/Parser.y.pp

    From 4643d45b774bbc3fb444bbcb15d546f277bde912 Mon Sep 17 00:00:00 2001
    From: Andrew Farmer <[email protected]>
    Date: Thu, 4 Oct 2012 16:51:28 -0500
    Subject: [PATCH] Extend parser to allow specification of RULES that never
     fire. #7162
    
    ---
     compiler/parser/Parser.y.pp |    1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/compiler/parser/Parser.y.pp b/compiler/parser/Parser.y.pp
    index 718adca..19b9b1c 100644
    a b activation :: { Maybe Activation } 
    876876explicit_activation :: { Activation }  -- In brackets
    877877        : '[' INTEGER ']'               { ActiveAfter  (fromInteger (getINTEGER $2)) }
    878878        | '[' '~' INTEGER ']'           { ActiveBefore (fromInteger (getINTEGER $3)) }
     879        | '[' '~' ']'                   { NeverActive }
    879880
    880881rule_forall :: { [RuleBndr RdrName] }
    881882        : 'forall' rule_var_list '.'            { $2 }