Skip to content

Commit d747f4e

Browse files
authored
Update concrete-syntax.md
Document the workaround for now.
1 parent 375d89a commit d747f4e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

content/howtos/stratego/concrete-syntax.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,13 @@ Note that the constructor `FromTerm` indicates that productions represent anti-q
108108
Using anti-quotations might make the fragment of the target language quite verbose. Therefore, it is also possible to define variables as shortcuts to anti-quotations. For example, the productions below define variables to reference anti-quotations to `Type` fragments. That is, instead of reference to a Stratego variable `X` by using `~type:X`, one may name this variable `t_1` which corresponds to a variable for a non-terminal `Type`.
109109

110110
```sdf3
111-
variables
112-
Type = "t_" [0-9\']* {prefer}
111+
context-free syntax
112+
Type.meta-var = "t_" [0-9\']* {prefer}
113113
```
114114

115+
!!! note "This special `meta-var` constructor is a workaround for a bug in the `variables` section translation in the SDF3 compiler."
116+
117+
115118
The `prefer` annotation indicates that in case of an ambiguity, the variable production should be preferred.
116119

117120
Using the three types of productions above, it is possible to specify which fragments one wants to write using concrete syntax and which symbols may appear inside these fragments as Stratego variables (using anti-quotation or variables with a specific name).

0 commit comments

Comments
 (0)