Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: tests/standalone/io/addlatexhash_test_src.tex

Issue 652993005: Working insertion of hash values; added a few labels in spec (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Working insertion of hash values (fix: invokes dart with full path) Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/standalone/io/addlatexhash_test.dart ('k') | tools/addlatexhash.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 \documentclass{article}
2 \usepackage{epsfig}
3 \usepackage{color}
4 \usepackage{dart}
5 \usepackage{bnf}
6 \usepackage{hyperref}
7 \usepackage{lmodern}
8 \newcommand{\code}[1]{{\sf #1}}
9 \title{Test File used by addlatexhash}
10
11 \begin{document}
12 \maketitle
13 \tableofcontents
14 \newpage
15
16 \pagestyle{myheadings}
17 \markright{Test file used by addlatexhash}
18
19 % begin Ecma boilerplate
20 \section{Scope}
21 \LMLabel{ecmaScope}
22
23 % Selected certain paragraphs from the spec, created exactly eight
24 % copies of each of them, modifying the copies in ways that should
25 % not affect the hash values; to verify correct behavior, grep for
26 % '^ *\\LMHash' in the output LaTeX source or take every 2nd line
27 % from the list file, and check that the sequence of hashes consists
28 % of subsequences of identical values, all with length eight.
29
30 % Test a "normal" paragraph -------------------------------------------
31
32 %0 original
33 \LMHash{}
34 This Ecma standard specifies the syntax and semantics of the Dart programming la nguage. It does not specify the APIs of the Dart libraries except where those l ibrary elements are essential to the correct functioning of the language itself (e.g., the existence of class \cd{Object} with methods such as \cd{noSuchMethod} , \cd{runtimeType}).
35
36 %1 enlarge white space; NB: cannot add new white space, just enlarge
37 \LMHash{}
38 This Ecma standard specifies the syntax and semantics of the Dart progra mming language. It does not specify the APIs of the Dart libraries e xcept where those library elements are essential to the correct functioning of t he language itself (e.g., the existence of class \cd{Object} with methods such a s \cd{noSuchMethod}, \cd{runtimeType}).
39
40 %2 insert extra newlines
41 \LMHash{}
42 This Ecma standard specifies the syntax and semantics of the Dart
43 programming language. It does not specify the APIs of the Dart
44 libraries except where those library elements are essential to the
45 correct functioning of the language itself (e.g., the existence of
46 class \cd{Object} with methods such as \cd{noSuchMethod},
47 \cd{runtimeType}).
48
49 %3 insert comments
50 \LMHash{}
51 This Ecma standard specifies the syntax and semantics of the Dart % blah
52 programming language. It does not specify the APIs of the Dart%blah
53 libraries except where those library elements are essential to the% blah
54 correct functioning of the language itself (e.g., the existence of
55 class \cd{Object} with methods such as \cd{noSuchMethod},
56 \cd{runtimeType}). % blah blah
57
58 %4 insert commentary
59 \LMHash{}
60 This Ecma standard specifies the syntax and semantics of the Dart programming la nguage. It does not specify the APIs of the Dart libraries except where those l ibrary elements are \commentary{whatever} essential to the correct functioning o f the language itself (e.g., the existence of class \cd{Object} with methods suc h as \cd{noSuchMethod}, \cd{runtimeType}).
61
62 %5 insert rationale
63 \LMHash{}
64 This Ecma standard specifies the syntax and semantics of the Dart programming la nguage. It does not specify the APIs of the \rationale{whatever} Dart libraries except where those library elements are essential to the correct functioning of the language itself (e.g., the existence of class \cd{Object} with methods such as \cd{noSuchMethod}, \cd{runtimeType}).
65
66 %6 insert nested rationale/commentary
67 \LMHash{}
68 This Ecma standard specifies \rationale{whatever \commentary{whatever}} the synt ax and semantics of the Dart programming language. It does not specify the APIs of the Dart libraries except where those library elements are essential to the correct functioning of the language itself (e.g., the existence of class \cd{Obj ect} with methods such as \cd{noSuchMethod}, \cd{runtimeType}).
69
70 %7 insert all; note that this block ends with more blank lines, too
71 \LMHash{}
72 This Ecma standard specifies the syntax \rationale{whatever \commentary{whatever}} and semantics of the Dart programming language. It does not specify the APIs of the
73 Dart libraries except where those library elements are
74 essential to the correct functioning of
75 the language itself (e.g., the existence of class
76 \cd{Object} with methods such as \cd{noSuchMethod}, \cd{runtimeType}).
77
78
79
80
81
82 \section{Conformance}
83 \LMLabel{ecmaConformance}
84
85 % Test a paragraph including math mode --------------------------------
86
87 %0 original
88 \LMHash{}
89 A list $x_1, \ldots, x_n$ denotes any list of $n$ elements of the form $x_i, 1 \ le i \le n$. Note that $n$ may be zero, in which case the list is empty. We use such lists extensively throughout this specification.
90
91 %1 enlarge white space in math mode; NB: cannot add new ws, even in math mode
92 \LMHash{}
93 A list $x_1, \ldots, x_n$ denotes any list of $n$ elements of the fo rm $x_i, 1 \le i \le n$. Note that $n$ may be zero, in which case the list is em pty. We use such lists extensively throughout this specification.
94
95 %2 enlarge other white space
96 \LMHash{}
97 A list $x_1, \ldots, x_n$ denotes any list of $n$ elements
98 of the form $x_i, 1 \le i \le n$.
99 Note that $n$ may be zero, in
100 which case the list is empty. We use such lists
101 extensively throughout this
102 specification.
103
104 %3 add comments, also in math mode
105 \LMHash{}
106 A list $x_1, \ldots, x_n$ denotes any list of $n$ elements% blah % blah
107 of the form $x_i, 1% blah
108 \le i % blah
109 \le n$. Note that $n$ may be zero, in which
110 % blah blah %
111 case the list is empty. We use such lists extensively throughout this
112 specification.
113
114 %4 even multiple newlines do not count when before '$'
115 \LMHash{}
116 A list $x_1, \ldots, x_n$ denotes any list of $n$ elements of the form
117
118
119 $x_i, 1 \le i \le n$. Note that $n$ may be zero, in which case the list is empty . We use such lists extensively throughout this specification.
120
121 %5 multiple new lines and leading ws before '$', and comments
122 \LMHash{}
123 A list $x_1, \ldots, x_n$ denotes any list of $n$ elements of the form $x_i, 1 \ le i \le n$. Note that
124
125 % blah blah blah blah blah blah blah blah
126 % blah blah blah blah blah blah blah blah
127 % blah blah blah blah blah blah blah blah
128 % blah blah blah blah blah blah blah blah
129
130 $n$ may be zero, in which case the list is empty. We use such lists ext ensively throughout this specification.
131
132 %6 precede paragraph with comments
133 \LMHash{}
134 % blah
135 % blah
136 %
137 A list $x_1, \ldots, x_n$ denotes any list of $n$ elements of the form $x_i, 1 \ le i \le n$. Note that $n$ may be zero, in which case the list is empty. We use such lists extensively throughout this specification.
138
139 %7 insert comment lines in the middle of the paragraph
140 \LMHash{}
141 A list $x_1, \ldots, x_n$ denotes any list of $n$ elements of the form $x_i, 1 \ le i \le n$. Note that $n$ may be zero,
142 %
143 % blah
144 %
145 in which case the list is empty. We use such lists extensively throughout this s pecification.
146
147
148 % Test paragraph plus dartCode, with commentary -----------------------
149
150 %0 original
151 \LMHash{}
152 If a declaration $d$ named $n$ is in the namespace induced by a scope $S$, then $d$ {\em hides} any declaration named $n$ that is available in the lexically en closing scope of $S$.
153
154 \commentary {
155 A consequence of these rules is that it is possible to hide a type with a method or variable.
156 Naming conventions usually prevent such abuses. Nevertheless,the following progr am is legal:
157 }
158
159 \begin{dartCode}
160 \CLASS{} HighlyStrung \{
161 String() $=>$ "?";
162 \}
163 \end{dartCode}
164
165 %1 delete/insert in the commentary, altering number of paragraphs in there
166 \LMHash{}
167 If a declaration $d$ named $n$ is in the namespace induced by a scope $S$, then $d$ {\em hides} any declaration named $n$ that is available in the lexically en closing scope of $S$.
168
169 \commentary {% NB: this space before brace begin is ignored by LaTeX
170 New paragraph.
171
172 New paragraph new paragraph new paragraph new paragraph new paragraph new paragr aph new paragraph new paragraph new paragraph new paragraph new paragraph new pa ragraph new paragraph new paragraph new paragraph new paragraph new paragraph.
173
174 New paragraph,
175 new paragraph, and
176 new paragraph. % blah \commentary{ with unbalanced '{'
177
178 \rationale{nested rationale}
179
180 Naming conventions usually prevent such abuses. Nevertheless,the following progr am is legal:
181 }
182
183 \begin{dartCode}
184 \CLASS{} HighlyStrung \{
185 String() $=>$ "?";
186 \}
187 \end{dartCode}
188
189 %2 remove commentary entirely, including newlines
190 \LMHash{}
191 If a declaration $d$ named $n$ is in the namespace induced by a scope $S$, then $d$ {\em hides} any declaration named $n$ that is available in the lexically en closing scope of $S$.
192
193 \begin{dartCode}
194 \CLASS{} HighlyStrung \{
195 String() $=>$ "?";
196 \}
197 \end{dartCode}
198
199 %3 change the amount of indentation in dartCode
200 \LMHash{}
201 If a declaration $d$ named $n$ is in the namespace induced by a scope $S$, then $d$ {\em hides} any declaration named $n$ that is available in the lexically en closing scope of $S$.
202
203 \commentary {
204 A consequence of these rules is that it is possible to hide a type with a method or variable.
205 Naming conventions usually prevent such abuses. Nevertheless,the following progr am is legal:
206 }
207
208 \begin{dartCode}
209 \CLASS{} HighlyStrung \{
210 String() $=>$ "?";
211 \}
212 \end{dartCode}
213
214 %4 change other white space in dartCode
215 \LMHash{}
216 If a declaration $d$ named $n$ is in the namespace induced by a scope $S$, then $d$ {\em hides} any declaration named $n$ that is available in the lexically en closing scope of $S$.
217
218 \commentary {
219 A consequence of these rules is that it is possible to hide a type with a method or variable.
220 Naming conventions usually prevent such abuses. Nevertheless,the following progr am is legal:
221 }
222
223 \begin{dartCode}
224
225 \CLASS{} HighlyStrung \{
226 String() $=>$ "?";
227
228
229 \}
230 \end{dartCode}
231
232 %5 add comments in dartCode
233 \LMHash{}
234 If a declaration $d$ named $n$ is in the namespace induced by a scope $S$, then $d$ {\em hides} any declaration named $n$ that is available in the lexically en closing scope of $S$.
235
236 \commentary {
237 A consequence of these rules is that it is possible to hide a type with a method or variable.
238 Naming conventions usually prevent such abuses. Nevertheless,the following progr am is legal:
239 }
240
241 \begin{dartCode}
242 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
243 \CLASS{} HighlyStrung \{
244 String() $=>$ "?";% blah % blah
245 \} % blah
246 %blah
247 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
248 \end{dartCode}
249
250 %6 remove commentary
251 \LMHash{}
252 If a declaration $d$ named $n$ is in the namespace induced by a scope $S$, then $d$ {\em hides} any declaration named $n$ that is available in the lexically en closing scope of $S$.
253
254 \begin{dartCode}
255 \CLASS{} HighlyStrung \{
256 String() $=>$ "?";
257 \}
258 \end{dartCode}
259
260 %7 add comment lines after the block
261 \LMHash{}
262 If a declaration $d$ named $n$ is in the namespace induced by a scope $S$, then $d$ {\em hides} any declaration named $n$ that is available in the lexically en closing scope of $S$.
263
264 \commentary {
265 A consequence of these rules is that it is possible to hide a type with a method or variable.
266 Naming conventions usually prevent such abuses. Nevertheless,the following progr am is legal:
267 }
268
269 \begin{dartCode}
270 \CLASS{} HighlyStrung \{
271 String() $=>$ "?";
272 \}
273 \end{dartCode}
274
275 % blah blah blah blah blah blah blah blah blah
276 % blah blah blah blah blah blah blah blah blah
277 % blah blah blah blah blah blah blah blah blah
278 % no blank lines before \section this time
279 \section{Variables}
280 \LMLabel{variables}
281
282 % Test paragraph followed by grammar ----------------------------------
283
284 %0 original
285 \LMHash{}
286 Variables are storage locations in memory.
287
288 \begin{grammar}
289 {\bf variableDeclaration:}
290 declaredIdentifier (`,' identifier)*
291 .
292
293 {\bf declaredIdentifier:}
294 metadata finalConstVarOrType identifier
295 .
296
297 {\bf finalConstVarOrType:}\FINAL{} type?;
298 \CONST{} type?;
299 varOrType
300 .
301
302 {\bf varOrType:}\VAR{};
303 type
304 .
305
306 {\bf initializedVariableDeclaration:}
307 declaredIdentifier (`=' expression)? (`,' initializedIdentifier)* % could do top level here
308 .
309
310 {\bf initializedIdentifier:}
311 identifier (`=' expression)? % could do top-level here
312 .
313
314 {\bf initializedIdentifierList:}
315 initializedIdentifier (`,' initializedIdentifier)*
316 .
317
318
319
320
321 \end{grammar}
322
323 %1 collecting grammar rules on single lines
324 \LMHash{}
325 Variables are storage locations in memory.
326
327 \begin{grammar}
328 {\bf variableDeclaration:} declaredIdentifier (`,' identifier)* .
329
330 {\bf declaredIdentifier:} metadata finalConstVarOrType identifier .
331
332 {\bf finalConstVarOrType:}\FINAL{} type?; \CONST{} type?; varOrType .
333
334 {\bf varOrType:}\VAR{}; type .
335
336 {\bf initializedVariableDeclaration:} declaredIdentifier (`=' expression)? (`, ' initializedIdentifier)* .
337
338 {\bf initializedIdentifier:} identifier (`=' expression)? .
339
340 {\bf initializedIdentifierList:} initializedIdentifier (`,' initializedIdentif ier)* .
341 \end{grammar}
342
343 %2 adding comments to grammar
344 \LMHash{}
345 Variables are storage locations in memory.
346
347 \begin{grammar}% blah
348 %blah
349 {\bf variableDeclaration:}%blah
350 declaredIdentifier (`,' identifier)*%blah
351 .%blah
352 %blah
353 {\bf declaredIdentifier:}
354 metadata finalConstVarOrType identifier
355 .
356
357 {\bf finalConstVarOrType:}\FINAL{} type?;
358 \CONST{} type?;
359 varOrType
360 .
361
362 {\bf varOrType:}\VAR{};
363 type
364 .
365
366 {\bf initializedVariableDeclaration:}
367 declaredIdentifier (`=' expression)? (`,' initializedIdentifier)* % could do top level here
368 .
369
370 {\bf initializedIdentifier:}
371 identifier (`=' expression)? % could do top-level here
372 .
373
374 {\bf initializedIdentifierList:}
375 initializedIdentifier (`,' initializedIdentifier)*
376 .% blah
377
378
379
380 %blah
381 \end{grammar}%blah
382
383 %3 removing empty lines from grammar
384 \LMHash{}
385 Variables are storage locations in memory.
386
387 \begin{grammar}
388 {\bf variableDeclaration:}
389 declaredIdentifier (`,' identifier)*
390 .
391 {\bf declaredIdentifier:}
392 metadata finalConstVarOrType identifier
393 .
394 {\bf finalConstVarOrType:}\FINAL{} type?;
395 \CONST{} type?;
396 varOrType
397 .
398 {\bf varOrType:}\VAR{};
399 type
400 .
401 {\bf initializedVariableDeclaration:}
402 declaredIdentifier (`=' expression)? (`,' initializedIdentifier)* % could do top level here
403 .
404 {\bf initializedIdentifier:}
405 identifier (`=' expression)? % could do top-level here
406 .
407 {\bf initializedIdentifierList:}
408 initializedIdentifier (`,' initializedIdentifier)*
409 .
410 \end{grammar}
411
412 %4 inserting comment block in grammar
413 \LMHash{}
414 Variables are storage locations in memory.
415
416 \begin{grammar}
417 {\bf variableDeclaration:}
418 declaredIdentifier (`,' identifier)*
419 .
420
421 {\bf declaredIdentifier:}
422 metadata finalConstVarOrType identifier
423 .
424
425 {\bf finalConstVarOrType:}\FINAL{} type?;
426 \CONST{} type?;
427 varOrType
428 .
429
430 {\bf varOrType:}\VAR{};
431 type
432 .
433 %% {\bf finalConstVarOrType:}\FINAL{} type?;
434 %% \CONST{} type?;
435 %% varOrType
436 %% .
437
438 %% {\bf varOrType:}\VAR{};
439 %% type
440 %% .
441
442
443 {\bf initializedVariableDeclaration:}
444 declaredIdentifier (`=' expression)? (`,' initializedIdentifier)* % could do top level here
445 .
446
447 {\bf initializedIdentifier:}
448 identifier (`=' expression)? % could do top-level here
449 .
450
451 {\bf initializedIdentifierList:}
452 initializedIdentifier (`,' initializedIdentifier)*
453 .
454
455
456
457
458 \end{grammar}
459
460 %5 adding commentary/rationale in grammar (may not happen, is OK anyway)
461 \LMHash{}
462 Variables are storage locations in memory.
463
464 \begin{grammar}
465 {\bf variableDeclaration:}
466 declaredIdentifier (`,' identifier)*
467 .
468
469 {\bf declaredIdentifier:}
470 metadata finalConstVarOrType identifier
471 .
472
473 \rationale{blah \commentary{blah}}
474 {\bf finalConstVarOrType:}\FINAL{} type?;
475 \CONST{} type?;
476 varOrType
477 .
478
479 {\bf varOrType:}\VAR{};
480 type
481 .
482
483 {\bf initializedVariableDeclaration:}
484 declaredIdentifier (`=' expression)? (`,' initializedIdentifier)* % could do top level here
485 .
486
487 {\bf initializedIdentifier:}
488 identifier (`=' expression)? % could do top-level here
489 .
490
491 {\bf initializedIdentifierList:}
492 initializedIdentifier (`,' initializedIdentifier)*
493 .
494
495
496
497
498 \end{grammar}
499
500 %6 inserting newlines in grammar (not new paragraph, only at existing ws)
501 \LMHash{}
502 Variables are storage locations in memory.
503
504 \begin{grammar}
505 {\bf variableDeclaration:}
506 declaredIdentifier
507 (`,'
508 identifier)*
509 .
510
511 {\bf declaredIdentifier:}
512 metadata finalConstVarOrType
513 identifier
514 .
515
516 {\bf
517 finalConstVarOrType:}\FINAL{}
518 type?;
519 \CONST{} type?;
520 varOrType
521 .
522
523 {\bf varOrType:}\VAR{};
524 type
525 .
526
527 {\bf initializedVariableDeclaration:}
528 declaredIdentifier (`=' expression)?
529 (`,' initializedIdentifier)*
530 % could do top level here
531 .
532
533 {\bf initializedIdentifier:}
534 identifier (`=' expression)? % could do top-level here
535 .
536
537 {\bf initializedIdentifierList:}
538 initializedIdentifier (`,' initializedIdentifier)*
539 .
540
541
542
543
544 \end{grammar}
545
546 %7
547 \LMHash{}
548 Variables are storage locations in memory.
549
550 \begin{grammar}
551 {\bf variableDeclaration:}
552 declaredIdentifier (`,' identifier)*
553 .
554
555 {\bf declaredIdentifier:}
556 metadata finalConstVarOrType identifier
557 .
558
559 {\bf finalConstVarOrType:}\FINAL{} type?;
560 \CONST{} type?;
561 varOrType
562 .
563
564 {\bf varOrType:}\VAR{};
565 type
566 .
567
568 {\bf initializedVariableDeclaration:}
569 declaredIdentifier (`=' expression)? (`,' initializedIdentifier)* % could do top level here
570 .
571
572 {\bf initializedIdentifier:}
573 identifier (`=' expression)? % could do top-level here
574 .
575
576 {\bf initializedIdentifierList:}
577 initializedIdentifier (`,' initializedIdentifier)*
578 .
579
580
581
582
583 \end{grammar}
584
585 \subsection{Evaluation of Implicit Variable Getters}
586 \LMLabel{evaluationOfImplicitVariableGetters}
587
588 % Test itemized list, right after paragraph ---------------------------
589
590 %0 original
591 \LMHash{}
592 Let $d$ be the declaration of a static or instance variable $v$. If $d$ is an i nstance variable, then the invocation of the implicit getter of $v$ evaluates t o the value stored in $v$.
593 If $d$ is a static or library variable then the implicit getter method of $v$ ex ecutes as follows:
594 \begin{itemize}
595 \item {\bf Non-constant variable declaration with initializer}. If $d$ is of one of the forms \code{\VAR{} $v$ = $e$;} , \code{$T$ $v$ = $e$;} , \code{\FINAL {} $v$ = $e$;} , \code{\FINAL{} $T$ $v$ = $e$;}, \code{\STATIC{} $v$ = $e$; }, \code{\STATIC{} $T$ $v$ = $e$; }, \code{\STATIC{} \FINAL{} $v$ = $e$; } or \code {\STATIC{} \FINAL{} $T$ $v$ = $e$;} and no value has yet been stored into $v$ th en the initializer expression $e$ is evaluated. If, during the evaluation of $e$ , the getter for $v$ is invoked, a \code{CyclicInitializationError} is thrown. I f the evaluation succeeded yielding an object $o$, let $r = o$, otherwise let $r = \NULL{}$. In any case, $r$ is stored into $v$. The result of executing the ge tter is $r$.
596 \item {\bf Constant variable declaration}. If $d$ is of one of the forms \code{ \CONST{} $v$ = $e$; } , \code{\CONST{} $T$ $v$ = $e$; }, \code{\STATIC{} \CON ST{} $v$ = $e$; } or \code{\STATIC{} \CONST{} $T$ $v$ = $e$;} the result of the getter is the value of the compile time constant $e$. \commentary{Note that a c ompile time constant cannot depend on itself, so no cyclic references can occur. }
597 Otherwise
598 \item {\bf Variable declaration without initializer}. The result of executing th e getter method is the value stored in $v$.
599 \end{itemize}
600
601 %1 insert blank lines and comments between paragraph and list ---------
602 \LMHash{}
603 Let $d$ be the declaration of a static or instance variable $v$. If $d$ is an i nstance variable, then the invocation of the implicit getter of $v$ evaluates t o the value stored in $v$.
604 If $d$ is a static or library variable then the implicit getter method of $v$ ex ecutes as follows:
605
606 %blah
607 %blah
608
609 \begin{itemize}
610 \item {\bf Non-constant variable declaration with initializer}. If $d$ is of one of the forms \code{\VAR{} $v$ = $e$;} , \code{$T$ $v$ = $e$;} , \code{\FINAL {} $v$ = $e$;} , \code{\FINAL{} $T$ $v$ = $e$;}, \code{\STATIC{} $v$ = $e$; }, \code{\STATIC{} $T$ $v$ = $e$; }, \code{\STATIC{} \FINAL{} $v$ = $e$; } or \code {\STATIC{} \FINAL{} $T$ $v$ = $e$;} and no value has yet been stored into $v$ th en the initializer expression $e$ is evaluated. If, during the evaluation of $e$ , the getter for $v$ is invoked, a \code{CyclicInitializationError} is thrown. I f the evaluation succeeded yielding an object $o$, let $r = o$, otherwise let $r = \NULL{}$. In any case, $r$ is stored into $v$. The result of executing the ge tter is $r$.
611 \item {\bf Constant variable declaration}. If $d$ is of one of the forms \code{ \CONST{} $v$ = $e$; } , \code{\CONST{} $T$ $v$ = $e$; }, \code{\STATIC{} \CON ST{} $v$ = $e$; } or \code{\STATIC{} \CONST{} $T$ $v$ = $e$;} the result of the getter is the value of the compile time constant $e$. \commentary{Note that a c ompile time constant cannot depend on itself, so no cyclic references can occur. }
612 Otherwise
613 \item {\bf Variable declaration without initializer}. The result of executing th e getter method is the value stored in $v$.
614 \end{itemize}
615
616 %2 insert line break before each item
617 \LMHash{}
618 Let $d$ be the declaration of a static or instance variable $v$. If $d$ is an i nstance variable, then the invocation of the implicit getter of $v$ evaluates t o the value stored in $v$.
619 If $d$ is a static or library variable then the implicit getter method of $v$ ex ecutes as follows:
620 \begin{itemize}
621 \item
622 {\bf Non-constant variable declaration with initializer}. If $d$ is of one of th e forms \code{\VAR{} $v$ = $e$;} , \code{$T$ $v$ = $e$;} , \code{\FINAL{} $v$ = $e$;} , \code{\FINAL{} $T$ $v$ = $e$;}, \code{\STATIC{} $v$ = $e$; }, \code{ \STATIC{} $T$ $v$ = $e$; }, \code{\STATIC{} \FINAL{} $v$ = $e$; } or \code{\STAT IC{} \FINAL{} $T$ $v$ = $e$;} and no value has yet been stored into $v$ then the initializer expression $e$ is evaluated. If, during the evaluation of $e$, the getter for $v$ is invoked, a \code{CyclicInitializationError} is thrown. If the evaluation succeeded yielding an object $o$, let $r = o$, otherwise let $r = \NU LL{}$. In any case, $r$ is stored into $v$. The result of executing the getter i s $r$.
623 \item
624 {\bf Constant variable declaration}. If $d$ is of one of the forms \code{\CONST{ } $v$ = $e$; } , \code{\CONST{} $T$ $v$ = $e$; }, \code{\STATIC{} \CONST{} $v $ = $e$; } or \code{\STATIC{} \CONST{} $T$ $v$ = $e$;} the result of the getter is the value of the compile time constant $e$. \commentary{Note that a compile time constant cannot depend on itself, so no cyclic references can occur.}
625 Otherwise
626 \item
627 {\bf Variable declaration without initializer}. The result of executing the gett er method is the value stored in $v$.
628 \end{itemize}
629
630 %3 insert blank/comment lines between,before,after items, and on begin/end
631 \LMHash{}
632 Let $d$ be the declaration of a static or instance variable $v$. If $d$ is an i nstance variable, then the invocation of the implicit getter of $v$ evaluates t o the value stored in $v$.
633 If $d$ is a static or library variable then the implicit getter method of $v$ ex ecutes as follows:
634 \begin{itemize}%blah
635
636 % blah
637
638 \item {\bf Non-constant variable declaration with initializer}. If $d$ is of one of the forms \code{\VAR{} $v$ = $e$;} , \code{$T$ $v$ = $e$;} , \code{\FINAL {} $v$ = $e$;} , \code{\FINAL{} $T$ $v$ = $e$;}, \code{\STATIC{} $v$ = $e$; }, \code{\STATIC{} $T$ $v$ = $e$; }, \code{\STATIC{} \FINAL{} $v$ = $e$; } or \code {\STATIC{} \FINAL{} $T$ $v$ = $e$;} and no value has yet been stored into $v$ th en the initializer expression $e$ is evaluated. If, during the evaluation of $e$ , the getter for $v$ is invoked, a \code{CyclicInitializationError} is thrown. I f the evaluation succeeded yielding an object $o$, let $r = o$, otherwise let $r = \NULL{}$. In any case, $r$ is stored into $v$. The result of executing the ge tter is $r$.
639
640 \item {\bf Constant variable declaration}. If $d$ is of one of the forms \code{ \CONST{} $v$ = $e$; } , \code{\CONST{} $T$ $v$ = $e$; }, \code{\STATIC{} \CON ST{} $v$ = $e$; } or \code{\STATIC{} \CONST{} $T$ $v$ = $e$;} the result of the getter is the value of the compile time constant $e$. \commentary{Note that a c ompile time constant cannot depend on itself, so no cyclic references can occur. }
641 Otherwise
642
643 %blah
644 %blah
645 %blah
646
647
648 \item {\bf Variable declaration without initializer}. The result of executing th e getter method is the value stored in $v$.
649
650 % blah
651 \end{itemize}%blah
652
653 %4 insert commentary/rationale inside itemized list
654 \LMHash{}
655 Let $d$ be the declaration of a static or instance variable $v$. If $d$ is an i nstance variable, then the invocation of the implicit getter of $v$ evaluates t o the value stored in $v$.
656 If $d$ is a static or library variable then the implicit getter method of $v$ ex ecutes as follows:
657 \begin{itemize}
658 \commentary{maybe this will not happen, but it is ok}
659 \item {\bf Non-constant variable declaration with initializer}. If $d$ is of one of the forms \code{\VAR{} $v$ = $e$;} , \code{$T$ $v$ = $e$;} , \code{\FINAL {} $v$ = $e$;} , \code{\FINAL{} $T$ $v$ = $e$;}, \code{\STATIC{} $v$ = $e$; }, \code{\STATIC{} $T$ $v$ = $e$; }, \code{\STATIC{} \FINAL{} $v$ = $e$; } or \code {\STATIC{} \FINAL{} $T$ $v$ = $e$;} and no value has yet been stored into $v$ th en the initializer expression $e$ is evaluated. If, during the evaluation of $e$ , the getter for $v$ is invoked, a \code{CyclicInitializationError} is thrown. I f the evaluation succeeded yielding an object $o$, let $r = o$, otherwise let $r = \NULL{}$. In any case, $r$ is stored into $v$. The result of executing the ge tter is $r$.
660 \rationale{but rationale at the end of an item seems to make sense}
661 \item {\bf Constant variable declaration}. If $d$ is of one of the forms \code{ \CONST{} $v$ = $e$; } , \code{\CONST{} $T$ $v$ = $e$; }, \code{\STATIC{} \CON ST{} $v$ = $e$; } or \code{\STATIC{} \CONST{} $T$ $v$ = $e$;} the result of the getter is the value of the compile time constant $e$. \commentary{Note that a c ompile time constant cannot depend on itself, so no cyclic references can occur. }
662 Otherwise
663 \item {\bf Variable declaration without initializer}. The result of executing th e getter method is the value stored in $v$.
664 \end{itemize}
665 \rationale{and we can of course have it immediately after the list}
666
667 %5 add line breaks in items, with/without indentation
668 \LMHash{}
669 Let $d$ be the declaration of a static or instance variable $v$. If $d$ is an i nstance variable, then the invocation of the implicit getter of $v$ evaluates t o the value stored in $v$.
670 If $d$ is a static or library variable then the implicit getter method of $v$ ex ecutes as follows:
671 \begin{itemize}
672 \item {\bf Non-constant variable declaration with initializer}. If $d$
673 is of one of the forms \code{\VAR{} $v$ = $e$;} , \code{$T$ $v$ = $e$;} ,
674 \code{\FINAL{} $v$ = $e$;} , \code{\FINAL{} $T$ $v$ = $e$;},
675 \code{\STATIC{} $v$ = $e$; }, \code{\STATIC{} $T$ $v$ = $e$; },
676 \code{\STATIC{} \FINAL{} $v$ = $e$; } or
677 \code{\STATIC{} \FINAL{} $T$ $v$ = $e$;} and no value has yet been stored
678 into $v$ then the initializer expression $e$ is evaluated. If, during
679 the evaluation of $e$, the getter for $v$ is invoked, a
680 \code{CyclicInitializationError} is thrown. If the evaluation succeeded
681 yielding an object $o$, let $r = o$, otherwise let $r = \NULL{}$. In
682 any case, $r$ is stored into $v$. The result of executing the getter
683 is $r$.
684 \item {\bf Constant variable declaration}. If $d$ is of one of the
685 forms \code{\CONST{} $v$ = $e$; } , \code{\CONST{} $T$ $v$ = $e$; },
686 \code{\STATIC{} \CONST{} $v$ = $e$; } or
687 \code{\STATIC{} \CONST{} $T$ $v$ = $e$;} the result of the getter is the
688 value of the compile time constant $e$.
689 \commentary{Note that a compile time constant cannot depend on
690 itself, so no cyclic references can occur.}
691 Otherwise
692 \item {\bf Variable declaration without initializer}. The result of
693 executing the getter method is the value stored in $v$.
694 \end{itemize}
695
696 %6 add line breaks, then "eliminate" them with comments
697 \LMHash{}
698 Let $d$ be the declaration of a static or instance%
699 variable $v$. If $d$ is an instance variable, then the %
700 invocation of the implicit getter of $v$ evaluates to%
701 the value stored in $v$.
702 If $d$ is a static or library variable then the implicit %
703 getter method of $v$ executes as follows: %
704
705 \begin{itemize}
706 \item {\bf Non-constant variable declaration with initializer}. If $d$ is of one of the forms \code{\VAR{} $v$ = $e$;} , \code{$T$ $v$ = $e$;} , \code{\FINAL {} $v$ = $e$;} , \code{\FINAL{} $T$ $v$ = $e$;}, \code{\STATIC{} $v$ = $e$; }, \code{\STATIC{} $T$ $v$ = $e$; }, \code{\STATIC{} \FINAL{} $v$ = $e$; } or \code {\STATIC{} \FINAL{} $T$ $v$ = $e$;} and no value has yet been stored into $v$ th en the initializer expression $e$ is evaluated. If, during the evaluation of $e$ , the getter for $v$ is invoked, a \code{CyclicInitializationError} is thrown. I f the evaluation succeeded yielding an object $o$, let $r = o$, otherwise let $r = \NULL{}$. In any case, $r$ is stored into $v$. The result of executing the ge tter is $r$. %
707
708 \item {\bf Constant variable declaration}. If $d$ is of one of the%
709 forms \code{\CONST{} $v$ = $e$; } , \code{\CONST{} $T$ $v$ = $e$; }, %
710 \code{\STATIC{} \CONST{} $v$ = $e$; } or%
711 \code{\STATIC{} \CONST{} $T$ $v$ = $e$;} the result of the getter is the value o f the compile time constant $e$. \commentary{Note that a compile time constant c annot depend on itself, so no cyclic references can occur.}
712 Otherwise
713 \item {\bf Variable declaration without initializer}. The result of executing th e getter method is the value stored in $v$.
714 \end{itemize}
715
716 %7 eliminate line break before environment and before \item
717 \LMHash{}
718 Let $d$ be the declaration of a static or instance variable $v$. If $d$ is an i nstance variable, then the invocation of the implicit getter of $v$ evaluates t o the value stored in $v$.
719 If $d$ is a static or library variable then the implicit getter method of $v$ ex ecutes as follows: \begin{itemize}
720 \item {\bf Non-constant variable declaration with initializer}. If $d$ is of one of the forms \code{\VAR{} $v$ = $e$;} , \code{$T$ $v$ = $e$;} , \code{\FINAL {} $v$ = $e$;} , \code{\FINAL{} $T$ $v$ = $e$;}, \code{\STATIC{} $v$ = $e$; }, \code{\STATIC{} $T$ $v$ = $e$; }, \code{\STATIC{} \FINAL{} $v$ = $e$; } or \code {\STATIC{} \FINAL{} $T$ $v$ = $e$;} and no value has yet been stored into $v$ th en the initializer expression $e$ is evaluated. If, during the evaluation of $e$ , the getter for $v$ is invoked, a \code{CyclicInitializationError} is thrown. I f the evaluation succeeded yielding an object $o$, let $r = o$, otherwise let $r = \NULL{}$. In any case, $r$ is stored into $v$. The result of executing the ge tter is $r$. \item {\bf Constant variable declaration}. If $d$ is of one of the forms \code{\CONST{} $v$ = $e$; } , \code{\CONST{} $T$ $v$ = $e$; }, \code{\ STATIC{} \CONST{} $v$ = $e$; } or \code{\STATIC{} \CONST{} $T$ $v$ = $e$;} the result of the getter is the value of the compile time constant $e$. \commentary{ Note that a compile time constant cannot depend on itself, so no cyclic referenc es can occur.}
721 Otherwise%
722 \item {\bf Variable declaration without initializer}. The result of executing th e getter method is the value stored in $v$.
723 \end{itemize}
724
725 % Test multiple commentary/rationale blocks in succession -------------
726
727 %0 original
728 \LMHash{}
729 The run time type of a function object always implements the class \cd{Function} .
730
731 \commentary{
732 One cannot assume, based on the above, that given a function \cd{f}, \cd{f.runt imeType} will actually be \cd{Function}, or that any two distinct function objec ts necessarily have the same runtime type.
733 }
734
735 \rationale{
736 It is up to the implementation to choose an appropriate representation for funct ions.
737 For example, consider that a closure produced via property extraction treats equ ality different from ordinary closures, and is therefore likely a different clas s. Implementations may also use different classes for functions based on arity a nd or type. Arity may be implicitly affected by whether a function is an instanc e method (with an implicit receiver parameter) or not. The variations are manifo ld, and so this specification only guarantees that function objects are instance s of some class that is considered to implement \cd{Function}.
738
739 }
740
741 %1 remove commentary/first
742 \LMHash{}
743 The run time type of a function object always implements the class \cd{Function} .
744
745 \rationale{
746 It is up to the implementation to choose an appropriate representation for funct ions.
747 For example, consider that a closure produced via property extraction treats equ ality different from ordinary closures, and is therefore likely a different clas s. Implementations may also use different classes for functions based on arity a nd or type. Arity may be implicitly affected by whether a function is an instanc e method (with an implicit receiver parameter) or not. The variations are manifo ld, and so this specification only guarantees that function objects are instance s of some class that is considered to implement \cd{Function}.
748
749 }
750
751 %2 remove rationale second
752 \LMHash{}
753 The run time type of a function object always implements the class \cd{Function} .
754
755 \commentary{
756 One cannot assume, based on the above, that given a function \cd{f}, \cd{f.runt imeType} will actually be \cd{Function}, or that any two distinct function objec ts necessarily have the same runtime type.
757 }
758
759 %3 remove both
760 \LMHash{}
761 The run time type of a function object always implements the class \cd{Function} .
762
763 %4 make first in paragraph, even with \par (double newline)
764 \LMHash{}
765 \commentary{
766 One cannot assume, based on the above, that given a function \cd{f}, \cd{f.runt imeType} will actually be \cd{Function}, or that any two distinct function objec ts necessarily have the same runtime type.
767 }
768
769 \rationale{
770 It is up to the implementation to choose an appropriate representation for funct ions.
771 For example, consider that a closure produced via property extraction treats equ ality different from ordinary closures, and is therefore likely a different clas s. Implementations may also use different classes for functions based on arity a nd or type. Arity may be implicitly affected by whether a function is an instanc e method (with an implicit receiver parameter) or not. The variations are manifo ld, and so this specification only guarantees that function objects are instance s of some class that is considered to implement \cd{Function}.
772
773 }
774
775 The run time type of a function object always implements the class \cd{Function} .
776
777 %5 insert misleading 'dartCode' comments
778 \LMHash{}
779 The run time type of a function object always implements the class \cd{Function} .
780
781 \commentary{
782 One cannot assume, based on the above, that given a function \cd{f}, \cd{f.runt
783 imeType} will actually be \cd{Function}, or that any two distinct function objec
784 %\begin{dartCode}
785 ts necessarily have the same runtime type.
786 }
787
788 \rationale{
789 It is up to the implementation to choose an appropriate representation for funct ions.
790 %\end{dartCode}
791 For example, consider that a closure produced via property extraction treats equ ality different from ordinary closures, and is therefore likely a different clas s. Implementations may also use different classes for functions based on arity a nd or type. Arity may be implicitly affected by whether a function is an instanc e method (with an implicit receiver parameter) or not. The variations are manifo ld, and so this specification only guarantees that function objects are instance s of some class that is considered to implement \cd{Function}.
792
793 }
794
795 %6 remove empty lines between normative and non-normative text
796 \LMHash{}
797 The run time type of a function object always implements the class \cd{Function} .
798 \commentary{
799 One cannot assume, based on the above, that given a function \cd{f}, \cd{f.runt imeType} will actually be \cd{Function}, or that any two distinct function objec ts necessarily have the same runtime type.
800 }
801 \rationale{
802 It is up to the implementation to choose an appropriate representation for funct ions.
803 For example, consider that a closure produced via property extraction treats equ ality different from ordinary closures, and is therefore likely a different clas s. Implementations may also use different classes for functions based on arity a nd or type. Arity may be implicitly affected by whether a function is an instanc e method (with an implicit receiver parameter) or not. The variations are manifo ld, and so this specification only guarantees that function objects are instance s of some class that is considered to implement \cd{Function}.
804
805 }
806
807 %7 remove white space between normative and non-normative text
808 \LMHash{}
809 The run time type of a function object always implements the class \cd{Function} .\commentary{
810 One cannot assume, based on the above, that given a function \cd{f}, \cd{f.runt imeType} will actually be \cd{Function}, or that any two distinct function objec ts necessarily have the same runtime type.
811 }\rationale{
812 It is up to the implementation to choose an appropriate representation for funct ions.
813 For example, consider that a closure produced via property extraction treats equ ality different from ordinary closures, and is therefore likely a different clas s. Implementations may also use different classes for functions based on arity a nd or type. Arity may be implicitly affected by whether a function is an instanc e method (with an implicit receiver parameter) or not. The variations are manifo ld, and so this specification only guarantees that function objects are instance s of some class that is considered to implement \cd{Function}.}
814
815 % Test structure command (\section) with leading white space ----------
816
817 \subsection{ Equality}
818 \LMLabel{equality}
819
820 The subsection should end the hashing block, so these words should
821 not affect the previous hash value.
822
823 % ---------------------------------------------------------------------
824
825 \end{document}
OLDNEW
« no previous file with comments | « tests/standalone/io/addlatexhash_test.dart ('k') | tools/addlatexhash.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698