about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--cpp/013literal_string1
-rw-r--r--cpp/014types1
-rw-r--r--cpp/020run1
-rw-r--r--cpp/041name1
-rw-r--r--cpp/043space1
-rw-r--r--cpp/050scenario2
-rw-r--r--cpp/tangle/030tangle.cc5
7 files changed, 5 insertions, 7 deletions
diff --git a/cpp/013literal_string b/cpp/013literal_string
index 8dc8c1b5..965f3f60 100644
--- a/cpp/013literal_string
+++ b/cpp/013literal_string
@@ -5,6 +5,7 @@
 //: imagine that 'recipe' might one day itself be defined in mu, doing its own
 //: parsing.
 
+:(scenarios add_recipes)
 :(scenario "string_literal")
 recipe main [
   1:address:array:character <- new [abc def]
diff --git a/cpp/014types b/cpp/014types
index f12aa6f8..60f9c845 100644
--- a/cpp/014types
+++ b/cpp/014types
@@ -1,5 +1,6 @@
 //: Textual form for types.
 
+:(scenarios "add_recipes")
 :(scenario "container")
 container foo [
   x:integer
diff --git a/cpp/020run b/cpp/020run
index 02a949f0..164bc5ac 100644
--- a/cpp/020run
+++ b/cpp/020run
@@ -9,7 +9,6 @@
 //: does nothing, and COPY, which can copy numbers from one memory location to
 //: another. Later layers will add more primitives.
 
-:(scenarios run)
 :(scenario copy_literal)
 recipe main [
   1:integer <- copy 23:literal
diff --git a/cpp/041name b/cpp/041name
index 64a416af..f4c1dffd 100644
--- a/cpp/041name
+++ b/cpp/041name
@@ -2,7 +2,6 @@
 //: locations. In mu, a transform called 'convert-names' provides this
 //: convenience.
 
-:(scenarios run)
 :(scenario "convert_names")
 recipe main [
   x:integer <- copy 0:literal
diff --git a/cpp/043space b/cpp/043space
index cc9c161e..4db3c725 100644
--- a/cpp/043space
+++ b/cpp/043space
@@ -2,7 +2,6 @@
 //: and all addresses in arguments are implicitly based on the 'default-space'
 //: (unless they have the /raw property)
 
-:(scenarios run)
 :(scenario "set_default_space")
 # if default-space is 10, and if an array of 5 locals lies from location 11 to 15 (inclusive),
 # then location 0 is really location 11, location 1 is really location 12, and so on.
diff --git a/cpp/050scenario b/cpp/050scenario
index 9fe50f2d..ff2a43dc 100644
--- a/cpp/050scenario
+++ b/cpp/050scenario
@@ -181,5 +181,3 @@ string &rtrim(string &s) {
   s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun<int, int>(isspace))).base(), s.end());
   return s;
 }
-
-:(scenarios run)
diff --git a/cpp/tangle/030tangle.cc b/cpp/tangle/030tangle.cc
index bbd0e178..1e30cc3c 100644
--- a/cpp/tangle/030tangle.cc
+++ b/cpp/tangle/030tangle.cc
@@ -4,12 +4,15 @@
 
 size_t Line_number = 0;
 string Filename;
+string Toplevel = "run";
 
 int tangle(int argc, const char* argv[]) {
   list<string> result;
   for (int i = 1; i < argc; ++i) {
+//?     cerr << "new file " << argv[i] << '\n'; //? 1
     ifstream in(argv[i]);
     Filename = argv[i];
+    Toplevel = "run";
     tangle(in, result);
   }
   for (list<string>::iterator p = result.begin(); p != result.end(); ++p)
@@ -36,8 +39,6 @@ void tangle(istream& in, list<string>& out) {
   trace_all("tangle", out);
 }
 
-string Toplevel = "run";
-
 void process_next_hunk(istream& in, const string& directive, list<string>& out) {
   list<string> hunk;
   hunk.push_back(line_directive(Line_number, Filename));
p;id=d9f8784d4c73a257205f040eeb31414814db56f8'>^
3d1c4216 ^














































c83dca9c ^



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142