From 66b2c51e7da6028b889a4160872513ed91a704ab Mon Sep 17 00:00:00 2001 From: ihedvall <92839244+ihedvall@users.noreply.github.com> Date: Mon, 14 Aug 2023 16:36:31 +0200 Subject: [PATCH] Added vcpkg build --- .idea/.name | 1 - CMakeLists.txt | 28 ++--- dbcviewer/CMakeLists.txt | 5 +- script/expat.cmake | 20 +++ script/zlib.cmake | 25 ++++ src/FlexLexer.h | 220 +++++++++++++++++++++++++++++++++ src/dbcflexer.cpp | 152 +++++++++++------------ src/dbcparser.cpp | 256 +++++++++++++++++++-------------------- src/dbcparser.hpp | 20 +-- test/CMakeLists.txt | 1 - vcpkg.json | 16 +++ 11 files changed, 512 insertions(+), 232 deletions(-) delete mode 100644 .idea/.name create mode 100644 script/expat.cmake create mode 100644 script/zlib.cmake create mode 100644 src/FlexLexer.h create mode 100644 vcpkg.json diff --git a/.idea/.name b/.idea/.name deleted file mode 100644 index 6ef138a..0000000 --- a/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -dbcLib \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 9a835d2..41ed015 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,16 +1,15 @@ # Copyright 2023 Ingemar Hedvall # SPDX-License-Identifier: MIT cmake_minimum_required(VERSION 3.20) -project(dbcLib +project(dbclib VERSION 1.0 DESCRIPTION "CAN DBC C++ library." LANGUAGES CXX) -option(CMAKE_SHARED_LIBS "Static libraries are preferred" OFF) +option(BUILD_SHARED_LIBS "Static libraries are preferred" OFF) option(DBC_DOC "If doxygen is installed, then build documentation in Release mode" OFF) option(DBC_TOOLS "Building applications" ON) option(DBC_TEST "Building unit test" ON) -option(DBC_YACC "Building Flex and Bison dependent files" OFF) set(CMAKE_CXX_STANDARD 11) set(CMAKE_DEBUG_POSTFIX d) @@ -18,21 +17,21 @@ set(CMAKE_DEBUG_POSTFIX d) include(CMakePrintHelpers) if (DBC_TOOLS) -include(script/wxwidgets.cmake) + include(script/wxwidgets.cmake) endif() if (DBC_TEST) -include(script/googletest.cmake) + include(script/googletest.cmake) endif() if (DBC_DOC) -include(script/doxygen.cmake) + include(script/doxygen.cmake) endif() include(script/flex.cmake) include(script/bison.cmake) -if (DBC_YACC AND BISON_FOUND) +if (BISON_FOUND) BISON_TARGET(DBC_PARSER src/dbcparser.y ${CMAKE_CURRENT_SOURCE_DIR}/src/dbcparser.cpp COMPILE_FLAGS "") cmake_print_variables(BISON_DBC_PARSER_DEFINED @@ -44,16 +43,18 @@ if (DBC_YACC AND BISON_FOUND) BISON_INCLUDE_DIRS) endif () -if (DBC_YACC AND FLEX_FOUND) +if (FLEX_FOUND) FLEX_TARGET(DBC_SCANNER src/dbcflexer.l ${CMAKE_CURRENT_SOURCE_DIR}/src/dbcflexer.cpp) cmake_print_variables(FLEX_DBC_SCANNER_DEFINED FLEX_DBC_SCANNER_OUTPUTS FLEX_DBC_SCANNER_INPUT FLEX_DBC_SCANNER_OUTPUT_HEADER FLEX_INCLUDE_DIRS) + # Copy FlexLexer.h. This is a dirty trick to avoid flex/bison installation in windows build + file(COPY_FILE ${FLEX_INCLUDE_DIRS}/FlexLexer.h ${CMAKE_CURRENT_SOURCE_DIR}/src/FlexLexer.h) endif () -if (DBC_YACC AND FLEX_FOUND AND BISON_FOUND) +if (FLEX_FOUND AND BISON_FOUND) ADD_FLEX_BISON_DEPENDENCY(DBC_SCANNER DBC_PARSER) endif() @@ -71,9 +72,9 @@ set(DBCL_HEADERS include/dbc/signalobserver.h ) -add_library(dbc STATIC +add_library(dbc src/dbcparser.cpp src/dbcparser.hpp - src/dbcflexer.cpp + src/FlexLexer.h src/dbcflexer.cpp ${DBCL_HEADERS} src/attribute.cpp src/network.cpp @@ -92,7 +93,7 @@ add_library(dbc STATIC target_include_directories(dbc PUBLIC $ $ - ${FLEX_INCLUDE_DIRS} ) + ) target_include_directories(dbc PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) cmake_print_properties(TARGETS dbc PROPERTIES INCLUDE_DIRECTORIES) @@ -101,9 +102,6 @@ if (MSVC) target_compile_definitions(dbc PRIVATE _WIN32_WINNT=0x0A00) endif () -if (DBC_TOOLS) -# add_subdirectory(listend) -endif () if (wxWidgets_FOUND AND DBC_TOOLS) add_subdirectory(dbcviewer) diff --git a/dbcviewer/CMakeLists.txt b/dbcviewer/CMakeLists.txt index 4771d1d..1d0cb31 100644 --- a/dbcviewer/CMakeLists.txt +++ b/dbcviewer/CMakeLists.txt @@ -7,9 +7,10 @@ project(MdfViewer LANGUAGES CXX) set(CMAKE_CXX_STANDARD 20) include("../script/boost.cmake") +include("../script/zlib.cmake") include("../script/utillib.cmake") include("../script/mdflib.cmake") - +message(STATUS "ZLIB Libraries: " ${ZLIB_LIBRARIES}) add_executable(dbcview src/dbcviewer.cpp src/dbcviewer.h src/mainframe.cpp src/mainframe.h @@ -41,6 +42,7 @@ endif() target_link_libraries(dbcview PRIVATE dbc) target_link_libraries(dbcview PRIVATE util) + if (MDFLIB_LOCAL_FETCH) target_link_libraries(dbcview PRIVATE mdf) else() @@ -48,6 +50,7 @@ else() endif() target_link_libraries(dbcview PRIVATE ${wxWidgets_LIBRARIES}) target_link_libraries(dbcview PRIVATE ${Boost_LIBRARIES}) +target_link_libraries(dbcview PRIVATE ${ZLIB_LIBRARIES}) if (MINGW) target_link_libraries(dbcview PRIVATE iconv) diff --git a/script/expat.cmake b/script/expat.cmake new file mode 100644 index 0000000..1ce0e1d --- /dev/null +++ b/script/expat.cmake @@ -0,0 +1,20 @@ +# Copyright 2021 Ingemar Hedvall +# SPDX-License-Identifier: MIT + +if (NOT EXPAT_FOUND) + find_package(EXPAT) + message(STATUS "EXPAT Found (Try 1): " ${EXPAT_FOUND}) + if (NOT EXPAT_FOUND) + set(EXPAT_USE_STATIC_LIBS ON) + if (COMP_DIR) + set(EXPAT_ROOT ${COMP_DIR}/expat/master) + endif() + + find_package(EXPAT REQUIRED) + message(STATUS "EXPAT Found (Try 2): " ${EXPAT_FOUND}) + endif() + message(STATUS "EXPAT Include Dirs: " ${EXPAT_INCLUDE_DIRS}) + message(STATUS "EXPAT Libraries: " ${EXPAT_LIBRARIES}) +endif() + + diff --git a/script/zlib.cmake b/script/zlib.cmake new file mode 100644 index 0000000..462778c --- /dev/null +++ b/script/zlib.cmake @@ -0,0 +1,25 @@ +# Copyright 2021 Ingemar Hedvall +# SPDX-License-Identifier: MIT + +# Use the static ZLIB. Currently the line below doesn't work. +# The solution is to use the COMP_DIR if it is defined otherwise +# is the DLL version loaded. +set(ZLIB_USE_STATIC_LIBS ON) + +if (NOT ZLIB_FOUND) + if (COMP_DIR) + set(ZLIB_ROOT ${COMP_DIR}/zlib/master) + endif() + + find_package(ZLIB) + message(STATUS "ZLIB Found (Try 1): " ${ZLIB_FOUND}) + if (NOT ZLIB_FOUND) + set(ZLIB_ROOT ${COMP_DIR}/zlib/master) + find_package(ZLIB REQUIRED) + message(STATUS "ZLIB Found (Try 2): " ${ZLIB_FOUND}) + endif() +endif() + +message(STATUS "ZLIB Version: " ${ZLIB_VERSION_STRING}) +message(STATUS "ZLIB Include Dirs: " ${ZLIB_INCLUDE_DIRS}) +message(STATUS "ZLIB Libraries: " ${ZLIB_LIBRARIES}) \ No newline at end of file diff --git a/src/FlexLexer.h b/src/FlexLexer.h new file mode 100644 index 0000000..c4dad2b --- /dev/null +++ b/src/FlexLexer.h @@ -0,0 +1,220 @@ +// -*-C++-*- +// FlexLexer.h -- define interfaces for lexical analyzer classes generated +// by flex + +// Copyright (c) 1993 The Regents of the University of California. +// All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Kent Williams and Tom Epperly. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: + +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. + +// Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE. + +// This file defines FlexLexer, an abstract class which specifies the +// external interface provided to flex C++ lexer objects, and yyFlexLexer, +// which defines a particular lexer class. +// +// If you want to create multiple lexer classes, you use the -P flag +// to rename each yyFlexLexer to some other xxFlexLexer. You then +// include in your other sources once per lexer class: +// +// #undef yyFlexLexer +// #define yyFlexLexer xxFlexLexer +// #include +// +// #undef yyFlexLexer +// #define yyFlexLexer zzFlexLexer +// #include +// ... + +#ifndef __FLEX_LEXER_H +// Never included before - need to define base class. +#define __FLEX_LEXER_H + +#include + +extern "C++" { + +struct yy_buffer_state; +typedef int yy_state_type; + +class FlexLexer +{ +public: + virtual ~FlexLexer() { } + + const char* YYText() const { return yytext; } + int YYLeng() const { return yyleng; } + + virtual void + yy_switch_to_buffer( yy_buffer_state* new_buffer ) = 0; + virtual yy_buffer_state* yy_create_buffer( std::istream* s, int size ) = 0; + virtual yy_buffer_state* yy_create_buffer( std::istream& s, int size ) = 0; + virtual void yy_delete_buffer( yy_buffer_state* b ) = 0; + virtual void yyrestart( std::istream* s ) = 0; + virtual void yyrestart( std::istream& s ) = 0; + + virtual int yylex() = 0; + + // Call yylex with new input/output sources. + int yylex( std::istream& new_in, std::ostream& new_out ) + { + switch_streams( new_in, new_out ); + return yylex(); + } + + int yylex( std::istream* new_in, std::ostream* new_out = 0) + { + switch_streams( new_in, new_out ); + return yylex(); + } + + // Switch to new input/output streams. A nil stream pointer + // indicates "keep the current one". + virtual void switch_streams( std::istream* new_in, + std::ostream* new_out ) = 0; + virtual void switch_streams( std::istream& new_in, + std::ostream& new_out ) = 0; + + int lineno() const { return yylineno; } + + int debug() const { return yy_flex_debug; } + void set_debug( int flag ) { yy_flex_debug = flag; } + +protected: + char* yytext; + int yyleng; + int yylineno; // only maintained if you use %option yylineno + int yy_flex_debug; // only has effect with -d or "%option debug" +}; + +} +#endif // FLEXLEXER_H + +#if defined(yyFlexLexer) || ! defined(yyFlexLexerOnce) +// Either this is the first time through (yyFlexLexerOnce not defined), +// or this is a repeated include to define a different flavor of +// yyFlexLexer, as discussed in the flex manual. +# define yyFlexLexerOnce + +extern "C++" { + +class yyFlexLexer : public FlexLexer { +public: + // arg_yyin and arg_yyout default to the cin and cout, but we + // only make that assignment when initializing in yylex(). + yyFlexLexer( std::istream& arg_yyin, std::ostream& arg_yyout ); + yyFlexLexer( std::istream* arg_yyin = 0, std::ostream* arg_yyout = 0 ); +private: + void ctor_common(); + +public: + + virtual ~yyFlexLexer(); + + void yy_switch_to_buffer( yy_buffer_state* new_buffer ); + yy_buffer_state* yy_create_buffer( std::istream* s, int size ); + yy_buffer_state* yy_create_buffer( std::istream& s, int size ); + void yy_delete_buffer( yy_buffer_state* b ); + void yyrestart( std::istream* s ); + void yyrestart( std::istream& s ); + + void yypush_buffer_state( yy_buffer_state* new_buffer ); + void yypop_buffer_state(); + + virtual int yylex(); + virtual void switch_streams( std::istream& new_in, std::ostream& new_out ); + virtual void switch_streams( std::istream* new_in = 0, std::ostream* new_out = 0 ); + virtual int yywrap(); + +protected: + virtual int LexerInput( char* buf, int max_size ); + virtual void LexerOutput( const char* buf, int size ); + virtual void LexerError( const char* msg ); + + void yyunput( int c, char* buf_ptr ); + int yyinput(); + + void yy_load_buffer_state(); + void yy_init_buffer( yy_buffer_state* b, std::istream& s ); + void yy_flush_buffer( yy_buffer_state* b ); + + int yy_start_stack_ptr; + int yy_start_stack_depth; + int* yy_start_stack; + + void yy_push_state( int new_state ); + void yy_pop_state(); + int yy_top_state(); + + yy_state_type yy_get_previous_state(); + yy_state_type yy_try_NUL_trans( yy_state_type current_state ); + int yy_get_next_buffer(); + + std::istream yyin; // input source for default LexerInput + std::ostream yyout; // output sink for default LexerOutput + + // yy_hold_char holds the character lost when yytext is formed. + char yy_hold_char; + + // Number of characters read into yy_ch_buf. + int yy_n_chars; + + // Points to current character in buffer. + char* yy_c_buf_p; + + int yy_init; // whether we need to initialize + int yy_start; // start state number + + // Flag which is used to allow yywrap()'s to do buffer switches + // instead of setting up a fresh yyin. A bit of a hack ... + int yy_did_buffer_switch_on_eof; + + + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + yy_buffer_state ** yy_buffer_stack; /**< Stack as an array. */ + void yyensure_buffer_stack(void); + + // The following are not always needed, but may be depending + // on use of certain flex features (like REJECT or yymore()). + + yy_state_type yy_last_accepting_state; + char* yy_last_accepting_cpos; + + yy_state_type* yy_state_buf; + yy_state_type* yy_state_ptr; + + char* yy_full_match; + int* yy_full_state; + int yy_full_lp; + + int yy_lp; + int yy_looking_for_trail_begin; + + int yy_more_flag; + int yy_more_len; + int yy_more_offset; + int yy_prev_more_offset; +}; + +} + +#endif // yyFlexLexer || ! yyFlexLexerOnce diff --git a/src/dbcflexer.cpp b/src/dbcflexer.cpp index ee5147f..8e63f71 100644 --- a/src/dbcflexer.cpp +++ b/src/dbcflexer.cpp @@ -1,7 +1,7 @@ -#line 2 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.cpp" +#line 1 "D:/projects/dbclib/src/dbcflexer.cpp" #include -#line 5 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.cpp" +#line 4 "D:/projects/dbclib/src/dbcflexer.cpp" #define YY_INT_ALIGNED short int @@ -405,7 +405,7 @@ typedef flex_uint8_t YY_CHAR; #include -int yyFlexLexer::yywrap() { return 1; } +inline int yyFlexLexer::yywrap() { return 1; } int yyFlexLexer::yylex() { LexerError( "yyFlexLexer::yylex invoked but %option yyclass used" ); @@ -709,18 +709,18 @@ static const flex_int16_t yy_rule_linenum[63] = #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET -#line 1 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 1 "D:/projects/dbclib/src/dbcflexer.l" -#line 5 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 5 "D:/projects/dbclib/src/dbcflexer.l" #include "dbcscanner.h" #undef YY_DECL #define YY_DECL int dbc::DbcScanner::ddlex(dbc::DbcParser::value_type* yy_value) using token = dbc::DbcParser::token; -#line 720 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.cpp" +#line 719 "D:/projects/dbclib/src/dbcflexer.cpp" #define YY_NO_UNISTD_H 1 #define YY_NO_INPUT 1 -#line 724 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.cpp" +#line 723 "D:/projects/dbclib/src/dbcflexer.cpp" #define INITIAL 0 #define PRI 1 @@ -747,7 +747,7 @@ static const flex_int16_t yy_rule_linenum[63] = #include /* %endif */ #endif - + #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif @@ -924,13 +924,13 @@ YY_DECL { /* %% [7.0] user's declarations go here */ -#line 34 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 34 "D:/projects/dbclib/src/dbcflexer.l" -#line 37 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 37 "D:/projects/dbclib/src/dbcflexer.l" yylval = yy_value; -#line 934 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.cpp" +#line 933 "D:/projects/dbclib/src/dbcflexer.cpp" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -1017,217 +1017,217 @@ YY_DECL case 1: YY_RULE_SETUP -#line 39 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 39 "D:/projects/dbclib/src/dbcflexer.l" { } /* Remove comments */ YY_BREAK case 2: YY_RULE_SETUP -#line 40 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 40 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_VERSION; } YY_BREAK case 3: YY_RULE_SETUP -#line 41 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 41 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_BO; } YY_BREAK case 4: YY_RULE_SETUP -#line 42 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 42 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_BS; } YY_BREAK case 5: YY_RULE_SETUP -#line 43 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 43 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_BU; } YY_BREAK case 6: YY_RULE_SETUP -#line 44 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 44 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_SG; } YY_BREAK case 7: YY_RULE_SETUP -#line 45 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 45 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_EV; } YY_BREAK case 8: YY_RULE_SETUP -#line 46 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 46 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_SIG_VALTYPE; } YY_BREAK case 9: YY_RULE_SETUP -#line 47 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 47 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_NS;} YY_BREAK case 10: YY_RULE_SETUP -#line 48 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 48 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_INT; } YY_BREAK case 11: YY_RULE_SETUP -#line 49 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 49 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_FLOAT; } YY_BREAK case 12: YY_RULE_SETUP -#line 50 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 50 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_NAN; } YY_BREAK case 13: YY_RULE_SETUP -#line 51 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 51 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_STRING; } YY_BREAK case 14: YY_RULE_SETUP -#line 52 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 52 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_ENUM; } YY_BREAK case 15: YY_RULE_SETUP -#line 53 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 53 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_HEX; } YY_BREAK case 16: YY_RULE_SETUP -#line 55 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 55 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_NS_DESC; } YY_BREAK case 17: YY_RULE_SETUP -#line 56 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 56 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_CM; } YY_BREAK case 18: YY_RULE_SETUP -#line 57 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 57 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_BA_DEF; } YY_BREAK case 19: YY_RULE_SETUP -#line 58 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 58 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_BA; } YY_BREAK case 20: YY_RULE_SETUP -#line 59 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 59 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_VAL; } YY_BREAK case 21: YY_RULE_SETUP -#line 60 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 60 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_CAT_DEF; } YY_BREAK case 22: YY_RULE_SETUP -#line 61 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 61 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_CAT; } YY_BREAK case 23: YY_RULE_SETUP -#line 63 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 63 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_FILTER; } YY_BREAK case 24: YY_RULE_SETUP -#line 65 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 65 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_BA_DEF_DEF; } YY_BREAK case 25: YY_RULE_SETUP -#line 66 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 66 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_EV_DATA; } YY_BREAK case 26: YY_RULE_SETUP -#line 67 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 67 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_ENVVAR_DATA; } YY_BREAK case 27: YY_RULE_SETUP -#line 68 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 68 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_SGTYPE; } YY_BREAK case 28: YY_RULE_SETUP -#line 69 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 69 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_SGTYPE_VAL; } YY_BREAK case 29: YY_RULE_SETUP -#line 70 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 70 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_BA_DEF_SGTYPE; } YY_BREAK case 30: YY_RULE_SETUP -#line 71 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 71 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_BA_SGTYPE; } YY_BREAK case 31: YY_RULE_SETUP -#line 72 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 72 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_SIG_TYPE_REF; } YY_BREAK case 32: YY_RULE_SETUP -#line 73 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 73 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_VAL_TABLE; } YY_BREAK case 33: YY_RULE_SETUP -#line 74 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 74 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_SIG_GROUP; } YY_BREAK case 34: YY_RULE_SETUP -#line 75 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 75 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_SIGTYPE_VALTYPE; } YY_BREAK case 35: YY_RULE_SETUP -#line 76 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 76 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_BO_TX_BU; } YY_BREAK case 36: YY_RULE_SETUP -#line 77 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 77 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_BA_DEF_REL; } YY_BREAK case 37: YY_RULE_SETUP -#line 78 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 78 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_BA_REL; } YY_BREAK case 38: YY_RULE_SETUP -#line 79 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 79 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_BA_DEF_DEF_REL; } YY_BREAK case 39: YY_RULE_SETUP -#line 80 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 80 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_BU_SG_REL; } YY_BREAK case 40: YY_RULE_SETUP -#line 81 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 81 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_BU_EV_REL; } YY_BREAK case 41: YY_RULE_SETUP -#line 82 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 82 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_BU_BO_REL; } YY_BREAK case 42: YY_RULE_SETUP -#line 83 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 83 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_SG_MUL_VAL; } YY_BREAK case 43: YY_RULE_SETUP -#line 85 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 85 "D:/projects/dbclib/src/dbcflexer.l" { try { const auto index = std::stoi(yytext + 17); @@ -1241,17 +1241,17 @@ YY_RULE_SETUP case 44: /* rule 44 can match eol */ YY_RULE_SETUP -#line 95 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 95 "D:/projects/dbclib/src/dbcflexer.l" {} YY_BREAK case 45: YY_RULE_SETUP -#line 96 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 96 "D:/projects/dbclib/src/dbcflexer.l" {} YY_BREAK case 46: YY_RULE_SETUP -#line 97 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 97 "D:/projects/dbclib/src/dbcflexer.l" { const std::string temp(yytext); yylval->build(temp); @@ -1260,18 +1260,18 @@ YY_RULE_SETUP YY_BREAK case 47: YY_RULE_SETUP -#line 102 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 102 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_PLUS; } YY_BREAK case 48: YY_RULE_SETUP -#line 103 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 103 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_MINUS; } YY_BREAK case 49: /* rule 49 can match eol */ YY_RULE_SETUP -#line 104 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 104 "D:/projects/dbclib/src/dbcflexer.l" { const size_t len = strlen(yytext); std::string temp; @@ -1285,7 +1285,7 @@ YY_RULE_SETUP YY_BREAK case 50: YY_RULE_SETUP -#line 115 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 115 "D:/projects/dbclib/src/dbcflexer.l" { int64_t temp = 0; try { @@ -1299,7 +1299,7 @@ YY_RULE_SETUP YY_BREAK case 51: YY_RULE_SETUP -#line 128 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 128 "D:/projects/dbclib/src/dbcflexer.l" { uint64_t address = 0; for ( size_t index = 0; yytext[ index ] != '\0'; ++index ) { @@ -1351,7 +1351,7 @@ YY_RULE_SETUP YY_BREAK case 52: YY_RULE_SETUP -#line 176 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 176 "D:/projects/dbclib/src/dbcflexer.l" { double temp = 0.0; try { @@ -1365,60 +1365,60 @@ YY_RULE_SETUP YY_BREAK case 53: YY_RULE_SETUP -#line 187 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 187 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_COLON; } YY_BREAK case 54: YY_RULE_SETUP -#line 188 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 188 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_SEMICOLON; } YY_BREAK case 55: YY_RULE_SETUP -#line 189 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 189 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_SEP; } YY_BREAK case 56: YY_RULE_SETUP -#line 190 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 190 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_COMMA; } YY_BREAK case 57: YY_RULE_SETUP -#line 191 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 191 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_AT; } YY_BREAK case 58: YY_RULE_SETUP -#line 193 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 193 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_BOX_OPEN; } YY_BREAK case 59: YY_RULE_SETUP -#line 194 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 194 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_BOX_CLOSE; } YY_BREAK case 60: YY_RULE_SETUP -#line 195 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 195 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_PAR_OPEN; } YY_BREAK case 61: YY_RULE_SETUP -#line 196 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 196 "D:/projects/dbclib/src/dbcflexer.l" { return token::TAG_PAR_CLOSE; } YY_BREAK case 62: YY_RULE_SETUP -#line 199 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 199 "D:/projects/dbclib/src/dbcflexer.l" {} YY_BREAK case 63: YY_RULE_SETUP -#line 200 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 200 "D:/projects/dbclib/src/dbcflexer.l" ECHO; YY_BREAK -#line 1422 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.cpp" +#line 1421 "D:/projects/dbclib/src/dbcflexer.cpp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(PRI): case YY_STATE_EOF(VERSION): @@ -2557,7 +2557,7 @@ void yyfree (void * ptr ) /* %ok-for-header */ -#line 200 "/home/ihedvall/CLionProjects/dbclib/src/dbcflexer.l" +#line 200 "D:/projects/dbclib/src/dbcflexer.l" diff --git a/src/dbcparser.cpp b/src/dbcparser.cpp index 77078b0..37bb67a 100644 --- a/src/dbcparser.cpp +++ b/src/dbcparser.cpp @@ -44,7 +44,7 @@ // Unqualified %code blocks. -#line 19 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 19 "D:/projects/dbclib/src/dbcparser.y" #include #include "dbcscanner.h" @@ -53,7 +53,7 @@ #undef yylex #define yylex scanner.ddlex -#line 57 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 57 "D:/projects/dbclib/src/dbcparser.cpp" #ifndef YY_ @@ -125,9 +125,9 @@ #define YYERROR goto yyerrorlab #define YYRECOVERING() (!!yyerrstatus_) -#line 5 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 5 "D:/projects/dbclib/src/dbcparser.y" namespace dbc { -#line 131 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 131 "D:/projects/dbclib/src/dbcparser.cpp" /// Build a parser object. DbcParser::DbcParser (dbc::DbcScanner &scanner_yyarg) @@ -880,17 +880,17 @@ namespace dbc { switch (yyn) { case 25: // version: TAG_VERSION STRING_VAL -#line 134 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 134 "D:/projects/dbclib/src/dbcparser.y" { auto& network = scanner.GetNetwork(); network.Version(yystack_[0].value.as < std::string > ()); scanner.ResetTempList(); } -#line 890 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 890 "D:/projects/dbclib/src/dbcparser.cpp" break; case 58: // envvar: TAG_EV ID_VAL TAG_COLON INT_VAL TAG_BOX_OPEN double_val TAG_SEP double_val TAG_BOX_CLOSE STRING_VAL double_val INT_VAL TAG_DUMMY_NODE_VECTOR comma_identifier_list TAG_SEMICOLON -#line 193 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 193 "D:/projects/dbclib/src/dbcparser.y" { auto& network = scanner.GetNetwork(); auto& env_var = network.GetEnvVar(yystack_[13].value.as < std::string > ()); @@ -905,38 +905,38 @@ namespace dbc { env_var.NodeList(list); scanner.ResetTempList(); } -#line 909 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 909 "D:/projects/dbclib/src/dbcparser.cpp" break; case 59: // envvar_data: TAG_ENVVAR_DATA ID_VAL TAG_COLON INT_VAL TAG_SEMICOLON -#line 212 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 212 "D:/projects/dbclib/src/dbcparser.y" { /* To be defined what to do here */ scanner.ResetTempList(); } -#line 918 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 918 "D:/projects/dbclib/src/dbcparser.cpp" break; case 63: // attribute_value: INT_VAL -#line 226 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 226 "D:/projects/dbclib/src/dbcparser.y" { yylhs.value.as < std::string > () = std::to_string(yystack_[0].value.as < int64_t > ()); } -#line 924 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 924 "D:/projects/dbclib/src/dbcparser.cpp" break; case 64: // attribute_value: STRING_VAL -#line 227 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 227 "D:/projects/dbclib/src/dbcparser.y" { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } -#line 930 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 930 "D:/projects/dbclib/src/dbcparser.cpp" break; case 65: // attribute_value: DOUBLE_VAL -#line 228 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 228 "D:/projects/dbclib/src/dbcparser.y" { yylhs.value.as < std::string > () = std::to_string(yystack_[0].value.as < double > ()); } -#line 936 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 936 "D:/projects/dbclib/src/dbcparser.cpp" break; case 66: // attribute: TAG_BA STRING_VAL attribute_value TAG_SEMICOLON -#line 236 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 236 "D:/projects/dbclib/src/dbcparser.y" { auto& network = scanner.GetNetwork(); auto& definition = network.CreateDefinition(yystack_[2].value.as < std::string > ()); @@ -944,11 +944,11 @@ namespace dbc { attribute.Value(yystack_[1].value.as < std::string > ()); scanner.ResetTempList(); } -#line 948 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 948 "D:/projects/dbclib/src/dbcparser.cpp" break; case 67: // attribute: TAG_BA STRING_VAL TAG_BU ID_VAL attribute_value TAG_SEMICOLON -#line 249 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 249 "D:/projects/dbclib/src/dbcparser.y" { auto& network = scanner.GetNetwork(); auto& definition = network.CreateDefinition(yystack_[4].value.as < std::string > ()); @@ -959,11 +959,11 @@ namespace dbc { } scanner.ResetTempList(); } -#line 963 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 963 "D:/projects/dbclib/src/dbcparser.cpp" break; case 68: // attribute: TAG_BA STRING_VAL TAG_BO INT_VAL attribute_value TAG_SEMICOLON -#line 265 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 265 "D:/projects/dbclib/src/dbcparser.y" { auto& network = scanner.GetNetwork(); auto& definition = network.CreateDefinition(yystack_[4].value.as < std::string > ()); @@ -974,11 +974,11 @@ namespace dbc { } scanner.ResetTempList(); } -#line 978 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 978 "D:/projects/dbclib/src/dbcparser.cpp" break; case 69: // attribute: TAG_BA STRING_VAL TAG_SG INT_VAL ID_VAL attribute_value TAG_SEMICOLON -#line 282 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 282 "D:/projects/dbclib/src/dbcparser.y" { auto& network = scanner.GetNetwork(); auto& definition = network.CreateDefinition(yystack_[5].value.as < std::string > ()); @@ -989,54 +989,54 @@ namespace dbc { } scanner.ResetTempList(); } -#line 993 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 993 "D:/projects/dbclib/src/dbcparser.cpp" break; case 70: // attribute_rel: TAG_BA_REL STRING_VAL TAG_BU_SG_REL ID_VAL TAG_SG INT_VAL ID_VAL attribute_value TAG_SEMICOLON -#line 304 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 304 "D:/projects/dbclib/src/dbcparser.y" { /* To be defined */ scanner.ResetTempList(); } -#line 1002 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1002 "D:/projects/dbclib/src/dbcparser.cpp" break; case 71: // attribute_definition_default: attribute_definition_object_or_relation STRING_VAL double_val TAG_SEMICOLON -#line 312 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 312 "D:/projects/dbclib/src/dbcparser.y" { auto& network = scanner.GetNetwork(); auto& definition = network.CreateDefinition( yystack_[2].value.as < std::string > () ); definition.Value( yystack_[1].value.as < double > () ); scanner.ResetTempList(); } -#line 1013 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1013 "D:/projects/dbclib/src/dbcparser.cpp" break; case 72: // attribute_definition_default: attribute_definition_object_or_relation STRING_VAL STRING_VAL TAG_SEMICOLON -#line 319 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 319 "D:/projects/dbclib/src/dbcparser.y" { auto& network = scanner.GetNetwork(); auto& definition = network.CreateDefinition( yystack_[2].value.as < std::string > () ); definition.Value( yystack_[1].value.as < std::string > () ); scanner.ResetTempList(); } -#line 1024 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1024 "D:/projects/dbclib/src/dbcparser.cpp" break; case 73: // attribute_definition_object_or_relation: TAG_BA_DEF_DEF -#line 327 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 327 "D:/projects/dbclib/src/dbcparser.y" { yylhs.value.as < bool > () = false; } -#line 1030 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1030 "D:/projects/dbclib/src/dbcparser.cpp" break; case 74: // attribute_definition_object_or_relation: TAG_BA_DEF_DEF_REL -#line 328 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 328 "D:/projects/dbclib/src/dbcparser.y" { yylhs.value.as < bool > () = true; } -#line 1036 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1036 "D:/projects/dbclib/src/dbcparser.cpp" break; case 75: // attribute_definition: attribute_object_type STRING_VAL TAG_INT INT_VAL INT_VAL TAG_SEMICOLON -#line 333 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 333 "D:/projects/dbclib/src/dbcparser.y" { auto& network = scanner.GetNetwork(); auto& definition = network.CreateDefinition( yystack_[4].value.as < std::string > () ); @@ -1046,11 +1046,11 @@ namespace dbc { definition.Max(static_cast( yystack_[1].value.as < int64_t > () )); scanner.ResetTempList(); } -#line 1050 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1050 "D:/projects/dbclib/src/dbcparser.cpp" break; case 76: // attribute_definition: attribute_object_type STRING_VAL TAG_FLOAT double_val double_val TAG_SEMICOLON -#line 343 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 343 "D:/projects/dbclib/src/dbcparser.y" { auto& network = scanner.GetNetwork(); auto& definition = network.CreateDefinition( yystack_[4].value.as < std::string > () ); @@ -1060,11 +1060,11 @@ namespace dbc { definition.Max( yystack_[1].value.as < double > () ); scanner.ResetTempList(); } -#line 1064 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1064 "D:/projects/dbclib/src/dbcparser.cpp" break; case 77: // attribute_definition: attribute_object_type STRING_VAL TAG_STRING TAG_SEMICOLON -#line 353 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 353 "D:/projects/dbclib/src/dbcparser.y" { auto& network = scanner.GetNetwork(); auto& definition = network.CreateDefinition( yystack_[2].value.as < std::string > () ); @@ -1072,11 +1072,11 @@ namespace dbc { definition.ValueType( AttributeValueType::StringValue); scanner.ResetTempList(); } -#line 1076 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1076 "D:/projects/dbclib/src/dbcparser.cpp" break; case 78: // attribute_definition: attribute_object_type STRING_VAL TAG_ENUM comma_string_list TAG_SEMICOLON -#line 361 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 361 "D:/projects/dbclib/src/dbcparser.y" { auto& network = scanner.GetNetwork(); auto& definition = network.CreateDefinition( yystack_[3].value.as < std::string > () ); @@ -1086,11 +1086,11 @@ namespace dbc { definition.EnumList(list); scanner.ResetTempList(); } -#line 1090 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1090 "D:/projects/dbclib/src/dbcparser.cpp" break; case 79: // attribute_definition: attribute_object_type STRING_VAL TAG_HEX INT_VAL INT_VAL TAG_SEMICOLON -#line 371 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 371 "D:/projects/dbclib/src/dbcparser.y" { auto& network = scanner.GetNetwork(); auto& definition = network.CreateDefinition( yystack_[4].value.as < std::string > () ); @@ -1100,65 +1100,65 @@ namespace dbc { definition.Max(static_cast( yystack_[1].value.as < int64_t > () )); scanner.ResetTempList(); } -#line 1104 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1104 "D:/projects/dbclib/src/dbcparser.cpp" break; case 80: // attribute_object_type: TAG_BA_DEF object_type -#line 382 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 382 "D:/projects/dbclib/src/dbcparser.y" {yylhs.value.as < AttributeType > () = yystack_[1].value.as< AttributeType > ();} -#line 1110 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1110 "D:/projects/dbclib/src/dbcparser.cpp" break; case 81: // attribute_object_type: TAG_BA_DEF_REL object_rel_type -#line 383 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 383 "D:/projects/dbclib/src/dbcparser.y" {yylhs.value.as < AttributeType > () = yystack_[1].value.as< AttributeType > ();} -#line 1116 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1116 "D:/projects/dbclib/src/dbcparser.cpp" break; case 82: // object_type: %empty -#line 386 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 386 "D:/projects/dbclib/src/dbcparser.y" { yylhs.value.as < AttributeType > () = AttributeType::DbcNetwork; } -#line 1122 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1122 "D:/projects/dbclib/src/dbcparser.cpp" break; case 83: // object_type: TAG_BU -#line 387 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 387 "D:/projects/dbclib/src/dbcparser.y" { yylhs.value.as < AttributeType > () = AttributeType::DbcNode; } -#line 1128 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1128 "D:/projects/dbclib/src/dbcparser.cpp" break; case 84: // object_type: TAG_BO -#line 388 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 388 "D:/projects/dbclib/src/dbcparser.y" { yylhs.value.as < AttributeType > () = AttributeType::DbcMessage; } -#line 1134 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1134 "D:/projects/dbclib/src/dbcparser.cpp" break; case 85: // object_type: TAG_SG -#line 389 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 389 "D:/projects/dbclib/src/dbcparser.y" { yylhs.value.as < AttributeType > () = AttributeType::DbcSignal; } -#line 1140 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1140 "D:/projects/dbclib/src/dbcparser.cpp" break; case 86: // object_type: TAG_EV -#line 390 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 390 "D:/projects/dbclib/src/dbcparser.y" { yylhs.value.as < AttributeType > () = AttributeType::EnvironmentVariable; } -#line 1146 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1146 "D:/projects/dbclib/src/dbcparser.cpp" break; case 87: // object_rel_type: TAG_BU_SG_REL -#line 393 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 393 "D:/projects/dbclib/src/dbcparser.y" { yylhs.value.as < AttributeType > () = AttributeType::NodeSignalRelation; } -#line 1152 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1152 "D:/projects/dbclib/src/dbcparser.cpp" break; case 88: // object_rel_type: TAG_BU_BO_REL -#line 394 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 394 "D:/projects/dbclib/src/dbcparser.y" { yylhs.value.as < AttributeType > () = AttributeType::NodeMessageRelation; } -#line 1158 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1158 "D:/projects/dbclib/src/dbcparser.cpp" break; case 89: // val: TAG_VAL INT_VAL ID_VAL val_map TAG_SEMICOLON -#line 398 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 398 "D:/projects/dbclib/src/dbcparser.y" { auto& network = scanner.GetNetwork(); auto* signal = network.GetSignal(static_cast( yystack_[3].value.as < int64_t > () ), yystack_[2].value.as < std::string > ()); @@ -1168,11 +1168,11 @@ namespace dbc { } scanner.ResetTempList(); } -#line 1172 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1172 "D:/projects/dbclib/src/dbcparser.cpp" break; case 90: // val: TAG_VAL ID_VAL val_map TAG_SEMICOLON -#line 409 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 409 "D:/projects/dbclib/src/dbcparser.y" { auto& network = scanner.GetNetwork(); auto& env_var = network.GetEnvVar( yystack_[2].value.as < std::string > () ); @@ -1180,19 +1180,19 @@ namespace dbc { env_var.EnumList(list); scanner.ResetTempList(); } -#line 1184 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1184 "D:/projects/dbclib/src/dbcparser.cpp" break; case 93: // val_map_entry: INT_VAL STRING_VAL -#line 424 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 424 "D:/projects/dbclib/src/dbcparser.y" { scanner.AddToEnumList(yystack_[1].value.as < int64_t > (), yystack_[0].value.as < std::string > () ); /* Temp storage on network */ } -#line 1192 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1192 "D:/projects/dbclib/src/dbcparser.cpp" break; case 94: // sig_valtype: TAG_SIG_VALTYPE INT_VAL ID_VAL TAG_COLON INT_VAL TAG_SEMICOLON -#line 439 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 439 "D:/projects/dbclib/src/dbcparser.y" { auto& network = scanner.GetNetwork(); auto* signal = network.GetSignal(static_cast(yystack_[4].value.as < int64_t > ()), yystack_[3].value.as < std::string > ()); @@ -1212,21 +1212,21 @@ namespace dbc { } } } -#line 1216 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1216 "D:/projects/dbclib/src/dbcparser.cpp" break; case 100: // comment_network: TAG_CM STRING_VAL TAG_SEMICOLON -#line 468 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 468 "D:/projects/dbclib/src/dbcparser.y" { auto& network = scanner.GetNetwork(); network.Comment( yystack_[1].value.as < std::string > () ); scanner.ResetTempList(); } -#line 1226 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1226 "D:/projects/dbclib/src/dbcparser.cpp" break; case 101: // comment_node: TAG_CM TAG_BU ID_VAL STRING_VAL TAG_SEMICOLON -#line 476 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 476 "D:/projects/dbclib/src/dbcparser.y" { auto& network = scanner.GetNetwork(); auto* node = network.GetNode( yystack_[2].value.as < std::string > () ); @@ -1235,11 +1235,11 @@ namespace dbc { } scanner.ResetTempList(); } -#line 1239 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1239 "D:/projects/dbclib/src/dbcparser.cpp" break; case 102: // comment_message: TAG_CM TAG_BO INT_VAL STRING_VAL TAG_SEMICOLON -#line 487 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 487 "D:/projects/dbclib/src/dbcparser.y" { auto& network = scanner.GetNetwork(); auto* message = network.GetMessage( static_cast(yystack_[2].value.as < int64_t > ())); @@ -1248,11 +1248,11 @@ namespace dbc { } scanner.ResetTempList(); } -#line 1252 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1252 "D:/projects/dbclib/src/dbcparser.cpp" break; case 103: // comment_signal: TAG_CM TAG_SG INT_VAL ID_VAL STRING_VAL TAG_SEMICOLON -#line 498 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 498 "D:/projects/dbclib/src/dbcparser.y" { auto& network = scanner.GetNetwork(); auto* signal = network.GetSignal( static_cast(yystack_[3].value.as < int64_t > ()), yystack_[2].value.as < std::string > ()); @@ -1261,22 +1261,22 @@ namespace dbc { } scanner.ResetTempList(); } -#line 1265 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1265 "D:/projects/dbclib/src/dbcparser.cpp" break; case 104: // comment_env_var: TAG_CM TAG_EV ID_VAL STRING_VAL TAG_SEMICOLON -#line 509 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 509 "D:/projects/dbclib/src/dbcparser.y" { auto& network = scanner.GetNetwork(); auto& env_var = network.GetEnvVar(yystack_[2].value.as < std::string > ()); env_var.Comment(yystack_[1].value.as < std::string > ()); scanner.ResetTempList(); } -#line 1276 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1276 "D:/projects/dbclib/src/dbcparser.cpp" break; case 106: // message: TAG_BO INT_VAL ID_VAL TAG_COLON INT_VAL ID_VAL -#line 521 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 521 "D:/projects/dbclib/src/dbcparser.y" { auto& network = scanner.GetNetwork(); auto& message = network.CreateMessage(static_cast(yystack_[4].value.as < int64_t > ())); @@ -1285,11 +1285,11 @@ namespace dbc { message.Node(yystack_[0].value.as < std::string > ()); scanner.ResetTempList(); } -#line 1289 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1289 "D:/projects/dbclib/src/dbcparser.cpp" break; case 109: // signal: TAG_SG ID_VAL mux_info TAG_COLON INT_VAL TAG_SEP INT_VAL TAG_AT little_endian signedness TAG_PAR_OPEN double_val TAG_COMMA double_val TAG_PAR_CLOSE TAG_BOX_OPEN double_val TAG_SEP double_val TAG_BOX_CLOSE STRING_VAL comma_identifier_list -#line 558 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 558 "D:/projects/dbclib/src/dbcparser.y" { auto& network = scanner.GetNetwork(); auto* message = network.LastMessage(); @@ -1326,111 +1326,111 @@ namespace dbc { } scanner.ResetTempList(); } -#line 1330 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1330 "D:/projects/dbclib/src/dbcparser.cpp" break; case 110: // mux_info: %empty -#line 599 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 599 "D:/projects/dbclib/src/dbcparser.y" { yylhs.value.as < std::string > () = ""; } -#line 1338 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1338 "D:/projects/dbclib/src/dbcparser.cpp" break; case 111: // mux_info: ID_VAL -#line 603 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 603 "D:/projects/dbclib/src/dbcparser.y" { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } -#line 1346 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1346 "D:/projects/dbclib/src/dbcparser.cpp" break; case 114: // space_identifier_list: space_identifier_list ID_VAL -#line 612 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 612 "D:/projects/dbclib/src/dbcparser.y" { scanner.AddToStringList( yystack_[0].value.as < std::string > () ); } -#line 1354 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1354 "D:/projects/dbclib/src/dbcparser.cpp" break; case 116: // comma_identifier_list: ID_VAL -#line 619 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 619 "D:/projects/dbclib/src/dbcparser.y" { scanner.AddToStringList( yystack_[0].value.as < std::string > () ); } -#line 1362 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1362 "D:/projects/dbclib/src/dbcparser.cpp" break; case 117: // comma_identifier_list: comma_identifier_list TAG_COMMA ID_VAL -#line 623 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 623 "D:/projects/dbclib/src/dbcparser.y" { scanner.AddToStringList( yystack_[0].value.as < std::string > () ); } -#line 1370 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1370 "D:/projects/dbclib/src/dbcparser.cpp" break; case 118: // comma_string_list: STRING_VAL -#line 629 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 629 "D:/projects/dbclib/src/dbcparser.y" { scanner.AddToStringList( yystack_[0].value.as < std::string > () ); } -#line 1378 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1378 "D:/projects/dbclib/src/dbcparser.cpp" break; case 119: // comma_string_list: comma_string_list TAG_COMMA STRING_VAL -#line 633 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 633 "D:/projects/dbclib/src/dbcparser.y" { scanner.AddToStringList( yystack_[0].value.as < std::string > () ); } -#line 1386 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1386 "D:/projects/dbclib/src/dbcparser.cpp" break; case 120: // double_val: DOUBLE_VAL -#line 641 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 641 "D:/projects/dbclib/src/dbcparser.y" { yylhs.value.as < double > () = yystack_[0].value.as < double > (); } -#line 1392 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1392 "D:/projects/dbclib/src/dbcparser.cpp" break; case 121: // double_val: TAG_NAN -#line 642 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 642 "D:/projects/dbclib/src/dbcparser.y" { yylhs.value.as < double > () = std::numeric_limits::quiet_NaN(); } -#line 1398 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1398 "D:/projects/dbclib/src/dbcparser.cpp" break; case 122: // double_val: INT_VAL -#line 643 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 643 "D:/projects/dbclib/src/dbcparser.y" { yylhs.value.as < double > () = static_cast(yystack_[0].value.as < int64_t > ()); } -#line 1404 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1404 "D:/projects/dbclib/src/dbcparser.cpp" break; case 123: // little_endian: INT_VAL -#line 646 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 646 "D:/projects/dbclib/src/dbcparser.y" { yylhs.value.as < bool > () = yystack_[0].value.as < int64_t > () == 1; } -#line 1410 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1410 "D:/projects/dbclib/src/dbcparser.cpp" break; case 124: // signedness: TAG_PLUS -#line 649 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 649 "D:/projects/dbclib/src/dbcparser.y" { yylhs.value.as < SignalDataType > () = SignalDataType::UnsignedData; } -#line 1416 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1416 "D:/projects/dbclib/src/dbcparser.cpp" break; case 125: // signedness: TAG_MINUS -#line 650 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 650 "D:/projects/dbclib/src/dbcparser.y" { yylhs.value.as < SignalDataType > () = SignalDataType::SignedData; } -#line 1422 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1422 "D:/projects/dbclib/src/dbcparser.cpp" break; case 127: // space_node_list: space_node_list ID_VAL -#line 658 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 658 "D:/projects/dbclib/src/dbcparser.y" { scanner.AddToStringList( yystack_[0].value.as < std::string > () ); } -#line 1430 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1430 "D:/projects/dbclib/src/dbcparser.cpp" break; case 128: // node: TAG_BU TAG_COLON space_node_list -#line 664 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 664 "D:/projects/dbclib/src/dbcparser.y" { auto& network = scanner.GetNetwork(); const auto& list = scanner.StringList(); @@ -1442,22 +1442,22 @@ namespace dbc { } scanner.ResetTempList(); } -#line 1446 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1446 "D:/projects/dbclib/src/dbcparser.cpp" break; case 129: // valtable: TAG_VAL_TABLE ID_VAL val_map TAG_SEMICOLON -#line 680 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 680 "D:/projects/dbclib/src/dbcparser.y" { auto& list = scanner.EnumList(); auto& network = scanner.GetNetwork(); network.AddValueTable(yystack_[2].value.as < std::string > (), list ); scanner.ResetTempList(); } -#line 1457 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1457 "D:/projects/dbclib/src/dbcparser.cpp" break; case 132: // signal_group: TAG_SIG_GROUP INT_VAL ID_VAL INT_VAL TAG_COLON signal_name_list TAG_SEMICOLON -#line 695 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 695 "D:/projects/dbclib/src/dbcparser.y" { auto& network = scanner.GetNetwork(); SignalGroup temp; @@ -1469,11 +1469,11 @@ namespace dbc { network.AddSignalGroup(temp); scanner.ResetTempList(); } -#line 1473 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1473 "D:/projects/dbclib/src/dbcparser.cpp" break; case 133: // extended_mux: TAG_SG_MUL_VAL INT_VAL ID_VAL ID_VAL value_range_list TAG_SEMICOLON -#line 714 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 714 "D:/projects/dbclib/src/dbcparser.y" { auto& network = scanner.GetNetwork(); auto* signal = network.GetSignal(static_cast(yystack_[4].value.as < int64_t > ()), yystack_[3].value.as < std::string > ()); @@ -1485,21 +1485,21 @@ namespace dbc { } scanner.ResetTempList(); } -#line 1489 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1489 "D:/projects/dbclib/src/dbcparser.cpp" break; case 136: // value_range: INT_VAL INT_VAL -#line 733 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 733 "D:/projects/dbclib/src/dbcparser.y" { const auto low = static_cast(yystack_[1].value.as < int64_t > ()); const auto high = static_cast(-yystack_[0].value.as < int64_t > ()); /* Solves the integer problem) */ scanner.AddToRangeList(low, high); } -#line 1499 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1499 "D:/projects/dbclib/src/dbcparser.cpp" break; case 137: // message_transmitters: TAG_BO_TX_BU INT_VAL TAG_COLON comma_identifier_list TAG_SEMICOLON -#line 741 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 741 "D:/projects/dbclib/src/dbcparser.y" { auto& network = scanner.GetNetwork(); auto* message = network.GetMessage(static_cast(yystack_[3].value.as < int64_t > ())); @@ -1511,11 +1511,11 @@ namespace dbc { } scanner.ResetTempList(); } -#line 1515 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1515 "D:/projects/dbclib/src/dbcparser.cpp" break; -#line 1519 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 1519 "D:/projects/dbclib/src/dbcparser.cpp" default: break; @@ -2068,11 +2068,11 @@ namespace dbc { return symbol_kind::S_YYUNDEF; } -#line 5 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 5 "D:/projects/dbclib/src/dbcparser.y" } // dbc -#line 2074 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.cpp" +#line 2074 "D:/projects/dbclib/src/dbcparser.cpp" -#line 753 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 753 "D:/projects/dbclib/src/dbcparser.y" diff --git a/src/dbcparser.hpp b/src/dbcparser.hpp index 52be2fa..ecb9303 100644 --- a/src/dbcparser.hpp +++ b/src/dbcparser.hpp @@ -32,7 +32,7 @@ /** - ** \file /home/ihedvall/CLionProjects/dbclib/src/dbcparser.hpp + ** \file D:/projects/dbclib/src/dbcparser.hpp ** Define the dbc::parser class. */ @@ -42,10 +42,10 @@ // especially those whose name start with YY_ or yy_. They are // private implementation details that can be changed or removed. -#ifndef YY_DD_HOME_IHEDVALL_CLIONPROJECTS_DBCLIB_SRC_DBCPARSER_HPP_INCLUDED -# define YY_DD_HOME_IHEDVALL_CLIONPROJECTS_DBCLIB_SRC_DBCPARSER_HPP_INCLUDED +#ifndef YY_DD_D_PROJECTS_DBCLIB_SRC_DBCPARSER_HPP_INCLUDED +# define YY_DD_D_PROJECTS_DBCLIB_SRC_DBCPARSER_HPP_INCLUDED // "%code requires" blocks. -#line 9 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 9 "D:/projects/dbclib/src/dbcparser.y" #include "dbc/attribute.h" #include "dbc/signal.h" @@ -53,7 +53,7 @@ class DbcScanner; } -#line 57 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.hpp" +#line 57 "D:/projects/dbclib/src/dbcparser.hpp" # include // std::abort @@ -195,9 +195,9 @@ # endif /* ! defined YYDEBUG */ #endif /* ! defined DDDEBUG */ -#line 5 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 5 "D:/projects/dbclib/src/dbcparser.y" namespace dbc { -#line 201 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.hpp" +#line 201 "D:/projects/dbclib/src/dbcparser.hpp" @@ -2345,11 +2345,11 @@ switch (yykind) }; -#line 5 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.y" +#line 5 "D:/projects/dbclib/src/dbcparser.y" } // dbc -#line 2351 "/home/ihedvall/CLionProjects/dbclib/src/dbcparser.hpp" +#line 2351 "D:/projects/dbclib/src/dbcparser.hpp" -#endif // !YY_DD_HOME_IHEDVALL_CLIONPROJECTS_DBCLIB_SRC_DBCPARSER_HPP_INCLUDED +#endif // !YY_DD_D_PROJECTS_DBCLIB_SRC_DBCPARSER_HPP_INCLUDED diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 42152c3..c3b9b37 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -15,7 +15,6 @@ target_include_directories(test_dbc PRIVATE ../src # dbchelper.h ${GTEST_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}) -target_include_directories(test_dbc PRIVATE ${FLEX_INCLUDE_DIRS}) if (MINGW) target_link_options(test_dbc PRIVATE -static -fstack-protector) diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 0000000..3675544 --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "dbc", + "version": "1.0", + "dependencies": [ + "boost-core", + "boost-filesystem", + "boost-locale", + "boost-process", + "boost-program-options", + "boost-interprocess", + "boost-endian", + "expat", + "gtest", + "wxwidgets" + ] +}