String-parsing in Nix

From NixOS Wiki
Revision as of 19:26, 17 November 2022 by imported>Milahu (update: Parser combinators)

String parsers

Some string parsers written in Nix

yaml

toml

yarn.lock

Lisp

arithmetic

https://github.com/nprindle/nix-parsec/tree/master/examples/arithmetic

cabal freeze

https://github.com/nix-community/dream2nix/blob/main/src/subsystems/haskell/translators/cabal-freeze/parser.nix

IPv4 addresses

https://github.com/NixOS/nix/issues/1491#issuecomment-318273971

UUID

https://github.com/nprindle/nix-parsec/tree/master/examples/uuids

Linux kernel config

https://github.com/nprindle/nix-parsec/tree/master/examples/kernel-config

Python setup.cfg

https://github.com/seppeljordan/nix-setuptools/blob/master/lib/setuptools.nix

PureScript

https://github.com/purs-nix/purs-nix/blob/master/parser.nix

Parser combinators

Build parsers from grammars

See also