SamyaDaleh / CL-Toolbox

A Parsing-as-Deduction system that parses with different parsing algorithms and some related tools for educational purposes.
7 stars 4 forks source link

NPE in Conversion to Schema for TAG Earley Prefix Valid #231

Closed SamyaDaleh closed 4 years ago

SamyaDaleh commented 4 years ago
java.lang.NullPointerException
    at com.github.samyadaleh.cltoolbox.chartparsing.converter.tag.TagToEarleyPrefixValidRulesConverter.tagToEarleyPrefixValidRules(TagToEarleyPrefixValidRulesConverter.java:21)
    at com.github.samyadaleh.cltoolbox.chartparsing.converter.GrammarToDeductionRulesConverter.convertToSchema(GrammarToDeductionRulesConverter.java:93)
    at com.github.samyadaleh.cltoolbox.cli.Main.parseTagFileAndConvertToSchema(Main.java:237)
    at com.github.samyadaleh.cltoolbox.cli.Main.parseGrammarReaderAndConvertToParsingSchema(Main.java:170)
    at com.gitlab.samyadaleh.cltaskbox.rest.DeductionRestController.returnParseTrace(DeductionRestController.java:58)

With this grammar:

G = <N, T, I, A, S>
N = {N0}
T = {t0, t1}
I = {α1 : (N0 (ε )), α2 : (N0 (ε )), α3 : (N0 (t0 )(N0 )), α4 : (N0 (ε )), α5 : (N0 (t1 )), α6 : (N0 (ε ))}
A = {}
S = N0
SamyaDaleh commented 4 years ago

Welp, I fixed two other bugs while searching for this one! Still on it.

SamyaDaleh commented 4 years ago

Fixed, thanks!