metaborg / spoofax-pie

Spoofax implementation using PIE pipelines
Apache License 2.0
12 stars 9 forks source link

SPT syntax tests succeed even if the parse result is ambiguous #41

Closed molenzwiebel closed 3 years ago

molenzwiebel commented 3 years ago

Summary

A parse test that yields an ambiguous AST succeeds, whereas the same test in Spoofax 2 would fail.

What you did

SDF3:

Term.Lit = INT
Term.Add = Term "+" Term

SPT:

test ambiguous [[
3 + 1 + 2
]] parse succeeds

What you expected to happen

The test fails.

What actually happened

The test succeeds.

Context

Additional information

Especially annoying because the WebLab tests for CS4200 still use Spoofax 2, so students end up having a solution that works in their own Eclipse but fails on WebLab (rightfully so, since it is ambiguous).

Gohla commented 3 years ago

I'm changing it to:

Do you think that is ok?

Gohla commented 3 years ago

Fixed by https://github.com/metaborg/spoofax-pie/commit/c4be02cffd6a7235cfd5229d47528a6a2c5dfd68