No description
- C++ 96.8%
- Makefile 3.2%
| bin | Add basic parser executable accepting stdin input | |
| src | Omit node type in dict node format string | |
| tests | Omit node type in dict node format string | |
| .clang-format | Initial commit | |
| .clangd | Update to clang++ version 19 | |
| .gitignore | Initial commit | |
| compile_flags.txt | Initial commit | |
| Makefile | Add basic parser executable accepting stdin input | |
| README.md | Add README document | |
Running the parser executable
The parser executable currently only supports receiving data from stdin.
The following shows an example of building it, and running it with a few simple inputs:
> make
...
> echo "i3e" | ./main.out
3
> echo "5:hello" | ./main.out
"hello"
> echo "li2ei5ee" | ./main.out
[2, 5]
> echo "d5:helloi2e7:goodbyei67ee" | ./main.out
{"goodbye": 67, "hello": 2}
> echo "d3:fooli2e9:somethinge3:bard5:helloi2e7:goodbyei-1ee" | ./main.out
{"bar": {"goodbye": -1, "hello": 2}, "foo": [2, "something"]}
Running the tests
Catch2 is used for defining unit tests.
To run the tests:
- clone this repo
- download this Catch2 header
file from the Catch2 repo and
place it in a directory called
external/in the root of the cloned repo - run the
make testscommand, which should build and run the test suite