

class Rule:
    pass


from grammpy import EPSILON


class Rule:
    right = [EPSILON]
    left = [EPSILON]
    rule = ([EPSILON], [EPSILON])
    rules = [([EPSILON], [EPSILON])]

    def is_regular(self):
        return False

    def is_contextfree(self):
        return False

    def is_context(self):
        return False

    def is_unrestricted(self):
        return False

Add base interface for rule
Add base interface for rule

+ 
+ from grammpy import EPSILON
  
  
  class Rule:
-     pass
+     right = [EPSILON]
+     left = [EPSILON]
+     rule = ([EPSILON], [EPSILON])
+     rules = [([EPSILON], [EPSILON])]
  
+     def is_regular(self):
+         return False
+ 
+     def is_contextfree(self):
+         return False
+ 
+     def is_context(self):
+         return False
+ 
+     def is_unrestricted(self):
+         return False
+ 
Add base interface for rule
## Code Before:


class Rule:
    pass

## Instruction:
Add base interface for rule
## Code After:

from grammpy import EPSILON


class Rule:
    right = [EPSILON]
    left = [EPSILON]
    rule = ([EPSILON], [EPSILON])
    rules = [([EPSILON], [EPSILON])]

    def is_regular(self):
        return False

    def is_contextfree(self):
        return False

    def is_context(self):
        return False

    def is_unrestricted(self):
        return False
