Ex. 01 Task 1: Parentheses for multiple >> operations

Moderatoren: pmueller, SE - Design and Construction

labataschö
Windoof-User
Windoof-User
Beiträge: 37
Registriert: 15. Apr 2015 16:43

Ex. 01 Task 1: Parentheses for multiple >> operations

Beitrag von labataschö »

Hi,

if we encounter an intermediate step like

Code: Alles auswählen

Lin(Foo, Lin(Bar) >> Lin(FooBar) >> Lin(BarFoo))
is it okay to omit the parentheses (like in the slides)? Or do we need to write

Code: Alles auswählen

Lin(Foo, Lin(Bar) >> (Lin(FooBar) >> Lin(BarFoo)))
instead?

Greetings,
labataschö

pmueller
Moderator
Moderator
Beiträge: 87
Registriert: 25. Jan 2018 11:14

Re: Ex. 01 Task 1: Parentheses for multiple >> operations

Beitrag von pmueller »

Hi,

in our DSL, the >> operator is modeled using a class, and you only can use it in a prefix way, i.e.:

Code: Alles auswählen

Lin(Bar) >> Lin(FooBar)
is written as:

Code: Alles auswählen

>>(Lin(Bar),Lin(FooBar)) 
As a consequence, you cannot omit the parentheses.

Best,
Patrick

Antworten

Zurück zu „Software Engineering - Design and Construction“