Skip to main content

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

Metadata

Release files for seclang_parser 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for seclang_parser 0.3.2
File Size Uploaded
seclang_parser-0.3.2.tar.gz 341.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for seclang_parser 0.3.2
File Interpreter ABI Platform
seclang_parser-0.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 434.1 kB

Release files / seclang_parser-0.3.2.tar.gz

Download URL seclang_parser-0.3.2.tar.gz
Size 341.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5ff065189e49f24fef425b97fffdde790558f1df8d04cd9bd1fe8cf3d1ef7223
BLAKE2b-256 checksum
How to use checksums
62be1f44eb44339ad2d158680ce49955e77020c34fe4441229ea03852d831c4d
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release files / seclang_parser-0.3.2-py3-none-any.whl

Download URL seclang_parser-0.3.2-py3-none-any.whl
Size 93.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
482ef5d9c3f7d6ae18bfcd68356b3755f26b0cf6e908129f1489b34735bb540d
BLAKE2b-256 checksum
How to use checksums
2c4f6659b58ecb93da3cd3c3b17a53a5409b44d4da2f64190dcd45442ba3a6b7
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release history Release notifications | RSS feed

This release

0.3.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page