tlex-th: TemplateHaskell plugin for Tlex

[ library, parsing ] [ Propose Tags ]

Tlex is haskell libraries and toolchains for generating lexical analyzer. See also: https://github.com/mizunashi-mana/tlex


[Skip to Readme]
Versions [faq] 0.1.0.0, 0.2.0.0, 0.2.0.1, 0.3.0.0
Change log CHANGELOG.md
Dependencies array (>=0.5.3 && <0.6), base (>=4.12.0 && <4.15), containers (>=0.6.0 && <0.7), enummapset-th (>=0.6.0 && <0.7), ghc-prim (>=0.5.3 && <0.7), template-haskell (>=2.14.0 && <2.17.0), tlex (>=0.3.0 && <0.4), tlex-core (>=0.3.0 && <0.4) [details]
License (Apache-2.0 OR MPL-2.0)
Copyright (c) 2021 Mizunashi Mana
Author Mizunashi Mana
Maintainer mizunashi-mana@noreply.git
Category Parsing
Home page https://github.com/mizunashi-mana/tlex
Bug tracker https://github.com/mizunashi-mana/tlex/issues
Source repo head: git clone https://github.com/mizunashi-mana/tlex.git
Uploaded by mizunashi_mana at 2021-05-03T14:30:50Z
Distributions NixOS:0.2.0.1
Downloads 160 total (62 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2021-05-03 [all 1 reports]

Modules

[Index] [Quick Jump]

Flags

NameDescriptionDefaultType
develop

Turn on some options for development

DisabledManual

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for tlex-th-0.3.0.0

[back to package description]

Tlex Plugin: Template Haskell

Hackage

See also https://hackage.haskell.org/package/tlex

Usage

This plugin outputs from Scanner these APIs:

-- aliases of arguments of @buildTHScanner@
type TlexStartState :: Type
type TlexSemanticAction :: Type
type TlexCodeUnit :: Type

-- lexing API
tlexScan :: TlexContext s TlexCodeUnit m => TlexStartState -> m (TlexResult s TlexSemanticAction)

-- runner fields
thTlexInitial :: Int -> Int
thTlexTrans :: Int -> Int -> Int
thTlexAccept :: Int -> Maybe TlexSemanticAction