forked from GitHub/gf-core
(Tutorial) Fix to make calculator example compile
In abstract: startcat needs to be defined to run the commands that are shown later in the doc. In concrete: ss and SS are defined in Prelude.
This commit is contained in:
@@ -4200,7 +4200,8 @@ We construct a calculator with addition, subtraction, multiplication, and
|
|||||||
division of integers.
|
division of integers.
|
||||||
```
|
```
|
||||||
abstract Calculator = {
|
abstract Calculator = {
|
||||||
|
flags startcat = Exp ;
|
||||||
|
|
||||||
cat Exp ;
|
cat Exp ;
|
||||||
|
|
||||||
fun
|
fun
|
||||||
@@ -4226,7 +4227,7 @@ We begin with a
|
|||||||
concrete syntax that always uses parentheses around binary
|
concrete syntax that always uses parentheses around binary
|
||||||
operator applications:
|
operator applications:
|
||||||
```
|
```
|
||||||
concrete CalculatorP of Calculator = {
|
concrete CalculatorP of Calculator = open Prelude in {
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
Exp = SS ;
|
Exp = SS ;
|
||||||
|
|||||||
Reference in New Issue
Block a user