Stratego/XT JIRA  History | Log In     View a printable version of the current page. Get help!  
Issue Details (XML | Word)

Key: STR-1
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Martin Bravenboer
Reporter: Rob Vermaas
Votes: 0
Watchers: 0
Operations

Clone this issue
Create sub-task
If you were logged in you would be able to see more operations.
Stratego/XT

if-then-else operator

Created: 2004-03-18 08:28   Updated: 2008-03-31 20:39
Component/s: Language concepts
Affects Version/s: None
Fix Version/s: 0.10

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide
See the discussion on stratego-dev, e.g.:
https://mail.cs.uu.nl/pipermail/stratego-dev/2004q1/000676.html

 All   Comments   Work Log   Change History      Sort Order:
Martin Bravenboer [2004-04-08 06:59]
The disambiguation of the if-then-else operator isn't ok. The current implementation, which is the best I've been able to achieve without obfuscating the whole grammar, allows:

"s ; if s then s else s ; s"
  "s + if s then s else s + s"

but not:

"s ; if s then s else s + s"
  "s + if s then s else s ; s"

I've no idea how to solve this completely in an acceptable way. The solution in the "Disambiguation Filters For Scannerless Generalized LR Parsers" article is ambiguous as well.

Martin Bravenboer [2004-04-08 08:27]
Arthur & Rob suggested that using an "end" is fine. This has now been implemented in stratego-front.

Martin Bravenboer [2004-04-10 15:37]
if-then-else-end is the solution for now.