Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update kgt version. #20

Merged
merged 1 commit into from
Mar 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/translator/grammar/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ else()
set(FETCHCONTENT_UPDATES_DISCONNECTED TRUE)
FetchContent_Declare(kgt
GIT_REPOSITORY https://github.com/ArthurSonzogni/kgt
GIT_TAG origin/main
#GIT_TAG e79328f7c1ef61f66a841672ef7a2abf6404f231
GIT_TAG fbf51224bee7bcf7c32bdce4fba30207d7adf862
#GIT_TAG origin/main
)
FetchContent_GetProperties(kgt)
FetchContent_Populate(kgt)
Expand Down
4 changes: 2 additions & 2 deletions src/translator/grammar/Grammar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ using AstRulePtr = kgt::ast_rule*;
using Opaque = void*;
using OpaqueRead = int(Opaque);
using InputFunction = AstRulePtr(OpaqueRead, Opaque);
using OutputFunction = void(const struct kgt::ast_rule*);
using OutputFunction = int(const struct kgt::ast_rule*);

InputFunction* f = kgt::abnf_input;

Expand Down Expand Up @@ -298,7 +298,7 @@ std::string Grammar::Translate(const std::string& input,
: kgt::rrutf8_output;

auto* model = input_function(StringReader::Read, &string_reader);
output_function(model);
int error = output_function(model);

// Restore stdout
dup2(old_stdout, 1);
Expand Down