Skip to content

Commit c133279

Browse files
authored
Merge pull request #31 from Certora/readme_update
Create README.md
2 parents 2355e07 + e95b4a6 commit c133279

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# cvldoc_parser
2+
This program parses Certora's `CVLDoc` comments. It contains the following modules:
3+
* [`parse`](/src/parse), which lexes and parses the subset of `CVL` required to be compatible with `CVLDoc`, including the `CVLDoc` documentation blocks
4+
* [`python_wrapper`](/src/python_wrapper), which exports the Python package `cvldoc_parser` using [`PyO3`](https://pyo3.rs). This is also used by [`cvldocTool`](https://github.com/Certora/cvldocTool).

src/python_wrapper/README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
# CVLDoc Parser: Python module
2-
Exposes a Python API for the CVLDoc module. WIP.
2+
Exposes a Python API for the CVLDoc module.
3+
Currently exposes a single function, `cvldoc_parser.parse(path)`. It takes a single path, and returns a list of parsed CVLDoc objects.
34

4-
## Usage
5-
First, make sure **Rust 1.62** or newer is installed.
5+
## Install
6+
Up-to-date builds (built by the CircleCI script) are available on Test `PyPI`:
7+
8+
`pip install --pre --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple cvldoc_parser`
9+
10+
## Build
11+
First, [install Rust](https://rustup.rs/).
612
Clone [the entire repo](https://github.com/Certora/cvldoc_parser), then from the project base:
713
```bash
814
$ cd src/python_wrapper
@@ -22,7 +28,3 @@ It is now possible to import the module:
2228
$ python
2329
>>> import cvldoc_parser
2430
```
25-
26-
## API
27-
Currently exposes a single function, `cvldoc_parser.parse(paths)`. It takes a list of file paths as strings, and returns a list of parsed CVLDoc objects for each path.
28-
A parsed CVLDoc object is either a `Documentation` or a `FreeForm`. They both support a `diagnostics()` method, that returns a list of warnings or errors associated with that object.

0 commit comments

Comments
 (0)