LastCalc
LastCalc copied to clipboard
Try a broader search strategy than best-first with backtracking
LastCalc currently explores all possible parses using a "best first with backtracking" strategy, where "best" is loosely defined to be the shortest token list, but specifically defined in ParseStep.getScore().
The problem is that this can sometimes result in the correct parse approach being overlooked.
An alternate approach might involve, with some random probability, trying alternate parsers on ParseSteps other than the current most promising one.
The various benchmarks in the SequentialParserTest (which count the number of steps required to parse something) can be used to ensure that it doesn't slow LastCalc down.