Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikeizbicki/parsed
a haskellified version of the classic sed unix tool
https://github.com/mikeizbicki/parsed
Last synced: 6 days ago
JSON representation
a haskellified version of the classic sed unix tool
- Host: GitHub
- URL: https://github.com/mikeizbicki/parsed
- Owner: mikeizbicki
- License: bsd-3-clause
- Created: 2014-08-22T07:29:26.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-04-01T15:06:16.000Z (almost 10 years ago)
- Last Synced: 2024-11-08T22:36:56.377Z (2 months ago)
- Language: TeX
- Homepage:
- Size: 383 KB
- Stars: 21
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# parsed
Parsed (pronounced par-séd) is a suite of shell scripts to simplify parsing from the Unix shell.
It improves the classic sed program by incorporating ideas from Haskell's popular [parsec](https://hackage.haskell.org/package/parsec) library.
In particular, the Unix pipe operator `|` corresponds exactly to Haskell's Applicative bind `*>`.
The resulting syntax is both intuitive and powerful.
The original syntax used by sed can match only regular languages;
but our improved syntax can match any context sensitive language.For example, the following one liner creates a parser for matching balanced parenthesis.
```
$ parens() { choice "$1" "match '(' | parens \"$1\" | match ')'"; }
```
For more examples and a detailed tutorial, please see our [SIGBOVIK2015 paper](https://github.com/mikeizbicki/parsed/raw/master/sigbovik2015/paper.pdf).