This is the home for the SNMP Simulator's SNMP Data File template grammar. The goal of this repository is to define SNMP Data File Templates and produce a testable, canonical grammar for the SNMP Data File template language.
This project includes a executable binary for exercising the grammar. Use
cargo run
to build and run it. Using --release
is encouraged as it is many
times faster. It supports several subcommands to point it at different files
or directories to examine. For example, if you check out the submodule
(explained below), you can run the tests with the following command:
cargo run --bin coverage --release -- dir testdata/ --verbose
This repository includes a set of testdata to test against the grammar.
Additionaly, a number of snapshot tests
are maintained in testdata. These files are named according to the
convention of <production>.<test-name>.input
, and the parse forest that they
produce is tracked in src/bin/snapshots. The tests are run with:
cargo run --bin snapshots --release
Once a snapshot is present for a given production, that production is, to the best of the maintainers' ability, considered "complete" in terms of its structure.
A test may also have the name <production>.<variant>.<test-name>.input
,
in which case only that variant should be considered tested and marked
"complete" by that test case.
At all times we reserve the right to change parse forests that do not produce unique parse trees, and to disambiguate tested parse forests to a subset.
This SNMP Simulator Grammar is licensed under the APACHE-2.0 license.
Want to contribute? Great 🎉
There are many ways to give back to the project, whether it be writing new code, fixing bugs, or just reporting errors. All forms of contributions are encouraged!
For instructions on how to contribute, see our Guide to contributing.