Skip to content

Commit c00b239

Browse files
committed
Doc: move old release notes to CHANGELOG.md
1 parent 356b808 commit c00b239

File tree

2 files changed

+96
-152
lines changed

2 files changed

+96
-152
lines changed

CHANGELOG.md

Lines changed: 96 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,23 +111,112 @@
111111
* Unicode support (contributed mostly by Jean-Philippe Bernardy,
112112
with help from Alan Zimmerman).
113113

114-
* An Alex lexer now takes a UTF-8 encoded byte sequence as input
115-
(see Section 5.1, “Unicode and UTF-8”. If you are using the
114+
* An Alex lexer now takes a UTF-8 encoded byte sequence as input.
115+
If you are using the
116116
"basic" wrapper or one of the other wrappers that takes a
117117
Haskell String as input, the string is automatically encoded
118-
into UTF-8 by Alex. If your input is a ByteString, you are
119-
responsible for ensuring that the input is UTF-8 encoded. The
120-
old 8-bit behaviour is still available via the --latin1
121-
option.
118+
into UTF-8 by Alex. If your input is a `ByteString`, you are
119+
responsible for ensuring that the input is UTF-8 encoded.
122120

123121
* Alex source files are assumed to be in UTF-8, like Haskell
124122
source files. The lexer specification can use Unicode
125123
characters and ranges.
126124

127125
* `alexGetChar` is renamed to `alexGetByte` in the generated code.
128126

129-
* There is a new option, `--latin1`, that restores the old
127+
* There is a new option, `--latin1`, that restores the old 8-bit
130128
behaviour.
131129

132130
* Alex now does DFA minimization, which helps to reduce the size
133131
of the generated tables, especially for lexers that use Unicode.
132+
133+
## Release Notes for version 2.2
134+
135+
- `Cabal-1.2` is now required.
136+
137+
- `ByteString` wrappers: use Alex to lex ByteStrings directly.
138+
139+
## Release Notes for version 2.1.0
140+
141+
- Switch to a Cabal build system: you need a recent version of Cabal
142+
(1.1.6 or later). If you have GHC 6.4.2, then you need to upgrade
143+
Cabal before building Alex. GHC 6.6 is fine.
144+
145+
- Slight change in the error semantics: the input returned on error is
146+
before the erroneous character was read, not after. This helps to
147+
give better error messages.
148+
149+
## Release Notes for version 2.0
150+
151+
Alex has changed a *lot* between versions 1.x and 2.0. The following is
152+
supposed to be an exhaustive list of the changes:
153+
154+
### Syntax changes
155+
156+
- Code blocks are now surrounded by `{...}` rather than `%{...%}`.
157+
158+
- Character-set macros now begin with ‘`$`’ instead of ‘`^`’ and have
159+
multi-character names.
160+
161+
- Regular expression macros now begin with ‘`@`’ instead of ‘`%`’ and
162+
have multi-character names.
163+
164+
- Macro definitions are no longer surrounded by `{ ... }`.
165+
166+
- Rules are now of the form
167+
168+
<c1,c2,...> regex { code }
169+
170+
where `c1`, `c2` are startcodes, and `code` is an arbitrary Haskell
171+
expression.
172+
173+
- Regular expression syntax changes:
174+
175+
- `()` is the empty regular expression (used to be ‘`$`’)
176+
177+
- set complement can now be expressed as `[^sets]` (for similarity
178+
with lex regular expressions).
179+
180+
- The `'abc'` form is no longer available, use `[abc]` instead.
181+
182+
-`^`’ and ‘`$`’ have the usual meanings: ‘`^`’ matches just
183+
after a ‘`\n`’, and ‘`$`’ matches just before a ‘`\n`’.
184+
185+
-`\n`’ is now the escape character, not ‘`^`’.
186+
187+
- The form `"..."` means the same as the sequence of characters
188+
inside the quotes, the difference being that special characters
189+
do not need to be escaped inside `"..."`.
190+
191+
- Rules can have arbitrary predicates attached to them. This subsumes
192+
the previous left-context and right-context facilities (although
193+
these are still allowed as syntactic sugar).
194+
195+
### Changes in the form of an Alex file
196+
197+
- Each file can now only define a single grammar. This change was made
198+
to simplify code generation. Multiple grammars can be simulated
199+
using startcodes, or split into separate modules.
200+
201+
- The API has been simplified, and at the same time made more
202+
flexible.
203+
204+
- You no longer need to import the `Alex` module.
205+
206+
### Usage changes
207+
208+
The command-line syntax is quite different.
209+
210+
### Implementation changes
211+
212+
- A more efficient table representation, coupled with standard
213+
table-compression techniques, are used to keep the size of the
214+
generated code down.
215+
216+
- When compiling a grammar with GHC, the `-g` switch causes an even
217+
faster and smaller grammar to be generated.
218+
219+
- Startcodes are implemented in a different way: each state
220+
corresponds to a different initial state in the DFA, so the scanner
221+
doesn't have to check the startcode when it gets to an accept state.
222+
This results in a larger, but quicker, scanner.

doc/about.rst

Lines changed: 0 additions & 145 deletions
Original file line numberDiff line numberDiff line change
@@ -8,151 +8,6 @@ Alex can always be obtained from its `home
88
page <http://www.haskell.org/alex>`__. The latest source code lives in
99
the `git repository <https://github.com/haskell/alex>`__ on ``GitHub``.
1010

11-
.. _relnotes-30:
12-
13-
Release Notes for version 3.0
14-
-----------------------------
15-
16-
- Unicode support (contributed mostly by Jean-Philippe Bernardy, with
17-
help from Alan Zimmerman).
18-
19-
- An Alex lexer now takes a UTF-8 encoded byte sequence as input
20-
(see :ref:`Unicode and UTF-8 <encoding>`. If you are using the
21-
"basic" wrapper or one of the other wrappers that takes a Haskell
22-
``String`` as input, the string is automatically encoded into
23-
UTF-8 by Alex. If your input is a ``ByteString``, you are
24-
responsible for ensuring that the input is UTF-8 encoded. The old
25-
8-bit behaviour is still available via the ``--latin1`` option.
26-
27-
- Alex source files are assumed to be in UTF-8, like Haskell source
28-
files. The lexer specification can use Unicode characters and
29-
ranges.
30-
31-
- ``alexGetChar`` is renamed to ``alexGetByte`` in the generated
32-
code.
33-
34-
- There is a new option, ``--latin1``, that restores the old
35-
behaviour.
36-
37-
- Alex now does DFA minimization, which helps to reduce the size of the
38-
generated tables, especially for lexers that use Unicode.
39-
40-
.. _relnotes-22:
41-
42-
Release Notes for version 2.2
43-
-----------------------------
44-
45-
- Cabal 1.2 is now required.
46-
47-
- ByteString wrappers: use Alex to lex ByteStrings directly.
48-
49-
.. _relnotes-210:
50-
51-
Release Notes for version 2.1.0
52-
-------------------------------
53-
54-
- Switch to a Cabal build system: you need a recent version of Cabal
55-
(1.1.6 or later). If you have GHC 6.4.2, then you need to upgrade
56-
Cabal before building Alex. GHC 6.6 is fine.
57-
58-
- Slight change in the error semantics: the input returned on error is
59-
before the erroneous character was read, not after. This helps to
60-
give better error messages.
61-
62-
.. _relnotes-20:
63-
64-
Release Notes for version 2.0
65-
-----------------------------
66-
67-
Alex has changed a *lot* between versions 1.x and 2.0. The following is
68-
supposed to be an exhaustive list of the changes:
69-
70-
.. _changes-syntax:
71-
72-
Syntax changes
73-
~~~~~~~~~~~~~~
74-
75-
- Code blocks are now surrounded by ``{...}`` rather than ``%{...%}``.
76-
77-
- Character-set macros now begin with ‘\ ``$``\ ’ instead of
78-
\ ``^``\ ’ and have multi-character names.
79-
80-
- Regular expression macros now begin with ‘\ ``@``\ ’ instead of
81-
\ ``%``\ ’ and have multi-character names.
82-
83-
- Macro definitions are no longer surrounded by ``{ ... }``.
84-
85-
- Rules are now of the form
86-
87-
::
88-
89-
<c1,c2,...> regex { code }
90-
91-
where ``c1``, ``c2`` are startcodes, and ``code`` is an arbitrary
92-
Haskell expression.
93-
94-
- Regular expression syntax changes:
95-
96-
- ``()`` is the empty regular expression (used to be ‘\ ``$``\ ’)
97-
98-
- set complement can now be expressed as ``[^sets]`` (for similarity
99-
with lex regular expressions).
100-
101-
- The ``'abc'`` form is no longer available, use ``[abc]`` instead.
102-
103-
- ‘\ ``^``\ ’ and ‘\ ``$``\ ’ have the usual meanings: ‘\ ``^``\
104-
matches just after a ‘\ ``\n``\ ’, and ‘\ ``$``\ ’ matches just
105-
before a ‘\ ``\n``\ ’.
106-
107-
- ‘\ ``\n``\ ’ is now the escape character, not ‘\ ``^``\ ’.
108-
109-
- The form ``"..."`` means the same as the sequence of characters
110-
inside the quotes, the difference being that special characters do
111-
not need to be escaped inside ``"..."``.
112-
113-
- Rules can have arbitrary predicates attached to them. This subsumes
114-
the previous left-context and right-context facilities (although
115-
these are still allowed as syntactic sugar).
116-
117-
.. _changes-files:
118-
119-
Changes in the form of an Alex file
120-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
121-
122-
- Each file can now only define a single grammar. This change was made
123-
to simplify code generation. Multiple grammars can be simulated using
124-
startcodes, or split into separate modules.
125-
126-
- The programmer experience has been simplified, and at the same time
127-
made more flexible. See
128-
:ref:`The Interface to an Alex-generated lexer <api>` for details.
129-
130-
- You no longer need to import the ``Alex`` module.
131-
132-
.. _changes-usage:
133-
134-
Usage changes
135-
~~~~~~~~~~~~~
136-
137-
The command-line syntax is quite different. See :ref:`Invoking Alex <invoking>`.
138-
139-
.. _changes-implementation:
140-
141-
Implementation changes
142-
~~~~~~~~~~~~~~~~~~~~~~
143-
144-
- A more efficient table representation, coupled with standard
145-
table-compression techniques, are used to keep the size of the
146-
generated code down.
147-
148-
- When compiling a grammar with GHC, the -g switch causes an even
149-
faster and smaller grammar to be generated.
150-
151-
- Startcodes are implemented in a different way: each state corresponds
152-
to a different initial state in the DFA, so the scanner doesn't have
153-
to check the startcode when it gets to an accept state. This results
154-
in a larger, but quicker, scanner.
155-
15611
.. _bug-reports:
15712

15813
Reporting bugs in Alex

0 commit comments

Comments
 (0)