This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from string import ascii_lowercase | |
from grammpy import * | |
from grammpy_transforms import ContextFree, InverseContextFree | |
from pyparsers import cyk | |
class Symb(Nonterminal): | |
def get(self): | |
if len(self.to_rule.to_symbols) == 3: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from string import ascii_lowercase | |
from grammpy import * | |
from grammpy_transforms import ContextFree, InverseContextFree, InverseCommon | |
from pyparsers import cyk | |
# Terminals | |
class PlusOperator(Terminal): pass |
NewerOlder