Skip to content
This repository was archived by the owner on Nov 5, 2024. It is now read-only.

Commit 9671320

Browse files
committed
updated to a new structure
1 parent 03e5f2f commit 9671320

File tree

175 files changed

+5290
-19178
lines changed

Some content is hidden

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

175 files changed

+5290
-19178
lines changed

.depend

Lines changed: 74 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,75 @@
1-
target/debug/byte_ptr.o: src/byte_ptr.cpp src/byte_ptr.h
2-
3-
target/debug/bytes.o: src/bytes.cpp src/bytes.h src/byte_ptr.h
4-
5-
target/debug/comment.o: src/comment.cpp src/comment.h src/comment_type.h \
6-
src/loc.h src/bytes.h src/byte_ptr.h src/input.h
7-
8-
target/debug/custom_decoder.o: src/custom_decoder.cpp \
9-
src/custom_decoder.h src/bytes.h src/byte_ptr.h
10-
11-
target/debug/diagnostic.o: src/diagnostic.cpp src/diagnostic.h \
12-
src/error_level.h src/bytes.h src/byte_ptr.h src/loc.h src/input.h \
13-
src/message.h src/gen/messages/variant.h src/gen/messages/classes.h \
14-
src/gen/messages/../../bytes.h
15-
16-
target/debug/input.o: src/input.cpp src/input.h src/bytes.h \
17-
src/byte_ptr.h
18-
19-
target/debug/loc.o: src/loc.cpp src/loc.h src/bytes.h src/byte_ptr.h \
20-
src/input.h
21-
22-
target/debug/low_level.o: src/low_level.cpp src/low_level.h \
23-
src/gen/nodes/make.h src/gen/nodes/../../byte_ptr.h \
24-
src/gen/nodes/../../node.h src/gen/nodes/variant.h \
25-
src/gen/nodes/classes.h src/gen/nodes/../../loc.h src/bytes.h \
26-
src/byte_ptr.h src/input.h src/gen/nodes/../../bytes.h \
27-
src/gen/messages/make.h src/gen/messages/../../error_level.h \
28-
src/gen/messages/../../byte_ptr.h src/comment_type.h src/error_level.h \
29-
src/magic_comment_kind.h src/comment.h src/loc.h src/custom_decoder.h \
30-
src/token.h src/diagnostic.h src/message.h src/gen/messages/variant.h \
31-
src/gen/messages/classes.h src/gen/messages/../../bytes.h \
32-
src/magic_comment.h src/parser_options.h src/token_rewriter.h \
33-
src/parser_result.h src/node.h
34-
35-
target/debug/magic_comment.o: src/magic_comment.cpp src/magic_comment.h \
36-
src/magic_comment_kind.h src/loc.h src/bytes.h src/byte_ptr.h \
37-
src/input.h
38-
39-
target/debug/message.o: src/message.cpp src/message.h \
40-
src/gen/messages/variant.h src/gen/messages/classes.h \
41-
src/gen/messages/../../bytes.h src/byte_ptr.h
42-
43-
target/debug/node.o: src/node.cpp src/node.h src/gen/nodes/variant.h \
44-
src/gen/nodes/classes.h src/gen/nodes/../../loc.h src/bytes.h \
45-
src/byte_ptr.h src/input.h src/gen/nodes/../../bytes.h \
46-
src/gen/nodes/../../node.h
47-
48-
target/debug/parser_options.o: src/parser_options.cpp \
49-
src/parser_options.h src/custom_decoder.h src/bytes.h src/byte_ptr.h \
50-
src/token_rewriter.h src/token.h src/loc.h src/input.h
51-
52-
target/debug/parser_result.o: src/parser_result.cpp src/parser_result.h \
53-
src/bytes.h src/byte_ptr.h src/node.h src/gen/nodes/variant.h \
54-
src/gen/nodes/classes.h src/gen/nodes/../../loc.h src/input.h \
55-
src/gen/nodes/../../bytes.h src/gen/nodes/../../node.h src/token.h \
56-
src/loc.h src/diagnostic.h src/error_level.h src/message.h \
57-
src/gen/messages/variant.h src/gen/messages/classes.h \
58-
src/gen/messages/../../bytes.h src/comment.h src/comment_type.h \
59-
src/magic_comment.h src/magic_comment_kind.h src/parser_options.h \
60-
src/custom_decoder.h src/token_rewriter.h
61-
62-
target/debug/token.o: src/token.cpp src/token.h src/bytes.h \
63-
src/byte_ptr.h src/loc.h src/input.h
64-
65-
target/debug/token_rewriter.o: src/token_rewriter.cpp \
66-
src/token_rewriter.h src/token.h src/bytes.h src/byte_ptr.h src/loc.h \
67-
src/input.h
68-
69-
target/debug/gen/messages/classes.o: src/gen/messages/classes.cpp \
70-
src/gen/messages/classes.h src/gen/messages/../../bytes.h \
71-
src/gen/messages/../../byte_ptr.h
72-
73-
target/debug/gen/messages/make.o: src/gen/messages/make.cpp \
74-
src/gen/messages/make.h src/gen/messages/../../error_level.h \
75-
src/gen/messages/../../byte_ptr.h src/gen/messages/variant.h \
76-
src/gen/messages/classes.h src/gen/messages/../../bytes.h \
77-
src/gen/messages/../../message.h \
78-
src/gen/messages/../../gen/messages/variant.h \
79-
src/gen/messages/../../loc.h src/gen/messages/../../input.h \
80-
src/gen/messages/../../diagnostic.h
81-
82-
target/debug/gen/messages/render.o: src/gen/messages/render.cpp \
83-
src/gen/messages/render.h src/gen/messages/../../error_level.h \
84-
src/gen/messages/../../byte_ptr.h src/gen/messages/../../diagnostic.h \
85-
src/gen/messages/../../bytes.h src/gen/messages/../../loc.h \
86-
src/gen/messages/../../input.h src/gen/messages/../../message.h \
87-
src/gen/messages/../../gen/messages/variant.h \
88-
src/gen/messages/classes.h
89-
90-
target/debug/gen/nodes/classes.o: src/gen/nodes/classes.cpp \
91-
src/gen/nodes/classes.h src/gen/nodes/../../loc.h \
92-
src/gen/nodes/../../bytes.h src/gen/nodes/../../byte_ptr.h \
93-
src/gen/nodes/../../input.h src/gen/nodes/../../node.h \
94-
src/gen/nodes/../../gen/nodes/variant.h
95-
96-
target/debug/gen/nodes/make.o: src/gen/nodes/make.cpp \
97-
src/gen/nodes/make.h src/gen/nodes/../../byte_ptr.h \
98-
src/gen/nodes/../../node.h src/gen/nodes/../../gen/nodes/variant.h \
99-
src/gen/nodes/classes.h src/gen/nodes/../../loc.h \
100-
src/gen/nodes/../../bytes.h src/gen/nodes/../../input.h
1+
2+
alloc.o: alloc.cpp alloc.hpp
3+
4+
api.o: api.cpp api.hpp parser_options.hpp string.hpp decoder.hpp \
5+
bytes.hpp token_rewriter.hpp token.hpp loc.hpp decoded_input.hpp \
6+
source_line.hpp token_ids.hpp shared_byte_list.hpp parser_result.hpp \
7+
nodes.hpp diagnostic.hpp messages.hpp comment.hpp magic_comment.hpp \
8+
utils.hpp test_helper.hpp
9+
10+
blobs.o: blobs.cpp
11+
12+
bytes.o: bytes.cpp bytes.hpp utils.hpp test_helper.hpp
13+
14+
comment.o: comment.cpp utils.hpp comment.hpp loc.hpp decoded_input.hpp \
15+
string.hpp source_line.hpp bytes.hpp test_helper.hpp
16+
17+
decoded_input.o: decoded_input.cpp utils.hpp decoded_input.hpp string.hpp \
18+
source_line.hpp bytes.hpp test_helper.hpp
19+
20+
decoder.o: decoder.cpp decoder.hpp string.hpp bytes.hpp utils.hpp \
21+
test_helper.hpp
22+
23+
diagnostic.o: diagnostic.cpp diagnostic.hpp messages.hpp string.hpp \
24+
loc.hpp decoded_input.hpp source_line.hpp bytes.hpp utils.hpp \
25+
test_helper.hpp
26+
27+
loc.o: loc.cpp utils.hpp loc.hpp decoded_input.hpp string.hpp \
28+
source_line.hpp bytes.hpp test_helper.hpp
29+
30+
magic_comment.o: magic_comment.cpp magic_comment.hpp loc.hpp \
31+
decoded_input.hpp string.hpp source_line.hpp bytes.hpp utils.hpp \
32+
test_helper.hpp
33+
34+
messages.o: messages.cpp messages.hpp string.hpp utils.hpp \
35+
test_helper.hpp
36+
37+
nodes.o: nodes.cpp nodes.hpp string.hpp loc.hpp decoded_input.hpp \
38+
source_line.hpp bytes.hpp utils.hpp test_helper.hpp
39+
40+
parser_options.o: parser_options.cpp parser_options.hpp string.hpp \
41+
decoder.hpp bytes.hpp token_rewriter.hpp token.hpp loc.hpp \
42+
decoded_input.hpp source_line.hpp token_ids.hpp shared_byte_list.hpp \
43+
utils.hpp test_helper.hpp
44+
45+
parser_result.o: parser_result.cpp parser_result.hpp nodes.hpp string.hpp \
46+
loc.hpp decoded_input.hpp source_line.hpp bytes.hpp token.hpp \
47+
token_ids.hpp diagnostic.hpp messages.hpp comment.hpp \
48+
magic_comment.hpp utils.hpp test_helper.hpp
49+
50+
shared_byte_list.o: shared_byte_list.cpp shared_byte_list.hpp \
51+
test_helper.hpp
52+
53+
source_line.o: source_line.cpp source_line.hpp utils.hpp test_helper.hpp
54+
55+
string.o: string.cpp string.hpp utils.hpp test_helper.hpp
56+
57+
test_helper.o: test_helper.cpp test_helper.hpp
58+
59+
token.o: token.cpp token.hpp bytes.hpp loc.hpp decoded_input.hpp \
60+
string.hpp source_line.hpp token_ids.hpp utils.hpp test_helper.hpp
61+
62+
token_rewriter.o: token_rewriter.cpp token_rewriter.hpp token.hpp \
63+
bytes.hpp loc.hpp decoded_input.hpp string.hpp source_line.hpp \
64+
token_ids.hpp shared_byte_list.hpp utils.hpp test_helper.hpp
65+
66+
tests/runner: tests/test.cpp tests/../test_helper.hpp tests/../bytes.hpp \
67+
tests/../comment.hpp tests/../loc.hpp tests/../decoded_input.hpp \
68+
tests/../string.hpp tests/../source_line.hpp tests/../decoder.hpp \
69+
tests/../diagnostic.hpp tests/../messages.hpp \
70+
tests/../magic_comment.hpp tests/../nodes.hpp \
71+
tests/../parser_options.hpp tests/../token_rewriter.hpp \
72+
tests/../token.hpp tests/../token_ids.hpp \
73+
tests/../shared_byte_list.hpp tests/../parser_result.hpp \
74+
tests/../api.hpp
10175

.github/workflows/test.yml

Lines changed: 58 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -11,74 +11,79 @@ env:
1111

1212
jobs:
1313
test:
14-
name: ${{matrix.build.name}}
14+
name: ${{ matrix.build.name }}
1515
runs-on: ${{ matrix.build.os }}
1616
env:
17-
CARGO_BUILD_TARGET: ${{ matrix.build.target }}
18-
CC: ${{ matrix.build.cc }}
17+
BUILD_ENV: debug
18+
TARGET: ${{ matrix.build.target }}
1919
CXX: ${{ matrix.build.cxx }}
2020
LD: ${{ matrix.build.ld }}
21-
CARGOFLAGS: ${{ matrix.build.cargoflags }}
21+
AR: ${{ matrix.build.ar }}
2222
strategy:
2323
fail-fast: false
2424
matrix:
2525
build:
26-
- os: ubuntu-latest
26+
- name: test on linux (clang)
27+
os: ubuntu-latest
2728
target: x86_64-unknown-linux-gnu
28-
cc: clang-9
29-
cxx: clang++-9
30-
ld: ld.lld-9
31-
cargoflags: --features="generate-bindings,onig"
32-
name: valgrind
33-
run: make clean test-valgrind
29+
cxx: clang++-12
30+
ld: ld.lld-12
31+
ar: llvm-ar-12
32+
run: make tests/run
3433

35-
- os: ubuntu-latest
36-
target: x86_64-unknown-linux-gnu
37-
cc: clang-9
38-
cxx: clang++-9
39-
ld: ld.lld-9
40-
cargoflags: --features="generate-bindings,onig"
41-
name: asan
42-
run: CXXFLAGS="-fsanitize=address" make clean test
43-
44-
- os: ubuntu-latest
45-
target: x86_64-unknown-linux-gnu
46-
cc: clang-9
47-
cxx: clang++-9
48-
ld: ld.lld-9
49-
cargoflags: --features="generate-bindings,onig"
50-
name: test on linux
51-
run: make clean test
52-
53-
- os: macos-latest
34+
- name: test on mac (clang)
35+
os: macos-latest
5436
target: x86_64-apple-darwin
55-
cc: clang
5637
cxx: clang++
5738
ld: ld
58-
cargoflags: --features="generate-bindings,onig"
59-
name: test on mac
60-
run: make clean test
39+
ar: ar
40+
run: |
41+
$CC --version
42+
make tests/run
6143
62-
- os: windows-latest
44+
- name: test on windows (msvc)
45+
os: windows-latest
6346
target: x86_64-pc-windows-msvc
64-
cc: cl.exe
6547
cxx: cl.exe
6648
ld: link.exe
67-
cargoflags: ""
68-
name: test on windows
69-
run: make clean test
49+
run: |
50+
make tests/run
51+
52+
- name: test on windows (mingw)
53+
os: windows-latest
54+
target: x86_64-pc-windows-gnu
55+
cxx: g++
56+
ld: ld
57+
ar: ar
58+
run: |
59+
gcc --version
60+
make tests/run
61+
62+
- name: valgrind
63+
os: ubuntu-latest
64+
target: x86_64-unknown-linux-gnu
65+
cxx: clang++-12
66+
ld: ld.lld-12
67+
ar: llvm-ar-12
68+
run: |
69+
sudo apt-get update
70+
sudo apt-get install -y valgrind libtool-bin
71+
make tests/runner
72+
valgrind ./tests/runner
73+
74+
- name: asan
75+
os: ubuntu-latest
76+
target: x86_64-unknown-linux-gnu
77+
cxx: clang++-12
78+
ld: ld.lld-12
79+
ar: llvm-ar-12
80+
run: ASAN_OPTIONS=detect_leaks=1 CXXFLAGS="-fsanitize=address" make tests/run
7081

7182
steps:
7283
- name: setup msvc on windows
7384
if: runner.os == 'Windows'
7485
uses: ilammy/msvc-dev-cmd@v1
7586

76-
- name: fix linker on windows
77-
if: runner.os == 'Windows'
78-
run: |
79-
rm "C:\\Program Files\\Git\\usr\\bin\\link.exe"
80-
which -a link.exe
81-
8287
- name: install rust
8388
uses: actions-rs/toolchain@v1
8489
with:
@@ -87,15 +92,18 @@ jobs:
8792
target: ${{ matrix.build.target }}
8893
override: true
8994

95+
- name: print rustc detailed version
96+
run: rustc --version --verbose
97+
9098
- name: checkout
9199
uses: actions/checkout@v2
92100

93-
- name: install valgrind
94-
if: runner.os == 'Linux'
101+
- name: codegen
102+
env:
103+
RUSTFLAGS: ""
95104
run: |
96-
sudo apt-get update
97-
sudo apt-get install -y valgrind
105+
make do-codegen
106+
make token_ids.h
98107
99108
- name: run tests
100-
shell: bash
101109
run: ${{ matrix.build.run }}

.gitignore

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1-
target/
2-
lib-ruby-parser-cpp-bindings/target
3-
lib-ruby-parser-cpp-bindings/Cargo.lock
1+
ruby-parser-cpp/src/message.rs
2+
ruby-parser-cpp/src/node.rs
3+
ruby-parser-cpp/target
4+
ruby-parser-cpp/Cargo.lock
5+
codegen/Cargo.lock
6+
lib-ruby-parser.hpp
7+
messages.hpp
8+
messages.cpp
9+
nodes.hpp
10+
nodes.cpp
11+
token_ids.hpp
12+
target
13+
*.o
14+
*.a
15+
*.dSYM
16+
tests/runner
17+
benchmark/repos.zip
18+
benchmark/rust-parser
19+
benchmark/ruby-parser.rb
20+
benchmark/repos
21+
benchmark/c-parser
22+
benchmark/filelist
23+
benchmark/stats
24+
*.benchmark-out

0 commit comments

Comments
 (0)