@@ -0,0 +1,1503 @@
+from parglare import Grammar, GLRParser%0A%0A%0Adef test_issue_112_fail_on_empty():%0A%0A    grammar = r'''%0A    sentence1:              subordinateClause* clause sentenceEnd;%0A%0A    subordinateClause:      clause clauseConnector;%0A%0A    clause:                 singleNounPhrase* verbPhrase;%0A%0A    // ----------%0A    singleNounPhrase:       determiner? simpleNoun;%0A    // ----------%0A%0A    verbPhrase:             simpleVerb verbSuffix* predicateEndingSuffix?;%0A%0A    terminals%0A        sentenceEnd:            /%5B%5E:%5D+:(SF);/;%0A        clauseConnector:        /%5B%5E:%5D+:(EC%7CCCF%7CCCMOD%7CCCNOM);/;%0A        determiner:             /%5B%5E:%5D+:(MM);/;%0A        simpleNoun:             /%5B%5E:%5D+:(NNG%7CNNP%7CNNB%7CNR%7CSL%7CNP%7CSN);/;%0A        simpleVerb:             /%5B%5E:%5D+:(VV%7CVVD%7CVHV);/;%0A        verbSuffix:             /%5B%5E:%5D+:(EP%7CTNS);/;%0A        predicateEndingSuffix:  /%5B%5E:%5D+:(SEF%7CEF);/;%0A    '''%0A%0A    g = Grammar.from_string(grammar)%0A    parser = GLRParser(g, build_tree=True)%0A%0A    results = parser.parse('%EC%9E%90%EC%A0%84%EA%B1%B0:NNG; %EC%9E%88:VV; %EC%96%B4%EC%9A%94:SEF; .:SF;')%0A%0A    expected = r'''%0Asentence1%5B0-%3E28%5D%0AsubordinateClause_0%5B0-%3E0%5D%0Aclause%5B0-%3E22%5D%0A  singleNounPhrase_0%5B0-%3E8%5D%0A    singleNounPhrase_1%5B0-%3E8%5D%0A      singleNounPhrase%5B0-%3E8%5D%0A        determiner_opt%5B0-%3E0%5D%0A        simpleNoun%5B0-%3E8, %22%EC%9E%90%EC%A0%84%EA%B1%B0:NNG;%22%5D%0A  verbPhrase%5B9-%3E22%5D%0A    simpleVerb%5B9-%3E14, %22%EC%9E%88:VV;%22%5D%0A    verbSuffix_0%5B15-%3E15%5D%0A    predicateEndingSuffix_opt%5B15-%3E22%5D%0A      predicateEndingSuffix%5B15-%3E22, %22%EC%96%B4%EC%9A%94:SEF;%22%5D%0AsentenceEnd%5B23-%3E28, %22.:SF;%22%5D%0A%0A'''%0A%0A    assert len(results) == 1%0A    assert results%5B0%5D.tree_str().strip() == expected.strip()%0A

Add regression test for issue #112