FlatParse 项目教程
flatparseFast parsing from bytestrings项目地址:https://gitcode.com/gh_mirrors/fl/flatparse
1. 项目的目录结构及介绍
FlatParse 项目的目录结构如下:
flatparse/
├── LICENSE
├── README.md
├── flake.lock
├── flake.nix
├── flatparse.cabal
├── package.yaml
├── stack-8.10.7.yaml
├── stack-8.6.5.yaml
├── stack-8.8.4.yaml
├── stack-9.0.2.yaml
├── stack-9.2.8.yaml
├── stack-9.4.6.yaml
├── stack.yaml
├── src/
│ └── FlatParse/
│ ├── Basic.hs
│ ├── Bytewise.hs
│ ├── CharacterPredicates.hs
│ ├── Combinators.hs
│ ├── Debugging.hs
│ ├── ErrorsAndFailures.hs
│ ├── ParserTypes.hs
│ ├── PositionText.hs
│ ├── PrimitiveResultTypes.hs
│ ├── RunningParsers.hs
│ ├── ST.hs
│ ├── UTFConversion.hs
│ ├── UnsafeIO.hs
│ └── package.yaml
├── test/
│ └── Spec.hs
├── .gitignore
└── .github/
└── workflows/
└── bench.yaml
目录介绍
LICENSE
: 项目的许可证文件。README.md
: 项目的介绍和使用说明。flake.lock
和 flake.nix
: Nix 包管理器的配置文件。flatparse.cabal
: Cabal 构建系统的配置文件。package.yaml
: Haskell 包描述文件。stack-*.yaml
: Stack 构建系统的不同版本配置文件。src/
: 源代码目录,包含 FlatParse 库的主要实现。test/
: 测试代码目录。.gitignore
: Git 忽略文件配置。.github/workflows/
: GitHub Actions 工作流配置。
2. 项目的启动文件介绍
FlatParse 项目的启动文件主要是 src/FlatParse/Basic.hs
,这是 FlatParse 库的基本实现文件。它定义了基本的解析器类型和运行解析器的方法。
module FlatParse.Basic (
module FlatParse.ParserTypes,
module FlatParse.RunningParsers,
module FlatParse.PrimitiveResultTypes,
module FlatParse.UTFConversion,
module FlatParse.CharacterPredicates,
module FlatParse.Bytewise,
module FlatParse.Combinators,
module FlatParse.ErrorsAndFailures,
module FlatParse.PositionText,
module FlatParse.ST,
module FlatParse.UnsafeIO,
module FlatParse.Debugging
) where
import FlatParse.ParserTypes
import FlatParse.RunningParsers
import FlatParse.PrimitiveResultTypes
import FlatParse.UTFConversion
import FlatParse.CharacterPredicates
import FlatParse.Bytewise
import FlatParse.Combinators
import FlatParse.ErrorsAndFailures
import FlatParse.PositionText
import FlatParse.ST
import FlatParse.UnsafeIO
import FlatParse.Debugging
3. 项目的配置文件介绍
flatparse.cabal
flatparse.cabal
是 Cabal 构建系统的配置文件,定义了项目的元数据、依赖关系和构建指令。
name: flatparse
version: 0.5.1.0
synopsis: High-performance parsing from strict bytestrings
description: Please see the README on GitHub at <https://github.com/AndrasKovacs/flatparse#readme>
license: MIT
license-file: LICENSE
author: Andras Kovacs
maintainer: put your email here
copyright: (c) 2021 Andras Kovacs
category: Parsing
build-type: Simple
extra-source-files: README.md
cabal-version: >=1.10
library
exposed-modules:
FlatParse.Basic
FlatParse.Bytewise
FlatParse.CharacterPredicates
FlatParse.Combinators
FlatParse.Debugging
FlatParse.ErrorsAndFailures
FlatParse.ParserTypes
FlatParse.PositionText
FlatParse.PrimitiveResultTypes
FlatParse.RunningParsers
FlatParse.ST
Flat
flatparseFast parsing from bytestrings项目地址:https://gitcode.com/gh_mirrors/fl/flatparse
© 版权声明
特别提醒: 内容为用户自行发布,如有侵权,请联系我们管理员删除,邮箱:mail@xieniao.com ,在收到您的邮件后我们会在3个工作日内处理。
相关文章
暂无评论...