Make trailing commas optional
In msolve v0.7.5, both input files
x, y
0
x,
y
and
x, y
0
x,
y,
are accepted and lead to correct results, while both
x, y
0
x
y
x, y
0
x
y,
give you segmentation fault.
By the documentation, only the first input should be accepted; so to fix the non-conformance issue, you have to break the backward compatibility in v0.7.6, right?
Well, why not make the world a better place if, instead, all four entries are accepted?
How do you handle polynomials that include line breaks? Or one line, multiple polynomial situations?
Good point. If we stick to the specification, such cases are probably to be allowed; In practice, they are not correctly handled, for example in msolve v0.7.5:
x
0
x
+1
Gives a segmentation fault, while
x
0
x, x+1
Gives
[0, [1,
[[[0, 0]]]
]]:
But indeed, if we're heading to fix the multi-line situation, this PR should be closed; I will check if I can solve the above issue in another PR. (EDIT: done in #206.)
This PR is superseded by PR206