SecLang Parser using ANTLR
Project description
SecLang ANTLR based parser
This repo contains the ANTLR files for a SecLang parser.
Why a new parser?
There has been efforts towards having parsers in different languages. Using ANTLR would allow us to have a common parser and generate parsing engines for different languages easily. This way we would consolidate efforts, and we can have a more robust parser.
Features we (might) want
- Agnostic: no language dependent, parser should be independent of the destination language.
- High Level: writing low level dependent parsing rules is prone to error and makes the language more difficult.
- Can be used from native code, e.g, no dependencies or CGo (this might hurt Coraza, for example)
- Can generate in many languages, and be read and extended by everyone.
- We choose one base implementation language (Python/Go?) and anyone can contribute others.
Usage
Right now this repo contains the ANTLR files and golang and python 3 basic tests.
To run the tests:
go generate ./...
go test ./...
Or for python:
- Get uv first
cd parser
./generate.sh
cd ..
uv sync --all-extras --dev
uv run pytest -vs
Authors
Felipe Zipitria felipe.zipitria@owasp.org
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file seclang_parser-0.3.2.tar.gz.
File metadata
- Download URL: seclang_parser-0.3.2.tar.gz
- Upload date:
- Size: 341.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ff065189e49f24fef425b97fffdde790558f1df8d04cd9bd1fe8cf3d1ef7223
|
|
| MD5 |
58281b449467b892b066b14d859bfcd4
|
|
| BLAKE2b-256 |
62be1f44eb44339ad2d158680ce49955e77020c34fe4441229ea03852d831c4d
|
File details
Details for the file seclang_parser-0.3.2-py3-none-any.whl.
File metadata
- Download URL: seclang_parser-0.3.2-py3-none-any.whl
- Upload date:
- Size: 93.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
482ef5d9c3f7d6ae18bfcd68356b3755f26b0cf6e908129f1489b34735bb540d
|
|
| MD5 |
693ccc1eb58830008b3fbe43471f8448
|
|
| BLAKE2b-256 |
2c4f6659b58ecb93da3cd3c3b17a53a5409b44d4da2f64190dcd45442ba3a6b7
|