diff options
Diffstat (limited to 'src/parser')
-rw-r--r-- | src/parser/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/parser/antlr_input.cpp | 20 | ||||
-rw-r--r-- | src/parser/antlr_line_buffered_input.cpp | 38 | ||||
-rw-r--r-- | src/parser/antlr_tracing.h | 6 | ||||
-rw-r--r-- | src/parser/cvc/Cvc.g | 4 | ||||
-rw-r--r-- | src/parser/memory_mapped_input_buffer.cpp | 6 | ||||
-rw-r--r-- | src/parser/smt2/Smt2.g | 4 | ||||
-rw-r--r-- | src/parser/smt2/smt2.cpp | 6 | ||||
-rw-r--r-- | src/parser/tptp/tptp.cpp | 6 |
9 files changed, 47 insertions, 47 deletions
diff --git a/src/parser/CMakeLists.txt b/src/parser/CMakeLists.txt index d131fa7b3..08dafe65c 100644 --- a/src/parser/CMakeLists.txt +++ b/src/parser/CMakeLists.txt @@ -99,7 +99,7 @@ endforeach() # libcvc4parser configuration add_library(cvc4parser ${libcvc4parser_src_files}) -set_target_properties(cvc4parser PROPERTIES SOVERSION ${CVC4_SOVERSION}) +set_target_properties(cvc4parser PROPERTIES SOVERSION ${CVC5_SOVERSION}) target_compile_definitions(cvc4parser PRIVATE -D__BUILDING_CVC4PARSERLIB) target_link_libraries(cvc4parser PUBLIC cvc4) target_link_libraries(cvc4parser PRIVATE ANTLR3) @@ -119,7 +119,7 @@ install(TARGETS cvc4parser # unresolved symbols when linking against libcvc4parser. # -Wl,--export-all-symbols makes sure that all symbols are exported when # building a DLL. -if(CVC4_WINDOWS_BUILD) +if(CVC5_WINDOWS_BUILD) set_target_properties(cvc4parser PROPERTIES LINK_FLAGS "-Wl,--export-all-symbols") endif() diff --git a/src/parser/antlr_input.cpp b/src/parser/antlr_input.cpp index a818f4148..8a96fec11 100644 --- a/src/parser/antlr_input.cpp +++ b/src/parser/antlr_input.cpp @@ -42,7 +42,7 @@ namespace cvc5 { namespace parser { // These functions exactly wrap the antlr3 source inconsistencies. -// These are the only location CVC4_ANTLR3_OLD_INPUT_STREAM ifdefs appear. +// These are the only location CVC5_ANTLR3_OLD_INPUT_STREAM ifdefs appear. // No other sanity checking happens; pANTLR3_INPUT_STREAM newAntlr3BufferedStream(std::istream& input, const std::string& name, @@ -58,13 +58,13 @@ pANTLR3_INPUT_STREAM newAntlr3BufferedStream(std::istream& input, pANTLR3_INPUT_STREAM inputStream = NULL; pANTLR3_UINT8 name_duplicate = (pANTLR3_UINT8) strdup(name.c_str()); -#ifdef CVC4_ANTLR3_OLD_INPUT_STREAM +#ifdef CVC5_ANTLR3_OLD_INPUT_STREAM inputStream = antlr3LineBufferedStreamNew(input, 0, name_duplicate, line_buffer); -#else /* CVC4_ANTLR3_OLD_INPUT_STREAM */ +#else /* CVC5_ANTLR3_OLD_INPUT_STREAM */ inputStream = antlr3LineBufferedStreamNew(input, ANTLR3_ENC_8BIT, name_duplicate, line_buffer); -#endif /* CVC4_ANTLR3_OLD_INPUT_STREAM */ +#endif /* CVC5_ANTLR3_OLD_INPUT_STREAM */ free(name_duplicate); return inputStream; @@ -75,11 +75,11 @@ pANTLR3_INPUT_STREAM newAntlr3FileStream(const std::string& name){ pANTLR3_UINT8 name_duplicate = (pANTLR3_UINT8) strdup(name.c_str()); // libantlr3c v3.2 isn't source-compatible with v3.4 -#ifdef CVC4_ANTLR3_OLD_INPUT_STREAM +#ifdef CVC5_ANTLR3_OLD_INPUT_STREAM input = antlr3AsciiFileStreamNew(name_duplicate); -#else /* CVC4_ANTLR3_OLD_INPUT_STREAM */ +#else /* CVC5_ANTLR3_OLD_INPUT_STREAM */ input = antlr3FileStreamNew(name_duplicate, ANTLR3_ENC_8BIT); -#endif /* CVC4_ANTLR3_OLD_INPUT_STREAM */ +#endif /* CVC5_ANTLR3_OLD_INPUT_STREAM */ free(name_duplicate); return input; @@ -92,14 +92,14 @@ pANTLR3_INPUT_STREAM newAntrl3InPlaceStream(pANTLR3_UINT8 basep, pANTLR3_UINT8 name_duplicate = (pANTLR3_UINT8) strdup(name.c_str()); pANTLR3_INPUT_STREAM inputStream = NULL; /* Create an ANTLR input backed by the buffer. */ -#ifdef CVC4_ANTLR3_OLD_INPUT_STREAM +#ifdef CVC5_ANTLR3_OLD_INPUT_STREAM inputStream = antlr3NewAsciiStringInPlaceStream(basep, size, name_duplicate); -#else /* CVC4_ANTLR3_OLD_INPUT_STREAM */ +#else /* CVC5_ANTLR3_OLD_INPUT_STREAM */ inputStream = antlr3StringStreamNew(basep, ANTLR3_ENC_8BIT, size, name_duplicate); -#endif /* CVC4_ANTLR3_OLD_INPUT_STREAM */ +#endif /* CVC5_ANTLR3_OLD_INPUT_STREAM */ free(name_duplicate); return inputStream; } diff --git a/src/parser/antlr_line_buffered_input.cpp b/src/parser/antlr_line_buffered_input.cpp index 1dd7c953c..bd4c910f9 100644 --- a/src/parser/antlr_line_buffered_input.cpp +++ b/src/parser/antlr_line_buffered_input.cpp @@ -341,25 +341,25 @@ pANTLR3_INPUT_STREAM antlr3LineBufferedStreamNew(std::istream& in, input->SetNewLineChar = bufferedInputSetNewLineChar; input->setUcaseLA = bufferedInputSetUcaseLA; -#ifndef CVC4_ANTLR3_OLD_INPUT_STREAM - // We have the data in memory now so we can deal with it according to - // the encoding scheme we were given by the user. - // - input->encoding = encoding; -#endif /* ! CVC4_ANTLR3_OLD_INPUT_STREAM */ +#ifndef CVC5_ANTLR3_OLD_INPUT_STREAM + // We have the data in memory now so we can deal with it according to + // the encoding scheme we were given by the user. + // + input->encoding = encoding; +#endif /* ! CVC5_ANTLR3_OLD_INPUT_STREAM */ - // Now we need to work out the endian type and install any - // API functions that differ from 8Bit - // - setupInputStream(input); + // Now we need to work out the endian type and install any + // API functions that differ from 8Bit + // + setupInputStream(input); - // Now we can set up the file name - // - input->istream->streamName = - input->strFactory->newStr8(input->strFactory, name); - input->fileName = input->istream->streamName; + // Now we can set up the file name + // + input->istream->streamName = + input->strFactory->newStr8(input->strFactory, name); + input->fileName = input->istream->streamName; - return input; + return input; } static pANTLR3_INPUT_STREAM antlr3CreateLineBufferedStream( @@ -391,16 +391,16 @@ static pANTLR3_INPUT_STREAM antlr3CreateLineBufferedStream( // Call the common 8 bit input stream handler // initialization. // -#ifdef CVC4_ANTLR3_OLD_INPUT_STREAM +#ifdef CVC5_ANTLR3_OLD_INPUT_STREAM antlr3AsciiSetupStream(input, ANTLR3_CHARSTREAM); -#else /* CVC4_ANTLR3_OLD_INPUT_STREAM */ +#else /* CVC5_ANTLR3_OLD_INPUT_STREAM */ antlr38BitSetupStream(input); // In some libantlr3c 3.4-beta versions, this call is not included in the // above. // This is probably an erroneously-deleted line in the libantlr3c source since // 3.2. antlr3GenericSetupStream(input); -#endif /* CVC4_ANTLR3_OLD_INPUT_STREAM */ +#endif /* CVC5_ANTLR3_OLD_INPUT_STREAM */ input->sizeBuf = 0; input->newlineChar = LineBuffer::NewLineChar; diff --git a/src/parser/antlr_tracing.h b/src/parser/antlr_tracing.h index 317b6ea98..e001512e6 100644 --- a/src/parser/antlr_tracing.h +++ b/src/parser/antlr_tracing.h @@ -18,8 +18,8 @@ #ifndef CVC5__PARSER__ANTLR_TRACING_H #define CVC5__PARSER__ANTLR_TRACING_H -// only enable the hack with -DCVC4_TRACE_ANTLR -#ifdef CVC4_TRACE_ANTLR +// only enable the hack with -DCVC5_TRACE_ANTLR +#ifdef CVC5_TRACE_ANTLR #include <iostream> #include <string> @@ -81,6 +81,6 @@ static struct __Cvc4System { #undef ANTLR3_PRINTF #define ANTLR3_PRINTF(args...) {int failed=0;printf(args);} -#endif /* CVC4_TRACE_ANTLR */ +#endif /* CVC5_TRACE_ANTLR */ #endif /* CVC5__PARSER__ANTLR_TRACING_H */ diff --git a/src/parser/cvc/Cvc.g b/src/parser/cvc/Cvc.g index 0b27b45fa..7b036fff4 100644 --- a/src/parser/cvc/Cvc.g +++ b/src/parser/cvc/Cvc.g @@ -525,7 +525,7 @@ api::Term addNots(api::Solver* s, size_t n, api::Term e) { * the lexer headers for two grammars AND (b) uses the token symbol definitions. */ #pragma GCC system_header -#if defined(CVC4_COMPETITION_MODE) && !defined(CVC4_SMTCOMP_APPLICATION_TRACK) +#if defined(CVC5_COMPETITION_MODE) && !defined(CVC5_SMTCOMP_APPLICATION_TRACK) /* This improves performance by ~10 percent on big inputs. * This option is only valid if we know the input is ASCII (or some 8-bit encoding). * If we know the input is UTF-16, we can use ANTLR3_INLINE_INPUT_UTF16. @@ -533,7 +533,7 @@ api::Term addNots(api::Solver* s, size_t n, api::Term e) { */ # define ANTLR3_INLINE_INPUT_ASCII # define ANTLR3_INLINE_INPUT_8BIT -#endif /* CVC4_COMPETITION_MODE && !CVC4_SMTCOMP_APPLICATION_TRACK */ +#endif /* CVC5_COMPETITION_MODE && !CVC5_SMTCOMP_APPLICATION_TRACK */ #include "parser/antlr_input.h" #include "parser/antlr_tracing.h" diff --git a/src/parser/memory_mapped_input_buffer.cpp b/src/parser/memory_mapped_input_buffer.cpp index 4259e328f..b1f1b8924 100644 --- a/src/parser/memory_mapped_input_buffer.cpp +++ b/src/parser/memory_mapped_input_buffer.cpp @@ -70,11 +70,11 @@ pANTLR3_INPUT_STREAM MemoryMappedInputBufferNew(const std::string& filename) { // Call the common 8 bit ASCII input stream handler // Initializer type thingy doobry function. // -#ifdef CVC4_ANTLR3_OLD_INPUT_STREAM +#ifdef CVC5_ANTLR3_OLD_INPUT_STREAM antlr3AsciiSetupStream(input, ANTLR3_CHARSTREAM); -#else /* CVC4_ANTLR3_OLD_INPUT_STREAM */ +#else /* CVC5_ANTLR3_OLD_INPUT_STREAM */ antlr38BitSetupStream(input); -#endif /* CVC4_ANTLR3_OLD_INPUT_STREAM */ +#endif /* CVC5_ANTLR3_OLD_INPUT_STREAM */ // Now we can set up the file name // diff --git a/src/parser/smt2/Smt2.g b/src/parser/smt2/Smt2.g index 00cf8e75a..66800ff53 100644 --- a/src/parser/smt2/Smt2.g +++ b/src/parser/smt2/Smt2.g @@ -48,7 +48,7 @@ options { */ #pragma GCC system_header -#if defined(CVC4_COMPETITION_MODE) && !defined(CVC4_SMTCOMP_APPLICATION_TRACK) +#if defined(CVC5_COMPETITION_MODE) && !defined(CVC5_SMTCOMP_APPLICATION_TRACK) /* This improves performance by ~10 percent on big inputs. * This option is only valid if we know the input is ASCII (or some 8-bit encoding). * If we know the input is UTF-16, we can use ANTLR3_INLINE_INPUT_UTF16. @@ -56,7 +56,7 @@ options { */ # define ANTLR3_INLINE_INPUT_ASCII # define ANTLR3_INLINE_INPUT_8BIT -#endif /* CVC4_COMPETITION_MODE && !CVC4_SMTCOMP_APPLICATION_TRACK */ +#endif /* CVC5_COMPETITION_MODE && !CVC5_SMTCOMP_APPLICATION_TRACK */ #include "parser/antlr_tracing.h" diff --git a/src/parser/smt2/smt2.cpp b/src/parser/smt2/smt2.cpp index a1659dcc2..c35582550 100644 --- a/src/parser/smt2/smt2.cpp +++ b/src/parser/smt2/smt2.cpp @@ -778,11 +778,11 @@ static bool newInputStream(const std::string& filename, pANTLR3_LEXER lexer) { // in C target runtime. // pANTLR3_INPUT_STREAM in; -#ifdef CVC4_ANTLR3_OLD_INPUT_STREAM +#ifdef CVC5_ANTLR3_OLD_INPUT_STREAM in = antlr3AsciiFileStreamNew((pANTLR3_UINT8) filename.c_str()); -#else /* CVC4_ANTLR3_OLD_INPUT_STREAM */ +#else /* CVC5_ANTLR3_OLD_INPUT_STREAM */ in = antlr3FileStreamNew((pANTLR3_UINT8) filename.c_str(), ANTLR3_ENC_8BIT); -#endif /* CVC4_ANTLR3_OLD_INPUT_STREAM */ +#endif /* CVC5_ANTLR3_OLD_INPUT_STREAM */ if( in == NULL ) { Debug("parser") << "Can't open " << filename << std::endl; return false; diff --git a/src/parser/tptp/tptp.cpp b/src/parser/tptp/tptp.cpp index 2f770a58d..0283554bc 100644 --- a/src/parser/tptp/tptp.cpp +++ b/src/parser/tptp/tptp.cpp @@ -114,11 +114,11 @@ bool newInputStream(std::string fileName, pANTLR3_LEXER lexer, std::vector< pANT // in C target runtime. // pANTLR3_INPUT_STREAM in; -#ifdef CVC4_ANTLR3_OLD_INPUT_STREAM +#ifdef CVC5_ANTLR3_OLD_INPUT_STREAM in = antlr3AsciiFileStreamNew((pANTLR3_UINT8) fileName.c_str()); -#else /* CVC4_ANTLR3_OLD_INPUT_STREAM */ +#else /* CVC5_ANTLR3_OLD_INPUT_STREAM */ in = antlr3FileStreamNew((pANTLR3_UINT8) fileName.c_str(), ANTLR3_ENC_8BIT); -#endif /* CVC4_ANTLR3_OLD_INPUT_STREAM */ +#endif /* CVC5_ANTLR3_OLD_INPUT_STREAM */ if(in == NULL) { Debug("parser") << "Can't open " << fileName << std::endl; return false; |