Skip to content

Commit

Permalink
README.md: fixed typo. Changed defualt to default.
Browse files Browse the repository at this point in the history
UnbufferedCharStream.cpp: fixed warning: comparison of integers of different signs: 'value_type' (aka 'char32_t') and 'int_type' (aka 'int') [-Wsign-compare].
Vocabulary.cpp: fixed  warning: ‘antlr4::dfa::Vocabulary::EMPTY_VOCABULARY’ is deprecated: Use the default constructor of Vocabulary instead. [-Wdeprecated-declarations].

Signed-off-by: rturrado <[email protected]>
  • Loading branch information
rturrado committed Dec 11, 2023
1 parent 74528a8 commit 6d13837
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion runtime/Cpp/cmake/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ ANTLR4_TAG - branch/tag used for building antlr4 library

`ANTLR4_TAG` is set to master branch by default to keep the antlr4 library up to date. However, this will require a rebuild after every `clean` is called. Set `ANTLR4_TAG` to a desired commit hash value to avoid rebuilding after every `clean` and keep the build stable, at the cost of not automatically updating to latest commit.

By defualt the ANTLR C++ runtime source is cloned from GitHub. However, users may specify `ANTLR4_ZIP_REPOSITORY` in order to download source as a zip file from [ANTLR downloads](http://www.antlr.org/download.html) (under *C++ Target*) or other locations. For example, this variable could list a zip file included in your the project directory. This is useful for maintaining a canonical source tree for each new build.
By default the ANTLR C++ runtime source is cloned from GitHub. However, users may specify `ANTLR4_ZIP_REPOSITORY` in order to download source as a zip file from [ANTLR downloads](http://www.antlr.org/download.html) (under *C++ Target*) or other locations. For example, this variable could list a zip file included in your the project directory. This is useful for maintaining a canonical source tree for each new build.

Visual C++ compiler users may want to additionally define `ANTLR4_WITH_STATIC_CRT` before including the file. Set `ANTLR4_WITH_STATIC_CRT` to true if ANTLR4 C++ runtime library should be compiled with `/MT` flag, otherwise will be compiled with `/MD` flag. This variable has a default value of `OFF`. Changing `ANTLR4_WITH_STATIC_CRT` after building the library may require reinitialization of CMake or `clean` for the library to get rebuilt.

Expand Down
2 changes: 1 addition & 1 deletion runtime/Cpp/runtime/src/UnbufferedCharStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ size_t UnbufferedCharStream::LA(ssize_t i) {
return EOF;
}

if (_data[static_cast<size_t>(index)] == std::char_traits<wchar_t>::eof()) {
if (_data[static_cast<size_t>(index)] == std::char_traits<char32_t>::eof()) {
return EOF;
}

Expand Down
2 changes: 1 addition & 1 deletion runtime/Cpp/runtime/src/Vocabulary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

using namespace antlr4::dfa;

const Vocabulary Vocabulary::EMPTY_VOCABULARY;
const Vocabulary Vocabulary{};

Vocabulary::Vocabulary(std::vector<std::string> literalNames, std::vector<std::string> symbolicNames)
: Vocabulary(std::move(literalNames), std::move(symbolicNames), {}) {
Expand Down

0 comments on commit 6d13837

Please sign in to comment.