https://github.com/colis-anr/morsmall
A concise AST for POSIX shell
https://github.com/colis-anr/morsmall
ocaml shell
Last synced: 9 months ago
JSON representation
A concise AST for POSIX shell
- Host: GitHub
- URL: https://github.com/colis-anr/morsmall
- Owner: colis-anr
- License: gpl-3.0
- Created: 2017-10-03T13:43:29.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2023-09-17T16:39:28.000Z (almost 3 years ago)
- Last Synced: 2025-04-03T18:52:46.891Z (about 1 year ago)
- Topics: ocaml, shell
- Language: OCaml
- Homepage:
- Size: 395 KB
- Stars: 10
- Watchers: 3
- Forks: 4
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Morsmall -- A concise AST for POSIX shell
This library is a small wrapper around [Morbig]. Morbig provides a parser and a
CST representation of POSIX shell scripts which may contain too much information
for certain uses.
[morbig]: https://github.com/colis-anr/morbig/
Morsmall provides a converter from Morbig's CST to an AST that aims to be easely
understandable and manipulable. It also provides a printer from that AST to
Shell.
This program is a free software licensed under the GNU General Public License,
version 3. Please refer to the [LICENSE](./LICENSE).
## Downloading, building and installing
### Download
#### Clone the repository
```
git clone https://github.com/colis-anr/morsmall
```
#### Download the latest release
cf [releases](https://github.com/colis-anr/morsmall/releases)
### Install dependencies
Morsmall depends on the following software:
- [OCaml](https://ocaml.org/) ≥ 4.04.0
- [Morbig](https://github.com/colis-anr/morbig/)
- [ppx_deriving](https://github.com/ocaml-ppx/ppx_deriving) ≥ 4.2.0
- [Dune](https://github.com/ocaml/dune) with ocaml-migrate-parsetree
- [OPAM](http://opam.ocaml.org/)
### Build
```
make
```
### Run tests
```
make tests
```
### Install
```
make install
```
This target recognises the environment variables `PREFIX` and `LIBDIR`.
### Uninstall
```
make uninstall
```
This target recognises the environment variables `PREFIX` and `LIBDIR`.