2013-10-07 22:43:18 +00:00
|
|
|
\def\keyword#1{\textbf{#1}}
|
2013-10-09 00:11:51 +00:00
|
|
|
\def\builtinId#1{\textbf{#1}}
|
2013-10-07 22:43:18 +00:00
|
|
|
\def\comment#1{\textit{#1}}
|
|
|
|
\def\capt#1{\rmfamily \caption{#1}}
|
|
|
|
\newcommand{\cd}[1]{\textsf{#1}}
|
|
|
|
\def\lt{$<$}
|
|
|
|
\def\gt{$>$}
|
|
|
|
\def\<{$\langle$}
|
|
|
|
\def\>{$\rangle$}
|
|
|
|
|
2013-10-09 00:11:51 +00:00
|
|
|
\def\ABSTRACT{\builtinId{abstract}}
|
|
|
|
\def\AS{\builtinId{as}}
|
2013-10-07 22:43:18 +00:00
|
|
|
\def\ASSERT{\keyword{assert}}
|
2014-10-08 15:55:04 +00:00
|
|
|
\def\ASYNC{\keyword{async}}
|
|
|
|
\def\AWAIT{\keyword{await}}
|
2013-10-07 22:43:18 +00:00
|
|
|
\def\BOOLEAN{\keyword{boolean}}
|
|
|
|
\def\BREAK{\keyword{break}}
|
|
|
|
\def\CASE{\keyword{case}}
|
|
|
|
\def\CLASS{\keyword{class}}
|
|
|
|
\def\CALL{\keyword{call}}
|
|
|
|
\def\CATCH{\keyword{catch}}
|
|
|
|
\def\CONST{\keyword{const}}
|
|
|
|
\def\CONTINUE{\keyword{continue}}
|
|
|
|
\def\DEFAULT{\keyword{default}}
|
2014-10-08 15:55:04 +00:00
|
|
|
\def\DEFERRED{\keyword{deferred}}
|
2013-10-09 00:11:51 +00:00
|
|
|
\def\DYNAMIC{\builtinId{dynamic}}
|
2013-10-07 22:43:18 +00:00
|
|
|
\def\DO{\keyword{do}}
|
|
|
|
\def\ELSE{\keyword{else}}
|
2014-10-08 15:55:04 +00:00
|
|
|
\def\ENUM{\keyword{enum}}
|
2013-10-07 22:43:18 +00:00
|
|
|
\def\EQUALS{\keyword{equals}}
|
2013-10-09 00:11:51 +00:00
|
|
|
\def\EXPORT{\builtinId{export}}
|
2013-10-07 22:43:18 +00:00
|
|
|
\def\EXTENDS{\keyword{extends}}
|
2013-10-09 00:11:51 +00:00
|
|
|
\def\EXTERNAL{\builtinId{external}}
|
|
|
|
\def\FACTORY{\builtinId{factory}}
|
2013-10-07 22:43:18 +00:00
|
|
|
\def\FALSE{\keyword{false}}
|
|
|
|
\def\FINAL{\keyword{final}}
|
|
|
|
\def\FINALLY{\keyword{finally}}
|
|
|
|
\def\FOR{\keyword{for}}
|
2013-10-09 00:11:51 +00:00
|
|
|
\def\GET{\builtinId{get}}
|
2013-10-07 22:43:18 +00:00
|
|
|
\def\HIDE{\keyword{hide}}
|
|
|
|
\def\IF{\keyword{if}}
|
2013-10-09 00:11:51 +00:00
|
|
|
\def\IMPLEMENTS{\builtinId{implements}}
|
|
|
|
\def\IMPORT{\builtinId{import}}
|
2013-10-07 22:43:18 +00:00
|
|
|
\def\IN{\keyword{in}}
|
|
|
|
\def\INT{\keyword{int}}
|
|
|
|
\def\INTERFACE{\keyword{interface}}
|
|
|
|
\def\IS{\keyword{is}}
|
2013-10-09 00:11:51 +00:00
|
|
|
\def\LIBRARY{\builtinId{library}}
|
2013-10-07 22:43:18 +00:00
|
|
|
\def\NATIVE{\keyword{native}}
|
|
|
|
\def\NEGATE{\keyword{negate}}
|
|
|
|
\def\NEW{\keyword{new}}
|
|
|
|
\def\NULL{\keyword{null}}
|
|
|
|
\def\ON{\keyword{on}}
|
|
|
|
\def\OF{\keyword{of}}
|
2013-10-09 00:11:51 +00:00
|
|
|
\def\OPERATOR{\builtinId{operator}}
|
|
|
|
\def\PART{\builtinId{part}}
|
2013-10-07 22:43:18 +00:00
|
|
|
\def\PRIVATE{\keyword{private}}
|
|
|
|
\def\RETHROW{\keyword{rethrow}}
|
|
|
|
\def\RETURN{\keyword{return}}
|
2013-10-09 00:11:51 +00:00
|
|
|
\def\SET{\builtinId{set}}
|
2013-10-07 22:43:18 +00:00
|
|
|
\def\SHOW{\keyword{show}}
|
|
|
|
\def\SOURCE{\keyword{source}}
|
2013-10-09 00:11:51 +00:00
|
|
|
\def\STATIC{\builtinId{static}}
|
2013-10-07 22:43:18 +00:00
|
|
|
\def\SUPER{\keyword{super}}
|
|
|
|
\def\SWITCH{\keyword{switch}}
|
2014-10-08 15:55:04 +00:00
|
|
|
\def\SYNC{\keyword{sync}}
|
2013-10-07 22:43:18 +00:00
|
|
|
\def\THIS{\keyword{this}}
|
|
|
|
\def\THROW{\keyword{throw}}
|
|
|
|
\def\TRUE{\keyword{true}}
|
|
|
|
\def\TRY{\keyword{try}}
|
2013-10-09 00:11:51 +00:00
|
|
|
\def\TYPEDEF{\builtinId{typedef}}
|
2013-10-07 22:43:18 +00:00
|
|
|
\def\THIS{\keyword{this}}
|
|
|
|
\def\VAR{\keyword{var}}
|
|
|
|
\def\VOID{\keyword{void}}
|
|
|
|
\def\WHILE{\keyword{while}}
|
2014-10-08 15:55:04 +00:00
|
|
|
\def\WITH{\keyword{with}}
|
|
|
|
\def\YIELD{\keyword{yield}}
|
2013-10-07 22:43:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
% \def\PUBLIC{\keyword{public}}
|
|
|
|
|
|
|
|
%\def\PROTECTED{\keyword{protected}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
% \def\OUTER{\keyword{outer}}
|
|
|
|
|
|
|
|
\def\TRUE{\keyword{true}}
|
|
|
|
|
|
|
|
|
|
|
|
\newenvironment{Q}[1]{{\bf #1}}
|
|
|
|
|
|
|
|
\newenvironment{rationale}[1]{{\it #1}}
|
|
|
|
|
|
|
|
\newenvironment{commentary}[1]{{\sf #1}}
|
|
|
|
|
|
|
|
\newenvironment{dartCode}[1][!ht] {
|
|
|
|
% \begin{verbatim}[#1]
|
|
|
|
\def\@programcr{\@addfield\strut}
|
|
|
|
\let\\=\@programcr
|
|
|
|
\relax\@vobeyspaces\obeylines
|
|
|
|
|
|
|
|
\sffamily
|
|
|
|
}{
|
|
|
|
%\end{verbatim}
|
|
|
|
}
|
Introduced hash valued location markers in the spec
Introduced support for adding SHA1 hash valued location markers
at several levels in the language specification, added long explanatory
comment at the end, added a script 'addlatexhash.dart' to normalize
spacing, remove comments, etc., in the spec, such that the hash values
are more robust than they would be with a direct usage of the spec.
The script passes the "dvi2tty test", that is, when the location markers
are empty, the resulting *.dvi files created from dartLangSpec.tex and
from the version processed by the script give rise to the same text via
dvi2tty, i.e., the script does not destroy the spec.
R=gbracha@google.com, ricow@google.com
Review URL: https://codereview.chromium.org//646003002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41191 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-20 14:02:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
% ----------------------------------------------------------------------
|
|
|
|
% Support for hash valued Location Markers
|
|
|
|
|
Working insertion of hash values; added a few labels in spec
Hash values are now computed for each "paragraph" starting with \LMHash
(which includes subsequent grammar, dartCode, itemize blocks, but stops
at \section-like commands). Now addlatexhash.dart expects three arguments
(first the source latex file, then the destination simplified and
hash-value-annotated latex source file, and finally a file name used to
create the list of hash values emitted). Adjusted testing accordingly.
Added a test for robustness of the hash value generation: It is checked
that lots of different "unimportant" changes make no difference for the
generated hash values (e.g., we can add/remove comments, change white
space, add \commentary{..} etc. without changing the hash values).
In order to ensure that all "structure" commands in the spec have a label,
I added an \LMLabel{..} a handful of places, following the style which is
used throughout the spec.
In dart.sty, the \renewcommand that made \LMHash{} produce a fixed
hash value has been removed such that the actual hash values are now
inserted into the generated spec PDF/DVI file. Tests have been adjusted
to handle this difference between the spec with and without hash values
when comparing the two.
R=gbracha@google.com, lrn@google.com, ricow@google.com
Committed: https://code.google.com/p/dart/source/detail?r=41658
Reverted: https://code.google.com/p/dart/source/detail?r=41662
Review URL: https://codereview.chromium.org//652993005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41687 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-12 08:41:55 +00:00
|
|
|
% very small font, to enable 40 char hash values in the margin
|
Introduced hash valued location markers in the spec
Introduced support for adding SHA1 hash valued location markers
at several levels in the language specification, added long explanatory
comment at the end, added a script 'addlatexhash.dart' to normalize
spacing, remove comments, etc., in the spec, such that the hash values
are more robust than they would be with a direct usage of the spec.
The script passes the "dvi2tty test", that is, when the location markers
are empty, the resulting *.dvi files created from dartLangSpec.tex and
from the version processed by the script give rise to the same text via
dvi2tty, i.e., the script does not destroy the spec.
R=gbracha@google.com, ricow@google.com
Review URL: https://codereview.chromium.org//646003002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41191 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-20 14:02:23 +00:00
|
|
|
\makeatletter
|
|
|
|
\ifcase \@ptsize \relax% 10pt
|
|
|
|
\newcommand{\miniscule}{\@setfontsize\miniscule{2}{3}}% \tiny: 5/6
|
|
|
|
\or% 11pt
|
|
|
|
\newcommand{\miniscule}{\@setfontsize\miniscule{3}{4}}% \tiny: 6/7
|
|
|
|
\or% 12pt
|
|
|
|
\newcommand{\miniscule}{\@setfontsize\miniscule{3}{4}}% \tiny: 6/7
|
|
|
|
\fi
|
|
|
|
\makeatother
|
|
|
|
|
|
|
|
% white: location markers should not create visual noise
|
|
|
|
\definecolor{LMdim}{gray}{1.0}
|
|
|
|
|
|
|
|
% insert location marker showing hash value of following paragraph
|
|
|
|
\newcommand{\LMHash}[1]{%
|
|
|
|
\hspace{0pt}\marginpar{\raisebox{0.5ex}{\miniscule{\color{LMdim}#1}}}}
|
|
|
|
|
|
|
|
% support convenient renewcommand
|
|
|
|
\let\OriginalLMHash\LMHash
|
|
|
|
|
|
|
|
% define a label, and show the associated logical location marker
|
|
|
|
\newcommand{\LMLabel}[1]{%
|
Working insertion of hash values; added a few labels in spec
Hash values are now computed for each "paragraph" starting with \LMHash
(which includes subsequent grammar, dartCode, itemize blocks, but stops
at \section-like commands). Now addlatexhash.dart expects three arguments
(first the source latex file, then the destination simplified and
hash-value-annotated latex source file, and finally a file name used to
create the list of hash values emitted). Adjusted testing accordingly.
Added a test for robustness of the hash value generation: It is checked
that lots of different "unimportant" changes make no difference for the
generated hash values (e.g., we can add/remove comments, change white
space, add \commentary{..} etc. without changing the hash values).
In order to ensure that all "structure" commands in the spec have a label,
I added an \LMLabel{..} a handful of places, following the style which is
used throughout the spec.
In dart.sty, the \renewcommand that made \LMHash{} produce a fixed
hash value has been removed such that the actual hash values are now
inserted into the generated spec PDF/DVI file. Tests have been adjusted
to handle this difference between the spec with and without hash values
when comparing the two.
R=gbracha@google.com, lrn@google.com, ricow@google.com
Committed: https://code.google.com/p/dart/source/detail?r=41658
Reverted: https://code.google.com/p/dart/source/detail?r=41662
Review URL: https://codereview.chromium.org//652993005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41687 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-12 08:41:55 +00:00
|
|
|
\vspace{-\baselineskip}\hspace{0pt}\OriginalLMHash{\raisebox{10ex}{#1}}%
|
Introduced hash valued location markers in the spec
Introduced support for adding SHA1 hash valued location markers
at several levels in the language specification, added long explanatory
comment at the end, added a script 'addlatexhash.dart' to normalize
spacing, remove comments, etc., in the spec, such that the hash values
are more robust than they would be with a direct usage of the spec.
The script passes the "dvi2tty test", that is, when the location markers
are empty, the resulting *.dvi files created from dartLangSpec.tex and
from the version processed by the script give rise to the same text via
dvi2tty, i.e., the script does not destroy the spec.
R=gbracha@google.com, ricow@google.com
Review URL: https://codereview.chromium.org//646003002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41191 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-20 14:02:23 +00:00
|
|
|
\label{#1}}
|
|
|
|
% ----------------------------------------------------------------------
|
|
|
|
|