GithubHelp home page GithubHelp logo

ndmitchell / alex Goto Github PK

View Code? Open in Web Editor NEW

This project forked from haskell/alex

0.0 3.0 0.0 671 KB

A lexical analyser generator for Haskell

Home Page: http://www.haskell.org/alex

License: BSD 3-Clause "New" or "Revised" License

Makefile 1.05% Haskell 82.22% Shell 0.41% Yacc 1.74% Logos 14.57% C 0.02%

alex's Introduction

Alex: A Lexical Analyser Generator

Build Status

Alex is a Lex-like tool for generating Haskell scanners. For complete documentation, see the doc directory.

Alex version 2.0 has changed fairly considerably since version 1.x, and the syntax is almost completely different. For a detailed list of changes, see the release notes in the documentation.

Alex is now covered by a BSD-Style licence; see the licence file in the 'doc' directory for details.

The sources are in the 'src' directory and the documentation in the 'doc' directory; various examples are in the 'examples' subdirectory.

The source code in the 'src' and 'examples' directories is intended for a Haskell 98 compiler with hierarchical modules. It should work with GHC >= 5.04.

Build Instructions

If you just want to use Alex, you can download or install (via cabal install alex) an Alex release from Hackage; also note that distributions such as the Haskell Platform and other package manager-based distributions provide packages for Alex. Moreover, recent versions of cabal will automatically install the required version of alex based on build-tools/build-tool-depends declarations.

Read on if you want to build Alex directly from Git.

Alex is built using GHC & Cabal; so first install GHC and cabal-install-2.0 (or later).

Since Alex itself is implemented in terms of an Alex scanner, bootstrapping Alex is a bit tricky:

You need to have the build-tools alex and happy manually installed; either via your system package manager distribution, the Haskell Platform, or e.g. via (run this outside the Git repository!):

$ cabal install alex happy

which installs them into ${HOME}/.cabal/bin by default (make sure they're in your $PATH for the next steps!).

Variant A

First you need to generate the pre-processed templates via

$ cabal new-run gen-alex-sdist

(otherwise cabal install will complain about "data/AlexTemplate: copyFile: does not exist (No such file or directory)")

And then you can install alex simply by invoking

$ cabal install

from inside the Git folder.

Variant B

Alternatively, you can use the Makefile which automates the steps of producing a self-contained pre-bootstrapped source distribution with pre-generated lexer/scanners (and which also performs the cabal new-run gen-alex-sdist pre-preprocessing step):

$ make sdist
$ cabal install dist/alex-*.tar.gz

For convenience, there's also a make sdist-test target which builds the source source tarball and runs the test-suite from within the source dist.

Contributing & Reporting Issues

Please report any bugs or comments at https://github.com/simonmar/alex/issues

Share and enjoy,

Chris Dornan: [email protected]

Isaac Jones: [email protected]

Simon Marlow: [email protected]

alex's People

Contributors

airmover avatar alexbiehl avatar chamini2 avatar davidlazar avatar dcoutts avatar donsbot avatar emc2 avatar erantapaa avatar erikd avatar ezyang avatar hvr avatar igfoo avatar josephcsible avatar jtdaugherty avatar nkpart avatar osa1 avatar peti avatar phadej avatar rwbarton avatar samb avatar sergv avatar shelarcy avatar simonmar avatar sol avatar spl avatar thomie avatar tlawson avatar trofi avatar vanessacristiny avatar yinguanhao avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.