The StrategoXT <string-to-real> strategy returns a java exception when the format doesn’t match, whereas <string-to-int> simply fails when the input is not convertible. This causes the run to break rather than it looking for strategies that might succeed.

I don’t know whether this is the intended functionality?

Submitted by Jeffrey Goderie on 27 October 2015 at 15:20

On 27 October 2015 at 15:48 Vlad Vergu commented:

Thank you for reporting. I agree that the behavior of this strategy is unexpected and incorrect. Therefore i think it’s a valid issue. I will push a fix for this tonight. Expect the strategy to fail in case of a malformed string.

To make the behavior consistent i will also update string-to-int related strategies to have the same behavior.


On 27 October 2015 at 15:48 Vlad Vergu tagged @vvergu

On 30 October 2015 at 07:48 Vlad Vergu commented:

This is now fixed in Spoofax Nightly and Spoofax Core Nightly.


On 30 October 2015 at 07:48 Vlad Vergu closed this issue.

Log in to post comments