| 1 |
%!TEX root = manual.tex |
| 2 |
% |
| 3 |
\chapter{Change history} |
| 4 |
\label{ch:history} |
| 5 |
|
| 6 |
Here is a history of changes to the SML/NJ Language Processing Tools. |
| 7 |
More details can be found in the SML/NJ \texttt{HISTORY} and \texttt{README} files. |
| 8 |
\begin{description} |
| 9 |
\item[SML/NJ 110.99] |
| 10 |
\mbox{}\\[0.5em] |
| 11 |
Changed the semantics of the spans returned by \ulex{} so that the second |
| 12 |
component of a span is the position of the rightmost character in the token (instead |
| 13 |
of the character following the token). |
| 14 |
Specifically, the span $(p_1, p_2)$ specifies the $p_2 - p_1 + 1$ characters |
| 15 |
that start with the character at position $p_1$ and run to $p_2$ (inclusive). |
| 16 |
This change avoids a potential problem when the span of a token ends at the last |
| 17 |
character in a file (when the input is spread across multiple files). |
| 18 |
\item[SML/NJ 110.98] |
| 19 |
\mbox{}\\[0.5em] |
| 20 |
Changed the semantics of the \texttt{--debug} command-line option for \mlantlr{}. |
| 21 |
Previously this option replaced the actions with a print expression, but that |
| 22 |
limited its usefulness because of type errors in the generated code. The new |
| 23 |
behavior is to preserve the existing actions and just add the printing code. |
| 24 |
\item[SML/NJ 110.96] |
| 25 |
\mbox{}\\[0.5em] |
| 26 |
Added the \texttt{FilePos} sub-structure to the \texttt{AntlrStreamPos} structure. |
| 27 |
This addition allows code to be written that is independent of the precision |
| 28 |
of the \texttt{AntlrStreamPos.pos} type. |
| 29 |
\item[SML/NJ 110.94] |
| 30 |
\mbox{}\\[0.5em] |
| 31 |
Changed type of source-file positions from \texttt{Position.int} to \texttt{Int.int}. |
| 32 |
This change is because the \texttt{Position.int} type was changed to 64-bit integers |
| 33 |
in Version 110.89, which is overkill for processing text files (especially since |
| 34 |
we are moving to 64-bit executables). |
| 35 |
\item[SML/NJ 110.81] |
| 36 |
\mbox{}\\[0.5em] |
| 37 |
Added ``\texttt{--debug}'' command-line option to \mlantlr{} to expose the generation |
| 38 |
of debug actions. |
| 39 |
\\[0.5em] |
| 40 |
Added \texttt{\%tokentype} directive to \mlantlr{}. |
| 41 |
\\[0.5em] |
| 42 |
Modified \mlantlr{} and \ulex{} to direct status and debugging messages to |
| 43 |
\texttt{stdErr} instead of \texttt{stdOut}. |
| 44 |
% |
| 45 |
\item[SML/NJ 110.79] |
| 46 |
\mbox{}\\[0.5em] |
| 47 |
Modified scanner to allow comments in \ulex{} directives. |
| 48 |
\\[0.5em] |
| 49 |
\mlantlr{} now inlines the \texttt{EBNF} structure in the generated parser (instead of using |
| 50 |
the \texttt{AntlrEBNF} functor from the \texttt{ml-lpt} library. |
| 51 |
\\[0.5em] |
| 52 |
Preliminary work on supporting the \texttt{\%prefer} and \texttt{\%change} directives |
| 53 |
from \texttt{ml-yacc}. The front-end accepts and checks these declaration forms, but |
| 54 |
the back-end does not yet generate code for them. These will be documented once the |
| 55 |
implementation is complete. |
| 56 |
% |
| 57 |
\item[SML/NJ 110.78] |
| 58 |
\mbox{}\\[0.5em] |
| 59 |
Improved the error message for when the lookahead computation fails in \mlantlr{}. |
| 60 |
\\[0.5em] |
| 61 |
Added \texttt{\%value} directive to allow non-nullary tokens to be inserted as |
| 62 |
an error-repair action. |
| 63 |
Note that the first version of this feature used the directive \texttt{\%default}, but |
| 64 |
this name was changed to \texttt{\%value} to match the ML-Yacc feature. |
| 65 |
\\[0.5em] |
| 66 |
Improved error messages for the situation where the lexer specification has an unclosed string. |
| 67 |
% |
| 68 |
\item[SML/NJ 110.77] |
| 69 |
\mbox{}\\[0.5em] |
| 70 |
Fixed an inconsistency in the way that \mlantlr{} and \ulex{} handled the contents of |
| 71 |
a \texttt{\%defs} declaration. \ulex{} made these definitions visible in the \texttt{UserDeclarations} |
| 72 |
substructure, whereas \mlantlr{} hid them. We have changed the behavior of \ulex{} to match |
| 73 |
that of \mlantlr{} (\ie{}, hide the user definitions). We chose to hide the user definitions |
| 74 |
in \ulex{} because they are usually not useful outside the lexer, hiding them reduces The |
| 75 |
size of the generated code, and definitions that are needed outside the lexer can be |
| 76 |
defined in an external module. Note that the \texttt{UserDeclarations} substructure remains |
| 77 |
visible when \ulex{} is run in \texttt{ml-lex} compatibility mode. |
| 78 |
\\[0.5em] |
| 79 |
Added the \texttt{actionToString'} and \texttt{repairToString'} functions |
| 80 |
to the \texttt{AntlrRepair} structure. These functions allow one to |
| 81 |
specialize the printing of tokens based on whether they are being added or deleted. |
| 82 |
\\[0.5em] |
| 83 |
Removed the \texttt{toksToString} function from the tokens structure that ml-antlr |
| 84 |
generates. It was originally for use by the \texttt{AntlrRepair} structure, but that |
| 85 |
structure does not use it. |
| 86 |
% |
| 87 |
\item[SML/NJ 110.72] |
| 88 |
\mbox{}\\[0.5em] |
| 89 |
Added \texttt{--strict-sml} flag to \ulex{} for MLton compatibility. |
| 90 |
\\[0.5em] |
| 91 |
Added \texttt{\%header} directive to the \mlantlr{} parser generator. |
| 92 |
\end{description}% |