Skip to content

Commit

Permalink
Use grammars from the TS project for C++ port testing (#161)
Browse files Browse the repository at this point in the history
* Take grammars for C++ port testing from the TS project

Signed-off-by: vityaman <[email protected]>

* Reduce Cpp14 grammar to be portable

Signed-off-by: vityaman <[email protected]>

* Fix Cpp14 grammar

Signed-off-by: vityaman <[email protected]>

* Run C++ port checks on grammar changes

Signed-off-by: vityaman <[email protected]>

* Make C++ port debug output more like TS

Signed-off-by: vityaman <[email protected]>

* #162 Remove generated parsers

Signed-off-by: vityaman <[email protected]>

---------

Signed-off-by: vityaman <[email protected]>
  • Loading branch information
vityaman authored Jan 5, 2025
1 parent f3b44db commit 91a5db0
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 2,152 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ on:
paths:
- "ports/cpp/**"
- ".github/workflows/*"
- "tests/*.g4"
pull_request:
branches: ["main"]
paths:
- "ports/cpp/**"
- ".github/workflows/*"
- "tests/*.g4"

jobs:
build:
Expand Down
13 changes: 12 additions & 1 deletion ports/cpp/cmake/Testing.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,19 @@ macro(define_grammar_test grammar)
${CMAKE_CURRENT_LIST_DIR} NAME
)

set(
ANTLR4C3_TS_PROJECT_ROOT
${CMAKE_CURRENT_LIST_DIR}/../../../..
)

configure_file(
${ANTLR4C3_TS_PROJECT_ROOT}/tests/${grammar}
${CMAKE_CURRENT_BINARY_DIR}/${grammar}
COPYONLY
)

antlr_generate(
${CMAKE_CURRENT_LIST_DIR}/${grammar}
${CMAKE_CURRENT_BINARY_DIR}/${grammar}
${CMAKE_CURRENT_BINARY_DIR}
)

Expand Down
Loading

0 comments on commit 91a5db0

Please sign in to comment.