|
2 | 2 |
|
3 | 3 | [](https://github.com/haskell/alex/actions/workflows/haskell-ci.yml) |
4 | 4 |
|
5 | | -Alex is a Lex-like tool for generating Haskell scanners. For complete |
6 | | -documentation, see the doc directory. |
| 5 | +Alex is a tool for generating lexical analysers, also known as "lexers" and "scanners", in Haskell. |
| 6 | +The lexical analysers implement a description of the tokens to be recognised in the form of regular expressions. |
| 7 | +It is similar to the tools "lex" and "flex" for C/C++. |
7 | 8 |
|
8 | | -- <https://www.haskell.org/alex/> |
| 9 | +Share and enjoy! |
9 | 10 |
|
10 | | -- <https://hackage.haskell.org/package/alex> |
| 11 | +## Documentation |
11 | 12 |
|
12 | | -For information on copying and distributing this program, see the file |
13 | | -LICENSE in this directory. |
| 13 | +Documentation is hosted on [Read the Docs](https://haskell-alex.readthedocs.io): |
14 | 14 |
|
15 | | -The sources are in the `src` directory and the documentation in the `doc` |
16 | | -directory; various examples are in the `examples` subdirectory. |
| 15 | +- [Online (HTML)](https://haskell-alex.readthedocs.io) |
| 16 | +- [PDF](https://haskell-alex.readthedocs.io/_/downloads/en/latest/pdf/) |
| 17 | +- [Downloadable HTML](https://haskell-alex.readthedocs.io/_/downloads/en/latest/htmlzip/) |
17 | 18 |
|
18 | | -The source code in the `src` and `examples` directories is intended to work |
19 | | -with GHC >= 7.0. |
| 19 | +For basic information of the sort typically found in a read-me, see the following sections of the docs: |
20 | 20 |
|
21 | | -## Build Instructions |
22 | | - |
23 | | -If you just want to *use* Alex, you can download or install (via |
24 | | -`cabal install alex`) an |
25 | | -[Alex release from Hackage](https://hackage.haskell.org/package/alex); also note that |
26 | | -distributions such as the |
27 | | -[Haskell Platform](https://www.haskell.org/platform/) and other package |
28 | | -manager-based distributions provide packages for Alex. Moreover, |
29 | | -recent versions of `cabal` will automatically install the required |
30 | | -version of `alex` based on |
31 | | -[`build-tools`/`build-tool-depends` declarations](http://cabal.readthedocs.io/en/latest/developing-packages.html#pkg-field-build-tool-depends). |
32 | | - |
33 | | -Read on if you want to build Alex directly from Git. |
34 | | - |
35 | | -Alex is built using GHC & Cabal; so first install |
36 | | -[GHC](https://www.haskell.org/ghc) and |
37 | | -[`cabal-install-2.0`](https://www.haskell.org/cabal) (or later). |
38 | | - |
39 | | -Since Alex itself is implemented in terms of an Alex scanner, |
40 | | -bootstrapping Alex is a bit tricky: |
41 | | - |
42 | | -You need to have the build-tools `alex` and `happy` manually |
43 | | -installed; either via your system package manager distribution, the |
44 | | -Haskell Platform, or e.g. via (run this outside the Git repository!): |
45 | | - |
46 | | - $ cabal install alex happy |
47 | | - |
48 | | -which installs them into `${HOME}/.cabal/bin` by default (make sure |
49 | | -they are in your `$PATH` for the next steps!). |
50 | | - |
51 | | -### Variant A |
52 | | - |
53 | | -You can install `alex` simply by invoking |
54 | | - |
55 | | - $ cabal install |
56 | | - |
57 | | -from inside the Git folder. |
58 | | - |
59 | | -### Variant B |
60 | | - |
61 | | -Alternatively, you can use the `Makefile` which automates the steps of |
62 | | -producing a self-contained pre-bootstrapped source distribution with |
63 | | -pre-generated lexer/scanners: |
64 | | - |
65 | | - $ make sdist |
66 | | - $ cabal install dist/alex-*.tar.gz |
67 | | - |
68 | | -For convenience, there is also a `make sdist-test` target which builds the |
69 | | -source source tarball and runs the test-suite from within the source dist. |
70 | | - |
71 | | -## Contributing & Reporting Issues |
72 | | - |
73 | | -Please report any bugs or comments at https://github.com/simonmar/alex/issues |
74 | | - |
75 | | -Share and enjoy, |
76 | | - |
77 | | - |
78 | | - |
79 | | - |
80 | | - |
81 | | - |
82 | | - |
83 | | -and [recent contributors](https://github.com/simonmar/alex/graphs/contributors). |
84 | | - |
85 | | -## Current Maintainers |
86 | | - |
87 | | -- John Ericson (@Ericson2314) |
88 | | - |
89 | | -- Simon Marlow (@simonmar) |
| 21 | +- [About Alex](https://haskell-alex.readthedocs.io/en/latest/about.html) |
| 22 | +- [Obtaining Alex](https://haskell-alex.readthedocs.io/en/latest/obtaining.html) |
| 23 | +- [Contributing](https://haskell-alex.readthedocs.io/en/latest/contributing.html) |
0 commit comments