Closed ontholerian closed 7 years ago
I finally got some time to look at the code into this issue, and I think I found where the problem is. The issue appears to be an assertion that there must be a space character following the string for it to be valid. See lines 2868-2870 of parser.c. This would not be the case if the string is the last thing in the line. If I understand how this string parser should work, this assertion is also incorrect in the case of a quoted string followed immediately by a non-space character string, as I can demonstrate in this second set of example files.
I did not submit any corrections to this part of the code, as I am sure I am missing some use cases or expected behaviors and so any changes I may make will likely break the expected behavior of this parser.
.
The string parser works as long as it is not the last thing on the line. It fails when it is the last element.
To reproduce the bug, see the example log.txt run through the rules in stringrules.txt. The first two lines fail because their respective rules expect the last element to be a string. The last two lines succeed since the string has something else tailing it. As a control, I tried using the older word parser (see wordrules.txt), which works fine on all four lines.
log.txt stringrules.txt wordrules.txt