Skip to content

Commit 4096dda

Browse files
author
moticless
committed
First draft - only support parsing strings and lists
1 parent 588a0d4 commit 4096dda

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+10414
-1
lines changed

.github/workflows/ci.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
15+
- name: Install Prerequisites
16+
run: |
17+
sudo apt-get update
18+
sudo apt-get install -y cmake libssl-dev valgrind git
19+
git clone https://git.cryptomilk.org/projects/cmocka.git
20+
cd cmocka
21+
mkdir build
22+
cd build
23+
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local
24+
make
25+
ctest
26+
sudo make install
27+
28+
shell: bash
29+
30+
- name: Build and run project
31+
run: |
32+
export LD_LIBRARY_PATH=/usr/local/lib/
33+
make
34+
working-directory: ${{github.workspace}}

.gitignore

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
bin/*
2+
lib/*
3+
.idea/*
4+
/**/*.o
5+
/**/*.d
6+
7+
test/log/*
8+
test/tmp/*
9+
test/test_static_lib
10+
test/test_lib
11+
12+
examples/example1
13+
examples/dumps/*.json
14+
15+

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023, Redis Labs
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

Makefile

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
all:
2+
$(MAKE) -C src -f Makefile $@
3+
$(MAKE) -C src/ext -f Makefile $@
4+
$(MAKE) -C examples -f Makefile $@
5+
$(MAKE) -C test -f Makefile $@
6+
./runtests -v
7+
8+
lib:
9+
$(MAKE) -C src -f Makefile all
10+
$(MAKE) -C src/ext -f Makefile all
11+
$(MAKE) -C examples -f Makefile all
12+
13+
clean:
14+
$(MAKE) -C src -f Makefile $@
15+
$(MAKE) -C src/ext -f Makefile $@
16+
$(MAKE) -C examples -f Makefile $@
17+
$(MAKE) -C test -f Makefile $@
18+
19+
example:
20+
cd examples && export LD_LIBRARY_PATH=../lib && ./example1
21+
22+
test:
23+
./runtests
24+
25+
valgrind:
26+
./runtests -v
27+
28+
help:
29+
@echo "Target rules:"
30+
@echo " all - Build parser libraries, tests, and run tests."
31+
@echo " lib - Build parser libraries."
32+
@echo " test - Run tests with shared lib."
33+
@echo " valgrind - Run tests with static lib and valgrind."
34+
@echo " example - Run the example."
35+
@echo " clean - "
36+
@echo " help - Prints this message."
37+
38+
39+
.PHONY: all clean test help valgrind lib

0 commit comments

Comments
 (0)