✏️ Exercises: designing a concrete syntax
1. Exercice 1: component architecture DSL
We continue the design of the component architecture DSL, started in ✏️ Exercises: designing an abstract syntax. In the following questions we assume we already have an abstract syntax design for this DSL.
1.1. Question 1
After dialoguing with (imaginary) domain experts that will use this DSL, we learn they have the following preferences regarding a textual concrete syntax of the DSL:
-
they prefer lowercase keywords,
-
they prefer keywords over operators (),
-
they prefer whole words (requires, provides) over abreviations (req, prov),
-
they are familiar with braces
{}as delimiters, -
they have experience with programming languages such as C, C++, Java.
Propose a mockup concrete syntax representation of the AST you made in ✏️ Exercises: designing an abstract syntax for this DSL.
2. Exercice 2: robot programming DSL
We continue the design of the robot programming DSL, started in ✏️ Exercises: designing an abstract syntax. In the following questions we assume we already have an abstract syntax design for this DSL.
2.1. Question 1
After dialoguing with (imaginary) domain experts that will use this DSL, we learn they have the following preferences regarding a textual concrete syntax of the DSL:
-
they like concise notations (for example using operators),
-
they prefer abbreviations over whole words, when relevant,
-
they are not familiar with programming languages.
Propose a mockup concrete syntax representation of the AST you made in ✏️ Exercises: designing an abstract syntax for this DSL.