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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
|
--- release 1.3 ---
New feature: Strings opening with a left quote ('`') are typeset as
normal code by mweave; mtangle translates the left quote to a normal
quote, and does macro expansion and module expansion inside. This is
useful if you write strings containing Matlab code, as is done a great
deal in user interface stuff: You get prettyprinted code, identifiers
are indexed, and you can use modules and macros in the string.
The left and right quotes in such a string must be balanced. If you
need an unpaired quote in the string, maybe nested, write `' in a
string, `'`' in a nested string, `'`'`'`' in a nested nested string,
etc. The result is a pair of primes, a quadruple of primes, an
octuple of primes, etc. Opening and closing quotes are typeset using
the \FQL and \FQR macros in mweb.tex. These expand into guillemets,
but this only works if you have the dcr1000 font. If you don't, simply
change the definitions of these macros.
Note that a string may not contain newlines in Matlab; mweave lets
them unchanged, but mtangle removes them; you must therefore add
enough commas or semicolons, as appropriate, to keep the interpreter
happy.
New feature: Identifiers in a "global" declaration are underlined in
the index.
--- release 1.4 ---
Improved rules for if-elseif-else-end constructs; the newline after
the condition is not necessary anymore.
C floating point syntax is used; e.g. "2.5e3" is translated into
"2.5\cdot 10^{3}".
Changed the syntax for formatted strings: each next level is opened
with a single left quote and closed by a single right quote. A quote
in a formatted string is obtained with a double-quote character. This
may be a transpose operator, or the start/end of a real string inside
a formatted string. The rules in matlab.spider are changed
accordingly (simplified). The \FQL and \FQR control sequences expand
into the correct number of guillemets.
mtangle writes a formatted string as a concatenation of short strings,
to prevent overflowing Matlab's input buffer. It also removes line
continuation characters in formatted strings, so that modules that are
used in formatted strings may contain linecons, and can also be used
elsewhere.
Improved the syntax for "if" and "for": newline after the
condition/range is no longer necessary. Single line if...end etc. is
now possible.
--- release 1.5 ---
Tokenize { and } correctly. New reserved words "switch", "case", and
"otherwise" added, plus rules for them.
--- release 2.0 ---
Bug in distrib/Makefile fixed. Prevented mtangle from outputting empty
strings as part of a multiline formatted string.
--- release 2.01 --- Dec 8, 1997 ---
Default delimiter for formatted strings is now single left/right quote;
guillemets are put in mweb.tex as an alternative.
Transpose operators are printed as ^{\prime}.
Some fixes in the rules for if, for, switch.
Better spacing for colons.
Fixed a stupid bug in mathematical expressions.
--- release 2.02 --- Dec 9, 1997 ---
Fixed error in the manual: linecons may be used in formatted strings;
sometimes necessary for mweave to parse it correctly.
Fixed a bug in mtangle that caused problems with strings in formatted
strings in combination with linecons: these strings are now parsed as
real strings, so linecons can be used without problems (and it is more
correct anyway).
Improved spacing, e.g. removed the space between "end" and ";".
Simplified a few rules.
Made the parser more tolerant with unnecessary commas.
Mentioned @% control sequence in the manual.
Fixed some bugs in rules for multiline if/switch conditions.
--- release 2.03 --- Dec 15, 1997 ---
Improved rules for "while" statements.
Bug fix: The backslash isn't handled as an escape character for quotes
anymore. This makes it possible to have a string whose last character
is a backslash.
--- release 2.04 --- Jan 15, 1998 ---
Fix for Matlab 5 new feature: quote after a `{' introduces a string.
Fix for else/elseif clauses on the same line as the previous statement.
--- release 2.05 --- Jan 23, 1998 ---
Recognize quote after a "case" as begin-of-string.
Spaces are retained in the m-file created by mtangle; tabs (and all
control characters below ASCII 33) are converted into spaces. This
will be changed if anyone doesn't like it, but it doesn't seem
harmful.
Controlled comments are handled separately. This allows them to stay
on the same line, and to be formatted without `visible spaces'. The
\CCM control sequence defined in mweb.tex is used to format controlled
comments.
Doubled max_texts and max_scraps in mweave to prevent errors for
extremely long modules.
--- release 2.06 --- May 26, 1998 ---
Bug fix: skip spaces before macro parameter names.
--- release 2.07 --- May 29, 1998 ---
Bug fix: skip spaces before macro args in macro usage
Bug fix: skip spaces before macro parameter list, after parameter
names, and after parameter list.
Bug fix: skip spaces that may occure before the parameter count when a
macro references another macro.
Bug fix: strip spaces at end of macro replacement text to allow
correct stripping of newlines.
Fix fix: when skipping spaces in a macro parameter list, don't skip
newlines.
Added new try...catch...end construct
--- release 2.08 --- May 29, 1998 ---
Implemented custom-formatted identifiers using the special
identifier \textit{TeX}.
Add a small space in weave's output for @+.
Reorganized the source by moving several features to my own version
of Spider.
--- release 2.09 --- Dec 21, 1999 ---
xor operator disappeared from Matlab; became a function.
fixed and documented the example
--- release 2.10 --- May 22, 2000 ---
|