예제 #1
0
def check_fail(text):
    try:
        grammar.process(text)
    except:
        pass
    else:
        grammar.process(text, debug=True)
        raise Exception('was supposed to fail on \'%s\'' % text.encode('string_escape'))
예제 #2
0
def check_fail(text):
    try:
        grammar.process(text)
    except:
        pass
    else:
        grammar.process(text, debug=True)
        raise Exception('was supposed to fail on \'%s\'' %
                        text.encode('string_escape'))
예제 #3
0
def check_parse(text):
    try:
        return grammar.process(text)
    except:
        return grammar.process(text, debug=True)
예제 #4
0
 def meta(self, *a, **b):
     result = grammar.process(text)
     self.assertEquals(str(result), text)
예제 #5
0
def check_parse(text):
    try:
        return grammar.process(text)
    except:
        return grammar.process(text, debug=True)
예제 #6
0
 def meta(self, *a, **b):
     result = grammar.process(text)
     self.assertEquals(str(result), text)