/ftlex

A generic ForTheL lexer

Primary LanguageHaskellGNU Lesser General Public License v3.0LGPL-3.0

FTLex – Formula Theory Lexer

This is a library that provides an abstract ForTheL lexer that is independent of concrete character encodings, position types, syntax highlighting specifications etc. and can thus be used as a generic basis for a wide range of ForTheL parsing frameworks.

Usage

Cabal

    • If you already have a file called cabal.project in your project directory, add https://github.com/McEarl/ftlex/archive/refs/tags/v0.3.5.tar.gz to packages there.

    • Otherwise, create a new file cabal.project that contains the following lines:

      packages:
        ./*.cabal
        https://github.com/McEarl/ftlex/archive/refs/tags/v0.3.5.tar.gz
  1. Add ftlex to build-depends in your <package name>.cabal.

Stack

  1. Add https://github.com/McEarl/ftlex/archive/refs/tags/v0.3.5.tar.gz to extra-deps in your stack.yaml.

  2. Add ftlex to dependencies in your package.yaml.

Development

Running the Test Suites

To run the test suites of this package, execute the following commands:

cabal configure --enable-tests
cabal build
cabal test --test-options="<path to ForTheL file>" --test-show-details=direct

(Note: The option --test-show-details=direct is necessary to allow user interaction during a test run.)

Generating a Source Distribution File

To generate a tarball of this package – which will be located at dist-newstyle/sdist/ftlex-0.3.4.tar.gz – simply execute the following command:

cabal sdist