예제 #1
0
파일: test.py 프로젝트: Hbaf/Compilers
 def test2(self):
     self.assertTrue(check('bcdaa'))
예제 #2
0
파일: test.py 프로젝트: Hbaf/Compilers
 def test7(self):
     self.assertFalse(check('BdR'))
예제 #3
0
파일: test.py 프로젝트: Hbaf/Compilers
 def test1(self):
     self.assertTrue(check('bcdc'))
예제 #4
0
파일: test.py 프로젝트: Hbaf/Compilers
 def test6(self):
     self.assertFalse(check('abc'))
예제 #5
0
파일: test.py 프로젝트: Hbaf/Compilers
 def test5(self):
     self.assertTrue(check('bcdacbcaa'))
예제 #6
0
파일: test.py 프로젝트: Hbaf/Compilers
 def test4(self):
     self.assertTrue(check('bcdacbcc'))
예제 #7
0
파일: test.py 프로젝트: Hbaf/Compilers
 def test3(self):
     self.assertTrue(check('bcdacc'))
예제 #8
0
파일: main.py 프로젝트: Hbaf/Compilers
from grammar_checker import check
from common import *
while True:
    string = input()
    if is_input_valid(string) and check(string):
        print('String is correct')
    else:
        print('String is not part of grammar')