Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/distributed-lab/circom-g4-grammar
G4 grammar for Circom
https://github.com/distributed-lab/circom-g4-grammar
antlr4 circom grammar
Last synced: about 2 months ago
JSON representation
G4 grammar for Circom
- Host: GitHub
- URL: https://github.com/distributed-lab/circom-g4-grammar
- Owner: distributed-lab
- Created: 2024-07-16T18:16:59.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-10-17T11:13:58.000Z (3 months ago)
- Last Synced: 2024-10-19T15:03:34.460Z (3 months ago)
- Topics: antlr4, circom, grammar
- Language: Circom
- Homepage:
- Size: 10 MB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Circom G4 Grammar Specification
This repository provides a Circom grammar implementation in G4 format using the [ANTLR](https://www.antlr.org) tool.
## Grammar Compatibility
Source: [Circom Parser Grammar](https://github.com/iden3/circom/blob/master/parser/src/lang.lalrpop)
### Issues
- The grammar described in this repository is unofficial. Consequently, the following issues may arise:
- The grammar may not be up-to-date.
- Some structures that are valid in the official grammar may not be valid in this version due to factors such as redundancy or complexity.Despite this, we strive to cover 99.9% of the existing Circom code, offering a simple and efficient structure. The parser is capable of handling both `circomlib` and `iden3-circuits`.
## Contribution
To contribute, first clone the repository:
```shell
git clone [email protected]:distributed-lab/circom-parser.git
cd circom-parser
```Next, install the dependencies:
```shell
go mod tidy
```Then, synchronize the git submodules:
```shell
git submodule update --init
git submodule update --remote
```After initializing the submodules, you are ready to generate the Go bindings for the grammar and run tests with a single command:
```shell
make
```