commit f01452868f3e3da0ffbb5ceb9733aa0b6aa80de1 Author: ian Date: Thu Jan 23 17:01:03 2025 +0900 add files diff --git a/a2llib-main/.clang-format b/a2llib-main/.clang-format new file mode 100644 index 0000000..b1392af --- /dev/null +++ b/a2llib-main/.clang-format @@ -0,0 +1,226 @@ +--- +Language: Cpp +# BasedOnStyle: Google +AccessModifierOffset: -1 +AlignAfterOpenBracket: Align +AlignArrayOfStructures: None +AlignConsecutiveMacros: None +AlignConsecutiveAssignments: None +AlignConsecutiveBitFields: None +AlignConsecutiveDeclarations: None +AlignEscapedNewlines: Left +AlignOperands: Align +AlignTrailingComments: true +AllowAllArgumentsOnNextLine: true +AllowAllParametersOfDeclarationOnNextLine: true +AllowShortEnumsOnASingleLine: true +AllowShortBlocksOnASingleLine: Never +AllowShortCaseLabelsOnASingleLine: false +AllowShortFunctionsOnASingleLine: All +AllowShortLambdasOnASingleLine: All +AllowShortIfStatementsOnASingleLine: WithoutElse +AllowShortLoopsOnASingleLine: true +AlwaysBreakAfterDefinitionReturnType: None +AlwaysBreakAfterReturnType: None +AlwaysBreakBeforeMultilineStrings: true +AlwaysBreakTemplateDeclarations: Yes +AttributeMacros: + - __capability +BinPackArguments: true +BinPackParameters: true +BraceWrapping: + AfterCaseLabel: false + AfterClass: false + AfterControlStatement: Never + AfterEnum: false + AfterFunction: false + AfterNamespace: false + AfterObjCDeclaration: false + AfterStruct: false + AfterUnion: false + AfterExternBlock: false + BeforeCatch: false + BeforeElse: false + BeforeLambdaBody: false + BeforeWhile: false + IndentBraces: false + SplitEmptyFunction: true + SplitEmptyRecord: true + SplitEmptyNamespace: true +BreakBeforeBinaryOperators: None +BreakBeforeConceptDeclarations: true +BreakBeforeBraces: Attach +BreakBeforeInheritanceComma: false +BreakInheritanceList: BeforeColon +BreakBeforeTernaryOperators: true +BreakConstructorInitializersBeforeComma: false +BreakConstructorInitializers: BeforeColon +BreakAfterJavaFieldAnnotations: false +BreakStringLiterals: true +ColumnLimit: 80 +CommentPragmas: '^ IWYU pragma:' +QualifierAlignment: Leave +CompactNamespaces: false +ConstructorInitializerIndentWidth: 4 +ContinuationIndentWidth: 4 +Cpp11BracedListStyle: true +DeriveLineEnding: true +DerivePointerAlignment: true +DisableFormat: false +EmptyLineAfterAccessModifier: Never +EmptyLineBeforeAccessModifier: LogicalBlock +ExperimentalAutoDetectBinPacking: false +PackConstructorInitializers: NextLine +BasedOnStyle: '' +ConstructorInitializerAllOnOneLineOrOnePerLine: false +AllowAllConstructorInitializersOnNextLine: true +FixNamespaceComments: true +ForEachMacros: + - foreach + - Q_FOREACH + - BOOST_FOREACH +IfMacros: + - KJ_IF_MAYBE +IncludeBlocks: Regroup +IncludeCategories: + - Regex: '^' + Priority: 2 + SortPriority: 0 + CaseSensitive: false + - Regex: '^<.*\.h>' + Priority: 1 + SortPriority: 0 + CaseSensitive: false + - Regex: '^<.*' + Priority: 2 + SortPriority: 0 + CaseSensitive: false + - Regex: '.*' + Priority: 3 + SortPriority: 0 + CaseSensitive: false +IncludeIsMainRegex: '([-_](test|unittest))?$' +IncludeIsMainSourceRegex: '' +IndentAccessModifiers: false +IndentCaseLabels: true +IndentCaseBlocks: false +IndentGotoLabels: true +IndentPPDirectives: None +IndentExternBlock: AfterExternBlock +IndentRequires: false +IndentWidth: 2 +IndentWrappedFunctionNames: false +InsertTrailingCommas: None +JavaScriptQuotes: Leave +JavaScriptWrapImports: true +KeepEmptyLinesAtTheStartOfBlocks: false +LambdaBodyIndentation: Signature +MacroBlockBegin: '' +MacroBlockEnd: '' +MaxEmptyLinesToKeep: 1 +NamespaceIndentation: None +ObjCBinPackProtocolList: Never +ObjCBlockIndentWidth: 2 +ObjCBreakBeforeNestedBlockParam: true +ObjCSpaceAfterProperty: false +ObjCSpaceBeforeProtocolList: true +PenaltyBreakAssignment: 2 +PenaltyBreakBeforeFirstCallParameter: 1 +PenaltyBreakComment: 300 +PenaltyBreakFirstLessLess: 120 +PenaltyBreakOpenParenthesis: 0 +PenaltyBreakString: 1000 +PenaltyBreakTemplateDeclaration: 10 +PenaltyExcessCharacter: 1000000 +PenaltyReturnTypeOnItsOwnLine: 200 +PenaltyIndentedWhitespace: 0 +PointerAlignment: Left +PPIndentWidth: -1 +RawStringFormats: + - Language: Cpp + Delimiters: + - cc + - CC + - cpp + - Cpp + - CPP + - 'c++' + - 'C++' + CanonicalDelimiter: '' + BasedOnStyle: google + - Language: TextProto + Delimiters: + - pb + - PB + - proto + - PROTO + EnclosingFunctions: + - EqualsProto + - EquivToProto + - PARSE_PARTIAL_TEXT_PROTO + - PARSE_TEST_PROTO + - PARSE_TEXT_PROTO + - ParseTextOrDie + - ParseTextProtoOrDie + - ParseTestProto + - ParsePartialTestProto + CanonicalDelimiter: pb + BasedOnStyle: google +ReferenceAlignment: Pointer +ReflowComments: true +RemoveBracesLLVM: false +SeparateDefinitionBlocks: Leave +ShortNamespaceLines: 1 +SortIncludes: CaseSensitive +SortJavaStaticImport: Before +SortUsingDeclarations: true +SpaceAfterCStyleCast: false +SpaceAfterLogicalNot: false +SpaceAfterTemplateKeyword: true +SpaceBeforeAssignmentOperators: true +SpaceBeforeCaseColon: false +SpaceBeforeCpp11BracedList: false +SpaceBeforeCtorInitializerColon: true +SpaceBeforeInheritanceColon: true +SpaceBeforeParens: ControlStatements +SpaceBeforeParensOptions: + AfterControlStatements: true + AfterForeachMacros: true + AfterFunctionDefinitionName: false + AfterFunctionDeclarationName: false + AfterIfMacros: true + AfterOverloadedOperator: false + BeforeNonEmptyParentheses: false +SpaceAroundPointerQualifiers: Default +SpaceBeforeRangeBasedForLoopColon: true +SpaceInEmptyBlock: false +SpaceInEmptyParentheses: false +SpacesBeforeTrailingComments: 2 +SpacesInAngles: Never +SpacesInConditionalStatement: false +SpacesInContainerLiterals: true +SpacesInCStyleCastParentheses: false +SpacesInLineCommentPrefix: + Minimum: 1 + Maximum: -1 +SpacesInParentheses: false +SpacesInSquareBrackets: false +SpaceBeforeSquareBrackets: false +BitFieldColonSpacing: Both +Standard: Auto +StatementAttributeLikeMacros: + - Q_EMIT +StatementMacros: + - Q_UNUSED + - QT_REQUIRE_VERSION +TabWidth: 8 +UseCRLF: false +UseTab: Never +WhitespaceSensitiveMacros: + - STRINGIZE + - PP_STRINGIZE + - BOOST_PP_STRINGIZE + - NS_SWIFT_NAME + - CF_SWIFT_NAME +... + diff --git a/a2llib-main/CMakeLists.txt b/a2llib-main/CMakeLists.txt new file mode 100644 index 0000000..af9bd0b --- /dev/null +++ b/a2llib-main/CMakeLists.txt @@ -0,0 +1,304 @@ +# Copyright 2023 Ingemar Hedvall +# SPDX-License-Identifier: MIT +cmake_minimum_required(VERSION 3.20) +include(CMakePrintHelpers) + +if("${CMAKE_TOOLCHAIN_FILE}" STREQUAL "") + set(USE_VCPKG OFF) +else() + set(USE_VCPKG ON) +endif() + +option(BUILD_SHARED_LIBS "Static libraries are preferred" OFF) +option(A2L_DOC "If doxygen is installed, then build documentation in Release mode" OFF) +option(A2L_TOOLS "Building applications" OFF) +option(A2L_TEST "Building unit test" OFF) +option(A2L_FLEX "Create FLEX/BISON files" OFF) + +if(A2L_TOOLS AND USE_VCPKG) + list(APPEND VCPKG_MANIFEST_FEATURES "tools") +endif() + +project(a2llib + VERSION 1.0 + DESCRIPTION "ASAP 2 parser C++ library." + LANGUAGES CXX) + +set(CMAKE_CXX_STANDARD 20) +set(CMAKE_DEBUG_POSTFIX d) + +include(script/boost.cmake) + +if (A2L_TOOLS) + include(script/wxwidgets.cmake) +endif() + +if (A2L_TEST) + include(script/googletest.cmake) +endif() + +if (A2L_DOC) + include(script/doxygen.cmake) +endif() + +if (A2L_FLEX) + include(script/flex.cmake) + include(script/bison.cmake) +endif() + +if (BISON_FOUND AND A2L_FLEX) + BISON_TARGET(A2L_PARSER src/a2lparser.y ${CMAKE_CURRENT_SOURCE_DIR}/src/a2lparser.cpp + COMPILE_FLAGS "") + cmake_print_variables(BISON_A2L_PARSER_DEFINED + BISON_A2L_PARSER_INPUT + BISON_A2L_PARSER_OUTPUT_SOURCE + BISON_A2L_PARSER_OUTPUT_HEADER + BISON_A2L_PARSER_OUTPUTS + BISON_A2L_PARSER_COMPILE_FLAGS + BISON_INCLUDE_DIRS) + + BISON_TARGET(A2ML_PARSER src/a2mlparser.y ${CMAKE_CURRENT_SOURCE_DIR}/src/a2mlparser.cpp + COMPILE_FLAGS "") + cmake_print_variables(BISON_A2ML_PARSER_DEFINED + BISON_A2ML_PARSER_INPUT + BISON_A2ML_PARSER_OUTPUT_SOURCE + BISON_A2ML_PARSER_OUTPUT_HEADER + BISON_A2ML_PARSER_OUTPUTS + BISON_A2ML_PARSER_COMPILE_FLAGS + BISON_INCLUDE_DIRS) + + BISON_TARGET(IF_DATA_PARSER src/ifdataparser.y ${CMAKE_CURRENT_SOURCE_DIR}/src/ifdataparser.cpp + COMPILE_FLAGS "") + cmake_print_variables(BISON_IF_DATA_PARSER_DEFINED + BISON_IF_DATA_PARSER_INPUT + BISON_IF_DATA_PARSER_OUTPUT_SOURCE + BISON_IF_DATA_PARSER_OUTPUT_HEADER + BISON_IF_DATA_PARSER_OUTPUTS + BISON_IF_DATA_PARSER_COMPILE_FLAGS + BISON_INCLUDE_DIRS) + +endif () + +if (FLEX_FOUND AND A2L_FLEX) + FLEX_TARGET(A2L_SCANNER src/a2lflexer.l ${CMAKE_CURRENT_SOURCE_DIR}/src/a2lflexer.cpp) + cmake_print_variables(FLEX_A2L_SCANNER_DEFINED + FLEX_A2L_SCANNER_OUTPUTS + FLEX_A2L_SCANNER_INPUT + FLEX_A2L_SCANNER_OUTPUT_HEADER + FLEX_INCLUDE_DIRS) + + FLEX_TARGET(A2ML_SCANNER src/a2mlflexer.l ${CMAKE_CURRENT_SOURCE_DIR}/src/a2mlflexer.cpp) + cmake_print_variables(FLEX_A2ML_SCANNER_DEFINED + FLEX_A2ML_SCANNER_OUTPUTS + FLEX_A2ML_SCANNER_INPUT + FLEX_A2ML_SCANNER_OUTPUT_HEADER + FLEX_INCLUDE_DIRS) + + FLEX_TARGET(IF_DATA_SCANNER src/ifdataflexer.l ${CMAKE_CURRENT_SOURCE_DIR}/src/ifdataflexer.cpp) + cmake_print_variables(FLEX_IF_DATA_SCANNER_DEFINED + FLEX_IF_DATA_SCANNER_OUTPUTS + FLEX_IF_DATA_SCANNER_INPUT + FLEX_IF_DATA_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 (FLEX_FOUND AND BISON_FOUND) + ADD_FLEX_BISON_DEPENDENCY(A2L_SCANNER A2L_PARSER) + ADD_FLEX_BISON_DEPENDENCY(A2ML_SCANNER A2ML_PARSER) + ADD_FLEX_BISON_DEPENDENCY(IF_DATA_SCANNER IF_DATA_PARSER) +endif() + +set(A2L_HEADERS + include/a2l/a2lfile.h + include/a2l/a2lstructs.h + include/a2l/a2lproject.h + include/a2l/module.h + include/a2l/a2lobject.h + include/a2l/a2lenums.h + include/a2l/axispts.h + include/a2l/blob.h + include/a2l/characteristic.h + include/a2l/axisdescr.h + include/a2l/compumethod.h + include/a2l/compuvtab.h + include/a2l/computab.h + include/a2l/compuvtabrange.h + include/a2l/frame.h + include/a2l/function.h + include/a2l/group.h + include/a2l/instance.h + include/a2l/overwrite.h + include/a2l/measurement.h + include/a2l/recordlayout.h + include/a2l/transformer.h + include/a2l/structure.h + include/a2l/unit.h + include/a2l/a2mlobject.h + include/a2l/a2mlblock.h + include/a2l/ifdataitem.h + include/a2l/ifdatablock.h + src/ifdatablock.cpp +) + +add_library(a2l + src/a2lparser.cpp src/a2lparser.hpp + src/a2mlparser.cpp src/a2mlparser.hpp + src/ifdataparser.cpp src/ifdataparser.hpp + src/FlexLexer.h src/a2lflexer.cpp + src/FlexLexer.h src/a2mlflexer.cpp + src/FlexLexer.h src/ifdataflexer.cpp + ${A2L_HEADERS} + src/a2lscanner.cpp src/a2lscanner.h + src/a2lfile.cpp + src/a2lhelper.cpp src/a2lhelper.h + src/a2lproject.cpp + src/module.cpp + src/a2lobject.cpp + src/axispts.cpp + src/a2lenums.cpp + src/blob.cpp + src/characteristic.cpp + src/axisdescr.cpp + src/compumethod.cpp + src/compuvtab.cpp + src/computab.cpp + src/compuvtabrange.cpp + src/frame.cpp + src/function.cpp + src/group.cpp + src/instance.cpp + src/overwrite.cpp + src/measurement.cpp + src/recordlayout.cpp + src/transformer.cpp + src/structure.cpp + src/unit.cpp + src/a2mlscanner.cpp + src/a2mlscanner.h + src/a2mlobject.cpp + src/a2mlblock.cpp + src/ifdatascanner.cpp + src/ifdatascanner.h +) + +target_include_directories(a2l PUBLIC + $ + $ + ) +target_include_directories(a2l PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) +target_include_directories(a2l PRIVATE ${Boost_INCLUDE_DIRS}) + +cmake_print_properties(TARGETS a2l PROPERTIES INCLUDE_DIRECTORIES) + +if (MSVC) + target_compile_definitions(a2l PRIVATE _WIN32_WINNT=0x0A00) +endif () + + +if (wxWidgets_FOUND AND A2L_TOOLS) + add_subdirectory(a2lexplorer) +endif () + +if (A2L_TEST) + enable_testing() + add_subdirectory(test) +endif () + +if (DOXYGEN_FOUND AND (CMAKE_BUILD_TYPE MATCHES "^[Rr]elease") AND A2L_DOC) + set(DOXYGEN_RECURSIVE NO) + set(DOXYGEN_REPEAT_BRIEF NO) + set(DOXYGEN_PROJECT_NAME "A2lLib") + set(DOXYGEN_HTML_EXTRA_STYLESHEET doxygen/a2llib.css) + set(DOXYGEN_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/docs/manual) + doxygen_add_docs(doc_liba2l ALL + include/dbc doxygen + COMMENT "A2L Library generating API documentation with Doxygen") +endif () + + +################################################################################## +##### Packaging and installation ############################################### +################################################################################## +# install headers +# FILE_SET makes problems with GTest +#if (${CMAKE_MINOR_VERSION} GREATER_EQUAL 23) +# target_sources(dbc PUBLIC +# FILE_SET HEADERS +# TYPE HEADERS +# BASE_DIRS include/dbc +# FILES ${HEADERS}) +#else() + if (WIN32) + install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/a2l DESTINATION a2l/include) + else() + install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/a2l DESTINATION include) + endif() +#endif() + +if (WIN32) + install(TARGETS a2l + EXPORT a2lTargets + LIBRARY DESTINATION a2l/lib + ARCHIVE DESTINATION a2l/lib + RUNTIME DESTINATION a2l/bin +# FILE_SET HEADERS DESTINATION dbc/include + ) +else() + install(TARGETS a2l + EXPORT a2lTargets + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + RUNTIME DESTINATION bin +# PUBLIC_HEADER +# FILE_SET HEADERS DESTINATION include/dbc + ) +endif() + +include(CMakePackageConfigHelpers) + +set(CONFIG_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/a2l/a2lConfigVersion.cmake") +# generate *Version.cmake +write_basic_package_version_file( + ${CONFIG_VERSION_FILE} + VERSION ${PACKAGE_VERSION} + COMPATIBILITY AnyNewerVersion) + +# Export dbcTargets to file *Targets.cmake +export(EXPORT a2lTargets + FILE "${CMAKE_CURRENT_BINARY_DIR}/liba2l/a2lTargets.cmake" + NAMESPACE Upstream:: +) + +set(ConfigPackageLocation lib/cmake/a2l) +set(CONFIG_CMAKE "${CMAKE_CURRENT_BINARY_DIR}/a2l/a2lConfig.cmake") +# create final a2l *Config.make file +# https://cmake.org/cmake/help/latest/module/CMakePackageConfigHelpers.html +configure_package_config_file( + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/a2lConfig.cmake.in" + ${CONFIG_CMAKE} + INSTALL_DESTINATION ${ConfigPackageLocation} +) + +# install *Targets.cmake +install(EXPORT a2lTargets + FILE + a2lTargets.cmake + NAMESPACE + A2l:: + DESTINATION + ${ConfigPackageLocation} +) + +# Install *Version.cmake and *Config.cmake +install( + FILES + ${CONFIG_VERSION_FILE} + ${CONFIG_CMAKE} + DESTINATION + ${ConfigPackageLocation} + COMPONENT + Devel +) diff --git a/a2llib-main/LICENSE b/a2llib-main/LICENSE new file mode 100644 index 0000000..962bd31 --- /dev/null +++ b/a2llib-main/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Ingemar Hedvall + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/a2llib-main/LICENSE-3RD-PARTY.md b/a2llib-main/LICENSE-3RD-PARTY.md new file mode 100644 index 0000000..a3eb513 --- /dev/null +++ b/a2llib-main/LICENSE-3RD-PARTY.md @@ -0,0 +1,48 @@ +# Third Party Libraries and Licenses +In the Report Server project are the following third party libraries used. + +## Libraries + +### Boost Libraries + +General purpose C++ libraries. Version 1.76. + +SPDX-License-Identifier: BSL-1.0 + +https://www.boost.org/LICENSE_1_0.txt + + +### WinFlexBison + +Flex and Bison for Windows. + +License: BSD AND GPLv3+ + +https://github.com/lexxmark/winflexbison + +### WxWidgets + +Cross-platform GUI library. + +License: wxWindows Library License + +https://www.wxwidgets.org/about/licence/ + +## Build Applications + +### Doxygen + +Software documentation tool. + +https://www.doxygen.nl/index.html + +### Google Test + +Unit test libraries. + +SPDX-License-Identifier: BSD-3-Clause + +https://opensource.org/licenses/BSD-3-Clause + + + diff --git a/a2llib-main/README.md b/a2llib-main/README.md new file mode 100644 index 0000000..c247c4a --- /dev/null +++ b/a2llib-main/README.md @@ -0,0 +1,11 @@ +# A2L File Parser +ASAM ASAP2 parser for A2L files. The parser reads an ASAP2 file (*.a2l) and parse its content. The file normally only contain description +of one module (ECU). An A2L file consist of 3 basic parts. + +1. Measurement and calibration configuration (ASAP2). +2. Communication information (IF_DATA). +3. Meta languange (A2ML). + +The measurement and calibration configuration is normally always parsed while the communication data and meta-language are optionally parsed. +The IF_DATA blocks are needed when communicating with the ECU. + diff --git a/a2llib-main/a2lexplorer/CMakeLists.txt b/a2llib-main/a2lexplorer/CMakeLists.txt new file mode 100644 index 0000000..cfb067f --- /dev/null +++ b/a2llib-main/a2lexplorer/CMakeLists.txt @@ -0,0 +1,87 @@ +# Copyright 2023 Ingemar Hedvall +# SPDX-License-Identifier: MIT +cmake_minimum_required(VERSION 3.20) +project( + A2lExplorer + VERSION 1.0 + DESCRIPTION "Simple A2L file explorer" + LANGUAGES CXX) + +set(CMAKE_CXX_STANDARD 20) + +include("../script/utillib.cmake") + +add_executable(a2lexplorer + src/a2lexplorer.cpp src/a2lexplorer.h + src/mainframe.cpp src/mainframe.h + src/a2ldocument.cpp src/a2ldocument.h + src/a2lview.cpp src/a2lview.h + src/a2lexplorer.rc + src/childframe.cpp src/childframe.h + src/windowid.h + src/a2ltreelist.cpp + src/a2ltreelist.h + src/a2lpropertygrid.cpp + src/a2lpropertygrid.h) + +target_include_directories(a2lexplorer PRIVATE a2l) + + +if(MSVC) + target_link_options(a2lexplorer PRIVATE /SUBSYSTEM:WINDOWS) + target_compile_definitions(a2lexplorer PRIVATE _WIN32_WINNT=0x0A00) +endif() + +if(MINGW) + target_link_options(a2lexplorer PRIVATE -mwindows -static -fstack-protector) +endif() + +target_link_libraries(a2lexplorer PRIVATE a2l) +target_link_libraries(a2lexplorer PRIVATE util) + +if(VCPKG) + find_package(expat CONFIG REQUIRED) + target_link_libraries(a2lexplorer PRIVATE expat::expat) + + find_package(Boost REQUIRED COMPONENTS filesystem locale) + target_link_libraries(a2lexplorer PRIVATE Boost::boost Boost::filesystem Boost::locale) + + find_package(wxWidgets CONFIG REQUIRED) + target_link_libraries(a2lexplorer PRIVATE wx::propgrid wx::adv wx::core wx::base) +else() + include("../script/expat.cmake") + include("../script/wxwidgets.cmake") + include("../script/boost.cmake") + + + target_include_directories(a2lexplorer PRIVATE ${wxWidgets_INCLUDE_DIRS}) + target_include_directories(a2lexplorer PRIVATE ${Boost_INCLUDE_DIRS}) + + target_compile_definitions(a2lexplorer PRIVATE XML_STATIC) + + target_link_libraries(a2lexplorer PRIVATE EXPAT::EXPAT) + target_link_libraries(a2lexplorer PRIVATE ${wxWidgets_LIBRARIES}) + target_link_libraries(a2lexplorer PRIVATE ${wxWidgets_LIB_DIR}/wxscintillad.lib) + target_link_libraries(a2lexplorer PRIVATE ${wxWidgets_LIB_DIR}/wxlexillad.lib) + target_link_libraries(a2lexplorer PRIVATE ${Boost_LIBRARIES}) +endif() + + +if(MINGW) + target_link_options(a2lexplorer PRIVATE -mwindows -static -fstack-protector) + target_link_libraries(a2lexplorer PRIVATE iconv) +elseif (MSVC) + target_link_options(a2lexplorer PRIVATE /SUBSYSTEM:WINDOWS) + target_compile_definitions(a2lexplorer PRIVATE -D_WIN32_WINNT=0x0A00) +endif () + + +if(WIN32) + target_link_libraries(a2lexplorer PRIVATE bcrypt) + target_link_libraries(a2lexplorer PRIVATE ws2_32) + target_link_libraries(a2lexplorer PRIVATE mswsock) +endif() + +if(UNIX) + target_link_libraries(a2lexplorer PRIVATE rt icuuc icui18n) +endif(UNIX) diff --git a/a2llib-main/a2lexplorer/src/a2ldocument.cpp b/a2llib-main/a2lexplorer/src/a2ldocument.cpp new file mode 100644 index 0000000..52af23b --- /dev/null +++ b/a2llib-main/a2lexplorer/src/a2ldocument.cpp @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Ingemar Hedvall + * SPDX-License-Identifier: MIT + */ +#include + +#include +#include +#if (_MSC_VER) +#include +#endif +#include + +#include + +#include +#include "a2ldocument.h" +#include "windowid.h" +#include "a2lexplorer.h" + +using namespace util::log; +using namespace a2l; + +namespace a2lgui { +wxIMPLEMENT_DYNAMIC_CLASS(A2lDocument, wxDocument) // NOLINT + +wxBEGIN_EVENT_TABLE(A2lDocument, wxDocument) // NOLINT +wxEND_EVENT_TABLE() + +bool A2lDocument::OnOpenDocument(const wxString &filename) { + + wxBusyCursor wait; + file_.Filename(std::string(filename.mb_str(wxConvUTF8))); + bool parse = file_.ParseFile(); + if (!parse) { + LOG_ERROR() << "The file is invalid A2L file. Error: " << file_.LastError() + << ", File: " << filename; + std::ostringstream err; + err << "File didn't parse correctly." << std::endl; + err << "Error: " << file_.LastError() << std::endl; + err << "File: " << filename << std::endl; + wxMessageBox(wxString(err.str()), + wxString("Error Open File"), + wxOK | wxCENTRE | wxICON_ERROR); + return false; + } + + return parse && wxDocument::OnOpenDocument(filename); +} + +} // namespace a2lgui \ No newline at end of file diff --git a/a2llib-main/a2lexplorer/src/a2ldocument.h b/a2llib-main/a2lexplorer/src/a2ldocument.h new file mode 100644 index 0000000..92ee0f0 --- /dev/null +++ b/a2llib-main/a2lexplorer/src/a2ldocument.h @@ -0,0 +1,89 @@ +/* + * Copyright 2023 Ingemar Hedvall + * SPDX-License-Identifier: MIT + */ +#pragma once +#include +#include + +#include + +#include + +namespace a2lgui { + +enum class TreeItemType { + A2L_FILE, + ANNOTATION_LIST, + ANNOTATION, + AXIS_DESC, + AXIS_PTS, + BLOB, + CAL_METHOD, + CHARACTERISTIC, + COMPU_METHOD, + COMPU_TAB, + COMPU_VTAB, + COMPU_VTAB_RANGE, + FRAME, + FUNCTION, + GROUP, + INSTANCE, + MEM_LAYOUT, + MEM_SEGMENT, + MEASUREMENT, + MOD_COMMON, + MOD_PAR, + MODULE, + OVERWRITE, + PROJECT, + RECORD_LAYOUT, + STRUCTURE, + TRANSFORMER, + UNIT, + VARIANT_CODING, + VAR_CHARACTERISTIC, + VAR_CRITERION, + UNKNOWN +}; + +class A2lDocument : public wxDocument { + public: + A2lDocument() = default; + ~A2lDocument() override = default; + + bool OnOpenDocument(const wxString &filename) override; + + [[nodiscard]] a2l::A2lFile& GetFile() { + return file_; + } + + [[nodiscard]] a2l::A2lProject& GetProject() { + return file_.Project(); + } + + void SetSelected(TreeItemType type, void* object) { + selected_type_ = type; + selected_object_ = object; + } + + [[nodiscard]] TreeItemType SelectedType() const { return selected_type_; } + [[nodiscard]] void* SelectedObject() const { + return selected_object_; + } + + private: + a2l::A2lFile file_; + TreeItemType selected_type_ = TreeItemType::UNKNOWN; + void* selected_object_ = nullptr; + + wxDECLARE_DYNAMIC_CLASS(A2lDocument); + wxDECLARE_EVENT_TABLE(); +}; + + + +} // end namespace a2lgui + + + diff --git a/a2llib-main/a2lexplorer/src/a2lexplorer.cpp b/a2llib-main/a2lexplorer/src/a2lexplorer.cpp new file mode 100644 index 0000000..7de12a0 --- /dev/null +++ b/a2llib-main/a2lexplorer/src/a2lexplorer.cpp @@ -0,0 +1,133 @@ +/* + * Copyright 2023 Ingemar Hedvall + * SPDX-License-Identifier: MIT + */ +#include +#include +#define BOOST_LOCALE_HIDE_AUTO_PTR +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include "a2lexplorer.h" +#include "mainframe.h" +#include "a2ldocument.h" +#include "a2lview.h" +#include "windowid.h" + +using namespace util::log; +using namespace a2l; + +wxIMPLEMENT_APP(a2lgui::A2lExplorer); + +namespace a2lgui { + +wxBEGIN_EVENT_TABLE(A2lExplorer, wxApp) + EVT_UPDATE_UI(kIdOpenLogFile,A2lExplorer::OnUpdateOpenLogFile) + EVT_MENU(kIdOpenLogFile, A2lExplorer::OnOpenLogFile) +wxEND_EVENT_TABLE() + +bool A2lExplorer::OnInit() { + if (!wxApp::OnInit()) { + return false; + } + + // Setup correct localization when formatting date and times + boost::locale::generator gen; + std::locale::global(gen("")); + + // Setup system basic configuration + SetVendorDisplayName("A2lLib"); + SetVendorName("A2lLib"); + SetAppName("A2lExplorer"); + SetAppDisplayName("A2L File Explorer"); + + // Set up the log file. + auto& log_config = LogConfig::Instance(); + log_config.Type(LogType::LogToFile); + log_config.SubDir("a2llib/log"); + log_config.BaseName("a2lexplorer"); + log_config.CreateDefaultLogger(); + LOG_INFO() << "Log File created. Path: " << log_config.GetLogFile(); + + notepad_ = util::log::FindNotepad(); + + auto* app_config = wxConfig::Get(); + wxPoint start_pos; + app_config->Read("/MainWin/X",&start_pos.x, wxDefaultPosition.x); + app_config->Read("/MainWin/Y",&start_pos.y, wxDefaultPosition.x); + wxSize start_size; + app_config->Read("/MainWin/XWidth",&start_size.x, 1200); + app_config->Read("/MainWin/YWidth",&start_size.y, 800); + bool maximized = false; + app_config->Read("/MainWin/Max",&maximized, maximized); + + auto* doc_manager = new wxDocManager; + new wxDocTemplate(doc_manager, "A2L File","*.a2l","", + "a2l","A2lExplorer","A2L Explorer", + wxCLASSINFO(A2lDocument), wxCLASSINFO(A2lView)); + auto* frame = new MainFrame(GetAppDisplayName(), start_pos, start_size, maximized); + + frame->Show(true); + + return true; +} + +int A2lExplorer::OnExit() { + LOG_INFO() << "Closing application"; + auto* app_config = wxConfig::Get(); + auto* doc_manager = wxDocManager::GetDocumentManager(); + doc_manager->FileHistorySave(*app_config); + delete doc_manager; + LOG_INFO() << "Saved file history."; + + auto& log_config = LogConfig::Instance(); + log_config.DeleteLogChain(); + return wxApp::OnExit(); +} + +void A2lExplorer::OnOpenLogFile(wxCommandEvent& event) { + auto& log_config = LogConfig::Instance(); + std::string logfile = log_config.GetLogFile(); + OpenFile(logfile); + +} + +void A2lExplorer::OnUpdateOpenLogFile(wxUpdateUIEvent &event) { + if (notepad_.empty()) { + event.Enable(false); + return; + } + + auto& log_config = LogConfig::Instance(); + std::string logfile = log_config.GetLogFile(); + try { + std::filesystem::path p(logfile); + const bool exist = std::filesystem::exists(p); + event.Enable(exist); + } catch (const std::exception&) { + event.Enable(false); + } +} + + +// utf8 +void A2lExplorer::OpenFile(const std::string& filename) const { + if (!notepad_.empty()) { + std::wstring_convert, char16_t> convert; + const auto utf16 = convert.from_bytes(filename); + boost::process::spawn(notepad_, std::wstring(utf16.begin(), utf16.end())); + } +} + +} // end namespace a2lgui + + diff --git a/a2llib-main/a2lexplorer/src/a2lexplorer.h b/a2llib-main/a2lexplorer/src/a2lexplorer.h new file mode 100644 index 0000000..319310a --- /dev/null +++ b/a2llib-main/a2lexplorer/src/a2lexplorer.h @@ -0,0 +1,32 @@ +/* + * Copyright 2023 Ingemar Hedvall + * SPDX-License-Identifier: MIT + */ +#pragma once +#include +#include + +#if !wxUSE_DOC_VIEW_ARCHITECTURE +#error You must set wxUSE_DOC_VIEW_ARCHITECTURE to 1 in setup.h! +#endif + +namespace a2lgui { + +class A2lExplorer : public wxApp { + public: + + bool OnInit() override; + int OnExit() override; + + void OpenFile(const std::string& filename) const; + + private: + std::string notepad_; ///< Path to notepad.exe if it exist + + void OnOpenLogFile(wxCommandEvent& event); + void OnUpdateOpenLogFile(wxUpdateUIEvent& event); + wxDECLARE_EVENT_TABLE(); +}; +} // namespace + +wxDECLARE_APP(a2lgui::A2lExplorer); diff --git a/a2llib-main/a2lexplorer/src/a2lexplorer.rc b/a2llib-main/a2lexplorer/src/a2lexplorer.rc new file mode 100644 index 0000000..0b718a4 --- /dev/null +++ b/a2llib-main/a2lexplorer/src/a2lexplorer.rc @@ -0,0 +1,8 @@ +#include + +APP_ICON ICON "img/app.ico" +SUB_ICON ICON "img/sub.ico" + +FOLDER_CLOSE BITMAP "img/folder_close.bmp" +FOLDER_OPEN BITMAP "img/folder_open.bmp" +TREE_LIST BITMAP "img/tree_list.bmp" diff --git a/a2llib-main/a2lexplorer/src/a2lpropertygrid.cpp b/a2llib-main/a2lexplorer/src/a2lpropertygrid.cpp new file mode 100644 index 0000000..252f77b --- /dev/null +++ b/a2llib-main/a2lexplorer/src/a2lpropertygrid.cpp @@ -0,0 +1,1397 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#include "a2lpropertygrid.h" +#include +#include +#include + +using namespace a2l; +using namespace util::string; + +namespace a2lgui { +void A2lPropertyGrid::FixNameDesc(const A2lObject& object) { + Append( new wxStringProperty("Name", wxPG_LABEL, + wxString::FromUTF8(object.Name()))); + Append(new wxLongStringProperty("Description", wxPG_LABEL, + wxString::FromUTF8(object.Description()))); +} + +void A2lPropertyGrid::FixStringMap(const std::string_view& property_label, + const std::string_view& property_name, + const std::map& string_list) { + if (!string_list.empty()) { + + wxArrayString list; + for (const auto& [name, text] : string_list) { + list.Add(wxString::FromUTF8(name)); + } + const std::string_view prop_name = property_name.empty() ? property_label : + property_name; + auto* item = Append( new wxArrayStringProperty(property_label.data(), + prop_name.data(), + list)); + size_t count = 0; + for (const auto& [name, value] : string_list) { + std::ostringstream item_prop_name; + item_prop_name << prop_name << "_" << count; + AppendIn(item, new wxLongStringProperty(wxString::FromUTF8(name), + item_prop_name.str(), wxString::FromUTF8(value))); + ++count; + } + } +} + +void A2lPropertyGrid::FixFloatList( const std::string_view& property_label, + const std::string_view& property_name, + const std::vector& float_list) { + if (!float_list.empty()) { + wxArrayString list; + for (const auto value : float_list) { + list.Add(FormatDouble(value, 6)); + } + Append( new wxArrayStringProperty(property_label.data(), + property_name.empty() ? wxPG_LABEL : wxString(property_name.data()), + list)); + } +} + +void A2lPropertyGrid::FixUintList(const std::string_view& property_label, + const std::string_view& property_name, + const std::vector& uint_list) { + if (!uint_list.empty()) { + wxArrayString list; + for (const auto value : uint_list) { + list.Add(std::to_string(value)); + } + Append( new wxArrayStringProperty(property_label.data(), + property_name.empty() ? wxPG_LABEL : wxString(property_name.data()), + list)); + } +} + +void A2lPropertyGrid::FixIntList( const std::string_view& property_label, + const std::string_view& property_name, + const std::vector& int_list) { + if (!int_list.empty()) { + wxArrayString list; + for (const auto value : int_list) { + list.Add(std::to_string(value)); + } + Append( new wxArrayStringProperty(property_label.data(), + property_name.empty() ? wxPG_LABEL : wxString(property_name.data()), + list)); + } +} + +void A2lPropertyGrid::FixStringList( const std::string_view& property_label, + const std::string_view& property_name, + const std::vector& text_list) { + if (!text_list.empty()) { + wxArrayString list; + for (const auto& value : text_list) { + list.Add(wxString::FromUTF8(value)); + } + const std::string_view prop_name = property_name.empty() ? property_label : + property_name; + auto* item = Append( new wxArrayStringProperty(property_label.data(), + prop_name.data(), list)); + if (text_list.size() > 1 && text_list.size() < 15) { + size_t count = 0; + for (const auto& text: text_list) { + std::ostringstream item_prop_name; + item_prop_name << prop_name << "_" << count; + AppendIn(item, new wxLongStringProperty("", item_prop_name.str(), + wxString::FromUTF8(text))); + ++count; + } + } + } +} + +void A2lPropertyGrid::FixString(const std::string_view& property_label, + const std::string_view& property_name, + const std::string& text) { + if (!text.empty()) { + Append( new wxStringProperty(property_label.data(), + property_name.empty() ? wxPG_LABEL : wxString(property_name.data()), + wxString::FromUTF8(text))); + } +} + +void A2lPropertyGrid::FixFloat(const std::string_view& property_label, + const std::string_view& property_name, + double value) { + if (value != 0.0) { + Append( new wxFloatProperty(property_label.data(), + property_name.empty() ? wxPG_LABEL : wxString(property_name.data()), + value)); + } +} + +void A2lPropertyGrid::FixUint(const std::string_view& property_label, + const std::string_view& property_name, + uint64_t value) { + if (value > 0) { + Append( new wxUIntProperty(property_label.data(), + property_name.empty() ? wxPG_LABEL : wxString(property_name.data()), + value)); + + } +} + +void A2lPropertyGrid::FixHex(const std::string_view& property_label, + const std::string_view& property_name, + uint64_t value) { + if (value > 0) { + const std::string_view prop_name = property_name.empty() ? property_label : + property_name; + + Append( new wxUIntProperty(property_label.data(), + prop_name.data(),value)); + SetPropertyAttribute( prop_name.data(), wxPG_UINT_PREFIX, wxPG_PREFIX_0x ); + SetPropertyAttribute( prop_name.data(), wxPG_UINT_BASE, wxPG_BASE_HEX ); + } +} + +void A2lPropertyGrid::FixInt(const std::string_view& property_label, + const std::string_view& property_name, + int64_t value) { + if (value != 0) { + Append( new wxIntProperty(property_label.data(), + property_name.empty() ? wxPG_LABEL : wxString(property_name.data()), + static_cast(value))); + } +} + +void A2lPropertyGrid::FixBool(const std::string_view& property_label, + const std::string_view& property_name, + bool value) { + if (value) { + Append( new wxBoolProperty(property_label.data(), + property_name.empty() ? wxPG_LABEL : wxString(property_name.data()), + value)); + } +} + +void A2lPropertyGrid::FixAxisPts(const std::string_view& label, + const A2lAxisPts& axis) { + if (axis.DataType == A2lDataType::UNKNOWN) { + return; + } + + auto *root = Append(new wxStringProperty(wxString::FromUTF8(label.data()), + wxPG_LABEL, "")); + + { + std::ostringstream temp; + temp << label << " Position"; + AppendIn(root, new wxUIntProperty("Position", temp.str(), axis.Position)); + } + { + std::ostringstream temp; + temp << label << " Data Type"; + FixInEnumList(root, "Data Type", temp.str(), DataTypeToStringList(), + axis.DataType); + } + + { + std::ostringstream temp; + temp << label << " Increment"; + FixInEnumList(root, "Increment", temp.str(), IndexOrderToStringList(), + axis.IndexOrder); + } + + { + std::ostringstream temp; + temp << label << " Address Type"; + FixInEnumList(root, "Address Type", temp.str(), AddressTypeToStringList(), + axis.AddressType); + } +} + +void A2lPropertyGrid::FixAxisRescale(const std::string_view& label, + const A2lAxisRescale& axis) { + if (axis.DataType == A2lDataType::UNKNOWN) { + return; + } + auto *root = Append(new wxStringProperty(wxString::FromUTF8(label.data()), + wxPG_LABEL, "")); + { + std::ostringstream temp; + temp << label << " Position"; + AppendIn(root, new wxUIntProperty("Position", temp.str(), axis.Position)); + } + + { + std::ostringstream temp; + temp << label << " Data Type"; + FixInEnumList(root, "Data Type", temp.str(), DataTypeToStringList(), + axis.DataType); + } + { + std::ostringstream temp; + temp << label << " Rescale Pairs"; + AppendIn(root, new wxUIntProperty("Rescale Pairs",temp.str(), + axis.MaxNoRescalePairs)); + } + + { + std::ostringstream temp; + temp << label << " Increment"; + FixInEnumList(root, "Increment", temp.str(), IndexOrderToStringList(), + axis.IndexOrder); + } + { + std::ostringstream temp; + temp << label << " Address Type"; + FixInEnumList(root, "Address Type", temp.str(), AddressTypeToStringList(), + axis.AddressType); + } +} + +void A2lPropertyGrid::FixDistOp(const std::string_view& label, + const A2lDistOp& dist) { + if (dist.DataType == A2lDataType::UNKNOWN) { + return; + } + auto *root = Append(new wxStringProperty(wxString::FromUTF8(label.data()), + wxPG_LABEL, "")); + { + std::ostringstream temp; + temp << label << " Position"; + AppendIn(root, new wxUIntProperty("Position", temp.str(), dist.Position)); + } + { + std::ostringstream temp; + temp << label << " Data Type"; + FixInEnumList(root, "Data Type", temp.str(), DataTypeToStringList(), + dist.DataType); + } +} + +void A2lPropertyGrid::FixFncValue(const std::string_view& label, + const A2lFncValue& fnc) { + if (fnc.DataType == A2lDataType::UNKNOWN) { + return; + } + auto *root = Append(new wxStringProperty(wxString::FromUTF8(label.data()), + wxPG_LABEL, "")); + { + std::ostringstream temp; + temp << label << " Position"; + AppendIn(root, new wxUIntProperty("Position", temp.str(), fnc.Position)); + } + + { + std::ostringstream temp; + temp << label << " Data Type"; + FixInEnumList(root, "Data Type", temp.str(), DataTypeToStringList(), + fnc.DataType); + } + + { + std::ostringstream temp; + temp << label << " Increment"; + FixInEnumList(root, "Increment", temp.str(), IndexModeToStringList(), + fnc.IndexMode); + } + + { + std::ostringstream temp; + temp << label << " Address Type"; + FixInEnumList(root, "Address Type", temp.str(), AddressTypeToStringList(), + fnc.AddressType); + } +} + +void A2lPropertyGrid::FixExtendedLimits(const A2lExtendedLimits& limits) { + if (limits.LowerLimits < limits.UpperLimits) { + Append(new wxFloatProperty("Extended Lower Limit", wxPG_LABEL, + limits.LowerLimits)); + Append(new wxFloatProperty("Extended Upper Limit", wxPG_LABEL, + limits.UpperLimits)); + } +} + +void A2lPropertyGrid::FixMaxRefresh( const A2lMaxRefresh& refresh) { + if (refresh.ScalingUnit != 0 || refresh.Rate != 0) { + Append(new wxUIntProperty("Refresh Scaling Unit", wxPG_LABEL, + refresh.ScalingUnit)); + Append(new wxUIntProperty("Refresh Rate", wxPG_LABEL, refresh.Rate)); + } +} + +void A2lPropertyGrid::FixSymbolLink(const A2lSymbolLink& symbol) { + if (!symbol.SymbolName.empty()) { + Append(new wxStringProperty("Symbol Name", wxPG_LABEL, + wxString::FromUTF8(symbol.SymbolName))); + Append(new wxIntProperty("Symbol Offset", wxPG_LABEL, + static_cast(symbol.Offset))); + } +} + +A2lPropertyGrid::A2lPropertyGrid(wxWindow *parent, wxWindowID id, + const wxPoint &pos, const wxSize &size, + long style, const wxString &name) + : wxPropertyGrid(parent, id, pos, size, style, name) { + +} + +void A2lPropertyGrid::Redraw() { + Clear(); + if (document_ == nullptr) { + return; + } + + auto& file = document_->GetFile(); + auto type = document_->SelectedType(); + auto* object = document_->SelectedObject(); + + switch (type) { + case TreeItemType::ANNOTATION: + if (object != nullptr ) { + auto* note = static_cast(object); + Redraw(*note); + } + break; + + case TreeItemType::ANNOTATION_LIST: + if (object != nullptr ) { + auto* notes = static_cast(object); + Redraw(*notes); + } + break; + + case TreeItemType::AXIS_DESC: + if (object != nullptr ) { + auto* axis = static_cast(object); + Redraw(*axis); + } + break; + + case TreeItemType::AXIS_PTS: + if (object != nullptr ) { + auto* axis = static_cast(object); + Redraw(*axis); + } + break; + + case TreeItemType::BLOB: + if (object != nullptr ) { + auto* blob = static_cast(object); + Redraw(*blob); + } + break; + + case TreeItemType::CAL_METHOD: + if (object != nullptr ) { + auto* method = static_cast(object); + Redraw(*method); + } + break; + + case TreeItemType::CHARACTERISTIC: + if (object != nullptr ) { + auto* characteristic = static_cast(object); + Redraw(*characteristic); + } + break; + + case TreeItemType::COMPU_METHOD: + if (object != nullptr ) { + auto* method = static_cast(object); + Redraw(*method); + } + break; + + case TreeItemType::COMPU_TAB: + if (object != nullptr ) { + auto* table = static_cast(object); + Redraw(*table); + } + break; + + case TreeItemType::COMPU_VTAB: + if (object != nullptr ) { + auto* table = static_cast(object); + Redraw(*table); + } + break; + + case TreeItemType::COMPU_VTAB_RANGE: + if (object != nullptr ) { + auto* table = static_cast(object); + Redraw(*table); + } + break; + + case TreeItemType::FRAME: + if (object != nullptr ) { + auto* frame = static_cast(object); + Redraw(*frame); + } + break; + + case TreeItemType::FUNCTION: + if (object != nullptr ) { + auto* function = static_cast(object); + Redraw(*function); + } + break; + + case TreeItemType::GROUP: + if (object != nullptr ) { + auto* group = static_cast(object); + Redraw(*group); + } + break; + + case TreeItemType::INSTANCE: + if (object != nullptr ) { + auto* instance = static_cast(object); + Redraw(*instance); + } + break; + + case TreeItemType::MEM_SEGMENT: + if (object != nullptr ) { + auto* segment = static_cast(object); + Redraw(*segment); + } + break; + + case TreeItemType::MEM_LAYOUT: + if (object != nullptr ) { + auto* layout = static_cast(object); + Redraw(*layout); + } + break; + + case TreeItemType::MEASUREMENT: + if (object != nullptr ) { + auto* measurement = static_cast(object); + Redraw(*measurement); + } + break; + + case TreeItemType::MOD_PAR: + if (object != nullptr ) { + auto* par = static_cast(object); + Redraw(*par); + } + break; + + case TreeItemType::MODULE: + if (object != nullptr ) { + auto* module = static_cast(object); + Redraw(*module); + } + break; + + case TreeItemType::OVERWRITE: + if (object != nullptr ) { + auto* overwrite = static_cast(object); + Redraw(*overwrite); + } + break; + + case TreeItemType::RECORD_LAYOUT: + if (object != nullptr ) { + auto* layout = static_cast(object); + Redraw(*layout); + } + break; + + case TreeItemType::STRUCTURE: + if (object != nullptr ) { + auto* structure = static_cast(object); + Redraw(*structure); + } + break; + + case TreeItemType::TRANSFORMER: + if (object != nullptr ) { + auto* transformer = static_cast(object); + Redraw(*transformer); + } + break; + + case TreeItemType::UNIT: + if (object != nullptr ) { + auto* unit = static_cast(object); + Redraw(*unit); + } + break; + + case TreeItemType::VARIANT_CODING: + if (object != nullptr ) { + auto* coding = static_cast(object); + Redraw(*coding); + } + break; + + case TreeItemType::VAR_CHARACTERISTIC: + if (object != nullptr ) { + auto* characteristic = static_cast(object); + Redraw(*characteristic); + } + break; + + case TreeItemType::VAR_CRITERION: + if (object != nullptr ) { + auto* criterion = static_cast(object); + Redraw(*criterion); + } + break; + + case TreeItemType::A2L_FILE: + case TreeItemType::PROJECT: + default: + Redraw(file); + break; + + } + // SetPropertyReadOnly(GetRoot()); +} + +void A2lPropertyGrid::Redraw(const a2l::A2lFile& file) { + Append( new wxPropertyCategory("ASAP2 File") ); + Append( new wxStringProperty("Name", "name", + wxString::FromUTF8(file.Name()))); + Append( new wxFileProperty("File Name", "filename", + wxString::FromUTF8(file.Filename()))); + const auto& version = file.A2lVersion(); + if (version.VersionNo > 0) { + Append( new wxPropertyCategory("ASAP2 Version") ); + Append( new wxUIntProperty("Version No", "a2lversion", version.VersionNo)); + Append( new wxUIntProperty("Upgrade No", "a2lupgrade", version.UpgradeNo)); + } + + const auto& a2ml = file.A2mlVersion(); + if (a2ml.VersionNo > 0) { + Append( new wxPropertyCategory("A2ML Version") ); + Append( new wxUIntProperty("Version No", "a2mlversion", a2ml.VersionNo)); + Append( new wxUIntProperty("Upgrade No", "a2mlupgrade", a2ml.UpgradeNo)); + } + + const auto& project = file.Project(); + Append( new wxPropertyCategory("Project") ); + Append( new wxStringProperty("Name", "projname", + wxString::FromUTF8(project.Name()))); + Append( new wxLongStringProperty("Description", "projdesc", + wxString::FromUTF8(project.Description()))); + + const auto& header = project.Header(); + Append( new wxLongStringProperty("Comments", "projcomment", + wxString::FromUTF8(header.Comment))); + Append( new wxStringProperty("Version", "projversion", + wxString::FromUTF8(header.VersionNo))); + Append( new wxStringProperty("Project", "projno", + wxString::FromUTF8(header.ProjectNo))); + + FixPropertyMap( "ECU", "modules", project.Modules()); + +} + +void A2lPropertyGrid::Redraw(const a2l::Module& module) { + Append(new wxPropertyCategory("ECU")); + FixNameDesc(module); + + const auto& a2ml = module.A2ml(); + if (!a2ml.empty()) { + Append(new wxLongStringProperty("Meta-Language", "a2ml", + wxString::FromUTF8(a2ml))); + } + FixStringMap("Interface Data", "if_data", module.IfDatas()); + + Append(new wxPropertyCategory("ECU Specific Definitions")); + const auto& common = module.ModCommon(); + Append(new wxLongStringProperty("Comment", "common_comment", + wxString::FromUTF8(common.Comment))); + + FixUint("Alignment Int8", "", common.AlignmentByte); + FixUint("Alignment Int16", "", common.AlignmentWord); + FixUint("Alignment Int32", "", common.AlignmentLong); + FixUint("Alignment Int64", "", common.AlignmentInt64); + FixUint("Alignment Float16", "", common.AlignmentFloat16); + FixUint("Alignment Float32", "", common.AlignmentFloat32); + FixUint("Alignment Float64", "", common.AlignmentFloat64); + FixEnumList("Byte Order", "byte_order", ByteOrderToStringList(), + common.ByteOrder); + FixUint("Data Size [bytes]", "data_size", common.DataSize); + FixEnumList("Deposit Mode for Axis", "deposit", DepositToStringList(), + common.Deposit); + + DrawCategory(module.ModPar()); + + Append(new wxPropertyCategory("ECU Objects")); + FixPropertyMap("Axis Points Distributions", "axis", module.AxisPtss()); + FixPropertyMap("Binary Large Objects", "blob", module.Blobs()); + FixPropertyMap("Adjustable Objects", "char", module.Characteristics()); + FixPropertyMap("Conversion Methods", "method", module.CompuMethods()); + FixPropertyMap("Conversion Tables", "table", module.CompuTabs()); + FixPropertyMap("Verbal Conversion Tables", "vtable", + module.CompuVtabs()); + FixPropertyMap("VTAB Ranges", "vtable_r", module.CompuVtabRanges()); + FixPropertyMap("Frames", "frame", module.Frames()); + FixPropertyMap("Function Descriptions", "function", + module.Functions()); + FixPropertyMap("Group Declarations", "group", module.Groups()); + FixPropertyMap("Instances", "instance", module.Instances()); + FixPropertyMap("Measurement Objects", "meas", module.Measurements()); + + const auto& user_list = module.UserRights(); + if (!user_list.empty()) { + for (const auto& [level, user_right] : user_list) { + std::ostringstream cat_name; + cat_name << level << "_cat"; + Append(new wxPropertyCategory("User Rights", cat_name.str())); + + std::ostringstream user_level; + user_level << level << "_level"; + Append(new wxStringProperty("User Level", user_level.str(), + wxString::FromUTF8(level))); + + std::ostringstream user_read; + user_read << level << "_read"; + FixBool("Read-Only", user_read.str(), user_right->ReadOnly); + + if (!user_right->RefGroupList.empty()) { + size_t group = 0; + for (const auto& group_list : user_right->RefGroupList) { + std::ostringstream user_group; + user_group << level << "_group_" << group; + FixStringList("Group References", user_group.str(), group_list); + ++group; + } + } + } + } +} + +void A2lPropertyGrid::Redraw(const a2l::A2lModPar& par) { + DrawCategory(par); +} + +void A2lPropertyGrid::DrawCategory( const A2lModPar& par) { + Append(new wxPropertyCategory("ECU Management Data")); + Append(new wxLongStringProperty("Comment", "par_comment", + wxString::FromUTF8(par.Comment))); + FixUintList("Address of EEPROM Identifiers", "eepk", + par.AddressEpkList); + + wxArrayString cal_method_list; + for (const auto& cal_method : par.CalibrationMethodList) { + cal_method_list.Add(cal_method.Method); + } + if (!cal_method_list.IsEmpty()) { + Append(new wxArrayStringProperty("Access Methods", "access_method", + cal_method_list)); + } + FixString("CPU Type", "cpu_type", par.CpuType); + FixString("Customer", "customer", par.Customer); + FixString("Customer Number", "customer_no", par.CustomerNo); + FixString("Control Unit", "control_unit", par.Ecu); + Append(new wxIntProperty("Calibration Offset", "cal_offset", + static_cast(par.EcuCalibrationOffset))); + FixString("EPROM Identifier", "epk", par.Epk); + FixUint("Number of Interfaces", "interface", par.NoOfInterfaces); + if (!par.MemoryLayoutList.empty()) { + wxArrayString enum_list; + for (const auto& layout : par.MemoryLayoutList) { + enum_list.Add(PrgTypeToString(layout.Type).data()); + } + Append(new wxArrayStringProperty("Memory Segments", wxPG_LABEL, enum_list)); + } + if (!par.MemorySegmentList.empty()) { + wxArrayString name_list; + for (const auto& seg : par.MemorySegmentList) { + name_list.Add(wxString::FromUTF8(seg.Name)); + } + Append(new wxArrayStringProperty("Memory Segments", "segments", name_list)); + } + FixString("PhoneNo", "phone_no", par.PhoneNo); + FixString("Supplier", "supplier", par.Supplier); + FixString("User", "user", par.User); + FixString("Version", "par_version", par.Version); + FixStringMap("System Constants", "sys_const", par.SystemConstantList); +} + +void A2lPropertyGrid::Redraw(const A2lCalibrationMethod& method) { + Append(new wxPropertyCategory("Calibration Method")); + Append( new wxStringProperty("Method", wxPG_LABEL, + wxString::FromUTF8(method.Method))); + Append( new wxUIntProperty("Version", wxPG_LABEL, method.Version)); + if (!method.CalibrationHandleList.empty()) { + wxArrayString list; + for (const auto& object : method.CalibrationHandleList) { + list.Add(wxString::FromUTF8(object.Comment)); + } + auto item = Append(new wxArrayStringProperty("Calibration Handles", + wxPG_LABEL,list)); + size_t count = 0; + for (const auto& handle : method.CalibrationHandleList) { + wxArrayString handle_list; + for (auto address : handle.HandleList) { + handle_list.Add(std::to_string(address)); + } + std::ostringstream prop_name; + prop_name << "handle_" << count; + AppendIn(item, new wxArrayStringProperty( + wxString::FromUTF8(handle.Comment), + prop_name.str(),handle_list)); + ++count; + } + } +} + +void A2lPropertyGrid::Redraw(const A2lMemoryLayout& layout) { + Append(new wxPropertyCategory("Memory Layout")); + FixEnumList("Type","", PrgTypeToStringList(),layout.Type); + FixHex("Address", "", layout.Address); + FixIntList("Offset","", layout.OffsetList); + FixStringMap("Interface Data","", layout.IfDataList); + +} + +void A2lPropertyGrid::Redraw(const A2lMemorySegment& segment) { + Append(new wxPropertyCategory("Memory Segment")); + Append( new wxStringProperty("Name", wxPG_LABEL, + wxString::FromUTF8(segment.Name))); + Append( new wxStringProperty("Description", wxPG_LABEL, + wxString::FromUTF8(segment.Description))); + FixEnumList("Segment Type","", SegmentTypeToStringList(), + segment.SegmentType); + FixEnumList("Memory Type","", MemoryTypeToStringList(), + segment.MemoryType); + FixEnumList("Memory Attribute","", MemoryAttributeToStringList(), + segment.Attribute); + FixHex("Address", "", segment.Address); + FixIntList("Offset","", segment.OffsetList); + FixStringMap("Interface Data","", segment.IfDataList); +} + +void A2lPropertyGrid::Redraw(const AxisDescr& axis) { + Append(new wxPropertyCategory("Axis Description")); + FixEnumList("Type", "", AxisTypeToStringList(), axis.AxisType()); + Append( new wxStringProperty("Input Quantity", wxPG_LABEL, + wxString::FromUTF8(axis.InputQuantity()))); + Append( new wxStringProperty("Conversion", wxPG_LABEL, + wxString::FromUTF8(axis.Conversion()))); + Append( new wxUIntProperty("Axis Points", wxPG_LABEL,axis.MaxAxisPoints())); + Append( new wxFloatProperty("Lower Limit", wxPG_LABEL, axis.LowerLimit())); + Append( new wxFloatProperty("Upper Limit", wxPG_LABEL, axis.UpperLimit())); + + FixString("Axis Point Reference", "", axis.AxisPtsRef()); + FixEnumList( "Byte Order", "", ByteOrderToStringList(), + axis.ByteOrder()); + FixString("Curve Axis Reference", "", axis.CurveAxisRef()); + FixEnumList("Deposit", "", DepositToStringList(), axis.Deposit()); + FixExtendedLimits(axis.ExtendedLimits()); + const auto& par = axis.FixAxisPar(); + if (par.Offset != 0.0 || par.Shift != 0.0 || par.NoAxisPoints > 0) { + Append( new wxFloatProperty("Fixed Axis Offset", wxPG_LABEL, + par.Offset)); + Append( new wxFloatProperty("Fixed Axis Shift", wxPG_LABEL, + par.Shift)); + Append( new wxUIntProperty("Fixed Axis Points", wxPG_LABEL, + par.NoAxisPoints)); + } + + const auto& dist = axis.FixAxisParDist(); + if (dist.Offset != 0.0 || dist.Distance != 0.0 || dist.NoAxisPoints > 0) { + Append( new wxFloatProperty("Fixed Axis Distance Offset", wxPG_LABEL, + dist.Offset)); + Append( new wxFloatProperty("Fixed Axis Distance", wxPG_LABEL, + dist.Distance)); + Append( new wxUIntProperty("Fixed Axis Distance Points", wxPG_LABEL, + dist.NoAxisPoints)); + } + + FixFloatList("Fixed Axis List", "", axis.FixAxisParList()); + FixString("Format", "", axis.Format()); + FixFloat("Max Gradient", "", axis.MaxGrad()); + FixEnumList("Monotony", "", MonotonyToStringList(), axis.Monotony()); + FixString("Physical Unit", "", axis.PhysUnit()); + FixBool("Read-Only", "", axis.ReadOnly()); + FixFloat("Step Size", "", axis.StepSize()); +} + +void A2lPropertyGrid::Redraw(const AxisPts& axis) { + Append(new wxPropertyCategory("Axis Point Distribution")); + FixNameDesc(axis); + FixHex("Address", "", axis.Address()); + Append( new wxStringProperty("Input Quantity", wxPG_LABEL, + wxString::FromUTF8(axis.InputQuantity()))); + Append( new wxStringProperty("Record Reference", wxPG_LABEL, + wxString::FromUTF8(axis.RefRecord()))); + Append( new wxFloatProperty("Max Difference", wxPG_LABEL, axis.MaxDiff())); + Append( new wxStringProperty("Conversion", wxPG_LABEL, + wxString::FromUTF8(axis.Conversion()))); + Append( new wxUIntProperty("Max axis Points", wxPG_LABEL, + axis.MaxAxisPoints())); + Append( new wxFloatProperty("Lower Limit", wxPG_LABEL, axis.LowerLimit())); + Append( new wxFloatProperty("Upper Limit", wxPG_LABEL, axis.UpperLimit())); + + FixEnumList("Byte Order", "", ByteOrderToStringList(), + axis.ByteOrder()); + FixEnumList("Calibration Access", "", CalibrationAccessToStringList(), + axis.CalibrationAccess()); + FixEnumList("Deposit", "", DepositToStringList(), axis.Deposit()); + FixString( "Display Identifier", "", axis.DisplayIdentifier()); + FixInt("ECU Address Extension", "", axis.EcuAddressExtension()); + FixExtendedLimits(axis.ExtendedLimits()); + FixString("Format", "", axis.Format()); + FixStringList("Functions", "", axis.FunctionList()); + FixBool( "Guard Rails", "", axis.GuardRails()); + FixStringMap( "Network Communication", "", axis.IfDatas()); + FixMaxRefresh(axis.MaxRefresh()); + FixString("Model Link", "", axis.ModelLink()); + FixEnumList("Monotony", "", MonotonyToStringList(), axis.Monotony()); + FixString("Physical Unit", "", axis.PhysUnit()); + FixBool("Read-Only", "", axis.ReadOnly()); + FixString("Memory Segment Reference", "", axis.RefMemorySegment()); + FixFloat("Step Size", "", axis.StepSize()); + FixSymbolLink(axis.SymbolLink()); +} + +void A2lPropertyGrid::Redraw(const Blob& blob) { + Append(new wxPropertyCategory("Binary Large Object")); + FixNameDesc(blob); + FixHex("Address", "", blob.Address()); + Append( new wxUIntProperty("Size", wxPG_LABEL, blob.Size())); + + FixEnumList("Address Type", "", AddressTypeToStringList(), + blob.AddressType()); + FixEnumList("Calibration Access", "", CalibrationAccessToStringList(), + blob.CalibrationAccess()); + FixString("Display Identifier", "", blob.DisplayIdentifier()); + FixInt("ECU Address Extension", "", blob.EcuAddressExtension()); + FixStringMap( "Network Communication", "", blob.IfDatas()); + FixMaxRefresh(blob.MaxRefresh()); + FixString("Model Link", "", blob.ModelLink()); + FixSymbolLink(blob.SymbolLink()); +} + +void A2lPropertyGrid::Redraw(const Characteristic& object) { + Append(new wxPropertyCategory("Characteristic")); + FixNameDesc(object); + FixEnumList("Type", "", CharacteristicTypeToStringList(), object.Type()); + FixHex("Address", "", object.Address()); + Append(new wxStringProperty("Reference to Data Record", wxPG_LABEL, + wxString::FromUTF8(object.Deposit()))); + Append(new wxFloatProperty("Max Difference", wxPG_LABEL, + object.MaxDiff())); + Append(new wxStringProperty("Conversion", wxPG_LABEL, + wxString::FromUTF8(object.Conversion()))); + Append(new wxFloatProperty("Lower Limit", wxPG_LABEL, + object.LowerLimit())); + Append(new wxFloatProperty("Upper Limit", wxPG_LABEL, + object.UpperLimit())); + + + FixHex("Bit Mask", "", object.BitMask()); + FixEnumList("Byte Order", "", ByteOrderToStringList(), object.ByteOrder()); + FixEnumList("CalibrationAccess", "", CalibrationAccessToStringList(), + object.CalibrationAccess()); + FixString("Comparison Quantity", "", object.ComparisonQuantity()); + const auto& dep = object.DependentCharacteristic(); + if (!dep.Formula.empty() || !dep.CharacteristicList.empty()) { + Append(new wxLongStringProperty("Dependent Formula", wxPG_LABEL, + wxString::FromUTF8(dep.Formula))); + FixStringList("Dependent List", "", dep.CharacteristicList); + } + FixBool("Discrete", "", object.Discrete()); + FixString( "Display Identifier", "", object.DisplayIdentifier()); + FixInt("ECU Address Extension", "", object.EcuAddressExtension()); + if (object.Encoding() != A2lEncoding::ASCII) { + FixEnumList("Encoding", "", EncodingToStringList(), object.Encoding()); + } + FixExtendedLimits(object.ExtendedLimits()); + FixString( "Format", "", object.Format()); + FixStringList( "Function List", "", object.FunctionList()); + FixBool("Guard Rails", "", object.GuardRails()); + FixStringMap( "Network Communication", "", object.IfDatas()); + FixStringList( "Map List", "", object.MapList()); + FixUintList( "Matrix Dimension", "", object.MatrixDim()); + FixMaxRefresh(object.MaxRefresh()); + FixString( "Model Link", "", object.ModelLink()); + FixUint("Number of Bytes", "", object.Number()); + FixString("Physical Unit", "", object.PhysUnit()); + FixBool("Read-Only", "", object.ReadOnly()); + FixString("Memory Segment Reference", "", object.RefMemorySegment()); + FixFloat("Step Size", "", object.StepSize()); + FixSymbolLink(object.SymbolLink()); + const auto& virt = object.VirtualCharacteristic(); + if (!virt.Formula.empty() || !virt.CharacteristicList.empty()) { + Append(new wxLongStringProperty(" Virtual Formula", wxPG_LABEL, + wxString::FromUTF8(virt.Formula))); + FixStringList("Virtual List", "", virt.CharacteristicList); + } + + +} + +void A2lPropertyGrid::Redraw(const AnnotationList& list) { + Append(new wxPropertyCategory("Notes")); + size_t count = 0; + for (const auto& note : list) { + std::ostringstream label; + if (!note.Label.empty()) { + label << note.Label; + } + if (!note.Origin.empty()) { + if (!label.str().empty()) { + label << "/"; + } + } + std::ostringstream name; + name << "note_" << count; + + wxArrayString text_list; + for (const auto& text : note.Text) { + text_list.Add(wxString::FromUTF8(text)); + } + Append(new wxArrayStringProperty(wxString::FromUTF8(label.str()), + name.str(), text_list)); + + } +} + +void A2lPropertyGrid::Redraw(const A2lAnnotation& note) { + Append(new wxPropertyCategory("Note")); + FixString("Label", "", note.Label); + FixString("Origin", "", note.Origin); + FixStringList("Text", "", note.Text); +} + +void A2lPropertyGrid::Redraw(const CompuMethod& method) { + Append(new wxPropertyCategory("Conversion Method")); + FixNameDesc(method); + FixEnumList("Type", "", ConversionTypeToStringList(), method.Type()); + Append(new wxStringProperty("Format", wxPG_LABEL, + wxString::FromUTF8(method.Format()))); + Append(new wxStringProperty("Unit", wxPG_LABEL, + wxString::FromUTF8(method.PhysUnit()))); + + FixFloatList("Float Coefficients", "" , method.Coeffs()); + FixFloatList("Linear Coefficients", "" , method.CoeffsLinear()); + FixString("Table Conversion Reference", "" , method.CompuTabRef()); + FixString("Formula", "" , method.Formula()); + FixString("Inverse Formula", "" , method.FormulaInv()); + FixString("Unit Reference", "" , method.RefUnit()); + FixString("Status Strings Reference", "" , method.StatusStringRef()); +} + +void A2lPropertyGrid::Redraw(const CompuTab& table) { + Append(new wxPropertyCategory("Conversion Table")); + FixNameDesc(table); + FixEnumList("Type", "", ConversionTypeToStringList(), table.Type()); + auto item = Append(new wxUIntProperty("Value Pairs", wxPG_LABEL, + table.Rows())); + int count = 0; + const auto& value_list = table.KeyValueList(); + for (const auto [key, value] : value_list) { + auto name = FormatDouble(key, 6); + std::ostringstream prop_name; + prop_name << "key_" << count; + AppendIn(item, new wxFloatProperty(name, prop_name.str(), value)); + ++count; + } + FixString("Default Value", "" , table.DefaultValue()); + FixFloat("Numeric Default Value", "" , table.DefaultValueNumeric()); +} + +void A2lPropertyGrid::Redraw(const CompuVtab& table) { + Append(new wxPropertyCategory("Conversion String Table")); + FixNameDesc(table); + FixEnumList("Type", "", ConversionTypeToStringList(), table.Type()); + auto item = Append(new wxUIntProperty("Value Pairs", wxPG_LABEL, + table.Rows())); + int count = 0; + const auto& value_list = table.KeyValueList(); + for (const auto& [key, value] : value_list) { + auto name = FormatDouble(key, 6); + std::ostringstream prop_name; + prop_name << "key_" << count; + AppendIn(item, new wxStringProperty(name, prop_name.str(), + wxString::FromUTF8(value))); + ++count; + } + FixString("Default Value", "" , table.DefaultValue()); +} + +void A2lPropertyGrid::Redraw(const CompuVtabRange& table) { + Append(new wxPropertyCategory("Conversion String Table")); + FixNameDesc(table); + auto item = Append(new wxUIntProperty("Value Pairs", wxPG_LABEL, + table.Rows())); + int count = 0; + const auto& value_list = table.KeyValueList(); + for (const auto& [key, value] : value_list) { + std::ostringstream range; + range << FormatDouble(key.first, 6) << ".." << FormatDouble(key.second, 6); + + std::ostringstream prop_name; + prop_name << "key_" << count; + AppendIn(item, new wxStringProperty(range.str(), prop_name.str(), + wxString::FromUTF8(value))); + ++count; + } + FixString("Default Value", "" , table.DefaultValue()); +} + +void A2lPropertyGrid::Redraw(const Frame& frame) { + Append(new wxPropertyCategory("Frame")); + FixNameDesc(frame); + Append(new wxUIntProperty("Scaling Unit", wxPG_LABEL, frame.ScalingUnit())); + Append(new wxUIntProperty("Rate", wxPG_LABEL, frame.Rate())); + FixStringList("Measurement Objects", "", frame.FrameMeasurement()); + FixStringMap("Network Communication", "", frame.IfDatas()); +} + +void A2lPropertyGrid::Redraw(const Function& function) { + Append(new wxPropertyCategory("Frame")); + FixNameDesc(function); + FixString("Component Type", "", function.ComponentType()); + FixString("Prototype", "", function.PrototypeOf()); + FixStringList("Default Characteristics", "", + function.DefaultCharacteristics()); + FixString("Version", "", function.Version()); + FixStringMap("Network Communication", "", function.IfDatas()); + FixStringList("Input Measurements", "", function.InMeasurements()); + FixStringList("Local Measurements", "", function.LocMeasurements()); + FixStringList("Output Measurements", "", function.OutMeasurements()); + FixStringList("Characteristic References", "", function.RefCharacteristics()); + FixStringList("Sub-Functions", "", function.SubFunctions()); +} + +void A2lPropertyGrid::Redraw(const Group& group) { + Append(new wxPropertyCategory("Group")); + FixNameDesc(group); + FixStringList("Function References", "", group.FunctionList()); + FixStringMap("Network Communication", "", group.IfDatas()); + FixStringList("Characteristic References", "", group.RefCharacteristics()); + FixStringList("Measurement References", "", group.RefMeasurements()); + FixBool("Root Group", "", group.Root()); + FixStringList("Sub-Groups", "", group.SubGroups()); +} + +void A2lPropertyGrid::Redraw(const Instance& instance) { + Append(new wxPropertyCategory("Instance")); + FixNameDesc(instance); + Append(new wxStringProperty("Type", wxPG_LABEL, + wxString::FromUTF8(instance.RefTypeDef()))); + FixHex("Address", "", instance.Address()); + FixEnumList("Address Type", "", AddressTypeToStringList(), + instance.AddressType()); + FixEnumList("Calibration Access", "", CalibrationAccessToStringList(), + instance.CalibrationAccess()); + FixString("Display Identifier", "", instance.DisplayIdentifier()); + FixInt("ECU Address Extension", "", instance.EcuAddressExtension()); + FixStringMap("Network Communication", "", instance.IfDatas()); + FixEnumList("Layout", "", LayoutToStringList(), + instance.Layout()); + FixUintList("Matrix Dimension", "", instance.MatrixDim()); + FixMaxRefresh(instance.MaxRefresh()); + FixString("Model Link", "", instance.ModelLink()); + FixBool("Read and Write", "", instance.ReadWrite()); + FixSymbolLink(instance.SymbolLink()); +} + +void A2lPropertyGrid::Redraw(const Overwrite& object) { + Append(new wxPropertyCategory("Overwrite")); + Append(new wxStringProperty("Name", wxPG_LABEL, + wxString::FromUTF8(object.Name()))); + Append(new wxUIntProperty("Axis", wxPG_LABEL,object.AxisNo())); + FixString("Conversion", "", object.Conversion()); + FixExtendedLimits(object.ExtendedLimits()); + FixString("Format", "", object.Format()); + FixString("Input Quantity", "", object.InputQuantity()); + if (object.LowerLimit() < object.UpperLimit()) { + Append(new wxFloatProperty("Lower Limit", wxPG_LABEL,object.LowerLimit())); + Append(new wxFloatProperty("Upper Limit", wxPG_LABEL,object.UpperLimit())); + } + FixEnumList("Monotony", "", MonotonyToStringList(), object.Monotony()); + FixString("Physical Unit", "", object.PhysUnit()); +} + +void A2lPropertyGrid::Redraw(const Measurement& meas) { + Append(new wxPropertyCategory("Measurement")); + FixNameDesc(meas); + FixEnumList("Data Type", "", DataTypeToStringList(), meas.DataType()); + Append(new wxStringProperty("Conversion", wxPG_LABEL, + wxString::FromUTF8(meas.Conversion()))); + Append(new wxUIntProperty("Resolution", wxPG_LABEL, meas.Resolution())); + Append(new wxFloatProperty("Accuracy", wxPG_LABEL, meas.Accuracy())); + Append(new wxFloatProperty("Lower Limit", wxPG_LABEL, meas.LowerLimit())); + Append(new wxFloatProperty("Upper Limit", wxPG_LABEL, meas.UpperLimit())); + + FixEnumList("Address Type", "", AddressTypeToStringList(), meas.AddressType()); + FixUint("Array Size", "", meas.ArraySize()); + FixHex("Bit Mask", "", meas.BitMask()); + + const auto& operation = meas.BitOperation(); + FixUint("Left Shift", "", operation.LeftShift); + FixUint("Right Shift", "", operation.RightShift); + FixBool("Extended Sign", "", operation.SignExtended); + + FixEnumList("Byte Order", "", ByteOrderToStringList(), meas.ByteOrder()); + FixBool("Discrete", "", meas.Discrete()); + FixString( "Display Identifier", "", meas.DisplayIdentifier()); + FixHex("ECU Address", "", meas.EcuAddress()); + FixInt("ECU Address Extension", "", meas.EcuAddressExtension()); + FixHex("Error Mask", "", meas.ErrorMask()); + FixString( "Format", "", meas.Format()); + FixStringList( "Function List", "", meas.FunctionList()); + FixStringMap( "Network Communication", "", meas.IfDatas()); + FixEnumList("Layout", "", LayoutToStringList(), meas.Layout()); + FixUintList( "Matrix Dimension", "", meas.MatrixDim()); + FixMaxRefresh(meas.MaxRefresh()); + FixString( "Model Link", "", meas.ModelLink()); + FixString("Physical Unit", "", meas.PhysUnit()); + FixBool("Read and Write", "", meas.ReadWrite()); + FixString("Memory Segment Reference", "", meas.RefMemorySegment()); + FixSymbolLink(meas.SymbolLink()); + FixStringList("Virtual Measurements", "", meas.Virtuals()); + +} +void A2lPropertyGrid::Redraw(const RecordLayout& layout) { + Append(new wxPropertyCategory("Record Layout")); + Append(new wxStringProperty("Name", wxPG_LABEL, + wxString::FromUTF8(layout.Name()))); + + FixUint("Alignment Int8", "", layout.AlignmentByte()); + FixUint("Alignment Int16", "", layout.AlignmentWord()); + FixUint("Alignment Int32", "", layout.AlignmentLong()); + FixUint("Alignment Int64", "", layout.AlignmentInt64()); + FixUint("Alignment Float16", "", layout.AlignmentFloat16()); + FixUint("Alignment Float32", "", layout.AlignmentFloat32()); + FixUint("Alignment Float64", "", layout.AlignmentFloat64()); + + FixAxisPts("X Axis Point", layout.AxisPtsX()); + FixAxisPts("Y Axis Point", layout.AxisPtsY()); + FixAxisPts("Z Axis Point", layout.AxisPtsZ()); + FixAxisPts("4 Axis Point", layout.AxisPts4()); + FixAxisPts("5 Axis Point", layout.AxisPts5()); + + FixAxisRescale("X Axis Rescale", layout.AxisRescaleX()); + + FixDistOp("X Distance", layout.DistOpX()); + FixDistOp("Y Distance", layout.DistOpY()); + FixDistOp("Z Distance", layout.DistOpZ()); + FixDistOp("4 Distance", layout.DistOp4()); + FixDistOp("5 Distance", layout.DistOp5()); + + FixUint("X Axis Fixed Points", "", layout.FixNoAxisPtsX()); + FixUint("Y Axis Fixed Points", "", layout.FixNoAxisPtsY()); + FixUint("Z Axis Fixed Points", "", layout.FixNoAxisPtsZ()); + FixUint("4 Axis Fixed Points", "", layout.FixNoAxisPts4()); + FixUint("5 Axis Fixed Points", "", layout.FixNoAxisPts5()); + + FixFncValue("Function Value", layout.FncValues()); + const auto& ident = layout.Identification(); + if ( ident.DataType != A2lDataType::UNKNOWN ) { + Append(new wxUIntProperty("Identification Position", wxPG_LABEL, + ident.Position)); + FixEnumList("Identification Data Type", "", DataTypeToStringList(), + ident.DataType); + } + + FixDistOp("X No Axis Points", layout.NoAxisPtsX()); + FixDistOp("Y No Axis Points", layout.NoAxisPtsY()); + FixDistOp("Z No Axis Points", layout.NoAxisPtsX()); + FixDistOp("4 No Axis Points", layout.NoAxisPts4()); + FixDistOp("5 No Axis Points", layout.NoAxisPts5()); + + FixDistOp("X No Rescale", layout.NoRescaleX()); + + FixDistOp("X Offset", layout.OffsetX()); + FixDistOp("Y Offset", layout.OffsetY()); + FixDistOp("Z Offset", layout.OffsetZ()); + FixDistOp("4 Offset", layout.Offset4()); + FixDistOp("5 Offset", layout.Offset5()); + + const auto& reserved_list = layout.ReservedList(); + size_t reserved_count = 1; + for (const auto& reserved : reserved_list) { + std::ostringstream res_name; + res_name << "Reserved " << reserved_count; + FixDistOp(res_name.str(), reserved); + ++reserved_count; + } + + FixDistOp("W RIP Address", layout.RipAddrW()); + FixDistOp("X RIP Address", layout.RipAddrX()); + FixDistOp("Y RIP Address", layout.RipAddrY()); + FixDistOp("Z RIP Address", layout.RipAddrZ()); + FixDistOp("4 RIP Address", layout.RipAddr4()); + FixDistOp("5 RIP Address", layout.RipAddr5()); + + FixDistOp("X Shift Operand", layout.ShiftOpX()); + FixDistOp("Y Shift Operand", layout.ShiftOpY()); + FixDistOp("Z Shift Operand", layout.ShiftOpZ()); + FixDistOp("4 Shift Operand", layout.ShiftOp4()); + FixDistOp("5 Shift Operand", layout.ShiftOp5()); + + FixDistOp("X Source Address", layout.SrcAddrX()); + FixDistOp("Y Source Address", layout.SrcAddrY()); + FixDistOp("Z Source Address", layout.SrcAddrZ()); + FixDistOp("4 Source Address", layout.SrcAddr4()); + FixDistOp("5 Source Address", layout.SrcAddr5()); + + FixBool("Static Address Offset", "", layout.StaticAddressOffsets()); + FixBool("Static Record Layout", "", layout.StaticRecordLayout()); + +} + +void A2lPropertyGrid::Redraw(const Transformer& transformer) { + Append(new wxPropertyCategory("Transformer")); + Append(new wxStringProperty("Name", wxPG_LABEL, + wxString::FromUTF8(transformer.Name()))); + Append(new wxStringProperty("Version", wxPG_LABEL, + wxString::FromUTF8(transformer.Version()))); + Append(new wxStringProperty("32-bit Executable", wxPG_LABEL, + wxString::FromUTF8(transformer.Executable32()))); + Append(new wxStringProperty("64-bit Executable", wxPG_LABEL, + wxString::FromUTF8(transformer.Executable64()))); + Append(new wxUIntProperty("Timeout", wxPG_LABEL,transformer.Timeout())); + FixEnumList("Trigger", "", TriggerToStringList(), transformer.Trigger()); + Append(new wxStringProperty("Inverse Transformer", wxPG_LABEL, + wxString::FromUTF8(transformer.InverseTransformer()))); + FixStringList("Input Objects", "", transformer.TransformerInObjects()); + FixStringList("Output Objects", "", transformer.TransformerOutObjects()); +} + +void A2lPropertyGrid::Redraw(const Structure& structure) { + Append(new wxPropertyCategory("Structure")); + FixNameDesc(structure); + Append(new wxUIntProperty("Size", wxPG_LABEL,structure.Size())); + FixEnumList("Address Type", "", AddressTypeToStringList(), + structure.AddressType()); + FixBool("Consistent Exchange", "", structure.ConsistentExchange()); + FixString("Symbol Type Link", "", structure.SymbolTypeLink()); + + const auto& list = structure.StructureComponents(); + size_t count = 1; + for (const auto& [name, component] : list) { + std::ostringstream cat_text; + cat_text << "Component " << count; + Append(new wxPropertyCategory(cat_text.str())); + + std::ostringstream prop_name; + prop_name << name << "_name"; + Append(new wxStringProperty("Name", prop_name.str(), + wxString::FromUTF8(component->Name))); + + std::ostringstream prop_typedef; + prop_typedef << name << "_typedef"; + Append(new wxStringProperty("Typedef", prop_typedef.str(), + wxString::FromUTF8(component->Typedef))); + + std::ostringstream prop_offset; + prop_offset << name << "_offset"; + Append(new wxUIntProperty("Offset", prop_offset.str(), + component->AddressOffset)); + + std::ostringstream prop_type; + prop_type << name << "_type"; + FixEnumList("Address Type", prop_type.str(), AddressTypeToStringList(), + component->AddressType); + + std::ostringstream prop_layout; + prop_layout << name << "_layout"; + FixEnumList("Layout", prop_layout.str(), LayoutToStringList(), + component->Layout); + + std::ostringstream prop_matrix; + prop_matrix << name << "_matrix"; + FixUintList("Matrix Dimension", prop_matrix.str(), component->MatrixDim); + + std::ostringstream prop_link; + prop_link << name << "_link"; + FixString("Symbol Type Link", prop_link.str(), structure.SymbolTypeLink()); + + ++count; + } +} + +void A2lPropertyGrid::Redraw(const Unit& unit) { + Append(new wxPropertyCategory("Unit")); + FixNameDesc(unit); + Append(new wxStringProperty("Display Identifier", wxPG_LABEL, + wxString::FromUTF8(unit.DisplayIdentifier()))); + FixEnumList("Type", "", UnitTypeToStringList(), unit.Type()); + + FixString("Unit Reference", "", unit.RefUnit()); + const auto& exp = unit.SiExponents(); + if (exp.HasExponent()) { + Append(new wxIntProperty("Length SI Exponent", wxPG_LABEL, + static_cast(exp.Length))); + Append(new wxIntProperty("Mass SI Exponent", wxPG_LABEL, + static_cast(exp.Mass))); + Append(new wxIntProperty("Time SI Exponent", wxPG_LABEL, + static_cast(exp.Time))); + Append(new wxIntProperty("Current SI Exponent", wxPG_LABEL, + static_cast(exp.ElectricCurrent))); + Append(new wxIntProperty("Temperature SI Exponent", wxPG_LABEL, + static_cast(exp.Temperature))); + Append(new wxIntProperty("Amount SI Exponent", wxPG_LABEL, + static_cast(exp.AmountOfSubstance))); + Append(new wxIntProperty("Luminous SI Exponent", wxPG_LABEL, + static_cast(exp.LuminousIntensity))); + } + FixFloat("Gradient", "", unit.Gradient()); + FixFloat("Offset", "", unit.Offset()); +} + +void A2lPropertyGrid::Redraw(const A2lVariantCoding& object) { + Append(new wxPropertyCategory("Variant Coding")); + { + std::vector list; + for (const auto& [name, obj] : object.CharacteristicList) { + list.emplace_back(name); + } + FixStringList("Variant Characteristics", "", list); + } + { + std::vector list; + for (const auto& [name, obj] : object.CriterionList) { + list.emplace_back(name); + } + FixStringList("Variant Criterion", "", list); + } + size_t count = 0; + for (const auto& comb_list : object.ForbiddenCombList) { + std::ostringstream list_name; + list_name << "comb_list_" << count; + FixStringMap("Forbidden Combinations", list_name.str(), comb_list); + ++count; + } + FixString("Naming", "", object.Naming); + FixString("Separator", "", object.Separator); +} + +void A2lPropertyGrid::Redraw(const A2lVarCharacteristic& object) { + Append(new wxPropertyCategory("Variant Characteristic")); + Append(new wxStringProperty("Name", wxPG_LABEL, + wxString::FromUTF8(object.Name))); + FixStringList("Criterion Names", "", object.CriterionNameList); + FixUintList("Variant Address", "", object.AddressList); +} + +void A2lPropertyGrid::Redraw(const A2lVarCriterion& object) { + Append(new wxPropertyCategory("Variant Criterion")); + Append(new wxStringProperty("Name", wxPG_LABEL, + wxString::FromUTF8(object.Name))); + Append(new wxStringProperty("Description", wxPG_LABEL, + wxString::FromUTF8(object.Description))); + FixStringList("Values", "", object.ValueList); + FixString("Measurement", "", object.Measurement); + FixString("Characteristic", "", object.SelectionCharacteristic); +} + +} // namespace a2lgui \ No newline at end of file diff --git a/a2llib-main/a2lexplorer/src/a2lpropertygrid.h b/a2llib-main/a2lexplorer/src/a2lpropertygrid.h new file mode 100644 index 0000000..209759a --- /dev/null +++ b/a2llib-main/a2lexplorer/src/a2lpropertygrid.h @@ -0,0 +1,184 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT +*/ + +#pragma once + +#include +#include "a2ldocument.h" +namespace a2lgui { + +class A2lPropertyGrid : public wxPropertyGrid { + public: + explicit A2lPropertyGrid( wxWindow *parent, wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxPG_DEFAULT_STYLE, + const wxString& name = wxASCII_STR(wxPropertyGridNameStr) ); + void SetDoc(A2lDocument* doc) { document_ = doc; } + void Redraw(); + private: + A2lDocument* document_ = nullptr; + + void FixNameDesc(const a2l::A2lObject& object); + + template + void FixPropertyMap(const std::string_view& property_label, + const std::string_view& property_name, + const std::map>& + object_list); + + void FixStringMap(const std::string_view& property_label, + const std::string_view& property_name, + const std::map& string_list); + + void FixFloatList(const std::string_view& property_label, + const std::string_view& property_name, + const std::vector& float_list); + + void FixUintList(const std::string_view& property_label, + const std::string_view& property_name, + const std::vector& uint_list); + + void FixIntList(const std::string_view& property_label, + const std::string_view& property_name, + const std::vector& int_list); + + void FixStringList(const std::string_view& property_label, + const std::string_view& property_name, + const std::vector& text_list); + + template + void FixEnumList(const std::string_view& property_label, + const std::string_view& property_name, + const a2l::EnumStringList& enum_list, + T selected_enum); + + template + void FixInEnumList(wxPGProperty* root, + const std::string_view& property_label, + const std::string_view& property_name, + const a2l::EnumStringList& enum_list, + T selected_enum); + + void FixString(const std::string_view& property_label, + const std::string_view& property_name, + const std::string& text); + + void FixFloat(const std::string_view& property_label, + const std::string_view& property_name, double value); + + void FixUint(const std::string_view& property_label, + const std::string_view& property_name, uint64_t value); + + void FixHex(const std::string_view& property_label, + const std::string_view& property_name, uint64_t value); + + void FixInt(const std::string_view& property_label, + const std::string_view& property_name, int64_t value); + + void FixBool(const std::string_view& property_label, + const std::string_view& property_name, bool value); + + void FixAxisPts(const std::string_view& label, const a2l::A2lAxisPts& axis); + void FixAxisRescale(const std::string_view& label, + const a2l::A2lAxisRescale& axis); + void FixDistOp(const std::string_view& label, const a2l::A2lDistOp& dist); + void FixFncValue(const std::string_view& label, const a2l::A2lFncValue& fnc); + void FixExtendedLimits(const a2l::A2lExtendedLimits& limits); + void FixMaxRefresh(const a2l::A2lMaxRefresh& refresh); + void FixSymbolLink(const a2l::A2lSymbolLink& symbol); + + void Redraw(const a2l::A2lFile& file); + void Redraw(const a2l::Module& module); + void Redraw(const a2l::A2lModPar& par); + void DrawCategory( const a2l::A2lModPar& par); + void Redraw(const a2l::A2lAnnotation& note); + void Redraw(const a2l::AnnotationList& list); + void Redraw(const a2l::A2lCalibrationMethod& method); + void Redraw(const a2l::A2lMemoryLayout& layout); + void Redraw(const a2l::A2lMemorySegment& segment); + void Redraw(const a2l::AxisDescr& axis); + void Redraw(const a2l::AxisPts& axis); + void Redraw(const a2l::Blob& blob); + void Redraw(const a2l::Characteristic& object); + void Redraw(const a2l::CompuMethod& method); + void Redraw(const a2l::CompuTab& table); + void Redraw(const a2l::CompuVtab& table); + void Redraw(const a2l::CompuVtabRange& table); + void Redraw(const a2l::Frame& frame); + void Redraw(const a2l::Function& function); + void Redraw(const a2l::Group& group); + void Redraw(const a2l::Instance& instance); + void Redraw(const a2l::Overwrite& object); + void Redraw(const a2l::Measurement& meas); + void Redraw(const a2l::RecordLayout& layout); + void Redraw(const a2l::Transformer& transformer); + void Redraw(const a2l::Structure& structure); + void Redraw(const a2l::Unit& unit); + void Redraw(const a2l::A2lVariantCoding& object); + void Redraw(const a2l::A2lVarCharacteristic& object); + void Redraw(const a2l::A2lVarCriterion& object); +}; + +template +void A2lPropertyGrid::FixPropertyMap(const std::string_view& property_label, + const std::string_view& property_name, + const std::map>& + object_list) { + if (!object_list.empty()) { + wxArrayString list; + for (const auto& [name, object] : object_list) { + list.Add(wxString::FromUTF8(name)); + } + Append( new wxArrayStringProperty(property_label.data(), + property_name.empty() ? wxPG_LABEL : wxString(property_name.data()), + list)); + } +} + +template +void A2lPropertyGrid::FixEnumList(const std::string_view& property_label, + const std::string_view& property_name, + const a2l::EnumStringList& enum_list, + T selected_enum) { + if (selected_enum == T::UNKNOWN) { + return; + } + wxPGChoices list; + int count = 0; + for (const auto& enum_name : enum_list) { + list.Add(wxString::FromUTF8(enum_name.data()), count); + ++count; + } + + const int selected = static_cast(selected_enum); + Append(new wxEnumProperty(property_label.data(), + property_name.empty() ? wxPG_LABEL : wxString(property_name.data()), + list, selected)); +} + +template +void A2lPropertyGrid::FixInEnumList(wxPGProperty* root, + const std::string_view& property_label, + const std::string_view& property_name, + const a2l::EnumStringList& enum_list, + T selected_enum) { + if (selected_enum == T::UNKNOWN) { + return; + } + wxPGChoices list; + int count = 0; + for (const auto& enum_name : enum_list) { + list.Add(wxString::FromUTF8(enum_name.data()), count); + ++count; + } + + const int selected = static_cast(selected_enum); + AppendIn(root, new wxEnumProperty(property_label.data(), + property_name.empty() ? wxPG_LABEL : wxString(property_name.data()), + list, selected)); +} + +} // namespace a2lgui diff --git a/a2llib-main/a2lexplorer/src/a2ltreelist.cpp b/a2llib-main/a2lexplorer/src/a2ltreelist.cpp new file mode 100644 index 0000000..0b2ff01 --- /dev/null +++ b/a2llib-main/a2lexplorer/src/a2ltreelist.cpp @@ -0,0 +1,726 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#include "a2ltreelist.h" +#include +#include + +using namespace a2l; + +namespace { + +#include "img/tree_list.xpm" + +constexpr int TREE_FOLDER = 0; +constexpr int TREE_FOLDER_OPEN = 1; +constexpr int TREE_PROJECT = 2; +constexpr int TREE_MODULE = 3; +constexpr int TREE_A2ML = 4; +constexpr int TREE_AXIS = 5; +constexpr int TREE_BLOB = 6; +constexpr int TREE_CHARACTERISTIC = 7; +constexpr int TREE_MOD_PAR = 8; +constexpr int TREE_METHOD = 9; +constexpr int TREE_MEM_INFO = 10; +constexpr int TREE_MEM_PROP = 11; +constexpr int TREE_NOTE = 12; +constexpr int TREE_FUNCTION = 13; +constexpr int TREE_TABLE = 14; +constexpr int TREE_FRAME = 15; +constexpr int TREE_FUNCTION_INFO = 16; +constexpr int TREE_GROUP = 17; +constexpr int TREE_INSTANCE = 18; +constexpr int TREE_OVERWRITE = 19; +constexpr int TREE_MEAS = 20; +constexpr int TREE_TRANSFORMER = 21; +constexpr int TREE_STRUCTURE = 22; +constexpr int TREE_UNIT = 23; +constexpr int TREE_VAR_CODING = 24; +constexpr int TREE_VAR_CHAR = 25; +constexpr int TREE_VAR_PROP = 26; +constexpr int TREE_BLOCK = 27; +constexpr int TREE_UNION = 28; +constexpr int TREE_STRUCT = 29; +constexpr int TREE_TAGGED_STRUCT = 30; +constexpr int TREE_ENUM = 31; +constexpr int TREE_VARIABLE = 32; +} +namespace a2lgui { + +A2lTreeList::A2lTreeList(wxWindow *parent, wxWindowID id, const wxPoint &pos, + const wxSize &size, long style, const wxString &name) + : wxTreeListCtrl(parent, id, pos, size, style, name), + image_list_(16,16,false,33){ + AppendColumn("Name"); + AppendColumn("Description"); + +#ifdef _WIN32 + wxBitmap tree_list("TREE_LIST", wxBITMAP_TYPE_BMP_RESOURCE); +#else + wxBitmap tree_list {wxICON(tree_list)}; +#endif + image_list_.Add(tree_list); + wxTreeListCtrl::SetImageList(&image_list_); +} + + +void A2lTreeList::Redraw(A2lProject& project) { + + DeleteAllItems(); + auto root_item = GetRootItem(); + + auto item = AppendItem(root_item,project.Name(), TREE_PROJECT, TREE_PROJECT, + new A2lTreeItemData(TreeItemType::A2L_FILE, &project)); + const auto& header = project.Header(); + + SetItemText(item, 1, wxString::FromUTF8(project.Description())); + + const auto& module_list = project.Modules(); + for ( const auto& [name, module] : module_list ) { + RedrawModule(item, *module); + } + Expand(item); + /* + auto selected_id = doc->GetSelectedBlockId(); + auto found = FindId(left_, left_->GetRootItem(), selected_id); + if (found.IsOk()) { + left_->SelectItem(found); + left_->EnsureVisible(found); + } + */ +} + +void A2lTreeList::RedrawModule(wxTreeListItem& root, Module& module) { + auto item = AppendItem(root, wxString::FromUTF8(module.Name()), + TREE_MODULE, TREE_MODULE, + new A2lTreeItemData(TreeItemType::MODULE, &module)); + SetItemText(item, 1, wxString::FromUTF8(module.Description())); + + RedrawA2ml(item, module); + RedrawModPar(item, module); + RedrawAxisPts(item, module); + RedrawBlob(item, module); + RedrawCharacteristic(item, module); + RedrawCompuMethod(item, module); + RedrawCompuTab(item, module); + RedrawFrame(item, module); + RedrawFunction(item, module); + RedrawGroup(item, module); + RedrawInstance(item, module); + RedrawMeasurement(item, module); + RedrawRecordLayout(item, module); + RedrawTransformer(item, module); + RedrawTypedef(item, module); + RedrawUnit(item, module); + RedrawVariantCoding(item, module); + Expand(item); +} + +void A2lTreeList::RedrawA2ml(wxTreeListItem& root, Module& module) { + const auto& a2ml = module.A2ml(); + if (a2ml.empty()) { + return; + } + A2mlBlock a2ml_parser(a2ml); + if (!a2ml_parser.IsOk() || a2ml_parser.BlockList().empty()) { + return; + } + auto a2ml_item = + AppendItem(root, wxString::FromUTF8("Meta-Language"), TREE_A2ML, + TREE_A2ML, new A2lTreeItemData(TreeItemType::MODULE, &module)); + for (const auto& block : a2ml_parser.BlockList()) { + RedrawA2mlObject(a2ml_item, block, module); + } +} + +void A2lTreeList::RedrawA2mlObject(wxTreeListItem& root, + const a2l::A2mlObject& object, + Module& module) { + std::string name; + if (!object.Ident().empty()) { + name = object.Ident(); + } else if (!object.Tag().empty()) { + name = object.Tag(); + } + wxTreeListItem item; + switch (object.Type()) { + + case A2mlTypeName::BLOCK: { + item = AppendItem(root, wxString::FromUTF8(name), + TREE_BLOCK, TREE_BLOCK, + new A2lTreeItemData(TreeItemType::MODULE, + &module)); + SetItemText(item, 1, wxString::FromUTF8(object.TypeAsString().data())); + break; + } + + case A2mlTypeName::TAGGED_UNION: { + item = AppendItem(root, wxString::FromUTF8(name), + TREE_UNION, TREE_UNION, + new A2lTreeItemData(TreeItemType::MODULE, + &module)); + SetItemText(item, 1, wxString::FromUTF8(object.TypeAsString().data())); + break; + } + + case A2mlTypeName::TAGGED_STRUCT: { + item = AppendItem(root, wxString::FromUTF8(name), + TREE_TAGGED_STRUCT, TREE_TAGGED_STRUCT, + new A2lTreeItemData(TreeItemType::MODULE, + &module)); + SetItemText(item, 1, wxString::FromUTF8(object.TypeAsString().data())); + break; + } + + case A2mlTypeName::STRUCT: { + item = AppendItem(root, wxString::FromUTF8(name), + TREE_STRUCT, TREE_STRUCT, + new A2lTreeItemData(TreeItemType::MODULE, + &module)); + SetItemText(item, 1, wxString::FromUTF8(object.TypeAsString().data())); + break; + } + + case A2mlTypeName::ENUMERATE: { + item = AppendItem(root, wxString::FromUTF8(name), + TREE_ENUM, TREE_ENUM, + new A2lTreeItemData(TreeItemType::MODULE, + &module)); + SetItemText(item, 1, wxString::FromUTF8(object.TypeAsString().data())); + break; + } + case A2mlTypeName::PREDEFINED: { + item = AppendItem(root, wxString::FromUTF8(name), + TREE_VARIABLE, TREE_VARIABLE, + new A2lTreeItemData(TreeItemType::MODULE, + &module)); + SetItemText(item, 1, wxString::FromUTF8(object.DataTypeAsString().data())); + break; + } + + default: + break; + } + if (!item.IsOk()) { + return; + } + for (const auto& member : object.MemberList()) { + RedrawA2mlObject(item, member, module); + } +} + +void A2lTreeList::RedrawModPar(wxTreeListItem& root, Module& module) { + auto& par = module.ModPar(); + auto par_item = AppendItem(root, wxString::FromUTF8("Management Data"), + TREE_MOD_PAR, TREE_MOD_PAR, + new A2lTreeItemData(TreeItemType::MOD_PAR, &par)); + SetItemText(par_item, 1, wxString::FromUTF8(par.Comment)); + + auto& cal_list = par.CalibrationMethodList; + if (!cal_list.empty()) { + auto cal_folder = AppendItem( + par_item, wxString::FromUTF8("Calibration Methods"), TREE_FOLDER, + TREE_FOLDER_OPEN, new A2lTreeItemData(TreeItemType::MOD_PAR, &par)); + for (auto& method : cal_list) { + AppendItem(cal_folder, wxString::FromUTF8(method.Method), TREE_METHOD, + TREE_METHOD, + new A2lTreeItemData(TreeItemType::CAL_METHOD, &method)); + } + } + + auto& layout_list = par.MemoryLayoutList; + if (!layout_list.empty()) { + auto layout_folder = + AppendItem(par_item, wxString::FromUTF8("Memory Layouts"), + TREE_FOLDER, TREE_FOLDER_OPEN, + new A2lTreeItemData(TreeItemType::MOD_PAR, &par)); + for (auto& layout : layout_list) { + auto item = AppendItem(layout_folder, + PrgTypeToString(layout.Type).data(), + TREE_MEM_INFO, TREE_MEM_INFO, + new A2lTreeItemData(TreeItemType::MEM_LAYOUT, &layout)); + SetItemText(item, 1, std::to_string(layout.Address)); + } + } + + auto& segment_list = par.MemorySegmentList; + if (!segment_list.empty()) { + auto segment_folder = AppendItem(par_item, + wxString::FromUTF8("Memory Segments"), + TREE_FOLDER, TREE_FOLDER_OPEN, + new A2lTreeItemData(TreeItemType::MOD_PAR, + &par)); + for (auto& segment : segment_list) { + + auto item = AppendItem(segment_folder, wxString::FromUTF8(segment.Name), + TREE_MEM_PROP, TREE_MEM_PROP, + new A2lTreeItemData(TreeItemType::MEM_SEGMENT, + &segment)); + SetItemText(item, 1, wxString::FromUTF8(segment.Description)); + } + } +} + +void A2lTreeList::RedrawAnnotation(wxTreeListItem& root, AnnotationList& list) { + if (list.empty()) { + return; + } + auto folder = AppendItem(root,"Notes", TREE_FOLDER, TREE_FOLDER_OPEN, + new A2lTreeItemData(TreeItemType::ANNOTATION_LIST, + &list)); + for ( auto& note : list ) { + auto item = AppendItem(folder,wxString::FromUTF8(note.Label), + TREE_NOTE, TREE_NOTE, + new A2lTreeItemData(TreeItemType::ANNOTATION, + ¬e)); + SetItemText(item, 1, wxString::FromUTF8(note.Origin)); + } +} + +void A2lTreeList::RedrawAxisPts(wxTreeListItem& root, Module& module) { + auto& list = module.AxisPtss(); + if (list.empty()) { + return; + } + auto folder = AppendItem(root,"Axis Point Distributions", + TREE_FOLDER, TREE_FOLDER_OPEN, + new A2lTreeItemData(TreeItemType::MODULE, &module)); + for ( auto& [name, object] : list ) { + auto item = AppendItem(folder,wxString::FromUTF8(name), + TREE_AXIS, TREE_AXIS, + new A2lTreeItemData(TreeItemType::AXIS_PTS, object.get())); + SetItemText(item, 1, wxString::FromUTF8(object->Description())); + RedrawAnnotation(item, object->Annotations()); + + } +} + +void A2lTreeList::RedrawBlob(wxTreeListItem& root, a2l::Module& module) { + auto& list = module.Blobs(); + if (list.empty()) { + return; + } + auto folder = AppendItem(root,"Binary Blob Objects", + TREE_FOLDER, TREE_FOLDER_OPEN, + new A2lTreeItemData(TreeItemType::MODULE, &module)); + for ( auto& [name, object] : list ) { + auto item = AppendItem(folder,wxString::FromUTF8(name), + TREE_BLOB, TREE_BLOB, + new A2lTreeItemData(TreeItemType::BLOB, object.get())); + SetItemText(item, 1, wxString::FromUTF8(object->Description())); + RedrawAnnotation(item, object->Annotations()); + } +} + +void A2lTreeList::RedrawCharacteristic(wxTreeListItem& root, Module& module) { + auto& list = module.Characteristics(); + if (list.empty()) { + return; + } + auto folder = AppendItem(root,"Adjustable Objects", + TREE_FOLDER, TREE_FOLDER_OPEN, + new A2lTreeItemData(TreeItemType::MODULE, &module)); + for ( auto& [name, object] : list ) { + auto item = AppendItem(folder,wxString::FromUTF8(name), + TREE_CHARACTERISTIC, TREE_CHARACTERISTIC, + new A2lTreeItemData(TreeItemType::CHARACTERISTIC, object.get())); + SetItemText(item, 1, wxString::FromUTF8(object->Description())); + RedrawAnnotation(item, object->Annotations()); + RedrawAxisDescription(item, *object); + } +} + +void A2lTreeList::RedrawAxisDescription(wxTreeListItem& root, + Characteristic& object) { + auto& list = object.AxisDescriptions(); + if (list.empty()) { + return; + } + auto folder = AppendItem(root,"Axis Descriptions", + TREE_FOLDER, TREE_FOLDER_OPEN, + new A2lTreeItemData(TreeItemType::CHARACTERISTIC, &object)); + + for ( auto& axis_desc : list ) { + auto item = AppendItem(folder, + wxString::FromUTF8(AxisTypeToString(axis_desc->AxisType()).data()), + TREE_AXIS, TREE_AXIS, + new A2lTreeItemData(TreeItemType::AXIS_DESC, axis_desc.get())); + std::ostringstream temp; + temp << axis_desc->InputQuantity() + << "/" << axis_desc->Conversion() + << "/" << axis_desc->MaxAxisPoints(); + SetItemText(item, 1, wxString::FromUTF8(temp.str())); + RedrawAnnotation(item, axis_desc->Annotations()); + } +} + +void A2lTreeList::RedrawCompuMethod(wxTreeListItem& root, Module& module) { + auto& list = module.CompuMethods(); + if (list.empty()) { + return; + } + auto folder = AppendItem(root,"Conversion Methods", + TREE_FOLDER, TREE_FOLDER_OPEN, + new A2lTreeItemData(TreeItemType::MODULE, &module)); + for ( auto& [name, object] : list ) { + auto item = AppendItem(folder,wxString::FromUTF8(name), + TREE_FUNCTION, TREE_FUNCTION, + new A2lTreeItemData(TreeItemType::COMPU_METHOD, + object.get())); + SetItemText(item, 1, wxString::FromUTF8(object->Description())); + } +} + +void A2lTreeList::RedrawCompuTab(wxTreeListItem& root, Module& module) { + std::map list; + auto& list_tab = module.CompuTabs(); + auto& list_vtab = module.CompuVtabs(); + auto& list_range = module.CompuVtabRanges(); + + for (const auto& [name1, tab1] : list_tab) { + list.emplace(name1, TreeItemType::COMPU_TAB); + } + for (const auto& [name2, tab2] : list_vtab) { + list.emplace(name2, TreeItemType::COMPU_VTAB); + } + for (const auto& [name3, tab3] : list_range) { + list.emplace(name3, TreeItemType::COMPU_VTAB_RANGE); + } + if (list.empty()) { + return; + } + auto folder = AppendItem(root,"Conversion Tables", + TREE_FOLDER, TREE_FOLDER_OPEN, + new A2lTreeItemData(TreeItemType::MODULE, &module)); + for ( auto& [name, type] : list ) { + switch (type) { + case TreeItemType::COMPU_TAB: { + auto* tab = module.GetCompuTab(name); + if (tab != nullptr) { + auto item = AppendItem(folder,wxString::FromUTF8(name), + TREE_TABLE, TREE_TABLE, + new A2lTreeItemData(type, tab)); + SetItemText(item, 1, wxString::FromUTF8(tab->Description())); + } + break; + } + + case TreeItemType::COMPU_VTAB: { + auto* tab = module.GetCompuVtab(name); + if (tab != nullptr) { + auto item = AppendItem(folder,wxString::FromUTF8(name), + TREE_TABLE, TREE_TABLE, + new A2lTreeItemData(type, tab)); + SetItemText(item, 1, wxString::FromUTF8(tab->Description())); + } + break; + } + + case TreeItemType::COMPU_VTAB_RANGE: { + auto* tab = module.GetCompuVtabRange(name); + if (tab != nullptr) { + auto item = AppendItem(folder,wxString::FromUTF8(name), + TREE_TABLE, TREE_TABLE, + new A2lTreeItemData(type, tab)); + SetItemText(item, 1, wxString::FromUTF8(tab->Description())); + } + break; + } + + default: + break; + } + } +} + +void A2lTreeList::RedrawFrame(wxTreeListItem& root, Module& module) { + auto& list = module.Frames(); + if (list.empty()) { + return; + } + auto folder = AppendItem(root,"Frames", + TREE_FOLDER, TREE_FOLDER_OPEN, + new A2lTreeItemData(TreeItemType::MODULE, &module)); + for ( auto& [name, object] : list ) { + auto item = AppendItem(folder,wxString::FromUTF8(name), + TREE_FRAME, TREE_FRAME, + new A2lTreeItemData(TreeItemType::FRAME, + object.get())); + SetItemText(item, 1, wxString::FromUTF8(object->Description())); + } +} + +void A2lTreeList::RedrawFunction(wxTreeListItem& root, Module& module) { + auto& list = module.Functions(); + if (list.empty()) { + return; + } + auto folder = AppendItem(root,"Functions", + TREE_FOLDER, TREE_FOLDER_OPEN, + new A2lTreeItemData(TreeItemType::MODULE, &module)); + for ( auto& [name, object] : list ) { + auto item = AppendItem(folder,wxString::FromUTF8(name), + TREE_FUNCTION_INFO, TREE_FUNCTION_INFO, + new A2lTreeItemData(TreeItemType::FUNCTION, + object.get())); + SetItemText(item, 1, wxString::FromUTF8(object->Description())); + RedrawAnnotation(item,object->Annotations()); + } +} + +void A2lTreeList::RedrawGroup(wxTreeListItem& root, Module& module) { + auto& list = module.Groups(); + if (list.empty()) { + return; + } + auto folder = AppendItem(root,"Groups", + TREE_FOLDER, TREE_FOLDER_OPEN, + new A2lTreeItemData(TreeItemType::MODULE, &module)); + for ( auto& [name, object] : list ) { + auto item = AppendItem(folder,wxString::FromUTF8(name), + TREE_GROUP, TREE_GROUP, + new A2lTreeItemData(TreeItemType::GROUP, + object.get())); + SetItemText(item, 1, wxString::FromUTF8(object->Description())); + RedrawAnnotation(item,object->Annotations()); + } +} + +void A2lTreeList::RedrawInstance(wxTreeListItem& root, Module& module) { + auto& list = module.Instances(); + if (list.empty()) { + return; + } + auto folder = AppendItem(root,"Instances", + TREE_FOLDER, TREE_FOLDER_OPEN, + new A2lTreeItemData(TreeItemType::MODULE, &module)); + for ( auto& [name, object] : list ) { + auto item = AppendItem(folder,wxString::FromUTF8(name), + TREE_INSTANCE, TREE_INSTANCE, + new A2lTreeItemData(TreeItemType::INSTANCE, + object.get())); + SetItemText(item, 1, wxString::FromUTF8(object->Description())); + RedrawAnnotation(item,object->Annotations()); + RedrawOverwrite(item, *object); + } +} + +void A2lTreeList::RedrawOverwrite(wxTreeListItem& root, Instance& instance) { + auto& list = instance.Overwrites(); + if (list.empty()) { + return; + } + auto folder = AppendItem(root,"OverWrites", + TREE_FOLDER, TREE_FOLDER_OPEN, + new A2lTreeItemData(TreeItemType::INSTANCE, &instance)); + for ( auto& object : list ) { + auto item = AppendItem(folder,wxString::FromUTF8(object->Name()), + TREE_OVERWRITE, TREE_OVERWRITE, + new A2lTreeItemData(TreeItemType::OVERWRITE, + object.get())); + SetItemText(item, 1, std::to_string(object->AxisNo())); + } +} + +void A2lTreeList::RedrawMeasurement(wxTreeListItem& root, Module& module) { + auto& list = module.Measurements(); + if (list.empty()) { + return; + } + auto folder = AppendItem(root,"Measurements", + TREE_FOLDER, TREE_FOLDER_OPEN, + new A2lTreeItemData(TreeItemType::MODULE, &module)); + for ( auto& [name, object] : list ) { + auto item = AppendItem(folder,wxString::FromUTF8(name), + TREE_MEAS, TREE_MEAS, + new A2lTreeItemData(TreeItemType::MEASUREMENT, + object.get())); + SetItemText(item, 1, wxString::FromUTF8(object->Description())); + RedrawAnnotation(item,object->Annotations()); + } +} + +void A2lTreeList::RedrawRecordLayout(wxTreeListItem& root, Module& module) { + auto& list = module.RecordLayouts(); + if (list.empty()) { + return; + } + auto folder = AppendItem(root,"Record Layouts", + TREE_FOLDER, TREE_FOLDER_OPEN, + new A2lTreeItemData(TreeItemType::MODULE, &module)); + for ( auto& [name, object] : list ) { + auto item = AppendItem(folder,wxString::FromUTF8(name), + TREE_MEM_INFO, TREE_MEM_INFO, + new A2lTreeItemData(TreeItemType::RECORD_LAYOUT, + object.get())); + SetItemText(item, 1, wxString::FromUTF8(object->Description())); + } +} + +void A2lTreeList::RedrawTransformer(wxTreeListItem& root, Module& module) { + auto& list = module.Transformers(); + if (list.empty()) { + return; + } + auto folder = AppendItem(root,"Transformers", + TREE_FOLDER, TREE_FOLDER_OPEN, + new A2lTreeItemData(TreeItemType::MODULE, &module)); + for ( auto& [name, object] : list ) { + auto item = AppendItem(folder,wxString::FromUTF8(name), + TREE_TRANSFORMER, TREE_TRANSFORMER, + new A2lTreeItemData(TreeItemType::TRANSFORMER, + object.get())); + SetItemText(item, 1, wxString::FromUTF8(object->Version())); + } +} + +void A2lTreeList::RedrawTypedef(wxTreeListItem& root, Module& module) { + std::map list; + auto& list_axis = module.TypedefAxiss(); + auto& list_blob = module.TypedefBlobs(); + auto& list_char = module.TypedefCharacteristics(); + auto& list_meas = module.TypedefMeasurements(); + auto& list_struct = module.TypedefStructures(); + + for (const auto& [name1, tab1] : list_axis) { + list.emplace(name1, TreeItemType::AXIS_PTS); + } + for (const auto& [name2, tab2] : list_blob) { + list.emplace(name2, TreeItemType::BLOB); + } + for (const auto& [name3, tab3] : list_char) { + list.emplace(name3, TreeItemType::CHARACTERISTIC); + } + for (const auto& [name4, tab4] : list_meas) { + list.emplace(name4, TreeItemType::MEASUREMENT); + } + for (const auto& [name5, tab5] : list_struct) { + list.emplace(name5, TreeItemType::STRUCTURE); + } + if (list.empty()) { + return; + } + auto folder = AppendItem(root,"Typedefs", + TREE_FOLDER, TREE_FOLDER_OPEN, + new A2lTreeItemData(TreeItemType::MODULE, &module)); + for ( auto& [name, type] : list ) { + switch (type) { + case TreeItemType::AXIS_PTS: { + auto* object = module.GetTypedefAxis(name); + if (object != nullptr) { + auto item = AppendItem(folder,wxString::FromUTF8(name), + TREE_AXIS, TREE_AXIS, + new A2lTreeItemData(type, object)); + SetItemText(item, 1, wxString::FromUTF8(object->Description())); + } + break; + } + + case TreeItemType::BLOB: { + auto* object = module.GetTypedefBlob(name); + if (object != nullptr) { + auto item = AppendItem(folder,wxString::FromUTF8(name), + TREE_BLOB, TREE_BLOB, + new A2lTreeItemData(type, object)); + SetItemText(item, 1, wxString::FromUTF8(object->Description())); + } + break; + } + + case TreeItemType::CHARACTERISTIC: { + auto* object = module.GetTypedefCharacteristic(name); + if (object != nullptr) { + auto item = AppendItem(folder,wxString::FromUTF8(name), + TREE_CHARACTERISTIC, TREE_CHARACTERISTIC, + new A2lTreeItemData(type, object)); + SetItemText(item, 1, wxString::FromUTF8(object->Description())); + } + break; + } + + case TreeItemType::MEASUREMENT: { + auto* object = module.GetTypedefMeasurement(name); + if (object != nullptr) { + auto item = AppendItem(folder,wxString::FromUTF8(name), + TREE_MEAS, TREE_MEAS, + new A2lTreeItemData(type, object)); + SetItemText(item, 1, wxString::FromUTF8(object->Description())); + } + break; + } + + case TreeItemType::STRUCTURE: { + auto* object = module.GetTypedefStructure(name); + if (object != nullptr) { + auto item = AppendItem(folder,wxString::FromUTF8(name), + TREE_STRUCTURE, TREE_STRUCTURE, + new A2lTreeItemData(type, object)); + SetItemText(item, 1, wxString::FromUTF8(object->Description())); + } + break; + } + + default: + break; + } + } + +} + +void A2lTreeList::RedrawUnit(wxTreeListItem& root, Module& module) { + auto& list = module.Units(); + if (list.empty()) { + return; + } + auto folder = AppendItem(root,"Units", + TREE_FOLDER, TREE_FOLDER_OPEN, + new A2lTreeItemData(TreeItemType::MODULE, &module)); + for ( auto& [name, object] : list ) { + auto item = AppendItem(folder,wxString::FromUTF8(name), + TREE_UNIT, TREE_UNIT, + new A2lTreeItemData(TreeItemType::UNIT, + object.get())); + SetItemText(item, 1, wxString::FromUTF8(object->Description())); + } +} +void A2lTreeList::RedrawVariantCoding(wxTreeListItem& root, Module& module) { + auto& coding = module.VariantCoding(); + if (!coding.HasCoding()) { + return; + } + auto var_cod = AppendItem(root,"Variant Coding", + TREE_VAR_CODING, TREE_VAR_CODING, + new A2lTreeItemData(TreeItemType::VARIANT_CODING, + &coding)); + if (!coding.CharacteristicList.empty()) { + auto char_folder = AppendItem(root,"Variant Characteristics", + TREE_FOLDER, TREE_FOLDER_OPEN, + new A2lTreeItemData(TreeItemType::VARIANT_CODING, + &coding)); + for ( auto& [name, object] : coding.CharacteristicList) { + AppendItem(char_folder,wxString::FromUTF8(name), + TREE_VAR_CHAR, TREE_VAR_CHAR, + new A2lTreeItemData(TreeItemType::VAR_CHARACTERISTIC, + &object)); + } + } + + if (!coding.CriterionList.empty()) { + auto crit_folder = AppendItem(root,"Variant Criterions", + TREE_FOLDER, TREE_FOLDER_OPEN, + new A2lTreeItemData(TreeItemType::VARIANT_CODING, + &coding)); + for ( auto& [name, object] : coding.CriterionList) { + auto item = AppendItem(crit_folder,wxString::FromUTF8(name), + TREE_VAR_PROP, TREE_VAR_PROP, + new A2lTreeItemData(TreeItemType::VAR_CRITERION, + &object)); + SetItemText(item, 1, wxString::FromUTF8(object.Description)); + } + } + +} + +} // namespace a2lgui \ No newline at end of file diff --git a/a2llib-main/a2lexplorer/src/a2ltreelist.h b/a2llib-main/a2lexplorer/src/a2ltreelist.h new file mode 100644 index 0000000..c5700ed --- /dev/null +++ b/a2llib-main/a2lexplorer/src/a2ltreelist.h @@ -0,0 +1,73 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT +*/ + +#pragma once + +#include + +#include + +#include +#include +#include "a2l/a2lproject.h" +#include "a2l/a2mlobject.h" + +#include "a2ldocument.h" +namespace a2lgui { + + +class A2lTreeItemData final : public wxTreeItemData { + public: + A2lTreeItemData(TreeItemType type, void* object) + : type_(type), + object_(object) { + + } + [[nodiscard]] TreeItemType Type() const { return type_; } + [[nodiscard]] void* Object() const { return object_; } + + private: + TreeItemType type_ = TreeItemType::UNKNOWN; + void* object_ = nullptr; +}; + +class A2lTreeList : public wxTreeListCtrl { + public: + A2lTreeList(wxWindow* parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTL_DEFAULT_STYLE, + const wxString& name = wxASCII_STR(wxTreeListCtrlNameStr)); + void Redraw(a2l::A2lProject& project); + private: + wxImageList image_list_; + + void RedrawModule(wxTreeListItem& root, a2l::Module& module); + void RedrawA2ml(wxTreeListItem& root, a2l::Module& module); + void RedrawA2mlObject(wxTreeListItem& root, const a2l::A2mlObject& object, + a2l::Module& module); + void RedrawModPar(wxTreeListItem& root, a2l::Module& module); + void RedrawAnnotation(wxTreeListItem& root, a2l::AnnotationList& list); + void RedrawAxisPts(wxTreeListItem& root, a2l::Module& module); + void RedrawBlob(wxTreeListItem& root, a2l::Module& module); + void RedrawCharacteristic(wxTreeListItem& root, a2l::Module& module); + void RedrawAxisDescription(wxTreeListItem& root, a2l::Characteristic& object); + void RedrawCompuMethod(wxTreeListItem& root,a2l::Module& module); + void RedrawCompuTab(wxTreeListItem& root,a2l::Module& module); + void RedrawFrame(wxTreeListItem& root,a2l::Module& module); + void RedrawFunction(wxTreeListItem& root,a2l::Module& module); + void RedrawGroup(wxTreeListItem& root,a2l::Module& module); + void RedrawInstance(wxTreeListItem& root,a2l::Module& module); + void RedrawOverwrite(wxTreeListItem& root,a2l::Instance& instance); + void RedrawMeasurement(wxTreeListItem& root,a2l::Module& module); + void RedrawRecordLayout(wxTreeListItem& root,a2l::Module& module); + void RedrawTransformer(wxTreeListItem& root,a2l::Module& module); + void RedrawTypedef(wxTreeListItem& root,a2l::Module& module); + void RedrawUnit(wxTreeListItem& root,a2l::Module& module); + void RedrawVariantCoding(wxTreeListItem& root,a2l::Module& module); +}; + +} // namespace a2lgui diff --git a/a2llib-main/a2lexplorer/src/a2lview.cpp b/a2llib-main/a2lexplorer/src/a2lview.cpp new file mode 100644 index 0000000..4148045 --- /dev/null +++ b/a2llib-main/a2lexplorer/src/a2lview.cpp @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Ingemar Hedvall + * SPDX-License-Identifier: MIT + */ +#include +#include "a2lview.h" +#include "a2lexplorer.h" +#include "childframe.h" + +namespace a2lgui { + +wxIMPLEMENT_DYNAMIC_CLASS(A2lView,wxView) //NOLINT + +A2lDocument *A2lView::GetDocument() const { + return wxDynamicCast(wxView::GetDocument(),A2lDocument ); +} + +void A2lView::OnDraw(wxDC*) { +} + +bool A2lView::OnCreate(wxDocument *doc, long flags) { + if (!wxView::OnCreate( doc,flags)) { + return false; + } + + auto & app = wxGetApp(); + auto* parent = wxDynamicCast(app.GetTopWindow(),wxMDIParentFrame); + wxFrame* sub_frame = new ChildFrame(doc, this, parent,wxID_ANY,"A2L File"); + sub_frame->Show(); + return true; +} + +bool A2lView::OnClose(bool del) { + return wxView::OnClose(del); +} + +void A2lView::OnUpdate(wxView *sender, wxObject *hint) { + wxView::OnUpdate(sender, hint); + auto* frame = GetFrame(); + if (frame != nullptr) { + frame->Update(); + } + +} + +} \ No newline at end of file diff --git a/a2llib-main/a2lexplorer/src/a2lview.h b/a2llib-main/a2lexplorer/src/a2lview.h new file mode 100644 index 0000000..52431b6 --- /dev/null +++ b/a2llib-main/a2lexplorer/src/a2lview.h @@ -0,0 +1,32 @@ +/* + * Copyright 2023 Ingemar Hedvall + * SPDX-License-Identifier: MIT + */ +#pragma once +#include +#include "a2ldocument.h" + +namespace a2lgui { +class A2lView : public wxView { + public: + A2lView() = default; + A2lDocument* GetDocument() const; + + bool OnCreate(wxDocument* doc, long flags) override; + bool OnClose(bool del) override; + + void OnDraw(wxDC *dc) override; + void OnUpdate(wxView *sender, wxObject *hint = nullptr) override; + + private: + + wxDECLARE_DYNAMIC_CLASS(A2lView); + +}; + +} + + + + + diff --git a/a2llib-main/a2lexplorer/src/childframe.cpp b/a2llib-main/a2lexplorer/src/childframe.cpp new file mode 100644 index 0000000..ad40bb7 --- /dev/null +++ b/a2llib-main/a2lexplorer/src/childframe.cpp @@ -0,0 +1,158 @@ +/* + * Copyright 2023 Ingemar Hedvall + * SPDX-License-Identifier: MIT + */ +#include +#include +#include +#include +#include +#include "childframe.h" +#include "a2ldocument.h" +#include "windowid.h" + +using namespace a2l; + +namespace { +#include "img/sub.xpm" +#include "img/tree_list.xpm" +// Bitmap index for the tree control (tree_list.bmp) + +// Fake file positions which select a list of blocks +constexpr int64_t kHistoryPosition = -100; +constexpr int64_t kMeasurementPosition = -200; +constexpr int64_t kAttachmentPosition = -300; +constexpr int64_t kEventPosition = -400; +constexpr int64_t kHierarchyPosition = -500; +/* +class BlockAddress : public wxTreeItemData { + public: + explicit BlockAddress(int64_t block_address) + : block_address_(block_address) { + } + + [[nodiscard]] int64_t FilePosition() const { + return block_address_; + } + + private: + int64_t block_address_ = 0; +}; + +wxString CreateBlockText(const mdf::detail::MdfBlock&block) { + std::ostringstream block_string; + block_string << block.BlockType(); + const auto comment = block.Comment(); + if (!comment.empty()) { + block_string << " (" << comment << ")"; + } + return wxString::FromUTF8(block_string.str()); +} + +int64_t GetBlockId(const wxTreeCtrl& list, const wxTreeItemId& item) { + if (!item.IsOk()) { + return -1; + } + const auto* data = dynamic_cast(list.GetItemData(item)); + return data != nullptr ? data->FilePosition() : -1; +} + +wxTreeItemId FindId(const wxTreeCtrl& list, const wxTreeItemId &root, int64_t id) { //NOLINT + for (auto item = root; item.IsOk(); item = list.GetNextSibling(item)) { + if (GetBlockId(list, item) == id) { + return item; + } + if (list.ItemHasChildren(item)) { + wxTreeItemIdValue cookie; + auto find = FindId(list, list.GetFirstChild(item, cookie), id); + if (find.IsOk()) { + return find; + } + } + } + return {}; +} +*/ + +} // Empty namespace + +namespace a2lgui { + +wxBEGIN_EVENT_TABLE(ChildFrame, wxDocMDIChildFrame) // NOLINT(cert-err58-cpp) + EVT_TREELIST_SELECTION_CHANGED(kIdLeftTree,ChildFrame::OnTreeSelected) +// EVT_LIST_ITEM_ACTIVATED(kIdPropertyList, ChildFrame::OnListItemActivated) +// EVT_TREE_ITEM_RIGHT_CLICK(kIdLeftTree, ChildFrame::OnTreeRightClick) +wxEND_EVENT_TABLE() + +ChildFrame::ChildFrame(wxDocument *doc, + wxView *view, + wxMDIParentFrame *parent, + wxWindowID id, + const wxString& title) + : wxDocMDIChildFrame(doc, view, parent, id, title, wxDefaultPosition, wxDefaultSize, + wxDEFAULT_FRAME_STYLE, wxASCII_STR(wxFrameNameStr)) { +#ifdef _WIN32 + wxIcon sub("SUB_ICON", wxBITMAP_TYPE_ICO_RESOURCE); +#else + wxIcon sub {wxICON(sub)}; +#endif + SetIcon(sub); + + auto* main_panel = new wxPanel(this); + + splitter_ = new wxSplitterWindow(main_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D | wxCLIP_CHILDREN); + + left_ = new A2lTreeList(splitter_,kIdLeftTree); + + + property_view_ = new A2lPropertyGrid(splitter_, kIdPropertyList, + wxDefaultPosition, wxDefaultSize, + wxPG_SPLITTER_AUTO_CENTER); + + splitter_->SplitVertically(left_, property_view_, -600); + + auto* main_sizer = new wxBoxSizer(wxVERTICAL); + main_sizer->Add(splitter_, 1 , wxALL | wxGROW,0); + main_panel->SetSizerAndFit(main_sizer); +} + +void ChildFrame::Update() { + auto* doc = GetDoc(); + if (doc == nullptr) { + return; + } + auto& project = doc->GetProject(); + left_->Redraw(project); + property_view_->SetDoc(doc); + property_view_->Redraw(); +} + +A2lDocument *ChildFrame::GetDoc() { + return wxDynamicCast(GetDocument(),A2lDocument ); // NOLINT(cppcoreguidelines-pro-type-static-cast-downcast) +} + +void ChildFrame::OnTreeSelected(wxTreeListEvent& event) { + auto* doc = GetDoc(); + if (doc == nullptr || left_ == nullptr || property_view_ == nullptr) { + return; + } + auto item = event.GetItem(); + auto* data = left_->GetItemData(item); + + if (!item.IsOk() || data == nullptr) { + doc->SetSelected(TreeItemType::UNKNOWN, nullptr); + } else { + auto* temp = dynamic_cast(data); + if (temp == nullptr) { + doc->SetSelected(TreeItemType::UNKNOWN, nullptr); + } else { + doc->SetSelected(temp->Type(), temp->Object()); + } + } + property_view_->Redraw(); +} + +} + + + diff --git a/a2llib-main/a2lexplorer/src/childframe.h b/a2llib-main/a2lexplorer/src/childframe.h new file mode 100644 index 0000000..20808cb --- /dev/null +++ b/a2llib-main/a2lexplorer/src/childframe.h @@ -0,0 +1,71 @@ +/* + * Copyright 2023 Ingemar Hedvall + * SPDX-License-Identifier: MIT + */ +#pragma once +#include +#include +#include + +#include +#include +#include +#include + +#include "a2ltreelist.h" +#include "a2lpropertygrid.h" +#include "a2ldocument.h" + +namespace a2lgui { +class ChildFrame : public wxDocMDIChildFrame { + public: + ChildFrame(wxDocument *doc, + wxView *view, + wxMDIParentFrame *parent, + wxWindowID id, + const wxString& title); + ChildFrame() = default; + + void Update() override; + protected: + [[nodiscard]] A2lDocument* GetDoc(); + + private: + A2lTreeList* left_ = nullptr; + A2lPropertyGrid* property_view_ = nullptr; + wxStyledTextCtrl* file_view_ = nullptr; + wxTextCtrl* text_view_ = nullptr; + /* + wxListView* history_view_ = nullptr; + wxListView* measurement_view_ = nullptr; + wxListView* event_view_ = nullptr; + wxListView* attachment_view_ = nullptr; + wxListView* hierarchy_view_ = nullptr; +*/ + wxSplitterWindow* splitter_ = nullptr; + + void OnTreeSelected(wxTreeListEvent& event); + + + + /* + + void RedrawListView(); + void RedrawHistoryView(); + void RedrawMeasurementView(); + void RedrawEventView(); + void RedrawAttachmentView(); + void RedrawHierarchyView(); + + + void OnTreeRightClick(wxTreeEvent& event); + void OnListItemActivated(wxListEvent& event); + */ + wxDECLARE_EVENT_TABLE(); + +}; +} + + + + diff --git a/a2llib-main/a2lexplorer/src/img/app.ico b/a2llib-main/a2lexplorer/src/img/app.ico new file mode 100644 index 0000000..28918c8 Binary files /dev/null and b/a2llib-main/a2lexplorer/src/img/app.ico differ diff --git a/a2llib-main/a2lexplorer/src/img/app.xpm b/a2llib-main/a2lexplorer/src/img/app.xpm new file mode 100644 index 0000000..c0496fa --- /dev/null +++ b/a2llib-main/a2lexplorer/src/img/app.xpm @@ -0,0 +1,81 @@ +/* XPM */ +static const char *app_xpm[] = { +/* columns rows colors chars-per-pixel */ +"64 64 11 1 ", +" c None", +". c gray40", +"X c #686868", +"o c DimGray", +"O c gray48", +"+ c gray49", +"@ c #3F77AF", +"# c #3E78B3", +"$ c #808080", +"% c #F8F8F8", +"& c white", +/* pixels */ +" ", +" ", +" ", +" ", +" ############################ ", +" ############################ ", +" ############################ ", +" ############################ ", +" ############################ ", +" ############################ ", +" ############################ ", +" ############################ ", +" ############################ ", +" ############################ ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" +$$$$$$$$+ ############################ ", +" $+$$$$$$+$ ############################ ", +" $$%%%%%%$$ ############################ ", +" $$&&&&&&$$ ############################ ", +" $$&&&&&&$$XXXXXXXXXXXXXX############################ ", +" $$&&&&&&$$XXXXXXXXXXXXXX############################ ", +" $$&&&&&&$$ ############################ ", +" $$&&&&&&$$ ############################ ", +" $+$$$$$$+$ ############################ ", +" +$$$$$$$$+ ############################ ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" +$$$$$$$$+ ############################ ", +" $+$$$$$$+$ ############################ ", +" $$%%%%%%$$ ############################ ", +" $$&&&&&&$$ ############################ ", +" $$&&&&&&$$XXXXXXXXXXXXXX@########################### ", +" $$&&&&&&$$XXXXXXXXXXXXXX@########################### ", +" $$&&&&&&$$ ############################ ", +" $$&&&&&&$$ ############################ ", +" $+$$$$$$+$ ############################ ", +" +$$$$$$$$+ ############################ ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" +$$$$$$$$+ ############################ ", +" $+$$$$$$$$ ############################ ", +" $$%%%%%%$$ ############################ ", +" $$&&&&&&$$ ############################ ", +" $$&&&&&&$$XXXXXXXXXXXXXX@########################### ", +" $$&&&&&&$$XXXXXXXXXXXXXX@########################### ", +" $$&&&&&&$$ ############################ ", +" $$&&&&&&O$ ############################ ", +" $+$$$$$$$$ ############################ ", +" +$$$$$$$$+ ############################ ", +" ", +" ", +" " +}; diff --git a/a2llib-main/a2lexplorer/src/img/folder_close.bmp b/a2llib-main/a2lexplorer/src/img/folder_close.bmp new file mode 100644 index 0000000..18cdb9f Binary files /dev/null and b/a2llib-main/a2lexplorer/src/img/folder_close.bmp differ diff --git a/a2llib-main/a2lexplorer/src/img/folder_close.xpm b/a2llib-main/a2lexplorer/src/img/folder_close.xpm new file mode 100644 index 0000000..d1879aa --- /dev/null +++ b/a2llib-main/a2lexplorer/src/img/folder_close.xpm @@ -0,0 +1,28 @@ +/* XPM */ +static const char *folder_close_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 16 6 1 ", +" c None", +". c gray47", +"X c #EAB766", +"o c #8D52AB", +"O c #C3A3D3", +"+ c white", +/* pixels */ +" ooo ", +" ooooooo ", +" ..... o++++oo ", +"...... oo++Ooooo", +"...... oo+O+Oooo", +" oo+oO+Ooo", +"XXXXXX ooooO+o ", +"XXXXXXX ooooooo ", +"XXXXXXX ooo ", +"XXXXXXXXXXXXXXX ", +"XXXXXXXXXXXXXXX ", +"XXXXXXXXXXXXXXX ", +"XXXXXXXXXXXXXXX ", +"XXXXXXXXXXXXXXX ", +"XXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXX " +}; diff --git a/a2llib-main/a2lexplorer/src/img/folder_open.bmp b/a2llib-main/a2lexplorer/src/img/folder_open.bmp new file mode 100644 index 0000000..e101f8a Binary files /dev/null and b/a2llib-main/a2lexplorer/src/img/folder_open.bmp differ diff --git a/a2llib-main/a2lexplorer/src/img/folder_open.xpm b/a2llib-main/a2lexplorer/src/img/folder_open.xpm new file mode 100644 index 0000000..9fa52a4 --- /dev/null +++ b/a2llib-main/a2lexplorer/src/img/folder_open.xpm @@ -0,0 +1,36 @@ +/* XPM */ +static const char *folder_open_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 16 14 1 ", +" c None", +". c #777777", +"X c #787877", +"o c #7A7977", +"O c #7B7A77", +"+ c #7C7A77", +"@ c gray47", +"# c #817C76", +"$ c #878075", +"% c #E4B366", +"& c #E6B566", +"* c #E9B665", +"= c #E9B666", +"- c #EAB766", +/* pixels */ +" ", +" ", +" @@@@@ ", +"@@@@@@@$ ", +"@@@@@@@@@@@@@@@ ", +"@@@@@@@@@@@@@@@ ", +"@@ ", +"@+ ------------", +"@X &------------", +"@X -------------", +"@X -------------", +". -------------", +". %------------ ", +"X ------------- ", +"X ------------- ", +"# ------------- " +}; diff --git a/a2llib-main/a2lexplorer/src/img/sub.ico b/a2llib-main/a2lexplorer/src/img/sub.ico new file mode 100644 index 0000000..8ba7441 Binary files /dev/null and b/a2llib-main/a2lexplorer/src/img/sub.ico differ diff --git a/a2llib-main/a2lexplorer/src/img/sub.xpm b/a2llib-main/a2lexplorer/src/img/sub.xpm new file mode 100644 index 0000000..af1c07f --- /dev/null +++ b/a2llib-main/a2lexplorer/src/img/sub.xpm @@ -0,0 +1,84 @@ +/* XPM */ +static const char *sub_xpm[] = { +/* columns rows colors chars-per-pixel */ +"64 64 14 1 ", +" c None", +". c gray40", +"X c #686868", +"o c DimGray", +"O c gray49", +"+ c #3F77AF", +"@ c #3E78B3", +"# c #808080", +"$ c #A9C3DD", +"% c #CCDBEB", +"& c #DDE7F1", +"* c #F8F8F8", +"= c #FEFEFE", +"- c white", +/* pixels */ +" ", +" ", +" ", +" @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" O########O @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" #O######O# @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" ##******## @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" ##------## @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" ##------##XXXXXXXXXXXXXX@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" ##------##XXXXXXXXXXXXXX@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" ##------## @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" ##------## @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" #O######O# @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" O########O @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" .. ", +" .. ", +" ", +" ", +" @@@@@@@@ ", +" @@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" @@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" @@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" @@@@@@@@&--$@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" @@@@@@@@@---%@@@@@@@@@ XXXXX+@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" @@@@@@@@@@---%@@@@@@@@@@ XXXX+@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" @@@@@@@@@@&--$@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" @@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" @@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" @@@@@@@@@@@@&--$@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" @@@@@@@@@@@@---%@@@@@@@@@@@@ ", +" @@@@@@@@@@@@---%@@@@@@@@@@@@ ", +" @@@@@@@@@@@@---%@@@@@@@@@@@@ ", +" @@@@@@@@@@@@---%@@@@@@@@@@@@ ", +" @@@@@@@@@@@@---%@@@@@@@@@@@@ ", +" @@@@@@@@@@@@---%@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" @@@@@@@@@@@@---%@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" @@@@@@@@@@@---%@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" @@@@@@@@@@@---%@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" @@@@@@@@@@---%@@@@@@@@@@ XXX+@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" @@@@@@@@@@---%@@@@@@@@@@ XXXX+@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" @@@@@@@@@---%@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" @@@@@@@@&--$@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" @@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" @@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" @@@@@@@@@@@@ ", +" @@@@@@@@ ", +" ", +" " +}; diff --git a/a2llib-main/a2lexplorer/src/img/tree_list.bmp b/a2llib-main/a2lexplorer/src/img/tree_list.bmp new file mode 100644 index 0000000..da066ac Binary files /dev/null and b/a2llib-main/a2lexplorer/src/img/tree_list.bmp differ diff --git a/a2llib-main/a2lexplorer/src/img/tree_list.xpm b/a2llib-main/a2lexplorer/src/img/tree_list.xpm new file mode 100644 index 0000000..c3b82a1 --- /dev/null +++ b/a2llib-main/a2lexplorer/src/img/tree_list.xpm @@ -0,0 +1,153 @@ +/* XPM */ +static const char *tree_list_xpm[] = { +/* columns rows colors chars-per-pixel */ +"400 16 131 2 ", +" c None", +". c #275078", +"X c #285179", +"o c #595959", +"O c #605D5D", +"+ c #666666", +"@ c #6B6B6B", +"# c #766E73", +"$ c #717171", +"% c #797979", +"& c #8A7D6C", +"* c #269B6B", +"= c #2B9D6D", +"- c #2D9E70", +"; c #33A274", +": c #38A377", +"> c #3AA379", +", c #D5A95F", +"< c #E4A644", +"1 c #E5A847", +"2 c #EAAA46", +"3 c #E6AC4D", +"4 c #EBAE4F", +"5 c #E7AD52", +"6 c #E8AF57", +"7 c #EAB055", +"8 c #E8B15A", +"9 c #EBB764", +"0 c #ECB965", +"q c #EAB869", +"w c #E6BB77", +"e c #EBBD74", +"r c #E8BC7D", +"t c #ECC07E", +"y c #365D83", +"u c #395F84", +"i c #3C6287", +"p c #3F688E", +"a c #336494", +"s c #1659A5", +"d c #1B5EA5", +"f c #1D5AA8", +"g c #1D61A6", +"h c #1D64AC", +"j c #2163A6", +"k c #2767AA", +"l c #2768AA", +"z c #2D6CAC", +"x c #336EAB", +"c c #3370AF", +"v c #3572B0", +"b c #3C76B1", +"n c #3778B5", +"m c #3E78B3", +"M c #3879BA", +"N c #476B8E", +"B c #496C8F", +"V c #437BB4", +"C c #487CB3", +"Z c #437EBB", +"A c #8C4EAD", +"S c #8E53AC", +"D c #8D4BB1", +"F c #9464B1", +"G c #9864B0", +"H c #9F76B7", +"J c #4BAC84", +"K c #5AB38E", +"L c #62B793", +"P c #5383B7", +"I c #5386BB", +"U c #5688BC", +"Y c #5C8DBF", +"T c #728DA8", +"R c #618ABA", +"E c #6691BF", +"W c #6896C4", +"Q c #7EA4CC", +"! c #808080", +"~ c #8D8D8D", +"^ c #939393", +"/ c #9A9A9A", +"( c #879EB5", +") c #B698BF", +"_ c #94A9BD", +"` c gray64", +"' c #A9A9A9", +"] c gray69", +"[ c #B8B8B8", +"{ c #ECC281", +"} c #EEC78B", +"| c #EFCC91", +" . c #F2D19C", +".. c #F0D3A3", +"X. c #B596C0", +"o. c #BA9AC0", +"O. c #8AA2C3", +"+. c #8EAFD2", +"@. c #95B5D5", +"#. c #A0B0C9", +"$. c #A9C3DD", +"%. c #B5C3D2", +"&. c #ABE1CA", +"*. c #BED2E5", +"=. c #C3C3C3", +"-. c #CCCCCC", +";. c #C9D4DE", +":. c #D5D5D5", +">. c #DADADA", +",. c #EFDCC7", +"<. c #EDDBCC", +"1. c #F0DFC3", +"2. c #F4E1C1", +"3. c #F1E2CA", +"4. c #F8E7CD", +"5. c #F9E8D1", +"6. c #FAEFDF", +"7. c #E5D9E4", +"8. c #D8ECE3", +"9. c #D4E1EE", +"0. c #DEE4ED", +"q. c #E5E5E5", +"w. c #E9E9E9", +"e. c #FBEFE0", +"r. c #FBF2E5", +"t. c #EBEFF3", +"y. c #EFF2F7", +"u. c #F3F3F4", +"i. c #F9F6F7", +"p. c #FEFBF4", +"a. c #FFFFFF", +/* pixels */ +" @ % @ ^ @ @ ^ % @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ 7 3 3 3 3 3 3 4 8 8 8 8 8 8 8 8 8 + o o o o o o o o + + o o o o o o o o + + + + + + + + + + + + + + + + + + + + + + + + + 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 C b b b b b b b b b b b C + o o o o o o o o + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + m m m m m m m m m m m + + @ @ + + + + % % % % % % % % % % % % % % ", +"a.' a.a.a.a.a.a.^ =.@ + + + + + + + + + + + + + + + + @ u.a.a.a.a.a.a.a.a.a.a.a.u.@ @ u.a.a.a.a.a.a.a.a.a.a.a.u.@ 1 1 1 3 3 3 3 1 1 3 7 8 8 8 8 8 8 8 8 8 8 8 5 o a.a.a.a.a.a.a.o [ + o a.a.a.a.a.a.a.o [ + + a.a.a.,.0 <.a.a.a.a.a.a.a.+ + a.a.a.,.0 <.a.a.a.a.a.a.a.+ 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 b b b b b b b b b b b b b o a.a.a.a.a.a.a.o [ + x x x x x x x x x x x x x x J J J J J J J J J J J J J J J J J J J J J J J J J J + a.a.a.a.-.a.a.a.a.-.a.a.a.a.+ + a.a.a.a.-.a.a.a.-.a.a.a.a.+ + a.a.a.a.-.a.a.a.-.a.a.a.a.+ + a.a.a.a.-.a.a.a.-.a.a.a.a.+ m m m m m m m m m m m + + + + @ @ @ + + + @ @ @ % a.a.a.a.a.a.a.a.a.a.a.a.% ", +"a.a.a.a.a.a.a.a./ a.-.` a. + u.a.a.a.a.a.a.a.a.a.a.a.a.u.+ @ a.a.a.a.a.a.a.a.a.a.a.a.a.@ @ a.a.a.a.a.a.a.a.a.a.a.a.a.@ r. .q 1 < < 1 q ..e. .< 5 8 8 8 8 8 8 8 6 < | o a.a.t.y u.a.a.o a.[ + o a.a.t.y u.a.a.o a.[ + + a.a.3.0 q 0 <.a.a.i.7.a.a.+ + a.a.3.0 q 0 <.a.a.i.7.a.a.+ 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 b b b b b b b b b b b b b o a.a.a.a.a.a.a.o a.[ + x x x x x x x x x x x x x x J J J J J J J J J J J J J J J J J J J J J J J J J J J J J J + a.a.a.a.[ a.a.a.a.[ a.a.a.a.+ + a.a.a.a.[ a.a.a.[ a.a.a.a.+ + a.a.a.a.[ a.a.a.[ a.a.a.a.+ + a.a.a.a.[ a.a.a.[ a.a.a.a.+ m m m m m m m m m m m @ @ @ @ % a./ % % % % % % % % ` a.% ", +"a.a.a.a.a.a.a.a.o a.a.:.q. + a.a.a.a.a.a.a.a.a.a.a.a.a.a.+ @ a.a.z z z z z z z z z a.a.@ @ a.a.z z z z z z z z z a.a.@ < } 2.r.r.r.6.2.} < p.a...e 6 < < < 6 e ..a.p. o a.a.( . _ a.a.o a.a.[ + o a.a.( . _ a.a.o a.a.[ + a.3.q q q 0 r a.a.G S u.a. a.3.q q q 0 r a.a.G S u.a. 8 8 8 8 8 8 8 8 8 8 8 8 8 8 b b b b b b b b b b b b b o a.a.a.a.a.a.a.o a.a.[ + x x x x x x x x x x x x x x J J J J J J J J J J J J J J J J J J J J J J J J J J J J J J + a.a.a.a.[ a.a.a.a.[ a.a.a.a.+ + a.a.a.a.[ a.a.a.[ a.a.a.a.+ + a.a.a.a.[ a.a.a.[ a.a.a.a.+ + a.a.a.a.[ a.a.a.[ a.a.a.a.+ m m m m m m m m m m m 8 8 8 8 8 8 8 % a.% a.a.a.a.a.a.a.a.% a.% ", +" >.a.a.a.a.a.a.^ ^ -.^ >. v v v v v + a.a.Z m m m m m m m m Z a.a.+ @ a.a.a.a.a.a.a.a.a. $ @ a.a.a.a.a.a.a.a.a. a.a.@ 3 1 < < < < < 2 t 4.a.a.a.a.a.a.a.5.{ < o a.a.N T u a.a.^ o o o o o a.a.N T u a.a.^ o o o o + 2.q q q 0 , u.o.D S A F a.+ + 1.q q q 0 , u.o.A S A F a.+ 8 8 8 8 8 8 8 8 8 8 8 8 8 8 b b b b b b b b b b b b b o a.a.~ ~ ~ ~ a.^ o o o o x x x a.a.a.a.a.a.a.a.x x x J J J a.a.a.a.a.a.a.a.a.a.J J J J J J a.a.a.a.a.a.a.a.J J J + -.[ [ [ [ [ [ [ [ [ [ [ [ -.+ + -.[ [ [ [ [ [ [ [ [ [ [ -.+ + -.[ [ [ [ [ [ [ [ [ [ [ -.+ + -.[ [ [ [ [ [ [ [ [ [ [ -.+ + 8 8 8 8 8 8 8 @ @ % a.% a.a.@.I I @.a.a.% a.% ", +" -.a.a.a.a.a.a.a.a.a.a.-. v v v v v v v + a.a.a.a.a.a.a.a.a.a.a.a.a.a.+ @ a.a.z z z z z z &.&. @ a.a.z z z z z @ 3 3 3 3 3 3 3 3 3 3 3 4 0 8 3 1 < < 1 < < 1 3 6 8 o a.%.B T X ;.a.a.a.a.a.o o a.%.B T X ;.a.a.a.a.a.o + 0 q q 0 & o # + + 0 q q 0 & o # D S A H a.a.+ 8 8 8 8 8 8 8 8 8 8 8 8 8 8 C b b o a.a.a.a.a.a.a.a.a.a.a. z z x x x a.a.a.a.a.a.a.a.x x x J J J a.a.a.a.a.a.a.a.a.a.J J J J J J a.a.a.a.a. + a.a.a.a.[ a.a.a.a.[ a.a.a.a.+ + a.a.a.a.[ a.a.a.[ a.a.a.a.+ + a.a.a.a.[ a.a.a.[ a.a.a.a.+ + a.a.a.a.[ a.a. + + 8 8 8 8 8 8 8 % a.% a.a.Y U U Y a.a.% a.% ", +" ` a.a.a.a.a.a.a.a.a.a.` v v v v v v v v + a.a.Z m m m m m m m m P a.a.+ @ a.a.a.a.a.a.a.a. * ; = K @ a.a.a.a.a.a. z z z z 3 3 3 3 3 1 1 1 3 3 3 3 1 1 3 0 8 8 8 8 8 o a.y _ u.u i a.~ o a.y _ u.u i a.~ ~ ~ a.o + 1.0 0 w a.O x x x x + 1.0 0 w a.O a.) A G a.a.a.+ 8 8 8 8 8 8 x x x x 8 8 8 8 8 8 8 8 8 8 b b b b b b b b b b b C b b o a.a.a.~ ~ ~ ~ ~ ~ a. l z x x x a.a.a.a.a.a.a.a.x x x J J J J J J J J J J J J J J J J J J J J J J J J J J J + a.a.a.a.[ a.a.a.a.[ a.a.a.a.+ + a.a.a.a.[ a.a.a.[ a.a.a.a.+ + a.a.a.a.[ a.a.a. + + a.a.a.a.[ a. x x x x % ! ! ! % m m m m m m m m + + + + % a.% a.a.a.a.a.a.a.a.% a.% ", +" o a.a.a.a.a.a.a.a.a.a.o v v v v v v v v v v v + a.a.a.a.a.a.a.a.a.a.a.a.a.a.+ @ a.a.z z = > ; L @ a.a.z z z z z z z z 3 3 3 3 3 r. .q 1 < < 1 q ..e.0 8 8 8 8 8 a a a a a a a a a o a.a.a.a.a.a. k k k o a.a.a.a.a.a.a.a.a.a.a.o a.3.w a.a. x x x x x x a.3.w a.a.O a.a.X.a.u.a.a. 8 8 8 8 8 8 x x x x x x 8 8 8 8 8 8 8 8 8 8 b b b b b b b b b b b b b b b o a.a.a.a.a.a.a.a.a. z l l x x x a.a.a.a.a.a.a.a.x x x J J J J J J J J J J J J J J J J J J J J J J J J J J J J + a.a.a.a.[ a.a.a.a.[ a.a.a.a.+ + -.[ [ [ [ -.+ + -.[ [ [ [ [ [ $ o @ + -.[ [ [ [ x x x x x x ! a.a.a.! m m m m m m m m @ @ + + + + + + + + + + + % a./ % % % % % % % % ` a.% ", +" v v v v v v v v v v v + a.a.Z m m m m m m W a.a.a.a.+ @ a.a.a.a. c d g f ; ; K @ a.a.a.a.a.a. z z z z 3 3 3 3 3 < } 2.6.r.r.6.2.} < 0 9 8 8 8 8 a Z Z Z Z Z Z Z a o a.~ ~ ~ ~ ~ k k k Q k k k o a.~ ~ ~ ~ ~ ~ ~ ~ ~ a.o + a.a.a.a. x m m a.a.m I x + a.a.a.a.a.O a.a.a.O.R a.a.+ 8 8 x m m a.a.m I x 8 8 8 8 8 8 b b b b b b b b b b b b b b b o a.a.a.~ ~ ~ ~ ~ l l l l x x x a.a.a.a.a.a.a.a.x x x J J J J J J J J J J J J J J J J J J J J J J J J a.8.J J J + -.[ [ [ [ [ [ [ [ [ [ [ [ -.+ + a.a.a.a. z z z z + + a.a.a.a.[ a. + ~ u.u.u.! + a.a.a.a. x m m a.a.m I x ! a.a.a.! + + m m m m m m m m + + + @ @ @ + + % a.% a.a.a.a.a.a.a.a.% a.% ", +" m m m m m m m m m m m m m v v v v v v v v + a.a.a.a.a.a.a.a.a.a.a.a.a.a.+ @ u.a.a.a. h z z d - - @ u.a.a.a.a.a. z z z z 3 3 3 3 3 3 1 < < < < < < 1 3 0 9 9 8 8 8 a Z Z Z Z Z Z Z a o a.a.a.a.a. k k Q a.Q C k o a.a.a.a.a.a.a.a.a.a.a.o + a.a.a.a. x x m m +.+.m m x x + a.a.a.a.a.O a.a.#.n n P a.+ 8 8 x x m m +.+.m m x x 8 8 8 8 8 b b b b b b b b b b b b b C o a.a.a.a.a.a.a. l l l l l x x x a.a.a.a.a.a.a.a.x x x J J J a.a.a.a.a.a.a.a.a.a.J J J J J J a.a. J J J J a.8.J J J J + a.a.a.a.[ a.a.a.a.[ a.a.a.a.+ + a.a.a. z z z z z z + a.a.a.a.[ a.w.q.w.a.' + + a.a.a.a. x x m m +.+.m m x x % ! ! ! % m m m m m m m m + + % a.% a.a.@.I I @.a.a.% a.% ", +" W W m @.m @.Q @.I W @.Q W m m v v v v v v v + a.a.a.a.a.a.a.a.a.a.a.a.a.a.+ @ @ @ @ a. I l l d - : * @ @ @ @ a.a.>.@ z z z z 4 4 4 3 3 3 3 3 3 3 3 3 3 0 9 8 8 8 8 + a.a.a.] a.a.a.+ o a.~ ~ ~ ~ k k k k Q k k k k o a.~ ~ ~ ~ ~ ~ ~ ~ ~ a.o a.a.a.a. x x m m +.+.m m x x a.a.a.a.a.+ o p M m C u.a. 8 8 8 x x m m +.+.m m x x 8 8 8 8 b b b b b b b b b b b b b o a.a.~ ~ ~ ~ z z l l l x x x a.a.a.a.a.a.a.a.x x x J J J a.a.a.a.a.a.a.a.a.a.J J J J J J a.a. J J a.a.a.a.a.a.J J + a.a.a.a.[ a.a.a.a.[ a.a.a.a.+ + a.a. z z z z z z + a.a.a.a.-. o >.w.q.w.q.w.q.@ + a.a.a.a. x x m m +.+.m m x x + @ a. % a.% a.a.Y U I Y a.a.% a.% ", +"m Q 9.I a.m *.m I $.Q Q b b m m v v v v v + u.a.a.a.a.a.a.a.a.a.a.a.a.u.+ @ q. j k ; : > ; = @ q.@ z z z z 3 3 3 3 3 3 3 3 3 3 0 8 8 8 8 8 + a.a.a./ a.a.a.+ o a.a.a.a.a. k k k Q a.Q k k k o a.a.a.a.a.a.a.a.a.a.a.o + a.a.a.a. x x b m a.a.m C x x + a.a.a.a.a.a.a.E n V 0.a.a.+ 8 8 8 8 x x b m a.a.m C x x 8 8 8 8 b b b b b b b b b b b b b o a.a.a.a.a. l z l l l x x x a.a.a.a.a.a.a.a.x x x J J J J J J J J J J J J J J J J J J J J J J J 8.8.a.8.8.8.J J + a.a.a.a.-.a.a.a.a.-.a.a.a.a.+ + + z z z z z z z z z z z z z + + + + + + a.q.w.w.w.q.a. + + + + + x x b m a.a.m C x x + a.@ % a.% a.a.a.a.a.a.a.a.% a.% ", +"m Q 9.9.9.m *.m m *.Q $.Q I m m + + + + a.a.>.+ + + + + + + + + Y k l U * ; ; ; @ @ z z z z z z z z 3 3 3 3 3 3 3 3 3 3 0 8 8 8 8 8 + ] / / / / / ] + o a.a.a.a.a. k k k Q a.Q k k k o a.~ ~ ~ ~ ~ ~ ~ ~ ~ a.o + a.a.a.a. x x m m a.a.V b x x + a.a.a.a.a.a.a.a.P y.a.a.a.+ 8 8 8 x x m m a.a.V b x x 8 8 8 b b b b b b b b b b b b b o a.a.a.a. z z l x x x x x x x x x x x x x x J J J J J J J J J J J J J J J J J J J J J J J J J a.8.J J J J + + + + + + + + + + + + + + + + m m z z z z z z z z z z z z z m m m m m m $ q.w.q.q.q.w.q.o m m m m m x x m m a.a.V b x x % ! ! ! % m m m m m m m m + + % a./ % % % % % % % % ` a.% ", +"m Q Q @.*.m *.m Q @.Q Q b b m m + q.+ + + g g k z l k k s K L @ z z z z z z z z z z 3 3 3 3 3 3 3 3 3 3 8 8 8 8 8 + a.a.a./ a.a.a.+ + o o o o o k k Q a.Q k k o a.a.a.a.a.a.a.a.a.a.a.o + a.a.a.a. x m m a.a.b b x + a.a.a.a.a.a.a.a.a.a.a.a.a.+ 8 8 8 x m m a.a.b b x 8 8 8 b b b b b b b b b b b b b o a.a.a. l z o x x x x x x x x x x x x x x J J J J J J J J J J J J J J J J J J J J J a.8.J J J m m m m m m m q.q.q.q.q.q.:. m m m z z z z z z m m m m m m @ ^ a.w.q.w.a. m m m m m x m m a.a.b b x ! a.a.a.! m m m m m m m m + + + + @ @ % a.a.a.a.a.a.a.a.a.a.a.a.% ", +" I I m W m W Q W m I I b b m + + + l l l z l l z g z z z z z z z z z z 3 3 3 3 3 3 3 3 3 3 8 8 8 + a.a.a.] a.a.a.+ k k k Q k k l o a.a.a.a.a.a.a.a.a.a.a.o + + + + + m V b b m m + + + + + + + + + + + + 8 m V b b m m 8 b b b b b b b b b b b b b + o o o l l o + x x x x x x x x x x x x x x J J J J J J m m m m m m m q.q.q.q.q.q.[ m m m m z z z z z z m m m m m m m ~ w.a.u./ o m m m m m m m V b b m m ! a.a.a.! + + m m m m m m m m + + @ + + + @ @ @ @ % % % % % % % % % % % % % % ", +" m m m m m m m m m m m m m + l z z z z z z g z z z z z z z z 4 4 4 4 4 4 + + + + + + + + + k k k + o o o o o o o o o o o + x x x x x x x x 8 C b b b b b b b b b b b C l J J J J m m m m m m m :.[ [ [ [ [ [ z z z z + + + x x x x % ! ! ! % m m m m m m m m + + @ @ " +}; diff --git a/a2llib-main/a2lexplorer/src/mainframe.cpp b/a2llib-main/a2lexplorer/src/mainframe.cpp new file mode 100644 index 0000000..4d319fc --- /dev/null +++ b/a2llib-main/a2lexplorer/src/mainframe.cpp @@ -0,0 +1,170 @@ +/* + * Copyright 2023 Ingemar Hedvall + * SPDX-License-Identifier: MIT + */ +#include +#include + +#include +#include +#include "mainframe.h" +#include "windowid.h" + +namespace { +#include "img/app.xpm" +} + +namespace a2lgui { + +wxBEGIN_EVENT_TABLE(MainFrame, wxDocMDIParentFrame) + EVT_MENU(wxID_ABOUT, MainFrame::OnAbout) + EVT_CLOSE(MainFrame::OnClose) + EVT_DROP_FILES(MainFrame::OnDropFiles) +wxEND_EVENT_TABLE() + +MainFrame::MainFrame(const wxString& title, const wxPoint& start_pos, const wxSize& start_size, bool maximized) + : wxDocMDIParentFrame(wxDocManager::GetDocumentManager(), nullptr, wxID_ANY, title, start_pos, start_size) { +#ifdef _WIN32 + wxIcon app("APP_ICON", wxBITMAP_TYPE_ICO_RESOURCE); +#else + wxIcon app {wxICON(app)}; +#endif + SetIcon(app); + wxWindow::SetName("A2lTopWindow"); +#if (_MSC_VER) + wxTopLevelWindowMSW::Maximize(maximized); + #else + wxTopLevelWindowNative::Maximize(maximized); +#endif + wxWindow::DragAcceptFiles(true); + + auto* app_config = wxConfig::Get(); + auto* doc_manager = wxDocManager::GetDocumentManager(); + + // FILE + auto* menu_file = new wxMenu; + menu_file->Append(wxID_OPEN); + menu_file->Append(wxID_EXIT); + + doc_manager->FileHistoryUseMenu(menu_file); + doc_manager->FileHistoryLoad(*app_config); + + + // ABOUT + auto* menu_about = new wxMenu; + menu_about->Append(kIdOpenLogFile, "Open Log File"); + menu_about->AppendSeparator(); + menu_about->Append(wxID_ABOUT, wxGetStockLabel(wxID_ABOUT)); + + auto* menu_bar = new wxMenuBar; + menu_bar->Append(menu_file, wxGetStockLabel(wxID_FILE)); + menu_bar->Append(menu_about, wxGetStockLabel(wxID_HELP)); + wxFrameBase::SetMenuBar(menu_bar); +} + + +void MainFrame::OnClose(wxCloseEvent &event) { + + // If the window is minimized. Do not save as last position + + if (!IsIconized()) { + bool maximized = IsMaximized(); + wxPoint end_pos = GetPosition(); + wxSize end_size = GetSize(); + auto* app_config = wxConfig::Get(); + + if (maximized) { + app_config->Write("/MainWin/Max",maximized); + } else { + app_config->Write("/MainWin/X", end_pos.x); + app_config->Write("/MainWin/Y", end_pos.y); + app_config->Write("/MainWin/XWidth", end_size.x); + app_config->Write("/MainWin/YWidth", end_size.y); + app_config->Write("/MainWin/Max", maximized); + } + } + event.Skip(true); +} + +void MainFrame::OnAbout(wxCommandEvent&) { + wxAboutDialogInfo info; + info.SetName("A2l Explorer"); + info.SetVersion("1.0"); + info.SetDescription("Simple A2L file explorer."); + + wxArrayString devs; + devs.push_back("Ingemar Hedvall"); + info.SetDevelopers(devs); + + info.SetCopyright("(C) 2023 Ingemar Hedvall"); + info.SetLicense("MIT License (https://opensource.org/licenses/MIT)\n" + "Copyright 2023 Ingemar Hedvall\n" + "\n" + "Permission is hereby granted, free of charge, to any person obtaining a copy of this\n" + "software and associated documentation files (the \"Software\"),\n" + "to deal in the Software without restriction, including without limitation the rights to use, copy,\n" + "modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,\n" + "and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n" + "\n" + "The above copyright notice and this permission notice shall be included in all copies or substantial\n" + "portions of the Software.\n" + "\n" + "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n" + "INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR\n" + "PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n" + "DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR\n" + "IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." + ); + if (!info.HasIcon()) { +#ifdef _WIN32 + wxIcon app("APP_ICON", wxBITMAP_TYPE_ICO_RESOURCE); +#else + wxIcon app {wxICON(app)}; +#endif + info.SetIcon(app); + } + + + wxAboutBox(info); +} + +void MainFrame::OnUpdateNoDoc(wxUpdateUIEvent &event) { + auto* man = wxDocManager::GetDocumentManager(); + auto* doc = man != nullptr ? man->GetCurrentDocument() : nullptr; + if (doc == nullptr) { + event.Enable(false); + } +} + +void MainFrame::OnDropFiles(wxDropFilesEvent& event) { + const int count = event.GetNumberOfFiles(); + const auto* list = event.GetFiles(); + auto* man = wxDocManager::GetDocumentManager(); + if (count <= 0 || list == nullptr || man == nullptr) { + return; + } + + for (int ii = 0; ii < count; ++ii) { + try { + const auto& file = list[ii]; + std::filesystem::path p(file.ToStdWstring()); + if (!std::filesystem::exists(p)) { + continue; + } + const auto& u8str = p.u8string(); + // Check if the file already is open + const auto* doc_exist = man->FindDocumentByPath(file); + if (doc_exist != nullptr) { + continue; + } + + man->CreateDocument(file, wxDOC_SILENT); + } + catch (const std::exception&) { + // Not much to do here + continue; + } + } +} + +} \ No newline at end of file diff --git a/a2llib-main/a2lexplorer/src/mainframe.h b/a2llib-main/a2lexplorer/src/mainframe.h new file mode 100644 index 0000000..e05d9d5 --- /dev/null +++ b/a2llib-main/a2lexplorer/src/mainframe.h @@ -0,0 +1,23 @@ +/* + * Copyright 2023 Ingemar Hedvall + * SPDX-License-Identifier: MIT + */ +#pragma once +#include +#include + +namespace a2lgui { + +class MainFrame : public wxDocMDIParentFrame { + public: + MainFrame(const wxString& title, const wxPoint& start_pos, const wxSize& start_size, bool maximized); + private: + void OnClose(wxCloseEvent& event); + void OnAbout(wxCommandEvent& event); + void OnUpdateNoDoc(wxUpdateUIEvent& event); + void OnDropFiles(wxDropFilesEvent& event); +wxDECLARE_EVENT_TABLE(); +}; + +} + diff --git a/a2llib-main/a2lexplorer/src/windowid.h b/a2llib-main/a2lexplorer/src/windowid.h new file mode 100644 index 0000000..663e2af --- /dev/null +++ b/a2llib-main/a2lexplorer/src/windowid.h @@ -0,0 +1,19 @@ +/* + * Copyright 2023 Ingemar Hedvall + * SPDX-License-Identifier: MIT + */ +#pragma once +namespace a2lgui { +constexpr wxWindowID kIdLeftTree = 1; +constexpr wxWindowID kIdPropertyList = 2; +constexpr wxWindowID kIdOpenLogFile = 3; +constexpr wxWindowID kIdSaveAttachment = 4; + + +constexpr wxWindowID kIdPlotChannelData = 8; +constexpr wxWindowID kIdHistoryList = 9; +constexpr wxWindowID kIdMeasurementList = 10; +constexpr wxWindowID kIdEventList = 11; +constexpr wxWindowID kIdAttachmentList = 12; +constexpr wxWindowID kIdHierarchyList = 12; +} \ No newline at end of file diff --git a/a2llib-main/bin/ALL_BUILD.vcxproj b/a2llib-main/bin/ALL_BUILD.vcxproj new file mode 100644 index 0000000..98fea0f --- /dev/null +++ b/a2llib-main/bin/ALL_BUILD.vcxproj @@ -0,0 +1,185 @@ + + + + x64 + + + false + + + + Debug + x64 + + + Release + x64 + + + MinSizeRel + x64 + + + RelWithDebInfo + x64 + + + + {94E13784-D25A-391E-857E-59B708793320} + Win32Proj + 10.0.22621.0 + x64 + ALL_BUILD + NoUpgrade + + + + Utility + MultiByte + v143 + + + Utility + MultiByte + v143 + + + Utility + MultiByte + v143 + + + Utility + MultiByte + v143 + + + + + + + + + + <_ProjectFileVersion>10.0.20506.1 + $(Platform)\$(Configuration)\$(ProjectName)\ + $(Platform)\$(Configuration)\$(ProjectName)\ + $(Platform)\$(Configuration)\$(ProjectName)\ + $(Platform)\$(Configuration)\$(ProjectName)\ + + + + C:\boost\include\boost-1_87;%(AdditionalIncludeDirectories) + $(ProjectDir)/$(IntDir) + %(Filename).h + %(Filename).tlb + %(Filename)_i.c + %(Filename)_p.c + + + + + C:\boost\include\boost-1_87;%(AdditionalIncludeDirectories) + $(ProjectDir)/$(IntDir) + %(Filename).h + %(Filename).tlb + %(Filename)_i.c + %(Filename)_p.c + + + + + C:\boost\include\boost-1_87;%(AdditionalIncludeDirectories) + $(ProjectDir)/$(IntDir) + %(Filename).h + %(Filename).tlb + %(Filename)_i.c + %(Filename)_p.c + + + + + C:\boost\include\boost-1_87;%(AdditionalIncludeDirectories) + $(ProjectDir)/$(IntDir) + %(Filename).h + %(Filename).tlb + %(Filename)_i.c + %(Filename)_p.c + + + + + Always + Building Custom Rule C:/git_work/a2l/a2llib-main/a2llib-main/CMakeLists.txt + setlocal +"C:\Program Files\CMake\bin\cmake.exe" -SC:/git_work/a2l/a2llib-main/a2llib-main -BC:/git_work/a2l/a2llib-main/a2llib-main/bin --check-stamp-file C:/git_work/a2l/a2llib-main/a2llib-main/bin/CMakeFiles/generate.stamp +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + C:\Program Files\CMake\share\cmake-3.31\Modules\BasicConfigVersion-AnyNewerVersion.cmake.in;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeCXXInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeCommonLanguageInclude.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeGenericSystem.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeInitializeConfigs.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeLanguageInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakePackageConfigHelpers.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakePrintHelpers.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeRCInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeSystemSpecificInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeSystemSpecificInitialize.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\CMakeCommonCompilerMacros.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindBoost.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindPackageHandleStandardArgs.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindPackageMessage.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Internal\CMakeCXXLinkerInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Internal\CMakeCommonLinkerInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Linker\Windows-MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-Initialize.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\WindowsPaths.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\WriteBasicConfigVersionFile.cmake;C:\boost\lib\cmake\Boost-1.87.0\BoostConfig.cmake;C:\boost\lib\cmake\Boost-1.87.0\BoostConfigVersion.cmake;C:\boost\lib\cmake\BoostDetectToolset-1.87.0.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\boost_atomic-config-version.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\boost_atomic-config.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\libboost_atomic-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\libboost_atomic-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\boost_filesystem-config-version.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\boost_filesystem-config.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\libboost_filesystem-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\libboost_filesystem-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_headers-1.87.0\boost_headers-config-version.cmake;C:\boost\lib\cmake\boost_headers-1.87.0\boost_headers-config.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\boost_locale-config-version.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\boost_locale-config.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\libboost_locale-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\libboost_locale-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_system-1.87.0\boost_system-config-version.cmake;C:\boost\lib\cmake\boost_system-1.87.0\boost_system-config.cmake;C:\boost\lib\cmake\boost_system-1.87.0\libboost_system-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_system-1.87.0\libboost_system-variant-vc143-mt-x64-1_87-static.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeCXXCompiler.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeRCCompiler.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeSystem.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\cmake\a2lConfig.cmake.in;C:\git_work\a2l\a2llib-main\a2llib-main\script\boost.cmake;%(AdditionalInputs) + C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\generate.stamp + false + Building Custom Rule C:/git_work/a2l/a2llib-main/a2llib-main/CMakeLists.txt + setlocal +"C:\Program Files\CMake\bin\cmake.exe" -SC:/git_work/a2l/a2llib-main/a2llib-main -BC:/git_work/a2l/a2llib-main/a2llib-main/bin --check-stamp-file C:/git_work/a2l/a2llib-main/a2llib-main/bin/CMakeFiles/generate.stamp +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + C:\Program Files\CMake\share\cmake-3.31\Modules\BasicConfigVersion-AnyNewerVersion.cmake.in;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeCXXInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeCommonLanguageInclude.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeGenericSystem.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeInitializeConfigs.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeLanguageInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakePackageConfigHelpers.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakePrintHelpers.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeRCInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeSystemSpecificInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeSystemSpecificInitialize.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\CMakeCommonCompilerMacros.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindBoost.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindPackageHandleStandardArgs.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindPackageMessage.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Internal\CMakeCXXLinkerInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Internal\CMakeCommonLinkerInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Linker\Windows-MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-Initialize.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\WindowsPaths.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\WriteBasicConfigVersionFile.cmake;C:\boost\lib\cmake\Boost-1.87.0\BoostConfig.cmake;C:\boost\lib\cmake\Boost-1.87.0\BoostConfigVersion.cmake;C:\boost\lib\cmake\BoostDetectToolset-1.87.0.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\boost_atomic-config-version.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\boost_atomic-config.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\libboost_atomic-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\libboost_atomic-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\boost_filesystem-config-version.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\boost_filesystem-config.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\libboost_filesystem-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\libboost_filesystem-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_headers-1.87.0\boost_headers-config-version.cmake;C:\boost\lib\cmake\boost_headers-1.87.0\boost_headers-config.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\boost_locale-config-version.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\boost_locale-config.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\libboost_locale-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\libboost_locale-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_system-1.87.0\boost_system-config-version.cmake;C:\boost\lib\cmake\boost_system-1.87.0\boost_system-config.cmake;C:\boost\lib\cmake\boost_system-1.87.0\libboost_system-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_system-1.87.0\libboost_system-variant-vc143-mt-x64-1_87-static.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeCXXCompiler.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeRCCompiler.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeSystem.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\cmake\a2lConfig.cmake.in;C:\git_work\a2l\a2llib-main\a2llib-main\script\boost.cmake;%(AdditionalInputs) + C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\generate.stamp + false + Building Custom Rule C:/git_work/a2l/a2llib-main/a2llib-main/CMakeLists.txt + setlocal +"C:\Program Files\CMake\bin\cmake.exe" -SC:/git_work/a2l/a2llib-main/a2llib-main -BC:/git_work/a2l/a2llib-main/a2llib-main/bin --check-stamp-file C:/git_work/a2l/a2llib-main/a2llib-main/bin/CMakeFiles/generate.stamp +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + C:\Program Files\CMake\share\cmake-3.31\Modules\BasicConfigVersion-AnyNewerVersion.cmake.in;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeCXXInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeCommonLanguageInclude.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeGenericSystem.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeInitializeConfigs.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeLanguageInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakePackageConfigHelpers.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakePrintHelpers.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeRCInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeSystemSpecificInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeSystemSpecificInitialize.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\CMakeCommonCompilerMacros.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindBoost.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindPackageHandleStandardArgs.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindPackageMessage.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Internal\CMakeCXXLinkerInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Internal\CMakeCommonLinkerInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Linker\Windows-MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-Initialize.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\WindowsPaths.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\WriteBasicConfigVersionFile.cmake;C:\boost\lib\cmake\Boost-1.87.0\BoostConfig.cmake;C:\boost\lib\cmake\Boost-1.87.0\BoostConfigVersion.cmake;C:\boost\lib\cmake\BoostDetectToolset-1.87.0.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\boost_atomic-config-version.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\boost_atomic-config.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\libboost_atomic-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\libboost_atomic-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\boost_filesystem-config-version.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\boost_filesystem-config.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\libboost_filesystem-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\libboost_filesystem-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_headers-1.87.0\boost_headers-config-version.cmake;C:\boost\lib\cmake\boost_headers-1.87.0\boost_headers-config.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\boost_locale-config-version.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\boost_locale-config.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\libboost_locale-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\libboost_locale-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_system-1.87.0\boost_system-config-version.cmake;C:\boost\lib\cmake\boost_system-1.87.0\boost_system-config.cmake;C:\boost\lib\cmake\boost_system-1.87.0\libboost_system-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_system-1.87.0\libboost_system-variant-vc143-mt-x64-1_87-static.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeCXXCompiler.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeRCCompiler.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeSystem.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\cmake\a2lConfig.cmake.in;C:\git_work\a2l\a2llib-main\a2llib-main\script\boost.cmake;%(AdditionalInputs) + C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\generate.stamp + false + Building Custom Rule C:/git_work/a2l/a2llib-main/a2llib-main/CMakeLists.txt + setlocal +"C:\Program Files\CMake\bin\cmake.exe" -SC:/git_work/a2l/a2llib-main/a2llib-main -BC:/git_work/a2l/a2llib-main/a2llib-main/bin --check-stamp-file C:/git_work/a2l/a2llib-main/a2llib-main/bin/CMakeFiles/generate.stamp +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + C:\Program Files\CMake\share\cmake-3.31\Modules\BasicConfigVersion-AnyNewerVersion.cmake.in;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeCXXInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeCommonLanguageInclude.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeGenericSystem.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeInitializeConfigs.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeLanguageInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakePackageConfigHelpers.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakePrintHelpers.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeRCInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeSystemSpecificInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeSystemSpecificInitialize.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\CMakeCommonCompilerMacros.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindBoost.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindPackageHandleStandardArgs.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindPackageMessage.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Internal\CMakeCXXLinkerInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Internal\CMakeCommonLinkerInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Linker\Windows-MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-Initialize.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\WindowsPaths.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\WriteBasicConfigVersionFile.cmake;C:\boost\lib\cmake\Boost-1.87.0\BoostConfig.cmake;C:\boost\lib\cmake\Boost-1.87.0\BoostConfigVersion.cmake;C:\boost\lib\cmake\BoostDetectToolset-1.87.0.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\boost_atomic-config-version.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\boost_atomic-config.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\libboost_atomic-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\libboost_atomic-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\boost_filesystem-config-version.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\boost_filesystem-config.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\libboost_filesystem-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\libboost_filesystem-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_headers-1.87.0\boost_headers-config-version.cmake;C:\boost\lib\cmake\boost_headers-1.87.0\boost_headers-config.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\boost_locale-config-version.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\boost_locale-config.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\libboost_locale-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\libboost_locale-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_system-1.87.0\boost_system-config-version.cmake;C:\boost\lib\cmake\boost_system-1.87.0\boost_system-config.cmake;C:\boost\lib\cmake\boost_system-1.87.0\libboost_system-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_system-1.87.0\libboost_system-variant-vc143-mt-x64-1_87-static.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeCXXCompiler.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeRCCompiler.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeSystem.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\cmake\a2lConfig.cmake.in;C:\git_work\a2l\a2llib-main\a2llib-main\script\boost.cmake;%(AdditionalInputs) + C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\generate.stamp + false + + + + + + + + {0A2017E7-D5A1-32C0-B66C-CADE1D639B18} + ZERO_CHECK + false + Never + + + {6BF55986-F028-31E8-AFE5-00FBA737754F} + a2l + + + + + + \ No newline at end of file diff --git a/a2llib-main/bin/ALL_BUILD.vcxproj.filters b/a2llib-main/bin/ALL_BUILD.vcxproj.filters new file mode 100644 index 0000000..f53c8a1 --- /dev/null +++ b/a2llib-main/bin/ALL_BUILD.vcxproj.filters @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/a2llib-main/bin/ALL_BUILD.vcxproj.user b/a2llib-main/bin/ALL_BUILD.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/a2llib-main/bin/ALL_BUILD.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/a2llib-main/bin/CMakeCache.txt b/a2llib-main/bin/CMakeCache.txt new file mode 100644 index 0000000..c98bb1b --- /dev/null +++ b/a2llib-main/bin/CMakeCache.txt @@ -0,0 +1,376 @@ +# This is the CMakeCache file. +# For build in directory: c:/git_work/a2l/a2llib-main/a2llib-main/bin +# It was generated by CMake: C:/Program Files/CMake/bin/cmake.exe +# You can edit this file to change values found and used by cmake. +# If you do not want to change any of the values, simply exit the editor. +# If you do want to change a value, simply edit, save, and exit the editor. +# The syntax for the file is as follows: +# KEY:TYPE=VALUE +# KEY is the name of a variable in the cache. +# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. +# VALUE is the current value for the KEY. + +######################## +# EXTERNAL cache entries +######################## + +//If doxygen is installed, then build documentation in Release +// mode +A2L_DOC:BOOL=OFF + +//Create FLEX/BISON files +A2L_FLEX:BOOL=OFF + +//Building unit test +A2L_TEST:BOOL=OFF + +//Building applications +A2L_TOOLS:BOOL=OFF + +//Static libraries are preferred +BUILD_SHARED_LIBS:BOOL=OFF + +//The directory containing a CMake configuration file for Boost. +Boost_DIR:PATH=C:/boost/lib/cmake/Boost-1.87.0 + +Boost_FILESYSTEM_LIBRARY_DEBUG:STRING=C:/boost/lib/libboost_filesystem-vc143-mt-gd-x64-1_87.lib + +Boost_FILESYSTEM_LIBRARY_RELEASE:STRING=C:/boost/lib/libboost_filesystem-vc143-mt-x64-1_87.lib + +//Path to a file. +Boost_INCLUDE_DIR:PATH= + +Boost_LOCALE_LIBRARY_DEBUG:STRING=C:/boost/lib/libboost_locale-vc143-mt-gd-x64-1_87.lib + +Boost_LOCALE_LIBRARY_RELEASE:STRING=C:/boost/lib/libboost_locale-vc143-mt-x64-1_87.lib + +Boost_SYSTEM_LIBRARY_DEBUG:STRING=C:/boost/lib/libboost_system-vc143-mt-gd-x64-1_87.lib + +Boost_SYSTEM_LIBRARY_RELEASE:STRING=C:/boost/lib/libboost_system-vc143-mt-x64-1_87.lib + +//Path to a program. +CMAKE_AR:FILEPATH=C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.42.34433/bin/Hostx64/x64/lib.exe + +//Semicolon separated list of supported configuration types, only +// supports Debug, Release, MinSizeRel, and RelWithDebInfo, anything +// else will be ignored. +CMAKE_CONFIGURATION_TYPES:STRING=Debug;Release;MinSizeRel;RelWithDebInfo + +//Flags used by the CXX compiler during all build types. +CMAKE_CXX_FLAGS:STRING=/DWIN32 /D_WINDOWS /EHsc + +//Flags used by the CXX compiler during DEBUG builds. +CMAKE_CXX_FLAGS_DEBUG:STRING=/Zi /Ob0 /Od /RTC1 + +//Flags used by the CXX compiler during MINSIZEREL builds. +CMAKE_CXX_FLAGS_MINSIZEREL:STRING=/O1 /Ob1 /DNDEBUG + +//Flags used by the CXX compiler during RELEASE builds. +CMAKE_CXX_FLAGS_RELEASE:STRING=/O2 /Ob2 /DNDEBUG + +//Flags used by the CXX compiler during RELWITHDEBINFO builds. +CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=/Zi /O2 /Ob1 /DNDEBUG + +//Libraries linked by default with all C++ applications. +CMAKE_CXX_STANDARD_LIBRARIES:STRING=kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib + +//Flags used by the linker during all build types. +CMAKE_EXE_LINKER_FLAGS:STRING=/machine:x64 + +//Flags used by the linker during DEBUG builds. +CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL + +//Flags used by the linker during MINSIZEREL builds. +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO + +//Flags used by the linker during RELEASE builds. +CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO + +//Flags used by the linker during RELWITHDEBINFO builds. +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL + +//Value Computed by CMake. +CMAKE_FIND_PACKAGE_REDIRECTS_DIR:STATIC=C:/git_work/a2l/a2llib-main/a2llib-main/bin/CMakeFiles/pkgRedirects + +//Install path prefix, prepended onto install directories. +CMAKE_INSTALL_PREFIX:PATH=C:/Program Files/a2llib + +//Path to a program. +CMAKE_LINKER:FILEPATH=C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.42.34433/bin/Hostx64/x64/link.exe + +//Flags used by the linker during the creation of modules during +// all build types. +CMAKE_MODULE_LINKER_FLAGS:STRING=/machine:x64 + +//Flags used by the linker during the creation of modules during +// DEBUG builds. +CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL + +//Flags used by the linker during the creation of modules during +// MINSIZEREL builds. +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO + +//Flags used by the linker during the creation of modules during +// RELEASE builds. +CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO + +//Flags used by the linker during the creation of modules during +// RELWITHDEBINFO builds. +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL + +//Path to a program. +CMAKE_MT:FILEPATH=CMAKE_MT-NOTFOUND + +//Value Computed by CMake +CMAKE_PROJECT_DESCRIPTION:STATIC=ASAP 2 parser C++ library. + +//Value Computed by CMake +CMAKE_PROJECT_HOMEPAGE_URL:STATIC= + +//Value Computed by CMake +CMAKE_PROJECT_NAME:STATIC=a2llib + +//Value Computed by CMake +CMAKE_PROJECT_VERSION:STATIC=1.0 + +//Value Computed by CMake +CMAKE_PROJECT_VERSION_MAJOR:STATIC=1 + +//Value Computed by CMake +CMAKE_PROJECT_VERSION_MINOR:STATIC=0 + +//Value Computed by CMake +CMAKE_PROJECT_VERSION_PATCH:STATIC= + +//Value Computed by CMake +CMAKE_PROJECT_VERSION_TWEAK:STATIC= + +//RC compiler +CMAKE_RC_COMPILER:FILEPATH=rc + +//Flags for Windows Resource Compiler during all build types. +CMAKE_RC_FLAGS:STRING=-DWIN32 + +//Flags for Windows Resource Compiler during DEBUG builds. +CMAKE_RC_FLAGS_DEBUG:STRING=-D_DEBUG + +//Flags for Windows Resource Compiler during MINSIZEREL builds. +CMAKE_RC_FLAGS_MINSIZEREL:STRING= + +//Flags for Windows Resource Compiler during RELEASE builds. +CMAKE_RC_FLAGS_RELEASE:STRING= + +//Flags for Windows Resource Compiler during RELWITHDEBINFO builds. +CMAKE_RC_FLAGS_RELWITHDEBINFO:STRING= + +//Flags used by the linker during the creation of shared libraries +// during all build types. +CMAKE_SHARED_LINKER_FLAGS:STRING=/machine:x64 + +//Flags used by the linker during the creation of shared libraries +// during DEBUG builds. +CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL + +//Flags used by the linker during the creation of shared libraries +// during MINSIZEREL builds. +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO + +//Flags used by the linker during the creation of shared libraries +// during RELEASE builds. +CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO + +//Flags used by the linker during the creation of shared libraries +// during RELWITHDEBINFO builds. +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL + +//If set, runtime paths are not added when installing shared libraries, +// but are added when building. +CMAKE_SKIP_INSTALL_RPATH:BOOL=OFF + +//If set, runtime paths are not added when using shared libraries. +CMAKE_SKIP_RPATH:BOOL=OFF + +//Flags used by the linker during the creation of static libraries +// during all build types. +CMAKE_STATIC_LINKER_FLAGS:STRING=/machine:x64 + +//Flags used by the linker during the creation of static libraries +// during DEBUG builds. +CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of static libraries +// during MINSIZEREL builds. +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of static libraries +// during RELEASE builds. +CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of static libraries +// during RELWITHDEBINFO builds. +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//If this value is on, makefiles will be generated without the +// .SILENT directive, and all commands will be echoed to the console +// during the make. This is useful for debugging only. With Visual +// Studio IDE projects all commands are done without /nologo. +CMAKE_VERBOSE_MAKEFILE:BOOL=OFF + +//Value Computed by CMake +a2llib_BINARY_DIR:STATIC=C:/git_work/a2l/a2llib-main/a2llib-main/bin + +//Value Computed by CMake +a2llib_IS_TOP_LEVEL:STATIC=ON + +//Value Computed by CMake +a2llib_SOURCE_DIR:STATIC=C:/git_work/a2l/a2llib-main/a2llib-main + +//The directory containing a CMake configuration file for boost_atomic. +boost_atomic_DIR:PATH=C:/boost/lib/cmake/boost_atomic-1.87.0 + +//The directory containing a CMake configuration file for boost_filesystem. +boost_filesystem_DIR:PATH=C:/boost/lib/cmake/boost_filesystem-1.87.0 + +//The directory containing a CMake configuration file for boost_headers. +boost_headers_DIR:PATH=C:/boost/lib/cmake/boost_headers-1.87.0 + +//The directory containing a CMake configuration file for boost_locale. +boost_locale_DIR:PATH=C:/boost/lib/cmake/boost_locale-1.87.0 + +//The directory containing a CMake configuration file for boost_system. +boost_system_DIR:PATH=C:/boost/lib/cmake/boost_system-1.87.0 + + +######################## +# INTERNAL cache entries +######################## + +//ADVANCED property for variable: Boost_DIR +Boost_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_AR +CMAKE_AR-ADVANCED:INTERNAL=1 +//This is the directory where this CMakeCache.txt was created +CMAKE_CACHEFILE_DIR:INTERNAL=c:/git_work/a2l/a2llib-main/a2llib-main/bin +//Major version of cmake used to create the current loaded cache +CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 +//Minor version of cmake used to create the current loaded cache +CMAKE_CACHE_MINOR_VERSION:INTERNAL=31 +//Patch version of cmake used to create the current loaded cache +CMAKE_CACHE_PATCH_VERSION:INTERNAL=4 +//Path to CMake executable. +CMAKE_COMMAND:INTERNAL=C:/Program Files/CMake/bin/cmake.exe +//Path to cpack program executable. +CMAKE_CPACK_COMMAND:INTERNAL=C:/Program Files/CMake/bin/cpack.exe +//Path to ctest program executable. +CMAKE_CTEST_COMMAND:INTERNAL=C:/Program Files/CMake/bin/ctest.exe +//ADVANCED property for variable: CMAKE_CXX_FLAGS +CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG +CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL +CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE +CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO +CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_STANDARD_LIBRARIES +CMAKE_CXX_STANDARD_LIBRARIES-ADVANCED:INTERNAL=1 +//Executable file format +CMAKE_EXECUTABLE_FORMAT:INTERNAL=Unknown +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS +CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG +CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE +CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//Name of external makefile project generator. +CMAKE_EXTRA_GENERATOR:INTERNAL= +//Name of generator. +CMAKE_GENERATOR:INTERNAL=Visual Studio 17 2022 +//Generator instance identifier. +CMAKE_GENERATOR_INSTANCE:INTERNAL=C:/Program Files/Microsoft Visual Studio/2022/Community +//Name of generator platform. +CMAKE_GENERATOR_PLATFORM:INTERNAL=x64 +//Name of generator toolset. +CMAKE_GENERATOR_TOOLSET:INTERNAL= +//Source directory with the top level CMakeLists.txt file for this +// project +CMAKE_HOME_DIRECTORY:INTERNAL=C:/git_work/a2l/a2llib-main/a2llib-main +//ADVANCED property for variable: CMAKE_LINKER +CMAKE_LINKER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS +CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG +CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE +CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MT +CMAKE_MT-ADVANCED:INTERNAL=1 +//number of local generators +CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1 +//Platform information initialized +CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1 +//noop for ranlib +CMAKE_RANLIB:INTERNAL=: +//ADVANCED property for variable: CMAKE_RC_COMPILER +CMAKE_RC_COMPILER-ADVANCED:INTERNAL=1 +CMAKE_RC_COMPILER_WORKS:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RC_FLAGS +CMAKE_RC_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RC_FLAGS_DEBUG +CMAKE_RC_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RC_FLAGS_MINSIZEREL +CMAKE_RC_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RC_FLAGS_RELEASE +CMAKE_RC_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RC_FLAGS_RELWITHDEBINFO +CMAKE_RC_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//Path to CMake installation. +CMAKE_ROOT:INTERNAL=C:/Program Files/CMake/share/cmake-3.31 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS +CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG +CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE +CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH +CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_RPATH +CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS +CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG +CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE +CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE +CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 +//Details about finding Boost +FIND_PACKAGE_MESSAGE_DETAILS_Boost:INTERNAL=[C:/boost/lib/cmake/Boost-1.87.0/BoostConfig.cmake][cfound components: locale filesystem system ][v1.87.0()] +//ADVANCED property for variable: boost_atomic_DIR +boost_atomic_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: boost_filesystem_DIR +boost_filesystem_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: boost_headers_DIR +boost_headers_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: boost_locale_DIR +boost_locale_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: boost_system_DIR +boost_system_DIR-ADVANCED:INTERNAL=1 + diff --git a/a2llib-main/bin/CMakeFiles/3.31.4/CMakeCXXCompiler.cmake b/a2llib-main/bin/CMakeFiles/3.31.4/CMakeCXXCompiler.cmake new file mode 100644 index 0000000..85e9487 --- /dev/null +++ b/a2llib-main/bin/CMakeFiles/3.31.4/CMakeCXXCompiler.cmake @@ -0,0 +1,101 @@ +set(CMAKE_CXX_COMPILER "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.42.34433/bin/Hostx64/x64/cl.exe") +set(CMAKE_CXX_COMPILER_ARG1 "") +set(CMAKE_CXX_COMPILER_ID "MSVC") +set(CMAKE_CXX_COMPILER_VERSION "19.42.34436.0") +set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "") +set(CMAKE_CXX_COMPILER_WRAPPER "") +set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "14") +set(CMAKE_CXX_EXTENSIONS_COMPUTED_DEFAULT "OFF") +set(CMAKE_CXX_STANDARD_LATEST "23") +set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17;cxx_std_20;cxx_std_23") +set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters") +set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates") +set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") +set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17") +set(CMAKE_CXX20_COMPILE_FEATURES "cxx_std_20") +set(CMAKE_CXX23_COMPILE_FEATURES "cxx_std_23") +set(CMAKE_CXX26_COMPILE_FEATURES "") + +set(CMAKE_CXX_PLATFORM_ID "Windows") +set(CMAKE_CXX_SIMULATE_ID "") +set(CMAKE_CXX_COMPILER_FRONTEND_VARIANT "MSVC") +set(CMAKE_CXX_SIMULATE_VERSION "") +set(CMAKE_CXX_COMPILER_ARCHITECTURE_ID x64) + +set(MSVC_CXX_ARCHITECTURE_ID x64) + +set(CMAKE_AR "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.42.34433/bin/Hostx64/x64/lib.exe") +set(CMAKE_CXX_COMPILER_AR "") +set(CMAKE_RANLIB ":") +set(CMAKE_CXX_COMPILER_RANLIB "") +set(CMAKE_LINKER "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.42.34433/bin/Hostx64/x64/link.exe") +set(CMAKE_LINKER_LINK "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.42.34433/bin/Hostx64/x64/link.exe") +set(CMAKE_LINKER_LLD "lld-link") +set(CMAKE_CXX_COMPILER_LINKER "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.42.34433/bin/HostX64/x64/link.exe") +set(CMAKE_CXX_COMPILER_LINKER_ID "MSVC") +set(CMAKE_CXX_COMPILER_LINKER_VERSION 14.42.34436.0) +set(CMAKE_CXX_COMPILER_LINKER_FRONTEND_VARIANT MSVC) +set(CMAKE_MT "CMAKE_MT-NOTFOUND") +set(CMAKE_TAPI "") +set(CMAKE_COMPILER_IS_GNUCXX ) +set(CMAKE_CXX_COMPILER_LOADED 1) +set(CMAKE_CXX_COMPILER_WORKS TRUE) +set(CMAKE_CXX_ABI_COMPILED TRUE) + +set(CMAKE_CXX_COMPILER_ENV_VAR "CXX") + +set(CMAKE_CXX_COMPILER_ID_RUN 1) +set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;mpp;CPP;ixx;cppm;ccm;cxxm;c++m) +set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC) + +foreach (lang IN ITEMS C OBJC OBJCXX) + if (CMAKE_${lang}_COMPILER_ID_RUN) + foreach(extension IN LISTS CMAKE_${lang}_SOURCE_FILE_EXTENSIONS) + list(REMOVE_ITEM CMAKE_CXX_SOURCE_FILE_EXTENSIONS ${extension}) + endforeach() + endif() +endforeach() + +set(CMAKE_CXX_LINKER_PREFERENCE 30) +set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1) +set(CMAKE_CXX_LINKER_DEPFILE_SUPPORTED ) + +# Save compiler ABI information. +set(CMAKE_CXX_SIZEOF_DATA_PTR "8") +set(CMAKE_CXX_COMPILER_ABI "") +set(CMAKE_CXX_BYTE_ORDER "LITTLE_ENDIAN") +set(CMAKE_CXX_LIBRARY_ARCHITECTURE "") + +if(CMAKE_CXX_SIZEOF_DATA_PTR) + set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}") +endif() + +if(CMAKE_CXX_COMPILER_ABI) + set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}") +endif() + +if(CMAKE_CXX_LIBRARY_ARCHITECTURE) + set(CMAKE_LIBRARY_ARCHITECTURE "") +endif() + +set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "") +if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX) + set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}") +endif() + + + + + +set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "") +set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "") +set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "") +set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") +set(CMAKE_CXX_COMPILER_CLANG_RESOURCE_DIR "") + +set(CMAKE_CXX_COMPILER_IMPORT_STD "") +### Imported target for C++23 standard library +set(CMAKE_CXX23_COMPILER_IMPORT_STD_NOT_FOUND_MESSAGE "Unsupported generator: Visual Studio 17 2022") + + + diff --git a/a2llib-main/bin/CMakeFiles/3.31.4/CMakeDetermineCompilerABI_CXX.bin b/a2llib-main/bin/CMakeFiles/3.31.4/CMakeDetermineCompilerABI_CXX.bin new file mode 100644 index 0000000..f5f5163 Binary files /dev/null and b/a2llib-main/bin/CMakeFiles/3.31.4/CMakeDetermineCompilerABI_CXX.bin differ diff --git a/a2llib-main/bin/CMakeFiles/3.31.4/CMakeRCCompiler.cmake b/a2llib-main/bin/CMakeFiles/3.31.4/CMakeRCCompiler.cmake new file mode 100644 index 0000000..0f61961 --- /dev/null +++ b/a2llib-main/bin/CMakeFiles/3.31.4/CMakeRCCompiler.cmake @@ -0,0 +1,6 @@ +set(CMAKE_RC_COMPILER "rc") +set(CMAKE_RC_COMPILER_ARG1 "") +set(CMAKE_RC_COMPILER_LOADED 1) +set(CMAKE_RC_SOURCE_FILE_EXTENSIONS rc;RC) +set(CMAKE_RC_OUTPUT_EXTENSION .res) +set(CMAKE_RC_COMPILER_ENV_VAR "RC") diff --git a/a2llib-main/bin/CMakeFiles/3.31.4/CMakeSystem.cmake b/a2llib-main/bin/CMakeFiles/3.31.4/CMakeSystem.cmake new file mode 100644 index 0000000..909db20 --- /dev/null +++ b/a2llib-main/bin/CMakeFiles/3.31.4/CMakeSystem.cmake @@ -0,0 +1,15 @@ +set(CMAKE_HOST_SYSTEM "Windows-10.0.19045") +set(CMAKE_HOST_SYSTEM_NAME "Windows") +set(CMAKE_HOST_SYSTEM_VERSION "10.0.19045") +set(CMAKE_HOST_SYSTEM_PROCESSOR "AMD64") + + + +set(CMAKE_SYSTEM "Windows-10.0.19045") +set(CMAKE_SYSTEM_NAME "Windows") +set(CMAKE_SYSTEM_VERSION "10.0.19045") +set(CMAKE_SYSTEM_PROCESSOR "AMD64") + +set(CMAKE_CROSSCOMPILING "FALSE") + +set(CMAKE_SYSTEM_LOADED 1) diff --git a/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/CMakeCXXCompilerId.cpp b/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/CMakeCXXCompilerId.cpp new file mode 100644 index 0000000..da6c824 --- /dev/null +++ b/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/CMakeCXXCompilerId.cpp @@ -0,0 +1,919 @@ +/* This source file must have a .cpp extension so that all C++ compilers + recognize the extension without flags. Borland does not know .cxx for + example. */ +#ifndef __cplusplus +# error "A C compiler has been selected for C++." +#endif + +#if !defined(__has_include) +/* If the compiler does not have __has_include, pretend the answer is + always no. */ +# define __has_include(x) 0 +#endif + + +/* Version number components: V=Version, R=Revision, P=Patch + Version date components: YYYY=Year, MM=Month, DD=Day */ + +#if defined(__INTEL_COMPILER) || defined(__ICC) +# define COMPILER_ID "Intel" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# if defined(__GNUC__) +# define SIMULATE_ID "GNU" +# endif + /* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later, + except that a few beta releases use the old format with V=2021. */ +# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111 +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) +# if defined(__INTEL_COMPILER_UPDATE) +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) +# else +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) +# endif +# else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE) + /* The third version component from --version is an update index, + but no macro is provided for it. */ +# define COMPILER_VERSION_PATCH DEC(0) +# endif +# if defined(__INTEL_COMPILER_BUILD_DATE) + /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ +# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) +# endif +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +# elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +# endif +# if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER) +# define COMPILER_ID "IntelLLVM" +#if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +#endif +#if defined(__GNUC__) +# define SIMULATE_ID "GNU" +#endif +/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and + * later. Look for 6 digit vs. 8 digit version number to decide encoding. + * VVVV is no smaller than the current year when a version is released. + */ +#if __INTEL_LLVM_COMPILER < 1000000L +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10) +#else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100) +#endif +#if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +#endif +#if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +#elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +#endif +#if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +#endif +#if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +#endif + +#elif defined(__PATHCC__) +# define COMPILER_ID "PathScale" +# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) +# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) +# if defined(__PATHCC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) +# endif + +#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) +# define COMPILER_ID "Embarcadero" +# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) +# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) +# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) + +#elif defined(__BORLANDC__) +# define COMPILER_ID "Borland" + /* __BORLANDC__ = 0xVRR */ +# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) +# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) + +#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 +# define COMPILER_ID "Watcom" + /* __WATCOMC__ = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__WATCOMC__) +# define COMPILER_ID "OpenWatcom" + /* __WATCOMC__ = VVRP + 1100 */ +# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__SUNPRO_CC) +# define COMPILER_ID "SunPro" +# if __SUNPRO_CC >= 0x5100 + /* __SUNPRO_CC = 0xVRRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) +# else + /* __SUNPRO_CC = 0xVRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) +# endif + +#elif defined(__HP_aCC) +# define COMPILER_ID "HP" + /* __HP_aCC = VVRRPP */ +# define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000) +# define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100) + +#elif defined(__DECCXX) +# define COMPILER_ID "Compaq" + /* __DECCXX_VER = VVRRTPPPP */ +# define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000) +# define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000 % 100) +# define COMPILER_VERSION_PATCH DEC(__DECCXX_VER % 10000) + +#elif defined(__IBMCPP__) && defined(__COMPILER_VER__) +# define COMPILER_ID "zOS" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__open_xl__) && defined(__clang__) +# define COMPILER_ID "IBMClang" +# define COMPILER_VERSION_MAJOR DEC(__open_xl_version__) +# define COMPILER_VERSION_MINOR DEC(__open_xl_release__) +# define COMPILER_VERSION_PATCH DEC(__open_xl_modification__) +# define COMPILER_VERSION_TWEAK DEC(__open_xl_ptf_fix_level__) + + +#elif defined(__ibmxl__) && defined(__clang__) +# define COMPILER_ID "XLClang" +# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) +# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) +# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) +# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) + + +#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800 +# define COMPILER_ID "XL" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800 +# define COMPILER_ID "VisualAge" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__NVCOMPILER) +# define COMPILER_ID "NVHPC" +# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__) +# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__) +# if defined(__NVCOMPILER_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__) +# endif + +#elif defined(__PGI) +# define COMPILER_ID "PGI" +# define COMPILER_VERSION_MAJOR DEC(__PGIC__) +# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) +# if defined(__PGIC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) +# endif + +#elif defined(__clang__) && defined(__cray__) +# define COMPILER_ID "CrayClang" +# define COMPILER_VERSION_MAJOR DEC(__cray_major__) +# define COMPILER_VERSION_MINOR DEC(__cray_minor__) +# define COMPILER_VERSION_PATCH DEC(__cray_patchlevel__) +# define COMPILER_VERSION_INTERNAL_STR __clang_version__ + + +#elif defined(_CRAYC) +# define COMPILER_ID "Cray" +# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) +# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) + +#elif defined(__TI_COMPILER_VERSION__) +# define COMPILER_ID "TI" + /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ +# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) +# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) +# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) + +#elif defined(__CLANG_FUJITSU) +# define COMPILER_ID "FujitsuClang" +# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) +# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) +# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) +# define COMPILER_VERSION_INTERNAL_STR __clang_version__ + + +#elif defined(__FUJITSU) +# define COMPILER_ID "Fujitsu" +# if defined(__FCC_version__) +# define COMPILER_VERSION __FCC_version__ +# elif defined(__FCC_major__) +# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) +# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) +# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) +# endif +# if defined(__fcc_version) +# define COMPILER_VERSION_INTERNAL DEC(__fcc_version) +# elif defined(__FCC_VERSION) +# define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION) +# endif + + +#elif defined(__ghs__) +# define COMPILER_ID "GHS" +/* __GHS_VERSION_NUMBER = VVVVRP */ +# ifdef __GHS_VERSION_NUMBER +# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100) +# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10) +# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10) +# endif + +#elif defined(__TASKING__) +# define COMPILER_ID "Tasking" + # define COMPILER_VERSION_MAJOR DEC(__VERSION__/1000) + # define COMPILER_VERSION_MINOR DEC(__VERSION__ % 100) +# define COMPILER_VERSION_INTERNAL DEC(__VERSION__) + +#elif defined(__ORANGEC__) +# define COMPILER_ID "OrangeC" +# define COMPILER_VERSION_MAJOR DEC(__ORANGEC_MAJOR__) +# define COMPILER_VERSION_MINOR DEC(__ORANGEC_MINOR__) +# define COMPILER_VERSION_PATCH DEC(__ORANGEC_PATCHLEVEL__) + +#elif defined(__SCO_VERSION__) +# define COMPILER_ID "SCO" + +#elif defined(__ARMCC_VERSION) && !defined(__clang__) +# define COMPILER_ID "ARMCC" +#if __ARMCC_VERSION >= 1000000 + /* __ARMCC_VERSION = VRRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#else + /* __ARMCC_VERSION = VRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#endif + + +#elif defined(__clang__) && defined(__apple_build_version__) +# define COMPILER_ID "AppleClang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) + +#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION) +# define COMPILER_ID "ARMClang" + # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION/100 % 100) +# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION) + +#elif defined(__clang__) && defined(__ti__) +# define COMPILER_ID "TIClang" + # define COMPILER_VERSION_MAJOR DEC(__ti_major__) + # define COMPILER_VERSION_MINOR DEC(__ti_minor__) + # define COMPILER_VERSION_PATCH DEC(__ti_patchlevel__) +# define COMPILER_VERSION_INTERNAL DEC(__ti_version__) + +#elif defined(__clang__) +# define COMPILER_ID "Clang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__LCC__) && (defined(__GNUC__) || defined(__GNUG__) || defined(__MCST__)) +# define COMPILER_ID "LCC" +# define COMPILER_VERSION_MAJOR DEC(__LCC__ / 100) +# define COMPILER_VERSION_MINOR DEC(__LCC__ % 100) +# if defined(__LCC_MINOR__) +# define COMPILER_VERSION_PATCH DEC(__LCC_MINOR__) +# endif +# if defined(__GNUC__) && defined(__GNUC_MINOR__) +# define SIMULATE_ID "GNU" +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +# if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif +# endif + +#elif defined(__GNUC__) || defined(__GNUG__) +# define COMPILER_ID "GNU" +# if defined(__GNUC__) +# define COMPILER_VERSION_MAJOR DEC(__GNUC__) +# else +# define COMPILER_VERSION_MAJOR DEC(__GNUG__) +# endif +# if defined(__GNUC_MINOR__) +# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif defined(_MSC_VER) +# define COMPILER_ID "MSVC" + /* _MSC_VER = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) +# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) +# if defined(_MSC_FULL_VER) +# if _MSC_VER >= 1400 + /* _MSC_FULL_VER = VVRRPPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) +# else + /* _MSC_FULL_VER = VVRRPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) +# endif +# endif +# if defined(_MSC_BUILD) +# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) +# endif + +#elif defined(_ADI_COMPILER) +# define COMPILER_ID "ADSP" +#if defined(__VERSIONNUM__) + /* __VERSIONNUM__ = 0xVVRRPPTT */ +# define COMPILER_VERSION_MAJOR DEC(__VERSIONNUM__ >> 24 & 0xFF) +# define COMPILER_VERSION_MINOR DEC(__VERSIONNUM__ >> 16 & 0xFF) +# define COMPILER_VERSION_PATCH DEC(__VERSIONNUM__ >> 8 & 0xFF) +# define COMPILER_VERSION_TWEAK DEC(__VERSIONNUM__ & 0xFF) +#endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# define COMPILER_ID "IAR" +# if defined(__VER__) && defined(__ICCARM__) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000) +# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000) +# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__)) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100) +# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100)) +# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# endif + + +/* These compilers are either not known or too old to define an + identification macro. Try to identify the platform and guess that + it is the native compiler. */ +#elif defined(__hpux) || defined(__hpua) +# define COMPILER_ID "HP" + +#else /* unknown compiler */ +# define COMPILER_ID "" +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; +#ifdef SIMULATE_ID +char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; +#endif + +#ifdef __QNXNTO__ +char const* qnxnto = "INFO" ":" "qnxnto[]"; +#endif + +#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) +char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; +#endif + +#define STRINGIFY_HELPER(X) #X +#define STRINGIFY(X) STRINGIFY_HELPER(X) + +/* Identify known platforms by name. */ +#if defined(__linux) || defined(__linux__) || defined(linux) +# define PLATFORM_ID "Linux" + +#elif defined(__MSYS__) +# define PLATFORM_ID "MSYS" + +#elif defined(__CYGWIN__) +# define PLATFORM_ID "Cygwin" + +#elif defined(__MINGW32__) +# define PLATFORM_ID "MinGW" + +#elif defined(__APPLE__) +# define PLATFORM_ID "Darwin" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +# define PLATFORM_ID "Windows" + +#elif defined(__FreeBSD__) || defined(__FreeBSD) +# define PLATFORM_ID "FreeBSD" + +#elif defined(__NetBSD__) || defined(__NetBSD) +# define PLATFORM_ID "NetBSD" + +#elif defined(__OpenBSD__) || defined(__OPENBSD) +# define PLATFORM_ID "OpenBSD" + +#elif defined(__sun) || defined(sun) +# define PLATFORM_ID "SunOS" + +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) +# define PLATFORM_ID "AIX" + +#elif defined(__hpux) || defined(__hpux__) +# define PLATFORM_ID "HP-UX" + +#elif defined(__HAIKU__) +# define PLATFORM_ID "Haiku" + +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) +# define PLATFORM_ID "BeOS" + +#elif defined(__QNX__) || defined(__QNXNTO__) +# define PLATFORM_ID "QNX" + +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) +# define PLATFORM_ID "Tru64" + +#elif defined(__riscos) || defined(__riscos__) +# define PLATFORM_ID "RISCos" + +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) +# define PLATFORM_ID "SINIX" + +#elif defined(__UNIX_SV__) +# define PLATFORM_ID "UNIX_SV" + +#elif defined(__bsdos__) +# define PLATFORM_ID "BSDOS" + +#elif defined(_MPRAS) || defined(MPRAS) +# define PLATFORM_ID "MP-RAS" + +#elif defined(__osf) || defined(__osf__) +# define PLATFORM_ID "OSF1" + +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) +# define PLATFORM_ID "SCO_SV" + +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) +# define PLATFORM_ID "ULTRIX" + +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) +# define PLATFORM_ID "Xenix" + +#elif defined(__WATCOMC__) +# if defined(__LINUX__) +# define PLATFORM_ID "Linux" + +# elif defined(__DOS__) +# define PLATFORM_ID "DOS" + +# elif defined(__OS2__) +# define PLATFORM_ID "OS2" + +# elif defined(__WINDOWS__) +# define PLATFORM_ID "Windows3x" + +# elif defined(__VXWORKS__) +# define PLATFORM_ID "VxWorks" + +# else /* unknown platform */ +# define PLATFORM_ID +# endif + +#elif defined(__INTEGRITY) +# if defined(INT_178B) +# define PLATFORM_ID "Integrity178" + +# else /* regular Integrity */ +# define PLATFORM_ID "Integrity" +# endif + +# elif defined(_ADI_COMPILER) +# define PLATFORM_ID "ADSP" + +#else /* unknown platform */ +# define PLATFORM_ID + +#endif + +/* For windows compilers MSVC and Intel we can determine + the architecture of the compiler being used. This is because + the compilers do not have flags that can change the architecture, + but rather depend on which compiler is being used +*/ +#if defined(_WIN32) && defined(_MSC_VER) +# if defined(_M_IA64) +# define ARCHITECTURE_ID "IA64" + +# elif defined(_M_ARM64EC) +# define ARCHITECTURE_ID "ARM64EC" + +# elif defined(_M_X64) || defined(_M_AMD64) +# define ARCHITECTURE_ID "x64" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# elif defined(_M_ARM64) +# define ARCHITECTURE_ID "ARM64" + +# elif defined(_M_ARM) +# if _M_ARM == 4 +# define ARCHITECTURE_ID "ARMV4I" +# elif _M_ARM == 5 +# define ARCHITECTURE_ID "ARMV5I" +# else +# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) +# endif + +# elif defined(_M_MIPS) +# define ARCHITECTURE_ID "MIPS" + +# elif defined(_M_SH) +# define ARCHITECTURE_ID "SHx" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__WATCOMC__) +# if defined(_M_I86) +# define ARCHITECTURE_ID "I86" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# if defined(__ICCARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__ICCRX__) +# define ARCHITECTURE_ID "RX" + +# elif defined(__ICCRH850__) +# define ARCHITECTURE_ID "RH850" + +# elif defined(__ICCRL78__) +# define ARCHITECTURE_ID "RL78" + +# elif defined(__ICCRISCV__) +# define ARCHITECTURE_ID "RISCV" + +# elif defined(__ICCAVR__) +# define ARCHITECTURE_ID "AVR" + +# elif defined(__ICC430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__ICCV850__) +# define ARCHITECTURE_ID "V850" + +# elif defined(__ICC8051__) +# define ARCHITECTURE_ID "8051" + +# elif defined(__ICCSTM8__) +# define ARCHITECTURE_ID "STM8" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__ghs__) +# if defined(__PPC64__) +# define ARCHITECTURE_ID "PPC64" + +# elif defined(__ppc__) +# define ARCHITECTURE_ID "PPC" + +# elif defined(__ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__x86_64__) +# define ARCHITECTURE_ID "x64" + +# elif defined(__i386__) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__clang__) && defined(__ti__) +# if defined(__ARM_ARCH) +# define ARCHITECTURE_ID "Arm" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__TI_COMPILER_VERSION__) +# if defined(__TI_ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__MSP430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__TMS320C28XX__) +# define ARCHITECTURE_ID "TMS320C28x" + +# elif defined(__TMS320C6X__) || defined(_TMS320C6X) +# define ARCHITECTURE_ID "TMS320C6x" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +# elif defined(__ADSPSHARC__) +# define ARCHITECTURE_ID "SHARC" + +# elif defined(__ADSPBLACKFIN__) +# define ARCHITECTURE_ID "Blackfin" + +#elif defined(__TASKING__) + +# if defined(__CTC__) || defined(__CPTC__) +# define ARCHITECTURE_ID "TriCore" + +# elif defined(__CMCS__) +# define ARCHITECTURE_ID "MCS" + +# elif defined(__CARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__CARC__) +# define ARCHITECTURE_ID "ARC" + +# elif defined(__C51__) +# define ARCHITECTURE_ID "8051" + +# elif defined(__CPCP__) +# define ARCHITECTURE_ID "PCP" + +# else +# define ARCHITECTURE_ID "" +# endif + +#else +# define ARCHITECTURE_ID +#endif + +/* Convert integer to decimal digit literals. */ +#define DEC(n) \ + ('0' + (((n) / 10000000)%10)), \ + ('0' + (((n) / 1000000)%10)), \ + ('0' + (((n) / 100000)%10)), \ + ('0' + (((n) / 10000)%10)), \ + ('0' + (((n) / 1000)%10)), \ + ('0' + (((n) / 100)%10)), \ + ('0' + (((n) / 10)%10)), \ + ('0' + ((n) % 10)) + +/* Convert integer to hex digit literals. */ +#define HEX(n) \ + ('0' + ((n)>>28 & 0xF)), \ + ('0' + ((n)>>24 & 0xF)), \ + ('0' + ((n)>>20 & 0xF)), \ + ('0' + ((n)>>16 & 0xF)), \ + ('0' + ((n)>>12 & 0xF)), \ + ('0' + ((n)>>8 & 0xF)), \ + ('0' + ((n)>>4 & 0xF)), \ + ('0' + ((n) & 0xF)) + +/* Construct a string literal encoding the version number. */ +#ifdef COMPILER_VERSION +char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]"; + +/* Construct a string literal encoding the version number components. */ +#elif defined(COMPILER_VERSION_MAJOR) +char const info_version[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', + COMPILER_VERSION_MAJOR, +# ifdef COMPILER_VERSION_MINOR + '.', COMPILER_VERSION_MINOR, +# ifdef COMPILER_VERSION_PATCH + '.', COMPILER_VERSION_PATCH, +# ifdef COMPILER_VERSION_TWEAK + '.', COMPILER_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct a string literal encoding the internal version number. */ +#ifdef COMPILER_VERSION_INTERNAL +char const info_version_internal[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_', + 'i','n','t','e','r','n','a','l','[', + COMPILER_VERSION_INTERNAL,']','\0'}; +#elif defined(COMPILER_VERSION_INTERNAL_STR) +char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]"; +#endif + +/* Construct a string literal encoding the version number components. */ +#ifdef SIMULATE_VERSION_MAJOR +char const info_simulate_version[] = { + 'I', 'N', 'F', 'O', ':', + 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', + SIMULATE_VERSION_MAJOR, +# ifdef SIMULATE_VERSION_MINOR + '.', SIMULATE_VERSION_MINOR, +# ifdef SIMULATE_VERSION_PATCH + '.', SIMULATE_VERSION_PATCH, +# ifdef SIMULATE_VERSION_TWEAK + '.', SIMULATE_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; +char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; + + + +#define CXX_STD_98 199711L +#define CXX_STD_11 201103L +#define CXX_STD_14 201402L +#define CXX_STD_17 201703L +#define CXX_STD_20 202002L +#define CXX_STD_23 202302L + +#if defined(__INTEL_COMPILER) && defined(_MSVC_LANG) +# if _MSVC_LANG > CXX_STD_17 +# define CXX_STD _MSVC_LANG +# elif _MSVC_LANG == CXX_STD_17 && defined(__cpp_aggregate_paren_init) +# define CXX_STD CXX_STD_20 +# elif _MSVC_LANG > CXX_STD_14 && __cplusplus > CXX_STD_17 +# define CXX_STD CXX_STD_20 +# elif _MSVC_LANG > CXX_STD_14 +# define CXX_STD CXX_STD_17 +# elif defined(__INTEL_CXX11_MODE__) && defined(__cpp_aggregate_nsdmi) +# define CXX_STD CXX_STD_14 +# elif defined(__INTEL_CXX11_MODE__) +# define CXX_STD CXX_STD_11 +# else +# define CXX_STD CXX_STD_98 +# endif +#elif defined(_MSC_VER) && defined(_MSVC_LANG) +# if _MSVC_LANG > __cplusplus +# define CXX_STD _MSVC_LANG +# else +# define CXX_STD __cplusplus +# endif +#elif defined(__NVCOMPILER) +# if __cplusplus == CXX_STD_17 && defined(__cpp_aggregate_paren_init) +# define CXX_STD CXX_STD_20 +# else +# define CXX_STD __cplusplus +# endif +#elif defined(__INTEL_COMPILER) || defined(__PGI) +# if __cplusplus == CXX_STD_11 && defined(__cpp_namespace_attributes) +# define CXX_STD CXX_STD_17 +# elif __cplusplus == CXX_STD_11 && defined(__cpp_aggregate_nsdmi) +# define CXX_STD CXX_STD_14 +# else +# define CXX_STD __cplusplus +# endif +#elif (defined(__IBMCPP__) || defined(__ibmxl__)) && defined(__linux__) +# if __cplusplus == CXX_STD_11 && defined(__cpp_aggregate_nsdmi) +# define CXX_STD CXX_STD_14 +# else +# define CXX_STD __cplusplus +# endif +#elif __cplusplus == 1 && defined(__GXX_EXPERIMENTAL_CXX0X__) +# define CXX_STD CXX_STD_11 +#else +# define CXX_STD __cplusplus +#endif + +const char* info_language_standard_default = "INFO" ":" "standard_default[" +#if CXX_STD > CXX_STD_23 + "26" +#elif CXX_STD > CXX_STD_20 + "23" +#elif CXX_STD > CXX_STD_17 + "20" +#elif CXX_STD > CXX_STD_14 + "17" +#elif CXX_STD > CXX_STD_11 + "14" +#elif CXX_STD >= CXX_STD_11 + "11" +#else + "98" +#endif +"]"; + +const char* info_language_extensions_default = "INFO" ":" "extensions_default[" +#if (defined(__clang__) || defined(__GNUC__) || defined(__xlC__) || \ + defined(__TI_COMPILER_VERSION__)) && \ + !defined(__STRICT_ANSI__) + "ON" +#else + "OFF" +#endif +"]"; + +/*--------------------------------------------------------------------------*/ + +int main(int argc, char* argv[]) +{ + int require = 0; + require += info_compiler[argc]; + require += info_platform[argc]; + require += info_arch[argc]; +#ifdef COMPILER_VERSION_MAJOR + require += info_version[argc]; +#endif +#ifdef COMPILER_VERSION_INTERNAL + require += info_version_internal[argc]; +#endif +#ifdef SIMULATE_ID + require += info_simulate[argc]; +#endif +#ifdef SIMULATE_VERSION_MAJOR + require += info_simulate_version[argc]; +#endif +#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) + require += info_cray[argc]; +#endif + require += info_language_standard_default[argc]; + require += info_language_extensions_default[argc]; + (void)argv; + return require; +} diff --git a/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/CompilerIdCXX.exe b/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/CompilerIdCXX.exe new file mode 100644 index 0000000..b9fb681 Binary files /dev/null and b/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/CompilerIdCXX.exe differ diff --git a/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/CompilerIdCXX.vcxproj b/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/CompilerIdCXX.vcxproj new file mode 100644 index 0000000..f180454 --- /dev/null +++ b/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/CompilerIdCXX.vcxproj @@ -0,0 +1,72 @@ + + + + + Debug + x64 + + + + {CAE07175-D007-4FC3-BFE8-47B392814159} + CompilerIdCXX + Win32Proj + + + 10.0.22621.0 + + + + + + + + + x64 + + + Application + v143 + + MultiByte + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\ + $(Configuration)\ + false + + + + Disabled + %(PreprocessorDefinitions) + false + EnableFastChecks + MultiThreadedDebugDLL + + + TurnOffAllWarnings + + + + + + false + Console + + + + for %%i in (cl.exe) do %40echo CMAKE_CXX_COMPILER=%%~$PATH:i + + + + + + + + + + diff --git a/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/Debug/CMakeCXXCompilerId.obj b/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/Debug/CMakeCXXCompilerId.obj new file mode 100644 index 0000000..cf8a0c8 Binary files /dev/null and b/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/Debug/CMakeCXXCompilerId.obj differ diff --git a/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/Debug/CompilerIdCXX.exe.recipe b/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/Debug/CompilerIdCXX.exe.recipe new file mode 100644 index 0000000..3b0ac9a --- /dev/null +++ b/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/Debug/CompilerIdCXX.exe.recipe @@ -0,0 +1,11 @@ + + + + + C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CompilerIdCXX\CompilerIdCXX.exe + + + + + + \ No newline at end of file diff --git a/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/Debug/CompilerIdCXX.tlog/CL.command.1.tlog b/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/Debug/CompilerIdCXX.tlog/CL.command.1.tlog new file mode 100644 index 0000000..2389a78 Binary files /dev/null and b/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/Debug/CompilerIdCXX.tlog/CL.command.1.tlog differ diff --git a/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/Debug/CompilerIdCXX.tlog/CL.read.1.tlog b/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/Debug/CompilerIdCXX.tlog/CL.read.1.tlog new file mode 100644 index 0000000..9885e1a Binary files /dev/null and b/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/Debug/CompilerIdCXX.tlog/CL.read.1.tlog differ diff --git a/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/Debug/CompilerIdCXX.tlog/CL.write.1.tlog b/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/Debug/CompilerIdCXX.tlog/CL.write.1.tlog new file mode 100644 index 0000000..77245b2 Binary files /dev/null and b/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/Debug/CompilerIdCXX.tlog/CL.write.1.tlog differ diff --git a/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/Debug/CompilerIdCXX.tlog/Cl.items.tlog b/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/Debug/CompilerIdCXX.tlog/Cl.items.tlog new file mode 100644 index 0000000..1082dbb --- /dev/null +++ b/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/Debug/CompilerIdCXX.tlog/Cl.items.tlog @@ -0,0 +1 @@ +C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CompilerIdCXX\CMakeCXXCompilerId.cpp;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CompilerIdCXX\Debug\CMakeCXXCompilerId.obj diff --git a/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/Debug/CompilerIdCXX.tlog/CompilerIdCXX.lastbuildstate b/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/Debug/CompilerIdCXX.tlog/CompilerIdCXX.lastbuildstate new file mode 100644 index 0000000..cf298df --- /dev/null +++ b/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/Debug/CompilerIdCXX.tlog/CompilerIdCXX.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.42.34433:TargetPlatformVersion=10.0.22621.0: +Debug|x64|C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CompilerIdCXX\| diff --git a/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/Debug/CompilerIdCXX.tlog/link.command.1.tlog b/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/Debug/CompilerIdCXX.tlog/link.command.1.tlog new file mode 100644 index 0000000..7f820e9 Binary files /dev/null and b/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/Debug/CompilerIdCXX.tlog/link.command.1.tlog differ diff --git a/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/Debug/CompilerIdCXX.tlog/link.read.1.tlog b/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/Debug/CompilerIdCXX.tlog/link.read.1.tlog new file mode 100644 index 0000000..fbbd22e Binary files /dev/null and b/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/Debug/CompilerIdCXX.tlog/link.read.1.tlog differ diff --git a/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/Debug/CompilerIdCXX.tlog/link.secondary.1.tlog b/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/Debug/CompilerIdCXX.tlog/link.secondary.1.tlog new file mode 100644 index 0000000..0c986ef --- /dev/null +++ b/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/Debug/CompilerIdCXX.tlog/link.secondary.1.tlog @@ -0,0 +1 @@ +^C:\GIT_WORK\A2L\A2LLIB-MAIN\A2LLIB-MAIN\BIN\CMAKEFILES\3.31.4\COMPILERIDCXX\DEBUG\CMAKECXXCOMPILERID.OBJ diff --git a/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/Debug/CompilerIdCXX.tlog/link.write.1.tlog b/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/Debug/CompilerIdCXX.tlog/link.write.1.tlog new file mode 100644 index 0000000..bbaf07e Binary files /dev/null and b/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/Debug/CompilerIdCXX.tlog/link.write.1.tlog differ diff --git a/a2llib-main/bin/CMakeFiles/3.31.4/VCTargetsPath.txt b/a2llib-main/bin/CMakeFiles/3.31.4/VCTargetsPath.txt new file mode 100644 index 0000000..513c277 --- /dev/null +++ b/a2llib-main/bin/CMakeFiles/3.31.4/VCTargetsPath.txt @@ -0,0 +1 @@ +C:/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Microsoft/VC/v170 diff --git a/a2llib-main/bin/CMakeFiles/3.31.4/VCTargetsPath.vcxproj b/a2llib-main/bin/CMakeFiles/3.31.4/VCTargetsPath.vcxproj new file mode 100644 index 0000000..ccb7d62 --- /dev/null +++ b/a2llib-main/bin/CMakeFiles/3.31.4/VCTargetsPath.vcxproj @@ -0,0 +1,31 @@ + + + + + Debug + x64 + + + + {F3FC6D86-508D-3FB1-96D2-995F08B142EC} + Win32Proj + x64 + 10.0.22621.0 + + + + x64 + + + Utility + MultiByte + v143 + + + + + echo VCTargetsPath=$(VCTargetsPath) + + + + diff --git a/a2llib-main/bin/CMakeFiles/3.31.4/VCTargetsPath/x64/Debug/VCTargetsPath.recipe b/a2llib-main/bin/CMakeFiles/3.31.4/VCTargetsPath/x64/Debug/VCTargetsPath.recipe new file mode 100644 index 0000000..d47c705 --- /dev/null +++ b/a2llib-main/bin/CMakeFiles/3.31.4/VCTargetsPath/x64/Debug/VCTargetsPath.recipe @@ -0,0 +1,11 @@ + + + + + C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\x64\Debug\VCTargetsPath + + + + + + \ No newline at end of file diff --git a/a2llib-main/bin/CMakeFiles/3.31.4/VCTargetsPath/x64/Debug/VCTargetsPath.tlog/VCTargetsPath.lastbuildstate b/a2llib-main/bin/CMakeFiles/3.31.4/VCTargetsPath/x64/Debug/VCTargetsPath.tlog/VCTargetsPath.lastbuildstate new file mode 100644 index 0000000..0c7ad17 --- /dev/null +++ b/a2llib-main/bin/CMakeFiles/3.31.4/VCTargetsPath/x64/Debug/VCTargetsPath.tlog/VCTargetsPath.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.42.34433:TargetPlatformVersion=10.0.22621.0: +Debug|x64|C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\| diff --git a/a2llib-main/bin/CMakeFiles/4936bca6c862aa6e0536b270f2c7e0c9/INSTALL_force.rule b/a2llib-main/bin/CMakeFiles/4936bca6c862aa6e0536b270f2c7e0c9/INSTALL_force.rule new file mode 100644 index 0000000..2d3998c --- /dev/null +++ b/a2llib-main/bin/CMakeFiles/4936bca6c862aa6e0536b270f2c7e0c9/INSTALL_force.rule @@ -0,0 +1 @@ +# generated from CMake diff --git a/a2llib-main/bin/CMakeFiles/4936bca6c862aa6e0536b270f2c7e0c9/generate.stamp.rule b/a2llib-main/bin/CMakeFiles/4936bca6c862aa6e0536b270f2c7e0c9/generate.stamp.rule new file mode 100644 index 0000000..2d3998c --- /dev/null +++ b/a2llib-main/bin/CMakeFiles/4936bca6c862aa6e0536b270f2c7e0c9/generate.stamp.rule @@ -0,0 +1 @@ +# generated from CMake diff --git a/a2llib-main/bin/CMakeFiles/CMakeConfigureLog.yaml b/a2llib-main/bin/CMakeFiles/CMakeConfigureLog.yaml new file mode 100644 index 0000000..3f20c41 --- /dev/null +++ b/a2llib-main/bin/CMakeFiles/CMakeConfigureLog.yaml @@ -0,0 +1,150 @@ + +--- +events: + - + kind: "message-v1" + backtrace: + - "C:/Program Files/CMake/share/cmake-3.31/Modules/CMakeDetermineSystem.cmake:205 (message)" + - "CMakeLists.txt:22 (project)" + message: | + The system is: Windows - 10.0.19045 - AMD64 + - + kind: "message-v1" + backtrace: + - "C:/Program Files/CMake/share/cmake-3.31/Modules/CMakeDetermineCompilerId.cmake:17 (message)" + - "C:/Program Files/CMake/share/cmake-3.31/Modules/CMakeDetermineCompilerId.cmake:64 (__determine_compiler_id_test)" + - "C:/Program Files/CMake/share/cmake-3.31/Modules/CMakeDetermineCXXCompiler.cmake:126 (CMAKE_DETERMINE_COMPILER_ID)" + - "CMakeLists.txt:22 (project)" + message: | + Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded. + Compiler: + Build flags: + Id flags: + + The output was: + 0 + MSBuild version 17.12.12+1cce77968 for .NET Framework + Build started 2025-01-21 오후 4:24:59. + + Project "C:\\git_work\\a2l\\a2llib-main\\a2llib-main\\bin\\CMakeFiles\\3.31.4\\CompilerIdCXX\\CompilerIdCXX.vcxproj" on node 1 (default targets). + PrepareForBuild: + Creating directory "Debug\\". + Structured output is enabled. The formatting of compiler diagnostics will reflect the error hierarchy. See https://aka.ms/cpp/structured-output for more details. + Creating directory "Debug\\CompilerIdCXX.tlog\\". + InitializeBuildStatus: + Creating "Debug\\CompilerIdCXX.tlog\\unsuccessfulbuild" because "AlwaysCreate" was specified. + Touching "Debug\\CompilerIdCXX.tlog\\unsuccessfulbuild". + ClCompile: + C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.42.34433\\bin\\HostX64\\x64\\CL.exe /c /nologo /W0 /WX- /diagnostics:column /Od /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\\\" /Fd"Debug\\vc143.pdb" /external:W0 /Gd /TP /FC /errorReport:queue CMakeCXXCompilerId.cpp + CMakeCXXCompilerId.cpp + Link: + C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.42.34433\\bin\\HostX64\\x64\\link.exe /ERRORREPORT:QUEUE /OUT:".\\CompilerIdCXX.exe" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\\CompilerIdCXX.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\\CompilerIdCXX.lib" /MACHINE:X64 Debug\\CMakeCXXCompilerId.obj + CompilerIdCXX.vcxproj -> C:\\git_work\\a2l\\a2llib-main\\a2llib-main\\bin\\CMakeFiles\\3.31.4\\CompilerIdCXX\\CompilerIdCXX.exe + PostBuildEvent: + for %%i in (cl.exe) do @echo CMAKE_CXX_COMPILER=%%~$PATH:i + :VCEnd + CMAKE_CXX_COMPILER=C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.42.34433\\bin\\Hostx64\\x64\\cl.exe + FinalizeBuildStatus: + Deleting file "Debug\\CompilerIdCXX.tlog\\unsuccessfulbuild". + Touching "Debug\\CompilerIdCXX.tlog\\CompilerIdCXX.lastbuildstate". + Done Building Project "C:\\git_work\\a2l\\a2llib-main\\a2llib-main\\bin\\CMakeFiles\\3.31.4\\CompilerIdCXX\\CompilerIdCXX.vcxproj" (default targets). + + Build succeeded. + 0 Warning(s) + 0 Error(s) + + Time Elapsed 00:00:01.65 + + + Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CompilerIdCXX.exe" + + Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CompilerIdCXX.vcxproj" + + The CXX compiler identification is MSVC, found in: + C:/git_work/a2l/a2llib-main/a2llib-main/bin/CMakeFiles/3.31.4/CompilerIdCXX/CompilerIdCXX.exe + + - + kind: "try_compile-v1" + backtrace: + - "C:/Program Files/CMake/share/cmake-3.31/Modules/CMakeDetermineCompilerABI.cmake:74 (try_compile)" + - "C:/Program Files/CMake/share/cmake-3.31/Modules/CMakeTestCXXCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)" + - "CMakeLists.txt:22 (project)" + checks: + - "Detecting CXX compiler ABI info" + directories: + source: "C:/git_work/a2l/a2llib-main/a2llib-main/bin/CMakeFiles/CMakeScratch/TryCompile-ic768p" + binary: "C:/git_work/a2l/a2llib-main/a2llib-main/bin/CMakeFiles/CMakeScratch/TryCompile-ic768p" + cmakeVariables: + CMAKE_CXX_FLAGS: "/DWIN32 /D_WINDOWS /EHsc" + CMAKE_CXX_FLAGS_DEBUG: "/Zi /Ob0 /Od /RTC1" + CMAKE_CXX_SCAN_FOR_MODULES: "OFF" + CMAKE_EXE_LINKER_FLAGS: "/machine:x64" + buildResult: + variable: "CMAKE_CXX_ABI_COMPILED" + cached: true + stdout: | + Change Dir: 'C:/git_work/a2l/a2llib-main/a2llib-main/bin/CMakeFiles/CMakeScratch/TryCompile-ic768p' + + Run Build Command(s): "C:/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/Bin/amd64/MSBuild.exe" cmTC_591a9.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=17.0 /v:n + MSBuild version 17.12.12+1cce77968 for .NET Framework + Build started 2025-01-21 오후 4:25:01. + + Project "C:\\git_work\\a2l\\a2llib-main\\a2llib-main\\bin\\CMakeFiles\\CMakeScratch\\TryCompile-ic768p\\cmTC_591a9.vcxproj" on node 1 (default targets). + PrepareForBuild: + Creating directory "cmTC_591a9.dir\\Debug\\". + Structured output is enabled. The formatting of compiler diagnostics will reflect the error hierarchy. See https://aka.ms/cpp/structured-output for more details. + Creating directory "C:\\git_work\\a2l\\a2llib-main\\a2llib-main\\bin\\CMakeFiles\\CMakeScratch\\TryCompile-ic768p\\Debug\\". + Creating directory "cmTC_591a9.dir\\Debug\\cmTC_591a9.tlog\\". + InitializeBuildStatus: + Creating "cmTC_591a9.dir\\Debug\\cmTC_591a9.tlog\\unsuccessfulbuild" because "AlwaysCreate" was specified. + Touching "cmTC_591a9.dir\\Debug\\cmTC_591a9.tlog\\unsuccessfulbuild". + ClCompile: + C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.42.34433\\bin\\HostX64\\x64\\CL.exe /c /Zi /W1 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\\"Debug\\"" /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_591a9.dir\\Debug\\\\" /Fd"cmTC_591a9.dir\\Debug\\vc143.pdb" /external:W1 /Gd /TP /errorReport:queue "C:\\Program Files\\CMake\\share\\cmake-3.31\\Modules\\CMakeCXXCompilerABI.cpp" + Microsoft (R) C/C++ 최적화 컴파일러 버전 19.42.34436(x64) + Copyright (c) Microsoft Corporation. All rights reserved. + cl /c /Zi /W1 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\\"Debug\\"" /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_591a9.dir\\Debug\\\\" /Fd"cmTC_591a9.dir\\Debug\\vc143.pdb" /external:W1 /Gd /TP /errorReport:queue "C:\\Program Files\\CMake\\share\\cmake-3.31\\Modules\\CMakeCXXCompilerABI.cpp" + CMakeCXXCompilerABI.cpp + Link: + C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.42.34433\\bin\\HostX64\\x64\\link.exe /ERRORREPORT:QUEUE /OUT:"C:\\git_work\\a2l\\a2llib-main\\a2llib-main\\bin\\CMakeFiles\\CMakeScratch\\TryCompile-ic768p\\Debug\\cmTC_591a9.exe" /INCREMENTAL /ILK:"cmTC_591a9.dir\\Debug\\cmTC_591a9.ilk" /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"C:/git_work/a2l/a2llib-main/a2llib-main/bin/CMakeFiles/CMakeScratch/TryCompile-ic768p/Debug/cmTC_591a9.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:/git_work/a2l/a2llib-main/a2llib-main/bin/CMakeFiles/CMakeScratch/TryCompile-ic768p/Debug/cmTC_591a9.lib" /MACHINE:X64 /machine:x64 cmTC_591a9.dir\\Debug\\CMakeCXXCompilerABI.obj + cmTC_591a9.vcxproj -> C:\\git_work\\a2l\\a2llib-main\\a2llib-main\\bin\\CMakeFiles\\CMakeScratch\\TryCompile-ic768p\\Debug\\cmTC_591a9.exe + FinalizeBuildStatus: + Deleting file "cmTC_591a9.dir\\Debug\\cmTC_591a9.tlog\\unsuccessfulbuild". + Touching "cmTC_591a9.dir\\Debug\\cmTC_591a9.tlog\\cmTC_591a9.lastbuildstate". + Done Building Project "C:\\git_work\\a2l\\a2llib-main\\a2llib-main\\bin\\CMakeFiles\\CMakeScratch\\TryCompile-ic768p\\cmTC_591a9.vcxproj" (default targets). + + Build succeeded. + 0 Warning(s) + 0 Error(s) + + Time Elapsed 00:00:01.48 + + exitCode: 0 + - + kind: "message-v1" + backtrace: + - "C:/Program Files/CMake/share/cmake-3.31/Modules/CMakeDetermineCompilerABI.cmake:218 (message)" + - "C:/Program Files/CMake/share/cmake-3.31/Modules/CMakeTestCXXCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)" + - "CMakeLists.txt:22 (project)" + message: | + Parsed CXX implicit link information: + link line regex: [^( *|.*[/\\])(ld[0-9]*(\\.[a-z]+)?|link\\.exe|lld-link(\\.exe)?|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\\]+-)?ld|collect2)[^/\\]*( |$)] + linker tool regex: [^[ ]*(->|")?[ ]*(([^"]*[/\\])?(ld[0-9]*(\\.[a-z]+)?|link\\.exe|lld-link(\\.exe)?))("|,| |$)] + linker tool for 'CXX': C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.42.34433/bin/HostX64/x64/link.exe + implicit libs: [] + implicit objs: [] + implicit dirs: [] + implicit fwks: [] + + + - + kind: "message-v1" + backtrace: + - "C:/Program Files/CMake/share/cmake-3.31/Modules/Internal/CMakeDetermineLinkerId.cmake:40 (message)" + - "C:/Program Files/CMake/share/cmake-3.31/Modules/CMakeDetermineCompilerABI.cmake:255 (cmake_determine_linker_id)" + - "C:/Program Files/CMake/share/cmake-3.31/Modules/CMakeTestCXXCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)" + - "CMakeLists.txt:22 (project)" + message: | + Running the CXX compiler's linker: "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.42.34433/bin/HostX64/x64/link.exe" "-v" + Microsoft (R) Incremental Linker Version 14.42.34436.0 + Copyright (C) Microsoft Corporation. All rights reserved. +... diff --git a/a2llib-main/bin/CMakeFiles/Export/3afe2a7513176bfc0ade3a80d1e0a152/a2lTargets-debug.cmake b/a2llib-main/bin/CMakeFiles/Export/3afe2a7513176bfc0ade3a80d1e0a152/a2lTargets-debug.cmake new file mode 100644 index 0000000..ebd2402 --- /dev/null +++ b/a2llib-main/bin/CMakeFiles/Export/3afe2a7513176bfc0ade3a80d1e0a152/a2lTargets-debug.cmake @@ -0,0 +1,19 @@ +#---------------------------------------------------------------- +# Generated CMake target import file for configuration "Debug". +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Import target "A2l::a2l" for configuration "Debug" +set_property(TARGET A2l::a2l APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) +set_target_properties(A2l::a2l PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX" + IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/a2l/lib/a2ld.lib" + ) + +list(APPEND _cmake_import_check_targets A2l::a2l ) +list(APPEND _cmake_import_check_files_for_A2l::a2l "${_IMPORT_PREFIX}/a2l/lib/a2ld.lib" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/a2llib-main/bin/CMakeFiles/Export/3afe2a7513176bfc0ade3a80d1e0a152/a2lTargets-minsizerel.cmake b/a2llib-main/bin/CMakeFiles/Export/3afe2a7513176bfc0ade3a80d1e0a152/a2lTargets-minsizerel.cmake new file mode 100644 index 0000000..7ebeecb --- /dev/null +++ b/a2llib-main/bin/CMakeFiles/Export/3afe2a7513176bfc0ade3a80d1e0a152/a2lTargets-minsizerel.cmake @@ -0,0 +1,19 @@ +#---------------------------------------------------------------- +# Generated CMake target import file for configuration "MinSizeRel". +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Import target "A2l::a2l" for configuration "MinSizeRel" +set_property(TARGET A2l::a2l APPEND PROPERTY IMPORTED_CONFIGURATIONS MINSIZEREL) +set_target_properties(A2l::a2l PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_MINSIZEREL "CXX" + IMPORTED_LOCATION_MINSIZEREL "${_IMPORT_PREFIX}/a2l/lib/a2l.lib" + ) + +list(APPEND _cmake_import_check_targets A2l::a2l ) +list(APPEND _cmake_import_check_files_for_A2l::a2l "${_IMPORT_PREFIX}/a2l/lib/a2l.lib" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/a2llib-main/bin/CMakeFiles/Export/3afe2a7513176bfc0ade3a80d1e0a152/a2lTargets-release.cmake b/a2llib-main/bin/CMakeFiles/Export/3afe2a7513176bfc0ade3a80d1e0a152/a2lTargets-release.cmake new file mode 100644 index 0000000..df38ed1 --- /dev/null +++ b/a2llib-main/bin/CMakeFiles/Export/3afe2a7513176bfc0ade3a80d1e0a152/a2lTargets-release.cmake @@ -0,0 +1,19 @@ +#---------------------------------------------------------------- +# Generated CMake target import file for configuration "Release". +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Import target "A2l::a2l" for configuration "Release" +set_property(TARGET A2l::a2l APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) +set_target_properties(A2l::a2l PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX" + IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/a2l/lib/a2l.lib" + ) + +list(APPEND _cmake_import_check_targets A2l::a2l ) +list(APPEND _cmake_import_check_files_for_A2l::a2l "${_IMPORT_PREFIX}/a2l/lib/a2l.lib" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/a2llib-main/bin/CMakeFiles/Export/3afe2a7513176bfc0ade3a80d1e0a152/a2lTargets-relwithdebinfo.cmake b/a2llib-main/bin/CMakeFiles/Export/3afe2a7513176bfc0ade3a80d1e0a152/a2lTargets-relwithdebinfo.cmake new file mode 100644 index 0000000..fd4d3c6 --- /dev/null +++ b/a2llib-main/bin/CMakeFiles/Export/3afe2a7513176bfc0ade3a80d1e0a152/a2lTargets-relwithdebinfo.cmake @@ -0,0 +1,19 @@ +#---------------------------------------------------------------- +# Generated CMake target import file for configuration "RelWithDebInfo". +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Import target "A2l::a2l" for configuration "RelWithDebInfo" +set_property(TARGET A2l::a2l APPEND PROPERTY IMPORTED_CONFIGURATIONS RELWITHDEBINFO) +set_target_properties(A2l::a2l PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_RELWITHDEBINFO "CXX" + IMPORTED_LOCATION_RELWITHDEBINFO "${_IMPORT_PREFIX}/a2l/lib/a2l.lib" + ) + +list(APPEND _cmake_import_check_targets A2l::a2l ) +list(APPEND _cmake_import_check_files_for_A2l::a2l "${_IMPORT_PREFIX}/a2l/lib/a2l.lib" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/a2llib-main/bin/CMakeFiles/Export/3afe2a7513176bfc0ade3a80d1e0a152/a2lTargets.cmake b/a2llib-main/bin/CMakeFiles/Export/3afe2a7513176bfc0ade3a80d1e0a152/a2lTargets.cmake new file mode 100644 index 0000000..15519bd --- /dev/null +++ b/a2llib-main/bin/CMakeFiles/Export/3afe2a7513176bfc0ade3a80d1e0a152/a2lTargets.cmake @@ -0,0 +1,106 @@ +# Generated by CMake + +if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8) + message(FATAL_ERROR "CMake >= 2.8.3 required") +endif() +if(CMAKE_VERSION VERSION_LESS "2.8.3") + message(FATAL_ERROR "CMake >= 2.8.3 required") +endif() +cmake_policy(PUSH) +cmake_policy(VERSION 2.8.3...3.29) +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Protect against multiple inclusion, which would fail when already imported targets are added once more. +set(_cmake_targets_defined "") +set(_cmake_targets_not_defined "") +set(_cmake_expected_targets "") +foreach(_cmake_expected_target IN ITEMS A2l::a2l) + list(APPEND _cmake_expected_targets "${_cmake_expected_target}") + if(TARGET "${_cmake_expected_target}") + list(APPEND _cmake_targets_defined "${_cmake_expected_target}") + else() + list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}") + endif() +endforeach() +unset(_cmake_expected_target) +if(_cmake_targets_defined STREQUAL _cmake_expected_targets) + unset(_cmake_targets_defined) + unset(_cmake_targets_not_defined) + unset(_cmake_expected_targets) + unset(CMAKE_IMPORT_FILE_VERSION) + cmake_policy(POP) + return() +endif() +if(NOT _cmake_targets_defined STREQUAL "") + string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}") + string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}") + message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_cmake_targets_defined_text}\nTargets not yet defined: ${_cmake_targets_not_defined_text}\n") +endif() +unset(_cmake_targets_defined) +unset(_cmake_targets_not_defined) +unset(_cmake_expected_targets) + + +# Compute the installation prefix relative to this file. +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() + +# Create imported target A2l::a2l +add_library(A2l::a2l STATIC IMPORTED) + +set_target_properties(A2l::a2l PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" +) + +# Load information for each installed configuration. +file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/a2lTargets-*.cmake") +foreach(_cmake_config_file IN LISTS _cmake_config_files) + include("${_cmake_config_file}") +endforeach() +unset(_cmake_config_file) +unset(_cmake_config_files) + +# Cleanup temporary variables. +set(_IMPORT_PREFIX) + +# Loop over all imported files and verify that they actually exist +foreach(_cmake_target IN LISTS _cmake_import_check_targets) + if(CMAKE_VERSION VERSION_LESS "3.28" + OR NOT DEFINED _cmake_import_check_xcframework_for_${_cmake_target} + OR NOT IS_DIRECTORY "${_cmake_import_check_xcframework_for_${_cmake_target}}") + foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}") + if(NOT EXISTS "${_cmake_file}") + message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file + \"${_cmake_file}\" +but this file does not exist. Possible reasons include: +* The file was deleted, renamed, or moved to another location. +* An install or uninstall procedure did not complete successfully. +* The installation package was faulty and contained + \"${CMAKE_CURRENT_LIST_FILE}\" +but not all the files it references. +") + endif() + endforeach() + endif() + unset(_cmake_file) + unset("_cmake_import_check_files_for_${_cmake_target}") +endforeach() +unset(_cmake_target) +unset(_cmake_import_check_targets) + +# This file does not depend on other imported targets which have +# been exported from the same project but in a separate export set. + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/a2llib-main/bin/CMakeFiles/TargetDirectories.txt b/a2llib-main/bin/CMakeFiles/TargetDirectories.txt new file mode 100644 index 0000000..773e38e --- /dev/null +++ b/a2llib-main/bin/CMakeFiles/TargetDirectories.txt @@ -0,0 +1,4 @@ +C:/git_work/a2l/a2llib-main/a2llib-main/bin/CMakeFiles/a2l.dir +C:/git_work/a2l/a2llib-main/a2llib-main/bin/CMakeFiles/INSTALL.dir +C:/git_work/a2l/a2llib-main/a2llib-main/bin/CMakeFiles/ALL_BUILD.dir +C:/git_work/a2l/a2llib-main/a2llib-main/bin/CMakeFiles/ZERO_CHECK.dir diff --git a/a2llib-main/bin/CMakeFiles/cmake.check_cache b/a2llib-main/bin/CMakeFiles/cmake.check_cache new file mode 100644 index 0000000..3dccd73 --- /dev/null +++ b/a2llib-main/bin/CMakeFiles/cmake.check_cache @@ -0,0 +1 @@ +# This file is generated by cmake for dependency checking of the CMakeCache.txt file diff --git a/a2llib-main/bin/CMakeFiles/generate.stamp b/a2llib-main/bin/CMakeFiles/generate.stamp new file mode 100644 index 0000000..9b5f49f --- /dev/null +++ b/a2llib-main/bin/CMakeFiles/generate.stamp @@ -0,0 +1 @@ +# CMake generation timestamp file for this directory. diff --git a/a2llib-main/bin/CMakeFiles/generate.stamp.depend b/a2llib-main/bin/CMakeFiles/generate.stamp.depend new file mode 100644 index 0000000..4757586 --- /dev/null +++ b/a2llib-main/bin/CMakeFiles/generate.stamp.depend @@ -0,0 +1,55 @@ +# CMake generation dependency list for this directory. +C:/Program Files/CMake/share/cmake-3.31/Modules/BasicConfigVersion-AnyNewerVersion.cmake.in +C:/Program Files/CMake/share/cmake-3.31/Modules/CMakeCXXInformation.cmake +C:/Program Files/CMake/share/cmake-3.31/Modules/CMakeCommonLanguageInclude.cmake +C:/Program Files/CMake/share/cmake-3.31/Modules/CMakeGenericSystem.cmake +C:/Program Files/CMake/share/cmake-3.31/Modules/CMakeInitializeConfigs.cmake +C:/Program Files/CMake/share/cmake-3.31/Modules/CMakeLanguageInformation.cmake +C:/Program Files/CMake/share/cmake-3.31/Modules/CMakePackageConfigHelpers.cmake +C:/Program Files/CMake/share/cmake-3.31/Modules/CMakePrintHelpers.cmake +C:/Program Files/CMake/share/cmake-3.31/Modules/CMakeRCInformation.cmake +C:/Program Files/CMake/share/cmake-3.31/Modules/CMakeSystemSpecificInformation.cmake +C:/Program Files/CMake/share/cmake-3.31/Modules/CMakeSystemSpecificInitialize.cmake +C:/Program Files/CMake/share/cmake-3.31/Modules/Compiler/CMakeCommonCompilerMacros.cmake +C:/Program Files/CMake/share/cmake-3.31/Modules/Compiler/MSVC-CXX.cmake +C:/Program Files/CMake/share/cmake-3.31/Modules/Compiler/MSVC.cmake +C:/Program Files/CMake/share/cmake-3.31/Modules/FindBoost.cmake +C:/Program Files/CMake/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake +C:/Program Files/CMake/share/cmake-3.31/Modules/FindPackageMessage.cmake +C:/Program Files/CMake/share/cmake-3.31/Modules/Internal/CMakeCXXLinkerInformation.cmake +C:/Program Files/CMake/share/cmake-3.31/Modules/Internal/CMakeCommonLinkerInformation.cmake +C:/Program Files/CMake/share/cmake-3.31/Modules/Platform/Linker/Windows-MSVC-CXX.cmake +C:/Program Files/CMake/share/cmake-3.31/Modules/Platform/Linker/Windows-MSVC.cmake +C:/Program Files/CMake/share/cmake-3.31/Modules/Platform/Windows-Initialize.cmake +C:/Program Files/CMake/share/cmake-3.31/Modules/Platform/Windows-MSVC-CXX.cmake +C:/Program Files/CMake/share/cmake-3.31/Modules/Platform/Windows-MSVC.cmake +C:/Program Files/CMake/share/cmake-3.31/Modules/Platform/Windows.cmake +C:/Program Files/CMake/share/cmake-3.31/Modules/Platform/WindowsPaths.cmake +C:/Program Files/CMake/share/cmake-3.31/Modules/WriteBasicConfigVersionFile.cmake +C:/boost/lib/cmake/Boost-1.87.0/BoostConfig.cmake +C:/boost/lib/cmake/Boost-1.87.0/BoostConfigVersion.cmake +C:/boost/lib/cmake/BoostDetectToolset-1.87.0.cmake +C:/boost/lib/cmake/boost_atomic-1.87.0/boost_atomic-config-version.cmake +C:/boost/lib/cmake/boost_atomic-1.87.0/boost_atomic-config.cmake +C:/boost/lib/cmake/boost_atomic-1.87.0/libboost_atomic-variant-vc143-mt-gd-x64-1_87-static.cmake +C:/boost/lib/cmake/boost_atomic-1.87.0/libboost_atomic-variant-vc143-mt-x64-1_87-static.cmake +C:/boost/lib/cmake/boost_filesystem-1.87.0/boost_filesystem-config-version.cmake +C:/boost/lib/cmake/boost_filesystem-1.87.0/boost_filesystem-config.cmake +C:/boost/lib/cmake/boost_filesystem-1.87.0/libboost_filesystem-variant-vc143-mt-gd-x64-1_87-static.cmake +C:/boost/lib/cmake/boost_filesystem-1.87.0/libboost_filesystem-variant-vc143-mt-x64-1_87-static.cmake +C:/boost/lib/cmake/boost_headers-1.87.0/boost_headers-config-version.cmake +C:/boost/lib/cmake/boost_headers-1.87.0/boost_headers-config.cmake +C:/boost/lib/cmake/boost_locale-1.87.0/boost_locale-config-version.cmake +C:/boost/lib/cmake/boost_locale-1.87.0/boost_locale-config.cmake +C:/boost/lib/cmake/boost_locale-1.87.0/libboost_locale-variant-vc143-mt-gd-x64-1_87-static.cmake +C:/boost/lib/cmake/boost_locale-1.87.0/libboost_locale-variant-vc143-mt-x64-1_87-static.cmake +C:/boost/lib/cmake/boost_system-1.87.0/boost_system-config-version.cmake +C:/boost/lib/cmake/boost_system-1.87.0/boost_system-config.cmake +C:/boost/lib/cmake/boost_system-1.87.0/libboost_system-variant-vc143-mt-gd-x64-1_87-static.cmake +C:/boost/lib/cmake/boost_system-1.87.0/libboost_system-variant-vc143-mt-x64-1_87-static.cmake +C:/git_work/a2l/a2llib-main/a2llib-main/CMakeLists.txt +C:/git_work/a2l/a2llib-main/a2llib-main/bin/CMakeFiles/3.31.4/CMakeCXXCompiler.cmake +C:/git_work/a2l/a2llib-main/a2llib-main/bin/CMakeFiles/3.31.4/CMakeRCCompiler.cmake +C:/git_work/a2l/a2llib-main/a2llib-main/bin/CMakeFiles/3.31.4/CMakeSystem.cmake +C:/git_work/a2l/a2llib-main/a2llib-main/cmake/a2lConfig.cmake.in +C:/git_work/a2l/a2llib-main/a2llib-main/script/boost.cmake diff --git a/a2llib-main/bin/CMakeFiles/generate.stamp.list b/a2llib-main/bin/CMakeFiles/generate.stamp.list new file mode 100644 index 0000000..563da9e --- /dev/null +++ b/a2llib-main/bin/CMakeFiles/generate.stamp.list @@ -0,0 +1 @@ +C:/git_work/a2l/a2llib-main/a2llib-main/bin/CMakeFiles/generate.stamp diff --git a/a2llib-main/bin/INSTALL.vcxproj b/a2llib-main/bin/INSTALL.vcxproj new file mode 100644 index 0000000..a88fcbf --- /dev/null +++ b/a2llib-main/bin/INSTALL.vcxproj @@ -0,0 +1,209 @@ + + + + x64 + + + + Debug + x64 + + + Release + x64 + + + MinSizeRel + x64 + + + RelWithDebInfo + x64 + + + + {D1DD392A-4316-3C5F-82CD-8944DC6416E2} + Win32Proj + 10.0.22621.0 + x64 + INSTALL + NoUpgrade + + + + Utility + MultiByte + v143 + + + Utility + MultiByte + v143 + + + Utility + MultiByte + v143 + + + Utility + MultiByte + v143 + + + + + + + + + + <_ProjectFileVersion>10.0.20506.1 + $(Platform)\$(Configuration)\$(ProjectName)\ + $(Platform)\$(Configuration)\$(ProjectName)\ + $(Platform)\$(Configuration)\$(ProjectName)\ + $(Platform)\$(Configuration)\$(ProjectName)\ + + + + Always + + setlocal +"C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + + + + + Always + + setlocal +"C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + + + + + Always + + setlocal +"C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + + + + + Always + + setlocal +"C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + + + + + true + + setlocal +cd . +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + %(AdditionalInputs) + C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\INSTALL_force + false + false + true + + setlocal +cd . +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + %(AdditionalInputs) + C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\INSTALL_force + false + false + true + + setlocal +cd . +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + %(AdditionalInputs) + C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\INSTALL_force + false + false + true + + setlocal +cd . +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + %(AdditionalInputs) + C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\INSTALL_force + false + false + + + + + + {0A2017E7-D5A1-32C0-B66C-CADE1D639B18} + ZERO_CHECK + false + Never + + + {94E13784-D25A-391E-857E-59B708793320} + ALL_BUILD + false + Never + + + + + + \ No newline at end of file diff --git a/a2llib-main/bin/INSTALL.vcxproj.filters b/a2llib-main/bin/INSTALL.vcxproj.filters new file mode 100644 index 0000000..000a7c0 --- /dev/null +++ b/a2llib-main/bin/INSTALL.vcxproj.filters @@ -0,0 +1,13 @@ + + + + + CMake Rules + + + + + {209447A8-13B1-3914-94F0-289259E1AA99} + + + diff --git a/a2llib-main/bin/INSTALL.vcxproj.user b/a2llib-main/bin/INSTALL.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/a2llib-main/bin/INSTALL.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/a2llib-main/bin/ZERO_CHECK.vcxproj b/a2llib-main/bin/ZERO_CHECK.vcxproj new file mode 100644 index 0000000..0c7510c --- /dev/null +++ b/a2llib-main/bin/ZERO_CHECK.vcxproj @@ -0,0 +1,179 @@ + + + + x64 + + + false + + + + Debug + x64 + + + Release + x64 + + + MinSizeRel + x64 + + + RelWithDebInfo + x64 + + + + {0A2017E7-D5A1-32C0-B66C-CADE1D639B18} + Win32Proj + 10.0.22621.0 + x64 + ZERO_CHECK + NoUpgrade + + + + Utility + MultiByte + v143 + + + Utility + MultiByte + v143 + + + Utility + MultiByte + v143 + + + Utility + MultiByte + v143 + + + + + + + + + + <_ProjectFileVersion>10.0.20506.1 + $(Platform)\$(Configuration)\$(ProjectName)\ + $(Platform)\$(Configuration)\$(ProjectName)\ + $(Platform)\$(Configuration)\$(ProjectName)\ + $(Platform)\$(Configuration)\$(ProjectName)\ + + + + C:\boost\include\boost-1_87;%(AdditionalIncludeDirectories) + $(ProjectDir)/$(IntDir) + %(Filename).h + %(Filename).tlb + %(Filename)_i.c + %(Filename)_p.c + + + + + C:\boost\include\boost-1_87;%(AdditionalIncludeDirectories) + $(ProjectDir)/$(IntDir) + %(Filename).h + %(Filename).tlb + %(Filename)_i.c + %(Filename)_p.c + + + + + C:\boost\include\boost-1_87;%(AdditionalIncludeDirectories) + $(ProjectDir)/$(IntDir) + %(Filename).h + %(Filename).tlb + %(Filename)_i.c + %(Filename)_p.c + + + + + C:\boost\include\boost-1_87;%(AdditionalIncludeDirectories) + $(ProjectDir)/$(IntDir) + %(Filename).h + %(Filename).tlb + %(Filename)_i.c + %(Filename)_p.c + + + + + Always + true + Checking Build System + setlocal +"C:\Program Files\CMake\bin\cmake.exe" -SC:/git_work/a2l/a2llib-main/a2llib-main -BC:/git_work/a2l/a2llib-main/a2llib-main/bin --check-stamp-list CMakeFiles/generate.stamp.list --vs-solution-file C:/git_work/a2l/a2llib-main/a2llib-main/bin/a2llib.sln +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + C:\Program Files\CMake\share\cmake-3.31\Modules\BasicConfigVersion-AnyNewerVersion.cmake.in;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeCXXInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeCommonLanguageInclude.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeGenericSystem.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeInitializeConfigs.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeLanguageInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakePackageConfigHelpers.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakePrintHelpers.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeRCInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeSystemSpecificInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeSystemSpecificInitialize.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\CMakeCommonCompilerMacros.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindBoost.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindPackageHandleStandardArgs.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindPackageMessage.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Internal\CMakeCXXLinkerInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Internal\CMakeCommonLinkerInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Linker\Windows-MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-Initialize.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\WindowsPaths.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\WriteBasicConfigVersionFile.cmake;C:\boost\lib\cmake\Boost-1.87.0\BoostConfig.cmake;C:\boost\lib\cmake\Boost-1.87.0\BoostConfigVersion.cmake;C:\boost\lib\cmake\BoostDetectToolset-1.87.0.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\boost_atomic-config-version.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\boost_atomic-config.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\libboost_atomic-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\libboost_atomic-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\boost_filesystem-config-version.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\boost_filesystem-config.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\libboost_filesystem-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\libboost_filesystem-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_headers-1.87.0\boost_headers-config-version.cmake;C:\boost\lib\cmake\boost_headers-1.87.0\boost_headers-config.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\boost_locale-config-version.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\boost_locale-config.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\libboost_locale-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\libboost_locale-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_system-1.87.0\boost_system-config-version.cmake;C:\boost\lib\cmake\boost_system-1.87.0\boost_system-config.cmake;C:\boost\lib\cmake\boost_system-1.87.0\libboost_system-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_system-1.87.0\libboost_system-variant-vc143-mt-x64-1_87-static.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\CMakeLists.txt;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeCXXCompiler.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeRCCompiler.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeSystem.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\cmake\a2lConfig.cmake.in;C:\git_work\a2l\a2llib-main\a2llib-main\script\boost.cmake;%(AdditionalInputs) + C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\generate.stamp + false + true + Checking Build System + setlocal +"C:\Program Files\CMake\bin\cmake.exe" -SC:/git_work/a2l/a2llib-main/a2llib-main -BC:/git_work/a2l/a2llib-main/a2llib-main/bin --check-stamp-list CMakeFiles/generate.stamp.list --vs-solution-file C:/git_work/a2l/a2llib-main/a2llib-main/bin/a2llib.sln +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + C:\Program Files\CMake\share\cmake-3.31\Modules\BasicConfigVersion-AnyNewerVersion.cmake.in;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeCXXInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeCommonLanguageInclude.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeGenericSystem.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeInitializeConfigs.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeLanguageInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakePackageConfigHelpers.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakePrintHelpers.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeRCInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeSystemSpecificInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeSystemSpecificInitialize.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\CMakeCommonCompilerMacros.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindBoost.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindPackageHandleStandardArgs.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindPackageMessage.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Internal\CMakeCXXLinkerInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Internal\CMakeCommonLinkerInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Linker\Windows-MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-Initialize.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\WindowsPaths.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\WriteBasicConfigVersionFile.cmake;C:\boost\lib\cmake\Boost-1.87.0\BoostConfig.cmake;C:\boost\lib\cmake\Boost-1.87.0\BoostConfigVersion.cmake;C:\boost\lib\cmake\BoostDetectToolset-1.87.0.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\boost_atomic-config-version.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\boost_atomic-config.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\libboost_atomic-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\libboost_atomic-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\boost_filesystem-config-version.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\boost_filesystem-config.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\libboost_filesystem-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\libboost_filesystem-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_headers-1.87.0\boost_headers-config-version.cmake;C:\boost\lib\cmake\boost_headers-1.87.0\boost_headers-config.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\boost_locale-config-version.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\boost_locale-config.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\libboost_locale-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\libboost_locale-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_system-1.87.0\boost_system-config-version.cmake;C:\boost\lib\cmake\boost_system-1.87.0\boost_system-config.cmake;C:\boost\lib\cmake\boost_system-1.87.0\libboost_system-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_system-1.87.0\libboost_system-variant-vc143-mt-x64-1_87-static.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\CMakeLists.txt;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeCXXCompiler.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeRCCompiler.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeSystem.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\cmake\a2lConfig.cmake.in;C:\git_work\a2l\a2llib-main\a2llib-main\script\boost.cmake;%(AdditionalInputs) + C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\generate.stamp + false + true + Checking Build System + setlocal +"C:\Program Files\CMake\bin\cmake.exe" -SC:/git_work/a2l/a2llib-main/a2llib-main -BC:/git_work/a2l/a2llib-main/a2llib-main/bin --check-stamp-list CMakeFiles/generate.stamp.list --vs-solution-file C:/git_work/a2l/a2llib-main/a2llib-main/bin/a2llib.sln +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + C:\Program Files\CMake\share\cmake-3.31\Modules\BasicConfigVersion-AnyNewerVersion.cmake.in;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeCXXInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeCommonLanguageInclude.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeGenericSystem.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeInitializeConfigs.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeLanguageInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakePackageConfigHelpers.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakePrintHelpers.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeRCInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeSystemSpecificInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeSystemSpecificInitialize.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\CMakeCommonCompilerMacros.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindBoost.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindPackageHandleStandardArgs.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindPackageMessage.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Internal\CMakeCXXLinkerInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Internal\CMakeCommonLinkerInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Linker\Windows-MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-Initialize.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\WindowsPaths.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\WriteBasicConfigVersionFile.cmake;C:\boost\lib\cmake\Boost-1.87.0\BoostConfig.cmake;C:\boost\lib\cmake\Boost-1.87.0\BoostConfigVersion.cmake;C:\boost\lib\cmake\BoostDetectToolset-1.87.0.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\boost_atomic-config-version.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\boost_atomic-config.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\libboost_atomic-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\libboost_atomic-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\boost_filesystem-config-version.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\boost_filesystem-config.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\libboost_filesystem-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\libboost_filesystem-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_headers-1.87.0\boost_headers-config-version.cmake;C:\boost\lib\cmake\boost_headers-1.87.0\boost_headers-config.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\boost_locale-config-version.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\boost_locale-config.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\libboost_locale-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\libboost_locale-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_system-1.87.0\boost_system-config-version.cmake;C:\boost\lib\cmake\boost_system-1.87.0\boost_system-config.cmake;C:\boost\lib\cmake\boost_system-1.87.0\libboost_system-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_system-1.87.0\libboost_system-variant-vc143-mt-x64-1_87-static.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\CMakeLists.txt;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeCXXCompiler.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeRCCompiler.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeSystem.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\cmake\a2lConfig.cmake.in;C:\git_work\a2l\a2llib-main\a2llib-main\script\boost.cmake;%(AdditionalInputs) + C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\generate.stamp + false + true + Checking Build System + setlocal +"C:\Program Files\CMake\bin\cmake.exe" -SC:/git_work/a2l/a2llib-main/a2llib-main -BC:/git_work/a2l/a2llib-main/a2llib-main/bin --check-stamp-list CMakeFiles/generate.stamp.list --vs-solution-file C:/git_work/a2l/a2llib-main/a2llib-main/bin/a2llib.sln +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + C:\Program Files\CMake\share\cmake-3.31\Modules\BasicConfigVersion-AnyNewerVersion.cmake.in;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeCXXInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeCommonLanguageInclude.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeGenericSystem.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeInitializeConfigs.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeLanguageInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakePackageConfigHelpers.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakePrintHelpers.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeRCInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeSystemSpecificInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeSystemSpecificInitialize.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\CMakeCommonCompilerMacros.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindBoost.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindPackageHandleStandardArgs.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindPackageMessage.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Internal\CMakeCXXLinkerInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Internal\CMakeCommonLinkerInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Linker\Windows-MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-Initialize.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\WindowsPaths.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\WriteBasicConfigVersionFile.cmake;C:\boost\lib\cmake\Boost-1.87.0\BoostConfig.cmake;C:\boost\lib\cmake\Boost-1.87.0\BoostConfigVersion.cmake;C:\boost\lib\cmake\BoostDetectToolset-1.87.0.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\boost_atomic-config-version.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\boost_atomic-config.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\libboost_atomic-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\libboost_atomic-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\boost_filesystem-config-version.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\boost_filesystem-config.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\libboost_filesystem-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\libboost_filesystem-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_headers-1.87.0\boost_headers-config-version.cmake;C:\boost\lib\cmake\boost_headers-1.87.0\boost_headers-config.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\boost_locale-config-version.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\boost_locale-config.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\libboost_locale-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\libboost_locale-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_system-1.87.0\boost_system-config-version.cmake;C:\boost\lib\cmake\boost_system-1.87.0\boost_system-config.cmake;C:\boost\lib\cmake\boost_system-1.87.0\libboost_system-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_system-1.87.0\libboost_system-variant-vc143-mt-x64-1_87-static.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\CMakeLists.txt;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeCXXCompiler.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeRCCompiler.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeSystem.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\cmake\a2lConfig.cmake.in;C:\git_work\a2l\a2llib-main\a2llib-main\script\boost.cmake;%(AdditionalInputs) + C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\generate.stamp + false + + + + + + + + + + + \ No newline at end of file diff --git a/a2llib-main/bin/ZERO_CHECK.vcxproj.filters b/a2llib-main/bin/ZERO_CHECK.vcxproj.filters new file mode 100644 index 0000000..5043b76 --- /dev/null +++ b/a2llib-main/bin/ZERO_CHECK.vcxproj.filters @@ -0,0 +1,13 @@ + + + + + CMake Rules + + + + + {209447A8-13B1-3914-94F0-289259E1AA99} + + + diff --git a/a2llib-main/bin/a2l.dir/Debug/a2l.log b/a2llib-main/bin/a2l.dir/Debug/a2l.log new file mode 100644 index 0000000..f4101fb --- /dev/null +++ b/a2llib-main/bin/a2l.dir/Debug/a2l.log @@ -0,0 +1,40 @@ + a2lparser.cpp + a2mlparser.cpp + ifdataparser.cpp + a2lflexer.cpp + a2mlflexer.cpp + ifdataflexer.cpp + ifdatablock.cpp + a2lscanner.cpp + a2lfile.cpp + a2lhelper.cpp + a2lproject.cpp + module.cpp + a2lobject.cpp + axispts.cpp + a2lenums.cpp + blob.cpp + characteristic.cpp + axisdescr.cpp + compumethod.cpp + compuvtab.cpp + 코드를 생성하고 있습니다... + 컴파일하고 있습니다... + computab.cpp + compuvtabrange.cpp + frame.cpp + function.cpp + group.cpp + instance.cpp + overwrite.cpp + measurement.cpp + recordlayout.cpp + transformer.cpp + structure.cpp + unit.cpp + a2mlscanner.cpp + a2mlobject.cpp + a2mlblock.cpp + ifdatascanner.cpp + 코드를 생성하고 있습니다... + a2l.vcxproj -> C:\git_work\a2l\a2llib-main\a2llib-main\bin\Debug\a2ld.lib diff --git a/a2llib-main/bin/a2l.dir/Debug/a2l.vcxproj.FileListAbsolute.txt b/a2llib-main/bin/a2l.dir/Debug/a2l.vcxproj.FileListAbsolute.txt new file mode 100644 index 0000000..e69de29 diff --git a/a2llib-main/bin/a2l.dir/Debug/a2ld.Build.CppClean.log b/a2llib-main/bin/a2l.dir/Debug/a2ld.Build.CppClean.log new file mode 100644 index 0000000..576e7e2 --- /dev/null +++ b/a2llib-main/bin/a2l.dir/Debug/a2ld.Build.CppClean.log @@ -0,0 +1,49 @@ +c:\git_work\a2l\a2llib-main\a2llib-main\bin\debug\a2ld.pdb +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\compuvtab.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\compumethod.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\axisdescr.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\characteristic.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\blob.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\a2lenums.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\axispts.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\a2lobject.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\module.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\a2lproject.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\a2lhelper.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\a2lfile.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\a2lscanner.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\ifdatablock.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\ifdataflexer.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\a2mlflexer.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\a2lflexer.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\ifdataparser.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\a2mlparser.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\a2lparser.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\ifdatascanner.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\a2mlblock.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\a2mlobject.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\a2mlscanner.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\unit.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\structure.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\transformer.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\recordlayout.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\measurement.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\overwrite.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\instance.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\group.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\function.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\frame.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\compuvtabrange.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\computab.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\cmakefiles\generate.stamp +c:\git_work\a2l\a2llib-main\a2llib-main\bin\debug\a2ld.lib +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\a2l.tlog\cl.command.1.tlog +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\a2l.tlog\cl.items.tlog +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\a2l.tlog\cl.read.1.tlog +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\a2l.tlog\cl.write.1.tlog +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\a2l.tlog\custombuild.command.1.tlog +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\a2l.tlog\custombuild.read.1.tlog +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\a2l.tlog\custombuild.write.1.tlog +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\a2l.tlog\lib-link.read.1.tlog +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\a2l.tlog\lib-link.write.1.tlog +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\debug\a2l.tlog\lib.command.1.tlog diff --git a/a2llib-main/bin/a2l.dir/Debug/a2ld.lib.recipe b/a2llib-main/bin/a2l.dir/Debug/a2ld.lib.recipe new file mode 100644 index 0000000..cef9632 --- /dev/null +++ b/a2llib-main/bin/a2l.dir/Debug/a2ld.lib.recipe @@ -0,0 +1,11 @@ + + + + + C:\git_work\a2l\a2llib-main\a2llib-main\bin\x64\Debug\ZERO_CHECK + + + + + + \ No newline at end of file diff --git a/a2llib-main/bin/a2l.dir/Release/a2l.Build.CppClean.log b/a2llib-main/bin/a2l.dir/Release/a2l.Build.CppClean.log new file mode 100644 index 0000000..058adf3 --- /dev/null +++ b/a2llib-main/bin/a2l.dir/Release/a2l.Build.CppClean.log @@ -0,0 +1,84 @@ +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\compuvtab.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\compumethod.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\axisdescr.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\characteristic.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\blob.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\a2lenums.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\axispts.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\a2lobject.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\module.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\a2lproject.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\a2lhelper.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\a2lfile.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\a2lscanner.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\ifdatablock.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\ifdataflexer.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\a2mlflexer.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\a2lflexer.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\ifdataparser.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\a2mlparser.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\a2lparser.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\ifdatascanner.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\a2mlblock.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\a2mlobject.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\a2mlscanner.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\unit.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\structure.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\transformer.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\recordlayout.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\measurement.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\overwrite.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\instance.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\group.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\function.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\frame.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\compuvtabrange.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\a2l.dir\release\computab.obj +c:\git_work\a2l\a2llib-main\a2llib-main\bin\cmakefiles\generate.stamp +c:\git_work\a2l\a2llib-main\a2llib-main\bin\release\a2l.lib +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\a2lenums.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\a2lfile.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\a2lflexer.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\a2lhelper.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\a2lobject.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\a2lparser.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\a2lproject.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\a2lscanner.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\a2mlblock.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\a2mlflexer.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\a2mlobject.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\a2mlparser.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\a2mlscanner.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\axisdescr.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\axispts.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\blob.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\characteristic.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\compumethod.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\computab.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\compuvtab.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\compuvtabrange.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\frame.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\function.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\group.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\ifdatablock.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\ifdataflexer.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\ifdataparser.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\ifdatascanner.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\instance.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\measurement.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\module.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\overwrite.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\recordlayout.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\structure.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\transformer.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\unit.obj +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\a2l.tlog\cl.command.1.tlog +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\a2l.tlog\cl.items.tlog +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\a2l.tlog\cl.read.1.tlog +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\a2l.tlog\cl.write.1.tlog +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\a2l.tlog\custombuild.command.1.tlog +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\a2l.tlog\custombuild.read.1.tlog +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\a2l.tlog\custombuild.write.1.tlog +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\a2l.tlog\lib-link.read.1.tlog +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\a2l.tlog\lib-link.write.1.tlog +c:\git_work\a2l\a2l_test\a2llib-main\bin\a2l.dir\release\a2l.tlog\lib.command.1.tlog diff --git a/a2llib-main/bin/a2l.dir/Release/a2l.lib.recipe b/a2llib-main/bin/a2l.dir/Release/a2l.lib.recipe new file mode 100644 index 0000000..9ee2f06 --- /dev/null +++ b/a2llib-main/bin/a2l.dir/Release/a2l.lib.recipe @@ -0,0 +1,11 @@ + + + + + C:\git_work\a2l\a2llib-main\a2llib-main\bin\x64\Release\ZERO_CHECK + + + + + + \ No newline at end of file diff --git a/a2llib-main/bin/a2l.dir/Release/a2l.log b/a2llib-main/bin/a2l.dir/Release/a2l.log new file mode 100644 index 0000000..2d2d8c4 --- /dev/null +++ b/a2llib-main/bin/a2l.dir/Release/a2l.log @@ -0,0 +1,41 @@ + Building Custom Rule C:/git_work/a2l/a2llib-main/a2llib-main/CMakeLists.txt + a2lparser.cpp + a2mlparser.cpp + ifdataparser.cpp + a2lflexer.cpp + a2mlflexer.cpp + ifdataflexer.cpp + ifdatablock.cpp + a2lscanner.cpp + a2lfile.cpp + a2lhelper.cpp + a2lproject.cpp + module.cpp + a2lobject.cpp + axispts.cpp + a2lenums.cpp + blob.cpp + characteristic.cpp + axisdescr.cpp + compumethod.cpp + compuvtab.cpp + 코드를 생성하고 있습니다... + 컴파일하고 있습니다... + computab.cpp + compuvtabrange.cpp + frame.cpp + function.cpp + group.cpp + instance.cpp + overwrite.cpp + measurement.cpp + recordlayout.cpp + transformer.cpp + structure.cpp + unit.cpp + a2mlscanner.cpp + a2mlobject.cpp + a2mlblock.cpp + ifdatascanner.cpp + 코드를 생성하고 있습니다... + a2l.vcxproj -> C:\git_work\a2l\a2llib-main\a2llib-main\bin\Release\a2l.lib diff --git a/a2llib-main/bin/a2l.dir/Release/a2l.vcxproj.FileListAbsolute.txt b/a2llib-main/bin/a2l.dir/Release/a2l.vcxproj.FileListAbsolute.txt new file mode 100644 index 0000000..e69de29 diff --git a/a2llib-main/bin/a2l.vcxproj b/a2llib-main/bin/a2l.vcxproj new file mode 100644 index 0000000..0227b09 --- /dev/null +++ b/a2llib-main/bin/a2l.vcxproj @@ -0,0 +1,364 @@ + + + + x64 + + + + Debug + x64 + + + Release + x64 + + + MinSizeRel + x64 + + + RelWithDebInfo + x64 + + + + {6BF55986-F028-31E8-AFE5-00FBA737754F} + Win32Proj + 10.0.22621.0 + x64 + a2l + NoUpgrade + + + + StaticLibrary + MultiByte + v143 + + + StaticLibrary + MultiByte + v143 + + + StaticLibrary + MultiByte + v143 + + + StaticLibrary + MultiByte + v143 + + + + + + + + + + <_ProjectFileVersion>10.0.20506.1 + C:\git_work\a2l\a2llib-main\a2llib-main\bin\Debug\ + a2l.dir\Debug\ + a2ld + .lib + C:\git_work\a2l\a2llib-main\a2llib-main\bin\Release\ + a2l.dir\Release\ + a2l + .lib + C:\git_work\a2l\a2llib-main\a2llib-main\bin\MinSizeRel\ + a2l.dir\MinSizeRel\ + a2l + .lib + C:\git_work\a2l\a2llib-main\a2llib-main\bin\RelWithDebInfo\ + a2l.dir\RelWithDebInfo\ + a2l + .lib + + + + C:\boost\include\boost-1_87;C:\git_work\a2l\a2llib-main\a2llib-main\include;C:\git_work\a2l\a2llib-main\a2llib-main\src;C:\;%(AdditionalIncludeDirectories) + $(IntDir) + EnableFastChecks + ProgramDatabase + Sync + Disabled + stdcpp20 + + Disabled + NotUsing + MultiThreadedDebugDLL + + false + %(PreprocessorDefinitions);WIN32;_WINDOWS;_WIN32_WINNT=0x0A00;CMAKE_INTDIR="Debug" + $(IntDir) + false + + + %(PreprocessorDefinitions);WIN32;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0A00;CMAKE_INTDIR=\"Debug\" + C:\boost\include\boost-1_87;C:\git_work\a2l\a2llib-main\a2llib-main\include;C:\git_work\a2l\a2llib-main\a2llib-main\src;C:\;%(AdditionalIncludeDirectories) + + + C:\boost\include\boost-1_87;C:\git_work\a2l\a2llib-main\a2llib-main\include;C:\git_work\a2l\a2llib-main\a2llib-main\src;C:\;%(AdditionalIncludeDirectories) + $(ProjectDir)/$(IntDir) + %(Filename).h + %(Filename).tlb + %(Filename)_i.c + %(Filename)_p.c + + + %(AdditionalOptions) /machine:x64 + + + + + C:\boost\include\boost-1_87;C:\git_work\a2l\a2llib-main\a2llib-main\include;C:\git_work\a2l\a2llib-main\a2llib-main\src;C:\;%(AdditionalIncludeDirectories) + $(IntDir) + Default + Sync + AnySuitable + stdcpp20 + + MaxSpeed + NotUsing + MultiThreadedDLL + + false + %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_WIN32_WINNT=0x0A00;CMAKE_INTDIR="Release" + $(IntDir) + + + false + + + %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_WIN32_WINNT=0x0A00;CMAKE_INTDIR=\"Release\" + C:\boost\include\boost-1_87;C:\git_work\a2l\a2llib-main\a2llib-main\include;C:\git_work\a2l\a2llib-main\a2llib-main\src;C:\;%(AdditionalIncludeDirectories) + + + C:\boost\include\boost-1_87;C:\git_work\a2l\a2llib-main\a2llib-main\include;C:\git_work\a2l\a2llib-main\a2llib-main\src;C:\;%(AdditionalIncludeDirectories) + $(ProjectDir)/$(IntDir) + %(Filename).h + %(Filename).tlb + %(Filename)_i.c + %(Filename)_p.c + + + %(AdditionalOptions) /machine:x64 + + + + + C:\boost\include\boost-1_87;C:\git_work\a2l\a2llib-main\a2llib-main\include;C:\git_work\a2l\a2llib-main\a2llib-main\src;C:\;%(AdditionalIncludeDirectories) + $(IntDir) + Default + Sync + OnlyExplicitInline + stdcpp20 + + MinSpace + NotUsing + MultiThreadedDLL + + false + %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_WIN32_WINNT=0x0A00;CMAKE_INTDIR="MinSizeRel" + $(IntDir) + + + false + + + %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_WIN32_WINNT=0x0A00;CMAKE_INTDIR=\"MinSizeRel\" + C:\boost\include\boost-1_87;C:\git_work\a2l\a2llib-main\a2llib-main\include;C:\git_work\a2l\a2llib-main\a2llib-main\src;C:\;%(AdditionalIncludeDirectories) + + + C:\boost\include\boost-1_87;C:\git_work\a2l\a2llib-main\a2llib-main\include;C:\git_work\a2l\a2llib-main\a2llib-main\src;C:\;%(AdditionalIncludeDirectories) + $(ProjectDir)/$(IntDir) + %(Filename).h + %(Filename).tlb + %(Filename)_i.c + %(Filename)_p.c + + + %(AdditionalOptions) /machine:x64 + + + + + C:\boost\include\boost-1_87;C:\git_work\a2l\a2llib-main\a2llib-main\include;C:\git_work\a2l\a2llib-main\a2llib-main\src;C:\;%(AdditionalIncludeDirectories) + $(IntDir) + Default + ProgramDatabase + Sync + OnlyExplicitInline + stdcpp20 + + MaxSpeed + NotUsing + MultiThreadedDLL + + false + %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_WIN32_WINNT=0x0A00;CMAKE_INTDIR="RelWithDebInfo" + $(IntDir) + false + + + %(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;_WIN32_WINNT=0x0A00;CMAKE_INTDIR=\"RelWithDebInfo\" + C:\boost\include\boost-1_87;C:\git_work\a2l\a2llib-main\a2llib-main\include;C:\git_work\a2l\a2llib-main\a2llib-main\src;C:\;%(AdditionalIncludeDirectories) + + + C:\boost\include\boost-1_87;C:\git_work\a2l\a2llib-main\a2llib-main\include;C:\git_work\a2l\a2llib-main\a2llib-main\src;C:\;%(AdditionalIncludeDirectories) + $(ProjectDir)/$(IntDir) + %(Filename).h + %(Filename).tlb + %(Filename)_i.c + %(Filename)_p.c + + + %(AdditionalOptions) /machine:x64 + + + + + Always + Building Custom Rule C:/git_work/a2l/a2llib-main/a2llib-main/CMakeLists.txt + setlocal +"C:\Program Files\CMake\bin\cmake.exe" -SC:/git_work/a2l/a2llib-main/a2llib-main -BC:/git_work/a2l/a2llib-main/a2llib-main/bin --check-stamp-file C:/git_work/a2l/a2llib-main/a2llib-main/bin/CMakeFiles/generate.stamp +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + C:\Program Files\CMake\share\cmake-3.31\Modules\BasicConfigVersion-AnyNewerVersion.cmake.in;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeCXXInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeCommonLanguageInclude.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeGenericSystem.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeInitializeConfigs.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeLanguageInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakePackageConfigHelpers.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakePrintHelpers.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeRCInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeSystemSpecificInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeSystemSpecificInitialize.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\CMakeCommonCompilerMacros.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindBoost.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindPackageHandleStandardArgs.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindPackageMessage.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Internal\CMakeCXXLinkerInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Internal\CMakeCommonLinkerInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Linker\Windows-MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-Initialize.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\WindowsPaths.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\WriteBasicConfigVersionFile.cmake;C:\boost\lib\cmake\Boost-1.87.0\BoostConfig.cmake;C:\boost\lib\cmake\Boost-1.87.0\BoostConfigVersion.cmake;C:\boost\lib\cmake\BoostDetectToolset-1.87.0.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\boost_atomic-config-version.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\boost_atomic-config.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\libboost_atomic-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\libboost_atomic-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\boost_filesystem-config-version.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\boost_filesystem-config.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\libboost_filesystem-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\libboost_filesystem-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_headers-1.87.0\boost_headers-config-version.cmake;C:\boost\lib\cmake\boost_headers-1.87.0\boost_headers-config.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\boost_locale-config-version.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\boost_locale-config.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\libboost_locale-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\libboost_locale-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_system-1.87.0\boost_system-config-version.cmake;C:\boost\lib\cmake\boost_system-1.87.0\boost_system-config.cmake;C:\boost\lib\cmake\boost_system-1.87.0\libboost_system-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_system-1.87.0\libboost_system-variant-vc143-mt-x64-1_87-static.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeCXXCompiler.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeRCCompiler.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeSystem.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\cmake\a2lConfig.cmake.in;C:\git_work\a2l\a2llib-main\a2llib-main\script\boost.cmake;%(AdditionalInputs) + C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\generate.stamp + false + Building Custom Rule C:/git_work/a2l/a2llib-main/a2llib-main/CMakeLists.txt + setlocal +"C:\Program Files\CMake\bin\cmake.exe" -SC:/git_work/a2l/a2llib-main/a2llib-main -BC:/git_work/a2l/a2llib-main/a2llib-main/bin --check-stamp-file C:/git_work/a2l/a2llib-main/a2llib-main/bin/CMakeFiles/generate.stamp +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + C:\Program Files\CMake\share\cmake-3.31\Modules\BasicConfigVersion-AnyNewerVersion.cmake.in;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeCXXInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeCommonLanguageInclude.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeGenericSystem.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeInitializeConfigs.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeLanguageInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakePackageConfigHelpers.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakePrintHelpers.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeRCInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeSystemSpecificInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeSystemSpecificInitialize.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\CMakeCommonCompilerMacros.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindBoost.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindPackageHandleStandardArgs.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindPackageMessage.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Internal\CMakeCXXLinkerInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Internal\CMakeCommonLinkerInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Linker\Windows-MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-Initialize.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\WindowsPaths.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\WriteBasicConfigVersionFile.cmake;C:\boost\lib\cmake\Boost-1.87.0\BoostConfig.cmake;C:\boost\lib\cmake\Boost-1.87.0\BoostConfigVersion.cmake;C:\boost\lib\cmake\BoostDetectToolset-1.87.0.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\boost_atomic-config-version.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\boost_atomic-config.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\libboost_atomic-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\libboost_atomic-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\boost_filesystem-config-version.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\boost_filesystem-config.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\libboost_filesystem-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\libboost_filesystem-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_headers-1.87.0\boost_headers-config-version.cmake;C:\boost\lib\cmake\boost_headers-1.87.0\boost_headers-config.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\boost_locale-config-version.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\boost_locale-config.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\libboost_locale-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\libboost_locale-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_system-1.87.0\boost_system-config-version.cmake;C:\boost\lib\cmake\boost_system-1.87.0\boost_system-config.cmake;C:\boost\lib\cmake\boost_system-1.87.0\libboost_system-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_system-1.87.0\libboost_system-variant-vc143-mt-x64-1_87-static.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeCXXCompiler.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeRCCompiler.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeSystem.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\cmake\a2lConfig.cmake.in;C:\git_work\a2l\a2llib-main\a2llib-main\script\boost.cmake;%(AdditionalInputs) + C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\generate.stamp + false + Building Custom Rule C:/git_work/a2l/a2llib-main/a2llib-main/CMakeLists.txt + setlocal +"C:\Program Files\CMake\bin\cmake.exe" -SC:/git_work/a2l/a2llib-main/a2llib-main -BC:/git_work/a2l/a2llib-main/a2llib-main/bin --check-stamp-file C:/git_work/a2l/a2llib-main/a2llib-main/bin/CMakeFiles/generate.stamp +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + C:\Program Files\CMake\share\cmake-3.31\Modules\BasicConfigVersion-AnyNewerVersion.cmake.in;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeCXXInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeCommonLanguageInclude.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeGenericSystem.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeInitializeConfigs.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeLanguageInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakePackageConfigHelpers.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakePrintHelpers.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeRCInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeSystemSpecificInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeSystemSpecificInitialize.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\CMakeCommonCompilerMacros.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindBoost.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindPackageHandleStandardArgs.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindPackageMessage.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Internal\CMakeCXXLinkerInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Internal\CMakeCommonLinkerInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Linker\Windows-MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-Initialize.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\WindowsPaths.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\WriteBasicConfigVersionFile.cmake;C:\boost\lib\cmake\Boost-1.87.0\BoostConfig.cmake;C:\boost\lib\cmake\Boost-1.87.0\BoostConfigVersion.cmake;C:\boost\lib\cmake\BoostDetectToolset-1.87.0.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\boost_atomic-config-version.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\boost_atomic-config.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\libboost_atomic-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\libboost_atomic-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\boost_filesystem-config-version.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\boost_filesystem-config.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\libboost_filesystem-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\libboost_filesystem-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_headers-1.87.0\boost_headers-config-version.cmake;C:\boost\lib\cmake\boost_headers-1.87.0\boost_headers-config.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\boost_locale-config-version.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\boost_locale-config.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\libboost_locale-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\libboost_locale-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_system-1.87.0\boost_system-config-version.cmake;C:\boost\lib\cmake\boost_system-1.87.0\boost_system-config.cmake;C:\boost\lib\cmake\boost_system-1.87.0\libboost_system-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_system-1.87.0\libboost_system-variant-vc143-mt-x64-1_87-static.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeCXXCompiler.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeRCCompiler.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeSystem.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\cmake\a2lConfig.cmake.in;C:\git_work\a2l\a2llib-main\a2llib-main\script\boost.cmake;%(AdditionalInputs) + C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\generate.stamp + false + Building Custom Rule C:/git_work/a2l/a2llib-main/a2llib-main/CMakeLists.txt + setlocal +"C:\Program Files\CMake\bin\cmake.exe" -SC:/git_work/a2l/a2llib-main/a2llib-main -BC:/git_work/a2l/a2llib-main/a2llib-main/bin --check-stamp-file C:/git_work/a2l/a2llib-main/a2llib-main/bin/CMakeFiles/generate.stamp +if %errorlevel% neq 0 goto :cmEnd +:cmEnd +endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone +:cmErrorLevel +exit /b %1 +:cmDone +if %errorlevel% neq 0 goto :VCEnd + C:\Program Files\CMake\share\cmake-3.31\Modules\BasicConfigVersion-AnyNewerVersion.cmake.in;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeCXXInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeCommonLanguageInclude.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeGenericSystem.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeInitializeConfigs.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeLanguageInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakePackageConfigHelpers.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakePrintHelpers.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeRCInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeSystemSpecificInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\CMakeSystemSpecificInitialize.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\CMakeCommonCompilerMacros.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Compiler\MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindBoost.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindPackageHandleStandardArgs.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\FindPackageMessage.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Internal\CMakeCXXLinkerInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Internal\CMakeCommonLinkerInformation.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Linker\Windows-MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Linker\Windows-MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-Initialize.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-MSVC-CXX.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows-MSVC.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\Windows.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\Platform\WindowsPaths.cmake;C:\Program Files\CMake\share\cmake-3.31\Modules\WriteBasicConfigVersionFile.cmake;C:\boost\lib\cmake\Boost-1.87.0\BoostConfig.cmake;C:\boost\lib\cmake\Boost-1.87.0\BoostConfigVersion.cmake;C:\boost\lib\cmake\BoostDetectToolset-1.87.0.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\boost_atomic-config-version.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\boost_atomic-config.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\libboost_atomic-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_atomic-1.87.0\libboost_atomic-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\boost_filesystem-config-version.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\boost_filesystem-config.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\libboost_filesystem-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_filesystem-1.87.0\libboost_filesystem-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_headers-1.87.0\boost_headers-config-version.cmake;C:\boost\lib\cmake\boost_headers-1.87.0\boost_headers-config.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\boost_locale-config-version.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\boost_locale-config.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\libboost_locale-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_locale-1.87.0\libboost_locale-variant-vc143-mt-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_system-1.87.0\boost_system-config-version.cmake;C:\boost\lib\cmake\boost_system-1.87.0\boost_system-config.cmake;C:\boost\lib\cmake\boost_system-1.87.0\libboost_system-variant-vc143-mt-gd-x64-1_87-static.cmake;C:\boost\lib\cmake\boost_system-1.87.0\libboost_system-variant-vc143-mt-x64-1_87-static.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeCXXCompiler.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeRCCompiler.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\3.31.4\CMakeSystem.cmake;C:\git_work\a2l\a2llib-main\a2llib-main\cmake\a2lConfig.cmake.in;C:\git_work\a2l\a2llib-main\a2llib-main\script\boost.cmake;%(AdditionalInputs) + C:\git_work\a2l\a2llib-main\a2llib-main\bin\CMakeFiles\generate.stamp + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {0A2017E7-D5A1-32C0-B66C-CADE1D639B18} + ZERO_CHECK + false + Never + + + + + + \ No newline at end of file diff --git a/a2llib-main/bin/a2l.vcxproj.filters b/a2llib-main/bin/a2l.vcxproj.filters new file mode 100644 index 0000000..c971281 --- /dev/null +++ b/a2llib-main/bin/a2l.vcxproj.filters @@ -0,0 +1,234 @@ + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + + + + {6741C30E-A22C-3837-93A1-9A77C80AC047} + + + {C16CD1DB-E17B-326A-9E1D-03AD68E5DAD4} + + + diff --git a/a2llib-main/bin/a2l/a2lConfig.cmake b/a2llib-main/bin/a2l/a2lConfig.cmake new file mode 100644 index 0000000..c748a2a --- /dev/null +++ b/a2llib-main/bin/a2l/a2lConfig.cmake @@ -0,0 +1,31 @@ +# All REQUIRED dependencies of a package should be listed here! +include(CMakeFindDependencyMacro) + +include("${CMAKE_CURRENT_LIST_DIR}/dbcTargets.cmake") + + +####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() ####### +####### Any changes to this file will be overwritten by the next CMake run #### +####### The input file was a2lConfig.cmake.in ######## + +get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE) + +macro(set_and_check _var _file) + set(${_var} "${_file}") + if(NOT EXISTS "${_file}") + message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !") + endif() +endmacro() + +macro(check_required_components _NAME) + foreach(comp ${${_NAME}_FIND_COMPONENTS}) + if(NOT ${_NAME}_${comp}_FOUND) + if(${_NAME}_FIND_REQUIRED_${comp}) + set(${_NAME}_FOUND FALSE) + endif() + endif() + endforeach() +endmacro() + +#################################################################################### +set(dbc_DIR "") diff --git a/a2llib-main/bin/a2l/a2lConfigVersion.cmake b/a2llib-main/bin/a2l/a2lConfigVersion.cmake new file mode 100644 index 0000000..b8b06d3 --- /dev/null +++ b/a2llib-main/bin/a2l/a2lConfigVersion.cmake @@ -0,0 +1,43 @@ +# This is a basic version file for the Config-mode of find_package(). +# It is used by write_basic_package_version_file() as input file for configure_file() +# to create a version-file which can be installed along a config.cmake file. +# +# The created file sets PACKAGE_VERSION_EXACT if the current version string and +# the requested version string are exactly the same and it sets +# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version. +# The variable CVF_VERSION must be set before calling configure_file(). + +set(PACKAGE_VERSION "1.0") + +if (PACKAGE_FIND_VERSION_RANGE) + # Package version must be in the requested version range + if ((PACKAGE_FIND_VERSION_RANGE_MIN STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MIN) + OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_GREATER PACKAGE_FIND_VERSION_MAX) + OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_GREATER_EQUAL PACKAGE_FIND_VERSION_MAX))) + set(PACKAGE_VERSION_COMPATIBLE FALSE) + else() + set(PACKAGE_VERSION_COMPATIBLE TRUE) + endif() +else() + if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) + set(PACKAGE_VERSION_COMPATIBLE FALSE) + else() + set(PACKAGE_VERSION_COMPATIBLE TRUE) + if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) + set(PACKAGE_VERSION_EXACT TRUE) + endif() + endif() +endif() + + +# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it: +if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "") + return() +endif() + +# check that the installed version has the same 32/64bit-ness as the one which is currently searching: +if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "8") + math(EXPR installedBits "8 * 8") + set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)") + set(PACKAGE_VERSION_UNSUITABLE TRUE) +endif() diff --git a/a2llib-main/bin/a2llib.sln b/a2llib-main/bin/a2llib.sln new file mode 100644 index 0000000..863791d --- /dev/null +++ b/a2llib-main/bin/a2llib.sln @@ -0,0 +1,67 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ALL_BUILD", "ALL_BUILD.vcxproj", "{94E13784-D25A-391E-857E-59B708793320}" + ProjectSection(ProjectDependencies) = postProject + {0A2017E7-D5A1-32C0-B66C-CADE1D639B18} = {0A2017E7-D5A1-32C0-B66C-CADE1D639B18} + {6BF55986-F028-31E8-AFE5-00FBA737754F} = {6BF55986-F028-31E8-AFE5-00FBA737754F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INSTALL", "INSTALL.vcxproj", "{D1DD392A-4316-3C5F-82CD-8944DC6416E2}" + ProjectSection(ProjectDependencies) = postProject + {94E13784-D25A-391E-857E-59B708793320} = {94E13784-D25A-391E-857E-59B708793320} + {0A2017E7-D5A1-32C0-B66C-CADE1D639B18} = {0A2017E7-D5A1-32C0-B66C-CADE1D639B18} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZERO_CHECK", "ZERO_CHECK.vcxproj", "{0A2017E7-D5A1-32C0-B66C-CADE1D639B18}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "a2l", "a2l.vcxproj", "{6BF55986-F028-31E8-AFE5-00FBA737754F}" + ProjectSection(ProjectDependencies) = postProject + {0A2017E7-D5A1-32C0-B66C-CADE1D639B18} = {0A2017E7-D5A1-32C0-B66C-CADE1D639B18} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Release|x64 = Release|x64 + MinSizeRel|x64 = MinSizeRel|x64 + RelWithDebInfo|x64 = RelWithDebInfo|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {94E13784-D25A-391E-857E-59B708793320}.Debug|x64.ActiveCfg = Debug|x64 + {94E13784-D25A-391E-857E-59B708793320}.Debug|x64.Build.0 = Debug|x64 + {94E13784-D25A-391E-857E-59B708793320}.Release|x64.ActiveCfg = Release|x64 + {94E13784-D25A-391E-857E-59B708793320}.Release|x64.Build.0 = Release|x64 + {94E13784-D25A-391E-857E-59B708793320}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64 + {94E13784-D25A-391E-857E-59B708793320}.MinSizeRel|x64.Build.0 = MinSizeRel|x64 + {94E13784-D25A-391E-857E-59B708793320}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 + {94E13784-D25A-391E-857E-59B708793320}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 + {D1DD392A-4316-3C5F-82CD-8944DC6416E2}.Debug|x64.ActiveCfg = Debug|x64 + {D1DD392A-4316-3C5F-82CD-8944DC6416E2}.Release|x64.ActiveCfg = Release|x64 + {D1DD392A-4316-3C5F-82CD-8944DC6416E2}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64 + {D1DD392A-4316-3C5F-82CD-8944DC6416E2}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 + {0A2017E7-D5A1-32C0-B66C-CADE1D639B18}.Debug|x64.ActiveCfg = Debug|x64 + {0A2017E7-D5A1-32C0-B66C-CADE1D639B18}.Debug|x64.Build.0 = Debug|x64 + {0A2017E7-D5A1-32C0-B66C-CADE1D639B18}.Release|x64.ActiveCfg = Release|x64 + {0A2017E7-D5A1-32C0-B66C-CADE1D639B18}.Release|x64.Build.0 = Release|x64 + {0A2017E7-D5A1-32C0-B66C-CADE1D639B18}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64 + {0A2017E7-D5A1-32C0-B66C-CADE1D639B18}.MinSizeRel|x64.Build.0 = MinSizeRel|x64 + {0A2017E7-D5A1-32C0-B66C-CADE1D639B18}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 + {0A2017E7-D5A1-32C0-B66C-CADE1D639B18}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 + {6BF55986-F028-31E8-AFE5-00FBA737754F}.Debug|x64.ActiveCfg = Debug|x64 + {6BF55986-F028-31E8-AFE5-00FBA737754F}.Debug|x64.Build.0 = Debug|x64 + {6BF55986-F028-31E8-AFE5-00FBA737754F}.Release|x64.ActiveCfg = Release|x64 + {6BF55986-F028-31E8-AFE5-00FBA737754F}.Release|x64.Build.0 = Release|x64 + {6BF55986-F028-31E8-AFE5-00FBA737754F}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64 + {6BF55986-F028-31E8-AFE5-00FBA737754F}.MinSizeRel|x64.Build.0 = MinSizeRel|x64 + {6BF55986-F028-31E8-AFE5-00FBA737754F}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 + {6BF55986-F028-31E8-AFE5-00FBA737754F}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {C3A914CF-746F-3276-A027-B15B530871E5} + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/a2llib-main/bin/cmake_install.cmake b/a2llib-main/bin/cmake_install.cmake new file mode 100644 index 0000000..23fb87f --- /dev/null +++ b/a2llib-main/bin/cmake_install.cmake @@ -0,0 +1,111 @@ +# Install script for directory: C:/git_work/a2l/a2llib-main/a2llib-main + +# Set the install prefix +if(NOT DEFINED CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "C:/Program Files/a2llib") +endif() +string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + if(BUILD_TYPE) + string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + else() + set(CMAKE_INSTALL_CONFIG_NAME "Release") + endif() + message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +endif() + +# Set the component getting installed. +if(NOT CMAKE_INSTALL_COMPONENT) + if(COMPONENT) + message(STATUS "Install component: \"${COMPONENT}\"") + set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + else() + set(CMAKE_INSTALL_COMPONENT) + endif() +endif() + +# Is this installation the result of a crosscompile? +if(NOT DEFINED CMAKE_CROSSCOMPILING) + set(CMAKE_CROSSCOMPILING "FALSE") +endif() + +if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT) + file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/a2l/include" TYPE DIRECTORY FILES "C:/git_work/a2l/a2llib-main/a2llib-main/include/a2l") +endif() + +if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT) + if(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Dd][Ee][Bb][Uu][Gg])$") + file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/a2l/lib" TYPE STATIC_LIBRARY FILES "C:/git_work/a2l/a2llib-main/a2llib-main/bin/Debug/a2ld.lib") + elseif(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$") + file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/a2l/lib" TYPE STATIC_LIBRARY FILES "C:/git_work/a2l/a2llib-main/a2llib-main/bin/Release/a2l.lib") + elseif(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Mm][Ii][Nn][Ss][Ii][Zz][Ee][Rr][Ee][Ll])$") + file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/a2l/lib" TYPE STATIC_LIBRARY FILES "C:/git_work/a2l/a2llib-main/a2llib-main/bin/MinSizeRel/a2l.lib") + elseif(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Rr][Ee][Ll][Ww][Ii][Tt][Hh][Dd][Ee][Bb][Ii][Nn][Ff][Oo])$") + file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/a2l/lib" TYPE STATIC_LIBRARY FILES "C:/git_work/a2l/a2llib-main/a2llib-main/bin/RelWithDebInfo/a2l.lib") + endif() +endif() + +if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT) + if(EXISTS "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/cmake/a2l/a2lTargets.cmake") + file(DIFFERENT _cmake_export_file_changed FILES + "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/cmake/a2l/a2lTargets.cmake" + "C:/git_work/a2l/a2llib-main/a2llib-main/bin/CMakeFiles/Export/3afe2a7513176bfc0ade3a80d1e0a152/a2lTargets.cmake") + if(_cmake_export_file_changed) + file(GLOB _cmake_old_config_files "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/cmake/a2l/a2lTargets-*.cmake") + if(_cmake_old_config_files) + string(REPLACE ";" ", " _cmake_old_config_files_text "${_cmake_old_config_files}") + message(STATUS "Old export file \"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/cmake/a2l/a2lTargets.cmake\" will be replaced. Removing files [${_cmake_old_config_files_text}].") + unset(_cmake_old_config_files_text) + file(REMOVE ${_cmake_old_config_files}) + endif() + unset(_cmake_old_config_files) + endif() + unset(_cmake_export_file_changed) + endif() + file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/cmake/a2l" TYPE FILE FILES "C:/git_work/a2l/a2llib-main/a2llib-main/bin/CMakeFiles/Export/3afe2a7513176bfc0ade3a80d1e0a152/a2lTargets.cmake") + if(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Dd][Ee][Bb][Uu][Gg])$") + file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/cmake/a2l" TYPE FILE FILES "C:/git_work/a2l/a2llib-main/a2llib-main/bin/CMakeFiles/Export/3afe2a7513176bfc0ade3a80d1e0a152/a2lTargets-debug.cmake") + endif() + if(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Mm][Ii][Nn][Ss][Ii][Zz][Ee][Rr][Ee][Ll])$") + file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/cmake/a2l" TYPE FILE FILES "C:/git_work/a2l/a2llib-main/a2llib-main/bin/CMakeFiles/Export/3afe2a7513176bfc0ade3a80d1e0a152/a2lTargets-minsizerel.cmake") + endif() + if(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Rr][Ee][Ll][Ww][Ii][Tt][Hh][Dd][Ee][Bb][Ii][Nn][Ff][Oo])$") + file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/cmake/a2l" TYPE FILE FILES "C:/git_work/a2l/a2llib-main/a2llib-main/bin/CMakeFiles/Export/3afe2a7513176bfc0ade3a80d1e0a152/a2lTargets-relwithdebinfo.cmake") + endif() + if(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$") + file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/cmake/a2l" TYPE FILE FILES "C:/git_work/a2l/a2llib-main/a2llib-main/bin/CMakeFiles/Export/3afe2a7513176bfc0ade3a80d1e0a152/a2lTargets-release.cmake") + endif() +endif() + +if(CMAKE_INSTALL_COMPONENT STREQUAL "Devel" OR NOT CMAKE_INSTALL_COMPONENT) + file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/cmake/a2l" TYPE FILE FILES + "C:/git_work/a2l/a2llib-main/a2llib-main/bin/a2l/a2lConfigVersion.cmake" + "C:/git_work/a2l/a2llib-main/a2llib-main/bin/a2l/a2lConfig.cmake" + ) +endif() + +string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT + "${CMAKE_INSTALL_MANIFEST_FILES}") +if(CMAKE_INSTALL_LOCAL_ONLY) + file(WRITE "C:/git_work/a2l/a2llib-main/a2llib-main/bin/install_local_manifest.txt" + "${CMAKE_INSTALL_MANIFEST_CONTENT}") +endif() +if(CMAKE_INSTALL_COMPONENT) + if(CMAKE_INSTALL_COMPONENT MATCHES "^[a-zA-Z0-9_.+-]+$") + set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") + else() + string(MD5 CMAKE_INST_COMP_HASH "${CMAKE_INSTALL_COMPONENT}") + set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INST_COMP_HASH}.txt") + unset(CMAKE_INST_COMP_HASH) + endif() +else() + set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") +endif() + +if(NOT CMAKE_INSTALL_LOCAL_ONLY) + file(WRITE "C:/git_work/a2l/a2llib-main/a2llib-main/bin/${CMAKE_INSTALL_MANIFEST}" + "${CMAKE_INSTALL_MANIFEST_CONTENT}") +endif() diff --git a/a2llib-main/bin/liba2l/a2lTargets.cmake b/a2llib-main/bin/liba2l/a2lTargets.cmake new file mode 100644 index 0000000..3fad5ac --- /dev/null +++ b/a2llib-main/bin/liba2l/a2lTargets.cmake @@ -0,0 +1,89 @@ +# Generated by CMake + +if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8) + message(FATAL_ERROR "CMake >= 2.8.3 required") +endif() +if(CMAKE_VERSION VERSION_LESS "2.8.3") + message(FATAL_ERROR "CMake >= 2.8.3 required") +endif() +cmake_policy(PUSH) +cmake_policy(VERSION 2.8.3...3.29) +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Protect against multiple inclusion, which would fail when already imported targets are added once more. +set(_cmake_targets_defined "") +set(_cmake_targets_not_defined "") +set(_cmake_expected_targets "") +foreach(_cmake_expected_target IN ITEMS Upstream::a2l) + list(APPEND _cmake_expected_targets "${_cmake_expected_target}") + if(TARGET "${_cmake_expected_target}") + list(APPEND _cmake_targets_defined "${_cmake_expected_target}") + else() + list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}") + endif() +endforeach() +unset(_cmake_expected_target) +if(_cmake_targets_defined STREQUAL _cmake_expected_targets) + unset(_cmake_targets_defined) + unset(_cmake_targets_not_defined) + unset(_cmake_expected_targets) + unset(CMAKE_IMPORT_FILE_VERSION) + cmake_policy(POP) + return() +endif() +if(NOT _cmake_targets_defined STREQUAL "") + string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}") + string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}") + message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_cmake_targets_defined_text}\nTargets not yet defined: ${_cmake_targets_not_defined_text}\n") +endif() +unset(_cmake_targets_defined) +unset(_cmake_targets_not_defined) +unset(_cmake_expected_targets) + + +# Create imported target Upstream::a2l +add_library(Upstream::a2l STATIC IMPORTED) + +set_target_properties(Upstream::a2l PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "C:/git_work/a2l/a2llib-main/a2llib-main/include" +) + +# Import target "Upstream::a2l" for configuration "Debug" +set_property(TARGET Upstream::a2l APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) +set_target_properties(Upstream::a2l PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX" + IMPORTED_LOCATION_DEBUG "C:/git_work/a2l/a2llib-main/a2llib-main/bin/Debug/a2ld.lib" + ) + +# Import target "Upstream::a2l" for configuration "Release" +set_property(TARGET Upstream::a2l APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) +set_target_properties(Upstream::a2l PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX" + IMPORTED_LOCATION_RELEASE "C:/git_work/a2l/a2llib-main/a2llib-main/bin/Release/a2l.lib" + ) + +# Import target "Upstream::a2l" for configuration "MinSizeRel" +set_property(TARGET Upstream::a2l APPEND PROPERTY IMPORTED_CONFIGURATIONS MINSIZEREL) +set_target_properties(Upstream::a2l PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_MINSIZEREL "CXX" + IMPORTED_LOCATION_MINSIZEREL "C:/git_work/a2l/a2llib-main/a2llib-main/bin/MinSizeRel/a2l.lib" + ) + +# Import target "Upstream::a2l" for configuration "RelWithDebInfo" +set_property(TARGET Upstream::a2l APPEND PROPERTY IMPORTED_CONFIGURATIONS RELWITHDEBINFO) +set_target_properties(Upstream::a2l PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_RELWITHDEBINFO "CXX" + IMPORTED_LOCATION_RELWITHDEBINFO "C:/git_work/a2l/a2llib-main/a2llib-main/bin/RelWithDebInfo/a2l.lib" + ) + +# This file does not depend on other imported targets which have +# been exported from the same project but in a separate export set. + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/a2llib-main/cmake/a2lConfig.cmake.in b/a2llib-main/cmake/a2lConfig.cmake.in new file mode 100644 index 0000000..8a4bd1f --- /dev/null +++ b/a2llib-main/cmake/a2lConfig.cmake.in @@ -0,0 +1,7 @@ +# All REQUIRED dependencies of a package should be listed here! +include(CMakeFindDependencyMacro) + +include("${CMAKE_CURRENT_LIST_DIR}/dbcTargets.cmake") + +@PACKAGE_INIT@ +set(dbc_DIR "@PACKAGE_SOME_INSTALL_DIR@") diff --git a/a2llib-main/img/a2llib.ico b/a2llib-main/img/a2llib.ico new file mode 100644 index 0000000..7765250 Binary files /dev/null and b/a2llib-main/img/a2llib.ico differ diff --git a/a2llib-main/img/a2llib.png b/a2llib-main/img/a2llib.png new file mode 100644 index 0000000..784924e Binary files /dev/null and b/a2llib-main/img/a2llib.png differ diff --git a/a2llib-main/img/document.ico b/a2llib-main/img/document.ico new file mode 100644 index 0000000..0ac2c39 Binary files /dev/null and b/a2llib-main/img/document.ico differ diff --git a/a2llib-main/img/mdflib.ico b/a2llib-main/img/mdflib.ico new file mode 100644 index 0000000..d187a54 Binary files /dev/null and b/a2llib-main/img/mdflib.ico differ diff --git a/a2llib-main/img/mdflib.png b/a2llib-main/img/mdflib.png new file mode 100644 index 0000000..bca6514 Binary files /dev/null and b/a2llib-main/img/mdflib.png differ diff --git a/a2llib-main/include/a2l/a2lenums.h b/a2llib-main/include/a2l/a2lenums.h new file mode 100644 index 0000000..fa726d0 --- /dev/null +++ b/a2llib-main/include/a2l/a2lenums.h @@ -0,0 +1,253 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once + +#include +#include +#include +namespace a2l { + +using EnumStringList = std::vector; + +enum class A2lAddressType { + PBYTE, + PWORD, + PLONG, + PLONGLONG, + DIRECT, + UNKNOWN +}; +A2lAddressType StringToAddressType(const std::string& text); +std::string_view AddressTypeToString(A2lAddressType type); +EnumStringList AddressTypeToStringList(); + +enum class A2lAxisType { + CURVE_AXIS, + COM_AXIS, + FIX_AXIS, + RES_AXIS, + STD_AXIS, + UNKNOWN +}; +A2lAxisType StringToAxisType(const std::string& text); +std::string_view AxisTypeToString(A2lAxisType type); +EnumStringList AxisTypeToStringList(); + +enum class A2lByteOrder { + MSB_FIRST, + MSB_LAST, + MSB_FIRST_MSW_LAST, + MSB_LAST_MSW_FIRST, + UNKNOWN +}; +A2lByteOrder StringToByteOrder(const std::string& order); +std::string_view ByteOrderToString(A2lByteOrder type); +EnumStringList ByteOrderToStringList(); + +enum class A2lCalibrationAccess { + CALIBRATION, + NO_CALIBRATION, + NOT_IN_MCD_SYSTEM, + OFFLINE_CALIBRATION, + UNKNOWN +}; +A2lCalibrationAccess StringToCalibrationAccess(const std::string& text); +std::string_view CalibrationAccessToString(A2lCalibrationAccess access); +EnumStringList CalibrationAccessToStringList(); + +enum class A2lCharacteristicType { + ASCII, + CURVE, + MAP, + CUBOID, + CUBE_4, + CUBE_5, + VAL_BLK, + VALUE, + UNKNOWN +}; +A2lCharacteristicType StringToCharacteristicType(const std::string& text); +std::string_view CharacteristicTypeToString(A2lCharacteristicType type); +EnumStringList CharacteristicTypeToStringList(); + +enum class A2lConversionType { + IDENTICAL, + FORM, + LINEAR, + RAT_FUNC, + TAB_INP, + TAB_NOINTP, + TAB_VERB, + UNKNOWN +}; +A2lConversionType StringToConversionType(const std::string& text); +std::string_view ConversionTypeToString(A2lConversionType type); +EnumStringList ConversionTypeToStringList(); + +enum class A2lDataType { + UBYTE, + SBYTE, + UWORD, + SWORD, + ULONG, + SLONG, + A_UINT64, + A_INT64, + FLOAT16_IEEE, + FLOAT32_IEEE, + FLOAT64_IEEE, + UNKNOWN +}; + +A2lDataType StringToDataType(const std::string& text); +std::string_view DataTypeToString(A2lDataType type); +EnumStringList DataTypeToStringList(); + +enum class A2lDeposit { + A2L_ABSOLUTE, + A2L_DIFFERENCE, + UNKNOWN +}; +A2lDeposit StringToDeposit(const std::string& mode); +std::string_view DepositToString(A2lDeposit deposit); +EnumStringList DepositToStringList(); + +enum class A2lEncoding { + ASCII, ///< 8-bit characters + UTF8, + UTF16, + UTF32, + UNKNOWN +}; +A2lEncoding StringToEncoding(const std::string& enc); +std::string_view EncodingToString(A2lEncoding encoding); +EnumStringList EncodingToStringList(); + + +enum class A2lIndexMode { + ALTERNATE_CURVES, + ALTERNATE_WITH_X, + ALTERNATE_WITH_Y, + COLUMN_DIR, + ROW_DIR, + UNKNOWN +}; +A2lIndexMode StringToIndexMode(const std::string& text); +std::string_view IndexModeToString(A2lIndexMode mode); +EnumStringList IndexModeToStringList(); + +enum class A2lIndexOrder { + INDEX_INCR, + INDEX_DECR, + UNKNOWN +}; +A2lIndexOrder StringToIndexOrder(const std::string& text); +std::string_view IndexOrderToString(A2lIndexOrder order); +EnumStringList IndexOrderToStringList(); + +enum class A2lLayout { + ROW_DIR, + COLUMN_DIR, + UNKNOWN +}; +A2lLayout StringToLayout(const std::string& text); +std::string_view LayoutToString(A2lLayout layout); +EnumStringList LayoutToStringList(); + +enum class A2lMemoryType { + EEPROM, + EPROM, + FLASH, + RAM, + ROM, + REGISTER, + NOT_IN_ECU, + UNKNOWN +}; +A2lMemoryType StringToMemoryType(const std::string& text); +std::string_view MemoryTypeToString(A2lMemoryType type); +EnumStringList MemoryTypeToStringList(); + +enum class A2lMemoryAttribute { + INTERN, + EXTERN, + UNKNOWN +}; +A2lMemoryAttribute StringToMemoryAttribute(const std::string& text); +std::string_view MemoryAttributeToString(A2lMemoryAttribute attr); +EnumStringList MemoryAttributeToStringList(); + +enum class A2lMonotony { + MON_DECREASE, + MON_INCREASE, + STRICT_DECREASE, + STRICT_INCREASE, + MONOTONOUS, + STRICT_MON, + NOT_MON, + UNKNOWN +}; +A2lMonotony StringToMonotony(const std::string& text); +std::string_view MonotonyToString(A2lMonotony type); +EnumStringList MonotonyToStringList(); + + +enum class A2lPrgType { + PRG_CODE, + PRG_DATA, + PRG_RESERVED, + UNKNOWN +}; +A2lPrgType StringToPrgType(const std::string& text); +std::string_view PrgTypeToString(A2lPrgType type); +EnumStringList PrgTypeToStringList(); + +enum class A2lSegmentType { + CALIBRATION_VARIABLES, + CODE, + DATA, + EXCLUDE_FROM_FLASH, + OFFLINE_DATA, + RESERVED, + SERAM, + VARIABLES, + UNKNOWN +}; +A2lSegmentType StringToSegmentType(const std::string& text); +std::string_view SegmentTypeToString(A2lSegmentType type); +EnumStringList SegmentTypeToStringList(); + +enum class A2lTrigger { + ON_CHANGE, + ON_USER_REQUEST, + UNKNOWN +}; +A2lTrigger StringToTrigger(const std::string& text); +std::string_view TriggerToString(A2lTrigger trigger); +EnumStringList TriggerToStringList(); + + +enum class A2lTypedefType { + TYPEDEF_AXIS, + TYPEDEF_BLOB, + TYPEDEF_CHARACTERISTIC, + TYPEDEF_MEASUREMENT, + TYPEDEF_STRUCTURE, + UNKNOWN +}; +A2lTypedefType StringToTypedefType(const std::string& text); +std::string_view TypedefTypeToString(A2lTypedefType type); +EnumStringList TypedefTypeToStringList(); + +enum class A2lUnitType { + DERIVED, + EXTENDED_SI, + UNKNOWN +}; +A2lUnitType StringToUnitType(const std::string& text); +std::string_view UnitTypeToString(A2lUnitType type); +EnumStringList UnitTypeToStringList(); +} // end namespace diff --git a/a2llib-main/include/a2l/a2lfile.h b/a2llib-main/include/a2l/a2lfile.h new file mode 100644 index 0000000..b44798e --- /dev/null +++ b/a2llib-main/include/a2l/a2lfile.h @@ -0,0 +1,69 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ +/** \file a2lfile.h + * \brief The A2L file object is the main user object. + */ +#pragma once +#include +#include +#include + +#include "a2l/a2lproject.h" +#include "a2l/a2lstructs.h" +namespace a2l { + + + +/** \brief Main user object that is an interface against an A2L file. + * + * The A2L file is the only object the user shall create. It handle the parsing + * of the file. An A2L file defines an ECU and optional hoe it communicate. + */ +class A2lFile { + public: + /** \brief Sets the file name. Full path required. */ + void Filename(const std::string& filename) {filename_ = filename; } + /** \brief Returns the file name with full path. */ + [[nodiscard]] const std::string& Filename() const {return filename_; } + + /** \brief Returns the File name without path and extension. */ + [[nodiscard]] std::string Name() const; + + /** \brief Returns the last (parser) error text. */ + [[nodiscard]] const std::string& LastError() const { return last_error_; } + + /** \brief Parses the A2L file. Returns true on success. */ + [[nodiscard]] bool ParseFile(); + + [[nodiscard]] Asap2Version& A2lVersion() { return a2l_version_; } + [[nodiscard]] const Asap2Version& A2lVersion() const { return a2l_version_; } + + [[nodiscard]] Asap2Version& A2mlVersion() { return a2ml_version_; } + [[nodiscard]] const Asap2Version& A2mlVersion() const { + return a2ml_version_; + } + + [[nodiscard]] A2lProject& Project() { return project_; } + [[nodiscard]] const A2lProject& Project() const { return project_; } + + void IsA2lFile(bool is_a2l_file) { found_ = is_a2l_file; } + + [[nodiscard]] bool IsA2lFile() const { return found_; } + + void Merge(A2lFile& include_file); + + private: + bool found_ = false; + std::string filename_; ///< Full path name + mutable std::string last_error_; ///< Last error message + + Asap2Version a2l_version_; + Asap2Version a2ml_version_; + A2lProject project_; + + +}; + +} // namespace dbc diff --git a/a2llib-main/include/a2l/a2lobject.h b/a2llib-main/include/a2l/a2lobject.h new file mode 100644 index 0000000..dedf11a --- /dev/null +++ b/a2llib-main/include/a2l/a2lobject.h @@ -0,0 +1,143 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once +#include +#include +#include "a2l/a2lenums.h" +#include "a2l/a2lstructs.h" +namespace a2l { + +/** \brief if_data strings sorted in protocol order */ +using IfDataList = std::map; + +class A2lObject { + public: + virtual ~A2lObject() = default; + void Name(const std::string& name) { name_ = name; } + [[nodiscard]] const std::string& Name() const { return name_; } + + + void ByteOrder(A2lByteOrder order) { byte_order_ = order; } + [[nodiscard]] A2lByteOrder ByteOrder() const { return byte_order_; } + + void CalibrationAccess(A2lCalibrationAccess access) { + calibration_access_ = access; + } + [[nodiscard]] A2lCalibrationAccess CalibrationAccess() const { + return calibration_access_; + } + + void Description(const std::string& description) { + description_ = description; + } + [[nodiscard]] const std::string& Description() const { return description_; } + + void Discrete(bool discrete) { discrete_ = discrete; } + [[nodiscard]] bool Discrete() const { return discrete_; } + + void DisplayIdentifier(const std::string& name) { + display_identifier_ = name; + } + [[nodiscard]] const std::string& DisplayIdentifier() const { + return display_identifier_; + } + + void EcuAddressExtension(int64_t ext) { + ecu_address_extension_ = ext; + } + [[nodiscard]] int64_t EcuAddressExtension() const { + return ecu_address_extension_; + } + + void ExtendedLimits(const A2lExtendedLimits& limits) { + extended_limits_ = limits; + } + [[nodiscard]] const A2lExtendedLimits& ExtendedLimits() const { + return extended_limits_; + } + + void Format(const std::string& format) {format_ = format; } + [[nodiscard]] const std::string& Format() const { return format_; } + + void FunctionList(const std::vector& list) { + function_list_ = list; + } + [[nodiscard]] const std::vector& FunctionList() const { + return function_list_; + } + + void GuardRails(bool guard_rails) { guard_rails_ = guard_rails; } + [[nodiscard]] bool GuardRails() const { return guard_rails_; }; + + void MatrixDim(const std::vector& list) { matrix_dim_ = list; } + [[nodiscard]] const std::vector& MatrixDim() const { + return matrix_dim_; + } + + void MaxRefresh(const A2lMaxRefresh& rate) { max_refresh_ = rate; } + [[nodiscard]] const A2lMaxRefresh& MaxRefresh() const { return max_refresh_; }; + + void ModelLink(const std::string& link) { model_link_ = link; } + [[nodiscard]] const std::string& ModelLink() const { return model_link_; } + + void PhysUnit(const std::string& unit) { phys_unit_ = unit; } + [[nodiscard]] const std::string& PhysUnit() const { return phys_unit_; } + + void ReadOnly(bool read_only) { read_only_ = read_only; } + [[nodiscard]] bool ReadOnly() const { return read_only_; } + + void RefMemorySegment(const std::string& segment) { + ref_memory_segment_ = segment; + } + [[nodiscard]] const std::string& RefMemorySegment() const { + return ref_memory_segment_; + } + void StepSize(double step_size) { step_size_ = step_size; } + [[nodiscard]] double StepSize() const { return step_size_; } + + void SymbolLink(const A2lSymbolLink& symbol) { symbol_link_ = symbol; } + [[nodiscard]] const A2lSymbolLink& SymbolLink() const { return symbol_link_; } + + void AddAnnotation(const A2lAnnotation& annotation); + [[nodiscard]] AnnotationList& Annotations() { + return annotation_list_; + } + [[nodiscard]] const AnnotationList& Annotations() const { + return annotation_list_; + } + + void AddIfData(const std::string& input); + [[nodiscard]] const IfDataList& IfDatas() const { return if_data_list_;} + [[nodiscard]] bool HaveIfData() const { return !if_data_list_.empty();} + [[nodiscard]] bool HaveIfData(const std::string_view& protocol) const; + private: + std::string name_; + std::string description_; + A2lByteOrder byte_order_ = A2lByteOrder::UNKNOWN; + A2lCalibrationAccess calibration_access_ = A2lCalibrationAccess::UNKNOWN; + + bool discrete_ = false; + std::string display_identifier_; + int64_t ecu_address_extension_ = 0; + A2lExtendedLimits extended_limits_ = {}; + std::string format_; + std::vector function_list_; + bool guard_rails_ = false; + std::vector matrix_dim_; + A2lMaxRefresh max_refresh_; + std::string model_link_; + std::string phys_unit_; + bool read_only_ = false; + std::string ref_memory_segment_; + double step_size_ = 0.0; + A2lSymbolLink symbol_link_; + + IfDataList if_data_list_; + AnnotationList annotation_list_; + +}; + +} // end namespace diff --git a/a2llib-main/include/a2l/a2lproject.h b/a2llib-main/include/a2l/a2lproject.h new file mode 100644 index 0000000..04aeb2a --- /dev/null +++ b/a2llib-main/include/a2l/a2lproject.h @@ -0,0 +1,34 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT +*/ + +#pragma once + +#include +#include +#include + +#include "a2l/a2lobject.h" +#include "a2l/a2lstructs.h" +#include "a2l/module.h" + +namespace a2l { +using ModuleList = std::map>; + +class A2lProject : public A2lObject { + public: + [[nodiscard]] A2lHeader& Header() { return header_;} + [[nodiscard]] const A2lHeader& Header() const { return header_;} + + void AddModule(std::unique_ptr& module ); + [[nodiscard]] const ModuleList& Modules() const { return module_list_; } + [[nodiscard]] ModuleList& Modules() { return module_list_; } + +private: + + A2lHeader header_; + ModuleList module_list_; +}; + +} // namespace a2l diff --git a/a2llib-main/include/a2l/a2lstructs.h b/a2llib-main/include/a2l/a2lstructs.h new file mode 100644 index 0000000..2734730 --- /dev/null +++ b/a2llib-main/include/a2l/a2lstructs.h @@ -0,0 +1,254 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ +#include +#include +#include +#include +#include "a2l/a2lenums.h" +#pragma once + +namespace a2l { + +struct Asap2Version { + uint64_t VersionNo = 0; + uint64_t UpgradeNo = 0; + void FromString(const std::string& version) { + // Assume "Version.Upgrade" + try { + const auto dot = version.find('.'); + if (dot == std::string::npos) { + VersionNo = std::stoull(version); + } else { + VersionNo = std::stoull(version.substr(0, dot)); + UpgradeNo = std::stoull(version.substr(dot + 1)); + } + } catch (const std::exception& ) {} + } +}; + +struct A2lAnnotation { + std::string Label; + std::string Origin; + std::vector Text; +}; +using AnnotationList = std::vector; + +struct A2lAxisPts { + uint64_t Position = 0; + A2lDataType DataType = A2lDataType::UNKNOWN; + A2lIndexOrder IndexOrder = A2lIndexOrder::UNKNOWN; + A2lAddressType AddressType = A2lAddressType::UNKNOWN; +}; + +struct A2lAxisRescale { + uint64_t Position = 0; + A2lDataType DataType = A2lDataType::UNKNOWN; + uint64_t MaxNoRescalePairs = 0; + A2lIndexOrder IndexOrder = A2lIndexOrder::UNKNOWN; + A2lAddressType AddressType = A2lAddressType::UNKNOWN; +}; + +struct A2lBitOperation { + uint64_t LeftShift = 0; + uint64_t RightShift = 0; + bool SignExtended = false; +}; + +struct A2lCalibrationHandle { + std::string Comment; + std::vector HandleList; +}; + +struct A2lCalibrationMethod { + std::string Method; + uint64_t Version = 0; + std::vector CalibrationHandleList; +}; + +struct A2lControllerAddress { + uint64_t Index = 0; + A2lByteOrder ByteOrder = A2lByteOrder::MSB_LAST; + uint64_t StartAddress = 0; + uint64_t Length = 0; +}; +using ControllerAddressList = std::vector; + +struct A2lDependentCharacteristic { + std::string Formula; + std::vector CharacteristicList; +}; + +struct A2lDistOp { + uint64_t Position = 0; + A2lDataType DataType = A2lDataType::UNKNOWN; +}; + +struct A2lExtendedLimits { + double LowerLimits = 0.0; + double UpperLimits = 0.0; +}; + +struct A2lFixAxisPar { + double Offset = 0.0; + double Shift = 0.0; + uint64_t NoAxisPoints = 0; +}; + +struct A2lFixAxisParDist { + double Offset = 0.0; + double Distance = 0.0; + uint64_t NoAxisPoints = 0; +}; + +struct A2lFncValue { + uint64_t Position = 0; + A2lDataType DataType = A2lDataType::UNKNOWN; + A2lIndexMode IndexMode = A2lIndexMode::UNKNOWN; + A2lAddressType AddressType = A2lAddressType::UNKNOWN; +}; + +struct A2lHeader { + std::string Comment; + std::string VersionNo; + std::string ProjectNo; +}; + +struct A2lIdentification { + uint64_t Position = 0; + A2lDataType DataType = A2lDataType::UNKNOWN; +}; + +struct A2lLimits { + double LowerLimit = 0.0; + double UpperLimit = 0.0; +}; + +struct A2lMaxRefresh { + uint64_t ScalingUnit = 0; + uint64_t Rate = 0; +}; + +struct A2lMemoryLayout { + A2lPrgType Type = A2lPrgType::UNKNOWN; + uint64_t Address = 0; + uint64_t Size = 0; + std::vector OffsetList; + std::map IfDataList; +}; + +struct A2lMemorySegment { + std::string Name; + std::string Description; + A2lSegmentType SegmentType = A2lSegmentType::UNKNOWN; + A2lMemoryType MemoryType = A2lMemoryType::UNKNOWN; + A2lMemoryAttribute Attribute = A2lMemoryAttribute::UNKNOWN; + uint64_t Address = 0; + uint64_t Size = 0; + std::vector OffsetList; + std::map IfDataList; +}; + + +struct A2lModCommon { + std::string Comment; + uint64_t AlignmentByte = 0; + uint64_t AlignmentWord = 0; + uint64_t AlignmentLong = 0; + uint64_t AlignmentInt64 = 0; + uint64_t AlignmentFloat16 = 0; + uint64_t AlignmentFloat32 = 0; + uint64_t AlignmentFloat64 = 0; + A2lByteOrder ByteOrder = A2lByteOrder::UNKNOWN; + uint64_t DataSize = 0; + A2lDeposit Deposit = A2lDeposit::UNKNOWN; +}; + +struct A2lModPar { + std::string Comment; + std::vector AddressEpkList; + std::vector CalibrationMethodList; + std::string CpuType; + std::string Customer; + std::string CustomerNo; + std::string Ecu; + int64_t EcuCalibrationOffset = 0; + std::string Epk; + std::vector MemoryLayoutList; + std::vector MemorySegmentList; + uint64_t NoOfInterfaces = 0; + std::string PhoneNo; + std::string Supplier; + std::map SystemConstantList; + std::string User; + std::string Version; +}; + +struct A2lSiExponents { + int64_t Length = 0; + int64_t Mass = 0; + int64_t Time = 0; + int64_t ElectricCurrent = 0; + int64_t Temperature = 0; + int64_t AmountOfSubstance = 0; + int64_t LuminousIntensity = 0; + + [[nodiscard]] bool HasExponent() const { + return Length != 0 || Mass != 0 || Time != 0 || ElectricCurrent != 0 || + Temperature != 0 || AmountOfSubstance != 0 || LuminousIntensity != 0; + } +}; + + +struct A2lStructureComponent { + std::string Name; + std::string Typedef; + uint64_t AddressOffset = 0; + A2lAddressType AddressType = A2lAddressType::DIRECT; + A2lLayout Layout = A2lLayout::ROW_DIR; + std::vector MatrixDim; + std::string SymbolTypeLink; +}; +using StructureComponentList = std::map>; + +struct A2lSymbolLink { + std::string SymbolName; + int64_t Offset = 0; +}; + +struct A2lUserRight { + std::string UserLevelId; + bool ReadOnly = false; + std::vector> RefGroupList; +}; +using UserRightList = std::map>; + +struct A2lVarCharacteristic { + std::string Name; + std::vector CriterionNameList; + std::vector AddressList; +}; + +struct A2lVarCriterion { + std::string Name; + std::string Description; + std::vector ValueList; + std::string Measurement; + std::string SelectionCharacteristic; +}; + +struct A2lVariantCoding { + std::map CharacteristicList; + std::map CriterionList; + std::vector> ForbiddenCombList; + std::string Naming; + std::string Separator; + [[nodiscard]] bool HasCoding() const { + return !CharacteristicList.empty() || !CriterionList.empty() || + !ForbiddenCombList.empty() || !Naming.empty() || !Separator.empty(); + } +}; + +} // end namespace a2l diff --git a/a2llib-main/include/a2l/a2mlblock.h b/a2llib-main/include/a2l/a2mlblock.h new file mode 100644 index 0000000..2ea9c34 --- /dev/null +++ b/a2llib-main/include/a2l/a2mlblock.h @@ -0,0 +1,28 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once + +#include "a2l/a2mlobject.h" +#include + + +namespace a2l { + +class A2mlBlock { + public: + explicit A2mlBlock(const std::string& a2ml); + [[nodiscard]] bool IsOk() const { return parse_; } + [[nodiscard]] const A2mlBlockList& BlockList() const { return block_list_; } + [[nodiscard]] const std::string& LastError() const { return last_error_; } + private: + bool parse_ = false; + std::string last_error_; + A2mlBlockList block_list_; + +}; + + +} // namespace a2l diff --git a/a2llib-main/include/a2l/a2mlobject.h b/a2llib-main/include/a2l/a2mlobject.h new file mode 100644 index 0000000..fea8a7d --- /dev/null +++ b/a2llib-main/include/a2l/a2mlobject.h @@ -0,0 +1,89 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT +*/ + +#pragma once + +#include +#include +#include + +namespace a2l { + +enum class A2mlTypeName : int { + PREDEFINED, + STRUCT, + TAGGED_STRUCT, + TAGGED_UNION, + ENUMERATE, + BLOCK, + UNKNOWN +}; + +enum class A2mlDataType : int { + CHAR, + INT, + LONG, + INT64, + UCHAR, + UINT, + UINT64, + ULONG, + DOUBLE, + FLOAT, + TEXT_ARRAY, + UNKNOWN +}; + +class A2mlObject; +using A2mlMemberList = std::vector; +using A2mlEnumerateList = std::map; +using A2mlBlockList = A2mlMemberList; + +class A2mlObject { + public: + A2mlObject() = default; + + explicit A2mlObject(A2mlTypeName type); + + void Ident(const std::string& ident) { ident_ = ident; } + [[nodiscard]] const std::string& Ident() const { return ident_; } + + void Tag(const std::string& tag) { tag_ = tag; } + [[nodiscard]] const std::string& Tag() const { return tag_; } + + void Type(A2mlTypeName type) { type_ = type; } + [[nodiscard]] A2mlTypeName Type() const { return type_; } + [[nodiscard]] std::string_view TypeAsString() const; + + void DataType(A2mlDataType type) { data_type_ = type; } + [[nodiscard]] A2mlDataType DataType() const { return data_type_; } + [[nodiscard]] std::string_view DataTypeAsString() const; + + void MemberList(const A2mlMemberList& list) { member_list_ = list; } + [[nodiscard]] A2mlMemberList& MemberList() { return member_list_; } + [[nodiscard]] const A2mlMemberList& MemberList() const { + return member_list_; + } + + void EnumerateList(const A2mlEnumerateList& list) { enumerate_list_ = list; } + [[nodiscard]] A2mlEnumerateList& EnumerateList() { return enumerate_list_; } + [[nodiscard]] const A2mlEnumerateList& EnumerateList() const { + return enumerate_list_; + } + + [[nodiscard]] std::string AsString() const; + private: + + std::string tag_; + std::string ident_; + A2mlMemberList member_list_; + A2mlEnumerateList enumerate_list_; + + A2mlTypeName type_ = A2mlTypeName::UNKNOWN; + A2mlDataType data_type_ = A2mlDataType::UNKNOWN; + +}; + +} // namespace a2l diff --git a/a2llib-main/include/a2l/axisdescr.h b/a2llib-main/include/a2l/axisdescr.h new file mode 100644 index 0000000..a2dad1b --- /dev/null +++ b/a2llib-main/include/a2l/axisdescr.h @@ -0,0 +1,111 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once + +#include "a2l/a2lobject.h" +#include "a2l/a2lenums.h" +#include +#include + +namespace a2l { +class AxisDescr : public A2lObject { + public: + void AxisType(A2lAxisType type) { axis_type_ = type; } + [[nodiscard]] A2lAxisType AxisType() const { return axis_type_; } + + void InputQuantity(const std::string& quantity) { + if (quantity != "NO_INPUT_QUANTITY") { + input_quantity_ = quantity; + } else { + input_quantity_.clear(); + } + } + [[nodiscard]] const std::string& InputQuantity() const { + return input_quantity_; + } + + void Conversion(const std::string& conversion) { + if (conversion != "NO_COMPU_METHOD") { + conversion_ = conversion; + } else { + conversion_.clear(); + } + } + [[nodiscard]] const std::string& Conversion() const { + return conversion_; + } + + void MaxAxisPoints(uint64_t nof) { max_axis_points_ = nof; } + [[nodiscard]] uint64_t MaxAxisPoints() const { return max_axis_points_; } + + void LowerLimit(double limit) { lower_limit_ = limit; } + [[nodiscard]] double LowerLimit() const { return lower_limit_; } + + void UpperLimit(double limit) { upper_limit_ = limit; } + [[nodiscard]] double UpperLimit() const { return upper_limit_; } + + void AxisPtsRef(const std::string& ref) { axis_pts_ref_ = ref; } + [[nodiscard]] const std::string& AxisPtsRef() const { return axis_pts_ref_; } + + void CurveAxisRef(const std::string& ref) { curve_axis_ref_ = ref; } + [[nodiscard]] const std::string& CurveAxisRef() const { + return curve_axis_ref_; + } + void Deposit(A2lDeposit deposit) { + deposit_ = deposit; + } + [[nodiscard]] A2lDeposit Deposit() const { + return deposit_; + } + + void FixAxisPar(const A2lFixAxisPar& axis_par) { + fix_axis_par_ = axis_par; + } + [[nodiscard]] const A2lFixAxisPar& FixAxisPar() const { + return fix_axis_par_; + } + + void FixAxisParDist(const A2lFixAxisParDist& axis_par_dist) { + fix_axis_par_dist_ = axis_par_dist; + } + [[nodiscard]] const A2lFixAxisParDist& FixAxisParDist() const { + return fix_axis_par_dist_; + } + + void FixAxisParList(const std::vector& list) { + fix_axis_par_list_ = list; + } + [[nodiscard]] const std::vector& FixAxisParList() const { + return fix_axis_par_list_; + } + + void MaxGradient(double max) { max_grad_ = max; } + [[nodiscard]] double MaxGrad() const { return max_grad_; } + + void Monotony(A2lMonotony monotony) { monotony_ = monotony; } + [[nodiscard]] A2lMonotony Monotony() const { return monotony_; } + private: + A2lAxisType axis_type_ = A2lAxisType::UNKNOWN; + std::string input_quantity_; + std::string conversion_; + uint64_t max_axis_points_ = 0; + + double lower_limit_ = 0.0; + double upper_limit_ = 0.0; + + std::string axis_pts_ref_; + std::string curve_axis_ref_; + A2lDeposit deposit_ = A2lDeposit::UNKNOWN; + + A2lFixAxisPar fix_axis_par_ = {}; + A2lFixAxisParDist fix_axis_par_dist_ = {}; + std::vector fix_axis_par_list_; + double max_grad_ = 0.0; + A2lMonotony monotony_ = A2lMonotony::UNKNOWN; +}; + +using AxisDescrList = std::vector>; +} // end namespace a2l \ No newline at end of file diff --git a/a2llib-main/include/a2l/axispts.h b/a2llib-main/include/a2l/axispts.h new file mode 100644 index 0000000..315393f --- /dev/null +++ b/a2llib-main/include/a2l/axispts.h @@ -0,0 +1,93 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once + +#include "a2l/a2lobject.h" + +#include +#include + +#include "a2l/a2lenums.h" + +namespace a2l { + + +class AxisPts : public A2lObject { + public: + void Address(uint64_t address) { address_ = address; } + [[nodiscard]] uint64_t Address() const { return address_; } + + void InputQuantity(const std::string& quantity) { + if (quantity != "NO_INPUT_QUANTITY") { + input_quantity_ = quantity; + } else { + input_quantity_.clear(); + } + } + [[nodiscard]] const std::string& InputQuantity() const { + return input_quantity_; + } + + void RefRecord(const std::string& ref) { + ref_record_ = ref; + } + [[nodiscard]] const std::string& RefRecord() const { + return ref_record_; + } + + void MaxDiff(double max_diff) { max_diff_ = max_diff; } + [[nodiscard]] double MaxDiff() const { return max_diff_; } + + void Conversion(const std::string& conversion) { + if (conversion != "NO_COMPU_METHOD") { + conversion_ = conversion; + } else { + conversion_.clear(); + } + } + [[nodiscard]] const std::string& Conversion() const { + return conversion_; + } + + void MaxAxisPoints(uint64_t nof) { max_axis_points_ = nof; } + [[nodiscard]] uint64_t MaxAxisPoints() const { return max_axis_points_; } + + void LowerLimit(double limit) { lower_limit_ = limit; } + [[nodiscard]] double LowerLimit() const { return lower_limit_; } + + void UpperLimit(double limit) { upper_limit_ = limit; } + [[nodiscard]] double UpperLimit() const { return upper_limit_; } + + void Deposit(A2lDeposit deposit) { + deposit_ = deposit; + } + [[nodiscard]] A2lDeposit Deposit() const { + return deposit_; + } + + void Monotony(A2lMonotony monotony) { monotony_ = monotony; } + [[nodiscard]] A2lMonotony Monotony() const { return monotony_; } + + + private: + uint64_t address_ = 0; + std::string input_quantity_; + std::string ref_record_; ///< Named deposit in standard + double max_diff_ = 0.0; + std::string conversion_; + uint64_t max_axis_points_ = 0; + double lower_limit_ = 0.0; + double upper_limit_ = 0.0; + + A2lDeposit deposit_ = A2lDeposit::UNKNOWN; + A2lExtendedLimits extended_limits_; + A2lMonotony monotony_ = A2lMonotony::UNKNOWN; + +}; + +using AxisPtsList = std::map>; + +} // namespace a2l diff --git a/a2llib-main/include/a2l/blob.h b/a2llib-main/include/a2l/blob.h new file mode 100644 index 0000000..029f151 --- /dev/null +++ b/a2llib-main/include/a2l/blob.h @@ -0,0 +1,30 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once + +#include "a2l/a2lobject.h" +#include +namespace a2l { +class Blob : public A2lObject { + public: + void Address(uint64_t address) { address_ = address; } + [[nodiscard]] uint64_t Address() const { return address_; } + + void Size(uint64_t size) { size_ = size; } + [[nodiscard]] uint64_t Size() const { return size_;} + + void AddressType(A2lAddressType type) { address_type_ = type; } + [[nodiscard]] A2lAddressType AddressType() const { return address_type_;} + + private: + uint64_t address_ = 0; + uint64_t size_ = 0; + + A2lAddressType address_type_ = A2lAddressType::UNKNOWN; +}; + +using BlobList = std::map>; +} // end namespace a2l \ No newline at end of file diff --git a/a2llib-main/include/a2l/characteristic.h b/a2llib-main/include/a2l/characteristic.h new file mode 100644 index 0000000..8777b4c --- /dev/null +++ b/a2llib-main/include/a2l/characteristic.h @@ -0,0 +1,100 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once + +#include "a2l/a2lobject.h" +#include +#include "a2l/a2lenums.h" +#include "a2l/axisdescr.h" +namespace a2l { + +class Characteristic : public A2lObject { + public: + void Address(uint64_t address) { address_ = address; } + [[nodiscard]] uint64_t Address() const { return address_; } + + void BitMask(uint64_t mask) { bit_mask_ = mask; } + [[nodiscard]] uint64_t BitMask() const { return bit_mask_; } + + void ComparisonQuantity(const std::string& quantity) { + comparison_quantity_ = quantity; + } + [[nodiscard]] const std::string& ComparisonQuantity() const { + return comparison_quantity_; + } + + void Conversion(const std::string& conversion) { conversion_ = conversion; } + [[nodiscard]] const std::string& Conversion() const { return conversion_; } + + void DependentCharacteristic(const A2lDependentCharacteristic& dependent) { + dependent_characteristic_ = dependent; + } + [[nodiscard]] const A2lDependentCharacteristic& DependentCharacteristic() + const { return dependent_characteristic_; + } + + void Deposit(const std::string& deposit) { deposit_ = deposit; } + [[nodiscard]] const std::string& Deposit() const { return deposit_; } + + void Encoding(A2lEncoding encoding) { encoding_ = encoding; } + [[nodiscard]] A2lEncoding Encoding() const { return encoding_; } + + void MapList(const std::vector& list) { map_list_ = list; } + [[nodiscard]] const std::vector& MapList() const { + return map_list_; + } + + void MaxDiff(double diff) { max_diff_ = diff; } + [[nodiscard]] double MaxDiff() const { return max_diff_; } + + void LowerLimit(double limit) { lower_limit_ = limit; } + [[nodiscard]] double LowerLimit() const { return lower_limit_; } + + void UpperLimit(double limit) { upper_limit_ = limit; } + [[nodiscard]] double UpperLimit() const { return upper_limit_; } + + void Number(uint64_t number) { number_ = number; } + [[nodiscard]] uint64_t Number() const { return number_; } + + void Type(A2lCharacteristicType type) { type_ = type; } + [[nodiscard]] A2lCharacteristicType Type() const { return type_; } + + void VirtualCharacteristic(const A2lDependentCharacteristic& virt) { + virtual_characteristic_ = virt; + } + [[nodiscard]] const A2lDependentCharacteristic& VirtualCharacteristic() + const { return virtual_characteristic_; + } + + void AddAxisDescr(std::unique_ptr& axis_descr); + [[nodiscard]] AxisDescrList& AxisDescriptions() { + return axis_descr_list_; + } + [[nodiscard]] const AxisDescrList& AxisDescriptions() const { + return axis_descr_list_; + } + + private: + A2lCharacteristicType type_ = A2lCharacteristicType::UNKNOWN; + AxisDescrList axis_descr_list_; + uint64_t address_ = 0; + uint64_t bit_mask_ = 0; + std::string comparison_quantity_; + std::string conversion_; + A2lDependentCharacteristic dependent_characteristic_ = {}; + std::string deposit_; + A2lEncoding encoding_ = A2lEncoding::ASCII; + std::vector map_list_; + double max_diff_ = 0; + double lower_limit_ = 0.0; + double upper_limit_ = 0.0; + uint64_t number_ = 0; + A2lDependentCharacteristic virtual_characteristic_ = {}; +}; + +using CharacteristicList = std::map>; +} // end namespace a2l diff --git a/a2llib-main/include/a2l/compumethod.h b/a2llib-main/include/a2l/compumethod.h new file mode 100644 index 0000000..53cf067 --- /dev/null +++ b/a2llib-main/include/a2l/compumethod.h @@ -0,0 +1,59 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once +#include "a2l/a2lobject.h" +#include "a2l/a2lenums.h" +#include +#include +namespace a2l { + +class CompuMethod : public A2lObject { + public: + void Type(A2lConversionType type) { conversion_type_ = type; } + [[nodiscard]] A2lConversionType Type() const { return conversion_type_; } + + void Coeffs(const std::vector& list) { coeffs_ = list; } + [[nodiscard]] const std::vector& Coeffs() const { return coeffs_; } + + void CoeffsLinear(const std::vector& list) { + coeffs_linear_ = list; + } + [[nodiscard]] const std::vector& CoeffsLinear() const { + return coeffs_linear_; + } + + void CompuTabRef(const std::string& ref) { compu_tab_ref_ = ref; } + [[nodiscard]] const std::string& CompuTabRef() const { + return compu_tab_ref_; + } + + void Formula(const std::string& formula) { formula_ = formula; } + [[nodiscard]] const std::string& Formula() const { return formula_; } + + void FormulaInv(const std::string& formula) { formula_inv_ = formula; } + [[nodiscard]] const std::string& FormulaInv() const { return formula_inv_; } + + void RefUnit(const std::string& unit) { ref_unit_ = unit; } + [[nodiscard]] const std::string& RefUnit() const { return ref_unit_; } + + void StatusStringRef(const std::string& ref) { status_string_ref_ = ref; } + [[nodiscard]] const std::string& StatusStringRef() const { + return status_string_ref_; + } + private: + A2lConversionType conversion_type_ = A2lConversionType::UNKNOWN; + std::vector coeffs_; + std::vector coeffs_linear_; + std::string compu_tab_ref_; + std::string formula_; + std::string formula_inv_; + std::string ref_unit_; + std::string status_string_ref_; +}; + +using CompuMethodList = std::map>; + +} diff --git a/a2llib-main/include/a2l/computab.h b/a2llib-main/include/a2l/computab.h new file mode 100644 index 0000000..41dc7d8 --- /dev/null +++ b/a2llib-main/include/a2l/computab.h @@ -0,0 +1,49 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once + +#include "a2l/a2lobject.h" +#include +#include + +namespace a2l { + +class CompuTab : public A2lObject { + public: + void Type(A2lConversionType type) { conversion_type_ = type; } + [[nodiscard]] A2lConversionType Type() const { return conversion_type_; } + + void Rows(uint64_t rows) { rows_ = rows; } + [[nodiscard]] uint64_t Rows() const { return rows_; } + + void KeyValueList(const std::map& list) { + value_list_ = list; + } + [[nodiscard]] const std::map& KeyValueList() const { + return value_list_; + } + + void DefaultValue(const std::string& value); + [[nodiscard]] const std::string& DefaultValue() const { + return default_value_; + } + + void DefaultValueNumeric(double value); + [[nodiscard]] double DefaultValueNumeric() const { + return default_value_numeric_; + } + + private: + A2lConversionType conversion_type_ = A2lConversionType::UNKNOWN; + uint64_t rows_ = 0; + std::map value_list_; + std::string default_value_; ///< Default value as string + double default_value_numeric_ = 0.0; ///< Default value as double +}; + +using CompuTabList = std::map>; + +} // end namespace a2l diff --git a/a2llib-main/include/a2l/compuvtab.h b/a2llib-main/include/a2l/compuvtab.h new file mode 100644 index 0000000..1679ca4 --- /dev/null +++ b/a2llib-main/include/a2l/compuvtab.h @@ -0,0 +1,43 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once + +#include "a2l/a2lobject.h" +#include +#include + +namespace a2l { + +class CompuVtab : public A2lObject { + public: + void Type(A2lConversionType type) { conversion_type_ = type; } + [[nodiscard]] A2lConversionType Type() const { return conversion_type_; } + + void Rows(uint64_t rows) { rows_ = rows; } + [[nodiscard]] uint64_t Rows() const { return rows_; } + + void KeyValueList(const std::map& list) { + value_list_ = list; + } + [[nodiscard]] const std::map& KeyValueList() const { + return value_list_; + } + + void DefaultValue(const std::string& value) { default_value_ = value; } + [[nodiscard]] const std::string& DefaultValue() const { + return default_value_; + } + + private: + A2lConversionType conversion_type_ = A2lConversionType::TAB_VERB; + uint64_t rows_ = 0; + std::map value_list_; + std::string default_value_; +}; + +using CompuVtabList = std::map>; + +} // end namespace a2l diff --git a/a2llib-main/include/a2l/compuvtabrange.h b/a2llib-main/include/a2l/compuvtabrange.h new file mode 100644 index 0000000..6663f24 --- /dev/null +++ b/a2llib-main/include/a2l/compuvtabrange.h @@ -0,0 +1,42 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once + +#include "a2l/a2lobject.h" +#include +#include + +namespace a2l { + +class CompuVtabRange : public A2lObject { + public: + void Rows(uint64_t rows) { rows_ = rows; } + [[nodiscard]] uint64_t Rows() const { return rows_; } + + void KeyValueList(const std::map, + std::string>& list) { + value_list_ = list; + } + [[nodiscard]] const std::map, + std::string>& KeyValueList() const { + return value_list_; + } + + void DefaultValue(const std::string& value) { default_value_ = value; } + [[nodiscard]] const std::string& DefaultValue() const { + return default_value_; + } + + private: + uint64_t rows_ = 0; + std::map, std::string> value_list_; + std::string default_value_; +}; + +using CompuVtabRangeList = std::map>; + +} // end namespace a2l diff --git a/a2llib-main/include/a2l/frame.h b/a2llib-main/include/a2l/frame.h new file mode 100644 index 0000000..13b0fa1 --- /dev/null +++ b/a2llib-main/include/a2l/frame.h @@ -0,0 +1,36 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once + +#include "a2l/a2lobject.h" +#include +#include + +namespace a2l { +class Frame : public A2lObject { + public: + void ScalingUnit(uint64_t scale) { scaling_unit_ = scale; } + [[nodiscard]] uint64_t ScalingUnit() const { return scaling_unit_; } + + void Rate(uint64_t rate) { rate_ = rate; } + [[nodiscard]] uint64_t Rate() const { return rate_; } + + void FrameMeasurement(const std::vector& list) { + frame_measurement_list_ = list; + } + [[nodiscard]] const std::vector& FrameMeasurement() const { + return frame_measurement_list_; + } + + private: + uint64_t scaling_unit_ = 0; + uint64_t rate_ = 0; + std::vector frame_measurement_list_; +}; + +using FrameList = std::map>; + +} // end namespace a2l diff --git a/a2llib-main/include/a2l/function.h b/a2llib-main/include/a2l/function.h new file mode 100644 index 0000000..4611e20 --- /dev/null +++ b/a2llib-main/include/a2l/function.h @@ -0,0 +1,84 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once + +#include "a2l/a2lobject.h" +#include +#include + +namespace a2l { +class Function : public A2lObject { + public: + void ComponentType(const std::string& type) { component_type_ = type; } + [[nodiscard]] const std::string& ComponentType() const { + return component_type_; + } + + void PrototypeOf(const std::string& type) { prototype_of_ = type; } + [[nodiscard]] const std::string& PrototypeOf() const { + return prototype_of_; + } + + void DefaultCharacteristics(const std::vector& list) { + default_characteristic_list_ = list; + } + [[nodiscard]] const std::vector& DefaultCharacteristics() const { + return default_characteristic_list_; + } + + void Version(const std::string& version) { version_ = version; } + [[nodiscard]] const std::string& Version() const { return version_; } + + void InMeasurements(const std::vector& list) { + in_measurement_list_ = list; + } + [[nodiscard]] const std::vector& InMeasurements() const { + return in_measurement_list_; + } + + void LocMeasurements(const std::vector& list) { + loc_measurement_list_ = list; + } + [[nodiscard]] const std::vector& LocMeasurements() const { + return loc_measurement_list_; + } + + void OutMeasurements(const std::vector& list) { + out_measurement_list_ = list; + } + [[nodiscard]] const std::vector& OutMeasurements() const { + return out_measurement_list_; + } + + void RefCharacteristics(const std::vector& list) { + ref_characteristic_list_ = list; + } + [[nodiscard]] const std::vector& RefCharacteristics() const { + return ref_characteristic_list_; + } + + void SubFunctions(const std::vector& list) { + sub_function_list_ = list; + } + [[nodiscard]] const std::vector& SubFunctions() const { + return sub_function_list_; + } + + private: + std::string component_type_; + std::string prototype_of_; + std::vector default_characteristic_list_; + std::string version_; + std::vector in_measurement_list_; + std::vector loc_measurement_list_; + std::vector out_measurement_list_; + std::vector ref_characteristic_list_; + std::vector sub_function_list_; +}; + +using FuncList = std::map>; + +} // end namespace a2l diff --git a/a2llib-main/include/a2l/group.h b/a2llib-main/include/a2l/group.h new file mode 100644 index 0000000..7fcf4e7 --- /dev/null +++ b/a2llib-main/include/a2l/group.h @@ -0,0 +1,47 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once + +#include "a2l/a2lobject.h" +#include +#include + +namespace a2l { +class Group : public A2lObject { + public: + void Root(bool root) { root_ = root; } + [[nodiscard]] bool Root() const { return root_; } + + void RefCharacteristics(const std::vector& list) { + ref_characteristic_list_ = list; + } + [[nodiscard]] const std::vector& RefCharacteristics() const { + return ref_characteristic_list_; + } + + void RefMeasurements(const std::vector& list) { + ref_measurement_list_ = list; + } + [[nodiscard]] const std::vector& RefMeasurements() const { + return ref_measurement_list_; + } + + void SubGroups(const std::vector& list) { + sub_group_list_ = list; + } + [[nodiscard]] const std::vector& SubGroups() const { + return sub_group_list_; + } + private: + bool root_ = false; + std::vector ref_characteristic_list_; + std::vector ref_measurement_list_; + std::vector sub_group_list_; +}; + +using GroupList = std::map>; + +} // end namespace a2l diff --git a/a2llib-main/include/a2l/ifdatablock.h b/a2llib-main/include/a2l/ifdatablock.h new file mode 100644 index 0000000..249e283 --- /dev/null +++ b/a2llib-main/include/a2l/ifdatablock.h @@ -0,0 +1,38 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once + +#include "a2l/ifdataitem.h" +#include +#include + +namespace a2l { + +class IfDataBlock { + public: + explicit IfDataBlock(const std::string& ifdata); + [[nodiscard]] bool IsOk() const { return parse_; } + + [[nodiscard]] const std::string& Protocol() const { + return protocol_; + } + [[nodiscard]] const std::vector& ItemList() const { + return item_list_; + } + [[nodiscard]] const std::string& LastError() const { return last_error_; } + + [[nodiscard]] std::string AsString() const; + private: + bool parse_ = false; + std::string last_error_; + std::string protocol_; + std::vector item_list_; + + [[nodiscard]] std::string AsString(size_t tab_level, + const IfDataItem& block_item) const; +}; + +} // namespace a2l diff --git a/a2llib-main/include/a2l/ifdataitem.h b/a2llib-main/include/a2l/ifdataitem.h new file mode 100644 index 0000000..c6523fe --- /dev/null +++ b/a2llib-main/include/a2l/ifdataitem.h @@ -0,0 +1,18 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ +#pragma once + +#include +#include +namespace a2l { + +struct IfDataItem { + std::string Value; + std::string BlockName; + std::vector ItemList; +}; + + +} // end namespace a2l \ No newline at end of file diff --git a/a2llib-main/include/a2l/instance.h b/a2llib-main/include/a2l/instance.h new file mode 100644 index 0000000..c521b67 --- /dev/null +++ b/a2llib-main/include/a2l/instance.h @@ -0,0 +1,47 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once + +#include "a2l/a2lobject.h" +#include +#include +#include "a2l/overwrite.h" + +namespace a2l { +class Instance : public A2lObject { + public: + void RefTypeDef(const std::string& type) { ref_type_def_ = type; } + [[nodiscard]] const std::string& RefTypeDef() const { + return ref_type_def_; + } + + void Address(uint64_t address) { address_ = address; } + [[nodiscard]] uint64_t Address() const { return address_; } + + void AddressType(A2lAddressType type) { address_type_ = type; } + [[nodiscard]] A2lAddressType AddressType() const { return address_type_; } + + void Layout(A2lLayout layout) { layout_ = layout; } + [[nodiscard]] A2lLayout Layout() const { return layout_; } + + void AddOverwrite(std::unique_ptr& overwrite); + [[nodiscard]] const OverwriteList& Overwrites() const { + return overwrite_list_; + } + void ReadWrite(bool read_write) { read_write_ = read_write; } + [[nodiscard]] bool ReadWrite() const { return read_write_; } + private: + std::string ref_type_def_; + uint64_t address_ = 0; + A2lAddressType address_type_ = A2lAddressType::UNKNOWN; + A2lLayout layout_ = A2lLayout::UNKNOWN; + OverwriteList overwrite_list_; + bool read_write_ = false; +}; + +using InstanceList = std::map< std::string, std::unique_ptr>; + +} // end namespace a2l \ No newline at end of file diff --git a/a2llib-main/include/a2l/measurement.h b/a2llib-main/include/a2l/measurement.h new file mode 100644 index 0000000..794ced0 --- /dev/null +++ b/a2llib-main/include/a2l/measurement.h @@ -0,0 +1,88 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once + +#include "a2l/a2lobject.h" +#include +#include + +namespace a2l { + +class Measurement : public A2lObject { + public: + void DataType(A2lDataType type) { data_type_ = type; } + [[nodiscard]] A2lDataType DataType() const { return data_type_; } + + void Conversion(const std::string& conversion) { conversion_ = conversion; } + [[nodiscard]] const std::string& Conversion() const { return conversion_; } + + void Resolution(uint64_t resolution) { resolution_ = resolution; } + [[nodiscard]] uint64_t Resolution() const { return resolution_; } + + void Accuracy(double accuracy) { accuracy_ = accuracy; } + [[nodiscard]] double Accuracy() const { return accuracy_; } + + void LowerLimit(double limit) { lower_limit_ = limit; } + [[nodiscard]] double LowerLimit() const { return lower_limit_; } + + void UpperLimit(double limit) { upper_limit_ = limit; } + [[nodiscard]] double UpperLimit() const { return upper_limit_; } + + void AddressType(A2lAddressType type) { address_type_ = type; } + [[nodiscard]] A2lAddressType AddressType() const { return address_type_; } + + void ArraySize(uint64_t size) { array_size_ = size; } + [[nodiscard]] uint64_t ArraySize() const { return array_size_; } + + void BitMask(uint64_t mask) { bit_mask_ = mask; } + [[nodiscard]] uint64_t BitMask() const { return bit_mask_; } + + void BitOperation(const A2lBitOperation& operation) { + bit_operation_ = operation; + } + [[nodiscard]] const A2lBitOperation& BitOperation() const { + return bit_operation_; + } + + void EcuAddress(uint64_t address) { ecu_address_ = address; } + [[nodiscard]] uint64_t EcuAddress() const { return ecu_address_; } + + void ErrorMask(uint64_t mask) { error_mask_ = mask; } + [[nodiscard]] uint64_t ErrorMask() const { return error_mask_; } + + void Layout(A2lLayout layout) { layout_ = layout; } + [[nodiscard]] A2lLayout Layout() const { return layout_; } + + void ReadWrite(bool read_write) { read_write_ = read_write; } + [[nodiscard]] bool ReadWrite() const { return read_write_; } + + void Virtuals(const std::vector& list) { + virtual_list_ = list; + } + [[nodiscard]] const std::vector& Virtuals() const { + return virtual_list_; + } + + private: + A2lDataType data_type_ = A2lDataType::UNKNOWN; + std::string conversion_; + uint64_t resolution_ = 0; + double accuracy_ = 0.0; + double lower_limit_ = 0.0; + double upper_limit_ = 0.0; + A2lAddressType address_type_ = A2lAddressType::UNKNOWN; + uint64_t array_size_ = 0; + uint64_t bit_mask_ = 0; + A2lBitOperation bit_operation_ = {}; + uint64_t ecu_address_ = 0; + uint64_t error_mask_ = 0; + A2lLayout layout_ = A2lLayout::UNKNOWN; + bool read_write_ = false; + std::vector virtual_list_; +}; + +using MeasurementList = std::map>; +} diff --git a/a2llib-main/include/a2l/module.h b/a2llib-main/include/a2l/module.h new file mode 100644 index 0000000..34e5ed7 --- /dev/null +++ b/a2llib-main/include/a2l/module.h @@ -0,0 +1,258 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT +*/ + +#pragma once + + +#include "a2l/a2lobject.h" +#include "a2l/a2lstructs.h" +#include "a2l/axisdescr.h" +#include "a2l/axispts.h" +#include "a2l/blob.h" +#include "a2l/characteristic.h" +#include "a2l/compumethod.h" +#include "a2l/computab.h" +#include "a2l/compuvtab.h" +#include "a2l/compuvtabrange.h" +#include "a2l/frame.h" +#include "a2l/function.h" +#include "a2l/group.h" +#include "a2l/instance.h" +#include "a2l/measurement.h" +#include "a2l/recordlayout.h" +#include "a2l/transformer.h" +#include "a2l/structure.h" +#include "a2l/unit.h" + +namespace a2l { + +class Module : public A2lObject { + public: + [[nodiscard]] A2lModCommon& ModCommon() { return mod_common_; } + [[nodiscard]] const A2lModCommon& ModCommon() const { return mod_common_; } + + [[nodiscard]] A2lModPar& ModPar() { return mod_par_; } + [[nodiscard]] const A2lModPar& ModPar() const { return mod_par_; } + + [[nodiscard]] A2lVariantCoding& VariantCoding() { return variant_coding_; } + [[nodiscard]] const A2lVariantCoding& VariantCoding() const { + return variant_coding_; + } + void A2ml(const std::string& a2ml) { a2ml_ = a2ml; } + [[nodiscard]] const std::string& A2ml() const { return a2ml_;} + + void AddAxisPts(std::unique_ptr& axis_pts); + [[nodiscard]] AxisPtsList& AxisPtss() { return axis_pts_list_; } + [[nodiscard]] const AxisPtsList& AxisPtss() const { return axis_pts_list_; } + [[nodiscard]] AxisPts* GetAxisPts(const std::string& name); + + void AddBlob(std::unique_ptr& blob); + [[nodiscard]] BlobList& Blobs() { return blob_list_; } + [[nodiscard]] const BlobList& Blobs() const { return blob_list_; } + [[nodiscard]] Blob* GetBlob(const std::string& name); + + void AddCharacteristic(std::unique_ptr& characteristic); + [[nodiscard]] CharacteristicList& Characteristics() { + return characteristic_list_; + } + [[nodiscard]] const CharacteristicList& Characteristics() const { + return characteristic_list_; + } + [[nodiscard]] Characteristic* GetCharacteristic(const std::string& name); + + void AddCompuMethod(std::unique_ptr& method); + [[nodiscard]] CompuMethodList& CompuMethods() { + return compu_method_list_; + } + [[nodiscard]] const CompuMethodList& CompuMethods() const { + return compu_method_list_; + } + + void AddCompuTab(std::unique_ptr& tab); + [[nodiscard]] CompuTabList& CompuTabs() { + return compu_tab_list_; + } + [[nodiscard]] const CompuTabList& CompuTabs() const { + return compu_tab_list_; + } + [[nodiscard]] CompuTab* GetCompuTab(const std::string& name); + + void AddCompuVtab(std::unique_ptr& tab); + [[nodiscard]] CompuVtabList& CompuVtabs() { + return compu_vtab_list_; + } + [[nodiscard]] const CompuVtabList& CompuVtabs() const { + return compu_vtab_list_; + } + [[nodiscard]] CompuVtab* GetCompuVtab(const std::string& name); + + + void AddCompuVtabRange(std::unique_ptr& tab); + [[nodiscard]] CompuVtabRangeList& CompuVtabRanges() { + return compu_vtab_range_list_; + } + [[nodiscard]] const CompuVtabRangeList& CompuVtabRanges() const { + return compu_vtab_range_list_; + } + [[nodiscard]] CompuVtabRange* GetCompuVtabRange(const std::string& name); + + void AddControllerAddress(A2lControllerAddress controller_address) { + controller_address_list_.emplace_back(controller_address); + } + [[nodiscard]] ControllerAddressList& ControllerAddresses() { + return controller_address_list_; + } + [[nodiscard]] const ControllerAddressList& ControllerAddresses() const { + return controller_address_list_; + } + + void AddFrame(std::unique_ptr& frame); + [[nodiscard]] FrameList& Frames() { + return frame_list_; + } + [[nodiscard]] const FrameList& Frames() const { + return frame_list_; + } + + void AddFunction(std::unique_ptr& func); + [[nodiscard]] FuncList& Functions() { + return function_list_; + } + [[nodiscard]] const FuncList& Functions() const { + return function_list_; + } + + void AddGroup(std::unique_ptr& group); + [[nodiscard]] GroupList& Groups() { + return group_list_; + } + [[nodiscard]] const GroupList& Groups() const { + return group_list_; + } + + void AddInstance(std::unique_ptr& instance); + [[nodiscard]] InstanceList& Instances() { + return instance_list_; + } + [[nodiscard]] const InstanceList& Instances() const { + return instance_list_; + } + + void AddMeasurement(std::unique_ptr& measurement); + [[nodiscard]] MeasurementList& Measurements() { + return measurement_list_; + } + [[nodiscard]] const MeasurementList& Measurements() const { + return measurement_list_; + } + [[nodiscard]] Measurement* GetMeasurement(const std::string& name); + + void AddRecordLayout(std::unique_ptr& record_layout); + [[nodiscard]] RecordLayoutList& RecordLayouts() { + return record_layout_list_; + } + [[nodiscard]] const RecordLayoutList& RecordLayouts() const { + return record_layout_list_; + } + + void AddTransformer(std::unique_ptr& transformer); + [[nodiscard]] TransformerList& Transformers() { + return transformer_list_; + } + [[nodiscard]] const TransformerList& Transformers() const { + return transformer_list_; + } + + void AddTypedefAxis(std::unique_ptr& axis); + [[nodiscard]] AxisPtsList& TypedefAxiss() { return typedef_axis_list_; } + [[nodiscard]] const AxisPtsList& TypedefAxiss() const { + return typedef_axis_list_; + } + [[nodiscard]] AxisPts* GetTypedefAxis(const std::string& name); + + void AddTypedefBlob(std::unique_ptr& blob); + [[nodiscard]] BlobList& TypedefBlobs() { + return typedef_blob_list_; + } + [[nodiscard]] const BlobList& TypedefBlobs() const { + return typedef_blob_list_; + } + [[nodiscard]] Blob* GetTypedefBlob(const std::string& name); + + void AddTypedefCharacteristic(std::unique_ptr& + characteristic); + [[nodiscard]] CharacteristicList& TypedefCharacteristics() { + return typedef_characteristic_list_; + } + [[nodiscard]] const CharacteristicList& TypedefCharacteristics() const { + return typedef_characteristic_list_; + } + [[nodiscard]] Characteristic* GetTypedefCharacteristic(const std::string& + name); + + void AddTypedefMeasurement(std::unique_ptr& measurement); + [[nodiscard]] const MeasurementList& TypedefMeasurements() const { + return typedef_measurement_list_; + } + [[nodiscard]] MeasurementList& TypedefMeasurements() { + return typedef_measurement_list_; + } + [[nodiscard]] Measurement* GetTypedefMeasurement(const std::string& name); + + void AddTypedefStructure(std::unique_ptr& structure); + [[nodiscard]] StructureList& TypedefStructures() { + return typedef_structure_list_; + } + [[nodiscard]] const StructureList& TypedefStructures() const { + return typedef_structure_list_; + } + [[nodiscard]] Structure* GetTypedefStructure(const std::string& name); + + void AddUnit(std::unique_ptr& unit); + [[nodiscard]] UnitList& Units() { + return unit_list_; + } + [[nodiscard]] const UnitList& Units() const { + return unit_list_; + } + + void AddUserRight(std::unique_ptr& user_right); + [[nodiscard]] UserRightList& UserRights() { + return user_right_list_; + } + [[nodiscard]] const UserRightList& UserRights() const { + return user_right_list_; + } + + private: + A2lModCommon mod_common_ = {}; + A2lModPar mod_par_ = {}; + A2lVariantCoding variant_coding_ = {}; + std::string a2ml_; + AxisPtsList axis_pts_list_; + BlobList blob_list_; + CharacteristicList characteristic_list_; + CompuMethodList compu_method_list_; + CompuTabList compu_tab_list_; + CompuVtabList compu_vtab_list_; + CompuVtabRangeList compu_vtab_range_list_; + ControllerAddressList controller_address_list_; + FrameList frame_list_; + FuncList function_list_; + GroupList group_list_; + InstanceList instance_list_; + MeasurementList measurement_list_; + RecordLayoutList record_layout_list_; + TransformerList transformer_list_; + AxisPtsList typedef_axis_list_; + BlobList typedef_blob_list_; + CharacteristicList typedef_characteristic_list_; + MeasurementList typedef_measurement_list_; + StructureList typedef_structure_list_; + UnitList unit_list_; + UserRightList user_right_list_; +}; + +} // namespace a2l diff --git a/a2llib-main/include/a2l/overwrite.h b/a2llib-main/include/a2l/overwrite.h new file mode 100644 index 0000000..924b532 --- /dev/null +++ b/a2llib-main/include/a2l/overwrite.h @@ -0,0 +1,50 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once + +#include "a2l/a2lobject.h" +#include +#include + +namespace a2l { + +class Overwrite : public A2lObject { + public: + void AxisNo(uint64_t axis) { axis_no_ = axis; } + [[nodiscard]] uint64_t AxisNo() const { return axis_no_; } + + void Conversion(const std::string& conversion) { conversion_ = conversion; } + [[nodiscard]] const std::string& Conversion() const { return conversion_; } + + void InputQuantity(const std::string& quantity) { + input_quantity_ = quantity; + } + [[nodiscard]] const std::string& InputQuantity() const { + return input_quantity_; + } + + void LowerLimit(double limit) { lower_limit_ = limit; } + [[nodiscard]] double LowerLimit() const { return lower_limit_; } + + void UpperLimit(double limit) { upper_limit_ = limit; } + [[nodiscard]] double UpperLimit() const { return upper_limit_; } + + void Monotony(A2lMonotony monotony) { monotony_ = monotony; } + [[nodiscard]] A2lMonotony Monotony() const { return monotony_; } + + private: + uint64_t axis_no_ = 0; + std::string conversion_; + std::string input_quantity_; + double lower_limit_ = 0.0; + double upper_limit_ = 0.0; + A2lMonotony monotony_ = A2lMonotony::UNKNOWN; + +}; + +using OverwriteList = std::vector>; + +} // end namespace a2l diff --git a/a2llib-main/include/a2l/recordlayout.h b/a2llib-main/include/a2l/recordlayout.h new file mode 100644 index 0000000..c748c0a --- /dev/null +++ b/a2llib-main/include/a2l/recordlayout.h @@ -0,0 +1,265 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once + +#include "a2l/a2lobject.h" +#include +#include + +namespace a2l { + +class RecordLayout : public A2lObject { + public: + void AlignmentByte(uint64_t alignment) { alignment_byte_ = alignment; } + [[nodiscard]] uint64_t AlignmentByte() const { return alignment_byte_; } + + void AlignmentWord(uint64_t alignment) { alignment_word_ = alignment; } + [[nodiscard]] uint64_t AlignmentWord() const { return alignment_word_; } + + void AlignmentLong(uint64_t alignment) { alignment_long_ = alignment; } + [[nodiscard]] uint64_t AlignmentLong() const { return alignment_long_; } + + void AlignmentInt64(uint64_t alignment) { alignment_int64_ = alignment; } + [[nodiscard]] uint64_t AlignmentInt64() const { return alignment_int64_; } + + void AlignmentFloat16(uint64_t alignment) { alignment_float16_ = alignment; } + [[nodiscard]] uint64_t AlignmentFloat16() const { return alignment_float16_; } + + void AlignmentFloat32(uint64_t alignment) { alignment_float32_ = alignment; } + [[nodiscard]] uint64_t AlignmentFloat32() const { return alignment_float32_; } + + void AlignmentFloat64(uint64_t alignment) { alignment_float64_ = alignment; } + [[nodiscard]] uint64_t AlignmentFloat64() const { return alignment_float64_; } + + void AxisPtsX(const A2lAxisPts& pts) { axis_pts_x_ = pts; } + [[nodiscard]] const A2lAxisPts& AxisPtsX() const { return axis_pts_x_; } + + void AxisPtsY(const A2lAxisPts& pts) { axis_pts_y_ = pts; } + [[nodiscard]] const A2lAxisPts& AxisPtsY() const { return axis_pts_y_; } + + void AxisPtsZ(const A2lAxisPts& pts) { axis_pts_z_ = pts; } + [[nodiscard]] const A2lAxisPts& AxisPtsZ() const { return axis_pts_z_; } + + void AxisPts4(const A2lAxisPts& pts) { axis_pts_4_ = pts; } + [[nodiscard]] const A2lAxisPts& AxisPts4() const { return axis_pts_4_; } + + void AxisPts5(const A2lAxisPts& pts) { axis_pts_5_ = pts; } + [[nodiscard]] const A2lAxisPts& AxisPts5() const { return axis_pts_5_; } + + void AxisRescaleX(const A2lAxisRescale& scale) { axis_rescale_x_ = scale; } + [[nodiscard]] const A2lAxisRescale& AxisRescaleX() const { + return axis_rescale_x_; + } + + void DistOpX(const A2lDistOp& dist) { dist_op_x_ = dist; } + [[nodiscard]] const A2lDistOp& DistOpX() const { return dist_op_x_; } + + void DistOpY(const A2lDistOp& dist) { dist_op_y_ = dist; } + [[nodiscard]] const A2lDistOp& DistOpY() const { return dist_op_y_; } + + void DistOpZ(const A2lDistOp& dist) { dist_op_z_ = dist; } + [[nodiscard]] const A2lDistOp& DistOpZ() const { return dist_op_z_; } + + void DistOp4(const A2lDistOp& dist) { dist_op_4_ = dist; } + [[nodiscard]] const A2lDistOp& DistOp4() const { return dist_op_4_; } + + void DistOp5(const A2lDistOp& dist) { dist_op_5_ = dist; } + [[nodiscard]] const A2lDistOp& DistOp5() const { return dist_op_5_; } + + void FixNoAxisPtsX(uint64_t pts) { fix_no_axis_pts_x_ = pts; } + [[nodiscard]] uint64_t FixNoAxisPtsX() const { return fix_no_axis_pts_x_; } + + void FixNoAxisPtsY(uint64_t pts) { fix_no_axis_pts_y_ = pts; } + [[nodiscard]] uint64_t FixNoAxisPtsY() const { return fix_no_axis_pts_y_; } + + void FixNoAxisPtsZ(uint64_t pts) { fix_no_axis_pts_z_ = pts; } + [[nodiscard]] uint64_t FixNoAxisPtsZ() const { return fix_no_axis_pts_z_; } + + void FixNoAxisPts4(uint64_t pts) { fix_no_axis_pts_4_ = pts; } + [[nodiscard]] uint64_t FixNoAxisPts4() const { return fix_no_axis_pts_4_; } + + void FixNoAxisPts5(uint64_t pts) { fix_no_axis_pts_5_ = pts; } + [[nodiscard]] uint64_t FixNoAxisPts5() const { return fix_no_axis_pts_5_; } + + void FncValues(const A2lFncValue& fnc ) { fnc_values_ = fnc; } + [[nodiscard]] const A2lFncValue& FncValues() const { return fnc_values_; } + + void Identification(const A2lIdentification& ident ) { + identification_ = ident; + } + [[nodiscard]] const A2lIdentification& Identification() const { + return identification_; + } + + void NoAxisPtsX(const A2lDistOp& pts) { no_axis_pts_x_ = pts; } + [[nodiscard]] const A2lDistOp& NoAxisPtsX() const { return no_axis_pts_x_; } + + void NoAxisPtsY(const A2lDistOp& pts) { no_axis_pts_y_ = pts; } + [[nodiscard]] const A2lDistOp& NoAxisPtsY() const { return no_axis_pts_y_; } + + void NoAxisPtsZ(const A2lDistOp& pts) { no_axis_pts_z_ = pts; } + [[nodiscard]] const A2lDistOp& NoAxisPtsZ() const { return no_axis_pts_z_; } + + void NoAxisPts4(const A2lDistOp& pts) { no_axis_pts_4_ = pts; } + [[nodiscard]] const A2lDistOp& NoAxisPts4() const { return no_axis_pts_4_; } + + void NoAxisPts5(const A2lDistOp& pts) { no_axis_pts_5_ = pts; } + [[nodiscard]] const A2lDistOp& NoAxisPts5() const { return no_axis_pts_5_; } + + void NoRescaleX(const A2lDistOp& pts) { no_rescale_x_ = pts; } + [[nodiscard]] const A2lDistOp& NoRescaleX() const { return no_rescale_x_; } + + void OffsetX(const A2lDistOp& offset) { offset_x_ = offset; } + [[nodiscard]] const A2lDistOp& OffsetX() const { return offset_x_; } + + void OffsetY(const A2lDistOp& offset) { offset_y_ = offset; } + [[nodiscard]] const A2lDistOp& OffsetY() const { return offset_y_; } + + void OffsetZ(const A2lDistOp& offset) { offset_z_ = offset; } + [[nodiscard]] const A2lDistOp& OffsetZ() const { return offset_z_; } + + void Offset4(const A2lDistOp& offset) { offset_4_ = offset; } + [[nodiscard]] const A2lDistOp& Offset4() const { return offset_4_; } + + void Offset5(const A2lDistOp& offset) { offset_5_ = offset; } + [[nodiscard]] const A2lDistOp& Offset5() const { return offset_5_; } + + void AddReserved(const A2lDistOp& reserved); + [[nodiscard]] const std::vector& ReservedList() const { + return reserved_list_; + } + + void RipAddrW(const A2lDistOp& rip) { rip_addr_w_ = rip; } + [[nodiscard]] const A2lDistOp& RipAddrW() const { return rip_addr_w_; } + + void RipAddrX(const A2lDistOp& rip) { rip_addr_x_ = rip; } + [[nodiscard]] const A2lDistOp& RipAddrX() const { return rip_addr_x_; } + + void RipAddrY(const A2lDistOp& rip) { rip_addr_y_ = rip; } + [[nodiscard]] const A2lDistOp& RipAddrY() const { return rip_addr_y_; } + + void RipAddrZ(const A2lDistOp& rip) { rip_addr_z_ = rip; } + [[nodiscard]] const A2lDistOp& RipAddrZ() const { return rip_addr_z_; } + + void RipAddr4(const A2lDistOp& rip) { rip_addr_4_ = rip; } + [[nodiscard]] const A2lDistOp& RipAddr4() const { return rip_addr_4_; } + + void RipAddr5(const A2lDistOp& rip) { rip_addr_5_ = rip; } + [[nodiscard]] const A2lDistOp& RipAddr5() const { return rip_addr_5_; } + + void SrcAddrX(const A2lDistOp& src) { src_addr_x_ = src; } + [[nodiscard]] const A2lDistOp& SrcAddrX() const { return src_addr_x_; } + + void SrcAddrY(const A2lDistOp& src) { src_addr_y_ = src; } + [[nodiscard]] const A2lDistOp& SrcAddrY() const { return src_addr_y_; } + + void SrcAddrZ(const A2lDistOp& src) { src_addr_z_ = src; } + [[nodiscard]] const A2lDistOp& SrcAddrZ() const { return src_addr_z_; } + + void SrcAddr4(const A2lDistOp& src) { src_addr_4_ = src; } + [[nodiscard]] const A2lDistOp& SrcAddr4() const { return src_addr_4_; } + + void SrcAddr5(const A2lDistOp& src) { src_addr_5_ = src; } + [[nodiscard]] const A2lDistOp& SrcAddr5() const { return src_addr_5_; } + + void ShiftOpX(const A2lDistOp& shift) { shift_op_x_ = shift; } + [[nodiscard]] const A2lDistOp& ShiftOpX() const { return shift_op_x_; } + + void ShiftOpY(const A2lDistOp& shift) { shift_op_y_ = shift; } + [[nodiscard]] const A2lDistOp& ShiftOpY() const { return shift_op_y_; } + + void ShiftOpZ(const A2lDistOp& shift) { shift_op_z_ = shift; } + [[nodiscard]] const A2lDistOp& ShiftOpZ() const { return shift_op_z_; } + + void ShiftOp4(const A2lDistOp& shift) { shift_op_4_ = shift; } + [[nodiscard]] const A2lDistOp& ShiftOp4() const { return shift_op_4_; } + + void ShiftOp5(const A2lDistOp& shift) { shift_op_5_ = shift; } + [[nodiscard]] const A2lDistOp& ShiftOp5() const { return shift_op_5_; } + + void StaticAddressOffsets(bool offset) { static_address_offsets_ = offset; } + [[nodiscard]] bool StaticAddressOffsets() const { + return static_address_offsets_; + } + void StaticRecordLayout(bool layout) { static_record_layout_ = layout; } + [[nodiscard]] bool StaticRecordLayout() const { + return static_record_layout_; + } + + private: + uint64_t alignment_byte_ = 0; + uint64_t alignment_word_ = 0; + uint64_t alignment_long_ = 0; + uint64_t alignment_int64_ = 0; + uint64_t alignment_float16_ = 0; + uint64_t alignment_float32_ = 0; + uint64_t alignment_float64_ = 0; + + A2lAxisPts axis_pts_x_ = {}; + A2lAxisPts axis_pts_y_ = {}; + A2lAxisPts axis_pts_z_ = {}; + A2lAxisPts axis_pts_4_ = {}; + A2lAxisPts axis_pts_5_ = {}; + + A2lAxisRescale axis_rescale_x_ = {}; + + A2lDistOp dist_op_x_ = {}; + A2lDistOp dist_op_y_ = {}; + A2lDistOp dist_op_z_ = {}; + A2lDistOp dist_op_4_ = {}; + A2lDistOp dist_op_5_ = {}; + + uint64_t fix_no_axis_pts_x_ = 0; + uint64_t fix_no_axis_pts_y_ = 0; + uint64_t fix_no_axis_pts_z_ = 0; + uint64_t fix_no_axis_pts_4_ = 0; + uint64_t fix_no_axis_pts_5_ = 0; + + A2lFncValue fnc_values_ = {}; + A2lIdentification identification_ = {}; + + A2lDistOp no_axis_pts_x_ = {}; + A2lDistOp no_axis_pts_y_ = {}; + A2lDistOp no_axis_pts_z_ = {}; + A2lDistOp no_axis_pts_4_ = {}; + A2lDistOp no_axis_pts_5_ = {}; + + A2lDistOp no_rescale_x_ = {}; + + A2lDistOp offset_x_ = {}; + A2lDistOp offset_y_ = {}; + A2lDistOp offset_z_ = {}; + A2lDistOp offset_4_ = {}; + A2lDistOp offset_5_ = {}; + + std::vector reserved_list_; + + A2lDistOp rip_addr_w_ = {}; + A2lDistOp rip_addr_x_ = {}; + A2lDistOp rip_addr_y_ = {}; + A2lDistOp rip_addr_z_ = {}; + A2lDistOp rip_addr_4_ = {}; + A2lDistOp rip_addr_5_ = {}; + + A2lDistOp src_addr_x_ = {}; + A2lDistOp src_addr_y_ = {}; + A2lDistOp src_addr_z_ = {}; + A2lDistOp src_addr_4_ = {}; + A2lDistOp src_addr_5_ = {}; + + A2lDistOp shift_op_x_ = {}; + A2lDistOp shift_op_y_ = {}; + A2lDistOp shift_op_z_ = {}; + A2lDistOp shift_op_4_ = {}; + A2lDistOp shift_op_5_ = {}; + + bool static_address_offsets_ = false; + bool static_record_layout_ = false; +}; + +using RecordLayoutList = std::map>; + +} // end namespace a2l \ No newline at end of file diff --git a/a2llib-main/include/a2l/structure.h b/a2llib-main/include/a2l/structure.h new file mode 100644 index 0000000..3696f02 --- /dev/null +++ b/a2llib-main/include/a2l/structure.h @@ -0,0 +1,47 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once + +#include "a2l/a2lobject.h" +#include +#include +#include "a2l/a2lstructs.h" +namespace a2l { + +class Structure : public A2lObject { + public: + void Size(uint64_t size) { size_ = size; } + [[nodiscard]] uint64_t Size() const { return size_; } + + void AddressType(A2lAddressType type) { address_type_ = type; } + [[nodiscard]] A2lAddressType AddressType() const { return address_type_; } + + void ConsistentExchange(bool value) { consistent_exchange_ = value; } + [[nodiscard]] bool ConsistentExchange() const { return consistent_exchange_; } + + void AddStructureComponent(std::unique_ptr& + component) { + structure_component_list_.emplace(component->Name, std::move(component)); + } + [[nodiscard]] const StructureComponentList& StructureComponents() const { + return structure_component_list_; + } + + void SymbolTypeLink(const std::string& link) { symbol_type_link_ = link; } + [[nodiscard]] const std::string& SymbolTypeLink() const { + return symbol_type_link_; } + + private: + uint64_t size_ = 0; + A2lAddressType address_type_ = A2lAddressType::DIRECT; + bool consistent_exchange_ = false; + StructureComponentList structure_component_list_; + std::string symbol_type_link_; + +}; + +using StructureList = std::map>; +} // end namespace diff --git a/a2llib-main/include/a2l/transformer.h b/a2llib-main/include/a2l/transformer.h new file mode 100644 index 0000000..842f1d1 --- /dev/null +++ b/a2llib-main/include/a2l/transformer.h @@ -0,0 +1,65 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once + +#include "a2l/a2lobject.h" +#include +#include + +namespace a2l { + +class Transformer : public A2lObject { + public: + void Version(const std::string& version) { version_ = version; } + [[nodiscard]] const std::string& Version() const {return version_; } + + void Executable32(const std::string& exe) { executable32_ = exe; } + [[nodiscard]] const std::string& Executable32() const {return executable32_; } + + void Executable64(const std::string& exe) { executable64_ = exe; } + [[nodiscard]] const std::string& Executable64() const {return executable64_; } + + void Timeout(uint64_t timeout) { timeout_ = timeout; } + [[nodiscard]] uint64_t Timeout() const {return timeout_; } + + void Trigger(A2lTrigger trigger) { trigger_ = trigger; } + [[nodiscard]] A2lTrigger Trigger() const { return trigger_; } + + void InverseTransformer(const std::string& inverse) { + inverse_transformer_ = inverse; + } + [[nodiscard]] const std::string& InverseTransformer() const { + return inverse_transformer_; + } + + void TransformerInObjects(const std::vector& list) { + in_object_list_ = list; + } + [[nodiscard]] const std::vector& TransformerInObjects() const { + return in_object_list_; + } + + void TransformerOutObjects(const std::vector& list) { + out_object_list_ = list; + } + [[nodiscard]] const std::vector& TransformerOutObjects() const { + return out_object_list_; + } + + private: + std::string version_; + std::string executable32_; + std::string executable64_; + uint64_t timeout_ = 0; + A2lTrigger trigger_ = A2lTrigger::UNKNOWN; + std::string inverse_transformer_; + std::vector in_object_list_; + std::vector out_object_list_; +}; + +using TransformerList = std::map>; + +} // end namespace a2l diff --git a/a2llib-main/include/a2l/unit.h b/a2llib-main/include/a2l/unit.h new file mode 100644 index 0000000..95cad5d --- /dev/null +++ b/a2llib-main/include/a2l/unit.h @@ -0,0 +1,45 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once + +#include "a2l/a2lobject.h" +#include +#include + +namespace a2l { + +class Unit : public A2lObject { + public: + void Type(A2lUnitType type) { type_ = type; } + [[nodiscard]] A2lUnitType Type() const { return type_; } + + void RefUnit(const std::string& ref) { ref_unit_ = ref; } + [[nodiscard]] const std::string& RefUnit() const { return ref_unit_; } + + void SiExponents(const A2lSiExponents& exponents) { + si_exponents_ = exponents; + } + [[nodiscard]] const A2lSiExponents& SiExponents() const { + return si_exponents_; + } + + void Gradient(double gradient) { gradient_ = gradient; } + [[nodiscard]] double Gradient() const { return gradient_; } + + void Offset(double offset) { offset_ = offset; } + [[nodiscard]] double Offset() const { return offset_; } + + private: + A2lUnitType type_ = A2lUnitType::UNKNOWN; + std::string ref_unit_; + A2lSiExponents si_exponents_ = {}; + double gradient_ = 0.0; + double offset_ = 0.0; +}; + +using UnitList = std::map>; + +} // end namespace a2l diff --git a/a2llib-main/script/a2llib.nsi b/a2llib-main/script/a2llib.nsi new file mode 100644 index 0000000..f6c540f --- /dev/null +++ b/a2llib-main/script/a2llib.nsi @@ -0,0 +1,154 @@ +# Copyright 2023 Ingemar Hedvall +# SPDX-License-Identifier: MIT + +!include MUI2.nsh +!include x64.nsh +!include FileFunc.nsh + +!define APP_BUILD_DIR "..\cmake-build-release" ; Path to executable and release library +!define APP_BUILD_DIR_DEBUG "..\cmake-build-debug" ; Path to the util debug library + +Name "DBC Applications and Libraries 1.0" +OutFile "..\cmake-build-release\dbclib.exe" +Unicode True + +RequestExecutionLevel admin ; Request for admin login + +Var StartMenuFolder + +InstallDir "$LOCALAPPDATA\dbclib" +InstallDirRegKey HKLM "Software\DbcLib" "" + + +!define MUI_ABORTWARNING +!define ARP "Software\Microsoft\Windows\CurrentVersion\Uninstall\DbcLib" +!define MSVS_DIR "d:\msvs" ; Path where the MS Visual Studio Run-Time libraries are downloaded + +!insertmacro MUI_PAGE_WELCOME +!insertmacro MUI_PAGE_LICENSE "..\LICENSE" +!insertmacro MUI_PAGE_COMPONENTS +!insertmacro MUI_PAGE_DIRECTORY + +!define MUI_STARTMENUPAGE_DEFAULTFOLDER "DBC Apps & Libs" +!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM" +!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\DbcLib" +!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder" + +!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder +!insertmacro MUI_PAGE_INSTFILES +!insertmacro MUI_PAGE_FINISH + +!insertmacro MUI_UNPAGE_WELCOME +!insertmacro MUI_UNPAGE_CONFIRM +!insertmacro MUI_UNPAGE_INSTFILES +!insertmacro MUI_UNPAGE_FINISH + +!insertmacro MUI_LANGUAGE "English" + +;-------------------------------- +;Installer Sections + +Section "Visual Studio Runtime" MSCRT + SectionIn RO ; Must be included + SetShellVarContext all + SetRegView 64 + SetOutPath "$INSTDIR\bin" + File "${MSVS_DIR}\VC_redist.x64.exe" + ExecWait '"$INSTDIR\bin\VC_redist.x64.exe" /passive /norestart' + ; Delete "$INSTDIR\bin\VC_redist.x64.exe.exe" +SectionEnd + +Section "Applications" APP + ; SectionIn RO + SetRegView 64 + SetShellVarContext all + + SetOutPath "$INSTDIR\bin" + File "${APP_BUILD_DIR}\dbcviewer\*.exe" + + SetOutPath "$INSTDIR\img" + File "..\img\*.*" + + ;Store installation folder + WriteRegStr HKLM "Software\DbcLib" "" $INSTDIR + + WriteUninstaller "$INSTDIR\Uninstall.exe" + + ; Add /Remove Programs + ${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2 + IntFmt $0 "0x%08X" $0 + + + WriteRegNone HKLM "${ARP}" "" + WriteRegStr HKLM "${ARP}" "InstallLocation" $INSTDIR + WriteRegStr HKLM "${ARP}" "DisplayIcon" "$INSTDIR\img\dbclib.ico" + WriteRegStr HKLM "${ARP}" "DisplayName" "DBC Apps & Libs 1.0" + WriteRegStr HKLM "${ARP}" "DisplayVersion" "1.0.0" + WriteRegStr HKLM "${ARP}" "Publisher" "Ingemar Hedvall" + WriteRegDWORD HKLM "${ARP}" "NoModify" 1 + WriteRegDWORD HKLM "${ARP}" "NoRepair" 1 + WriteRegDWORD HKLM "${ARP}" "VersionMajor" 1 + WriteRegDWORD HKLM "${ARP}" "VersionMinor" 0 + WriteRegDWORD HKLM "${ARP}" "EstimatedSize" "$0" + WriteRegStr HKLM "${ARP}" "UninstallString" "$\"$INSTDIR\Uninstall.exe$\"" + + ;Create uninstaller + + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + CreateDirectory "$SMPROGRAMS\$StartMenuFolder" + CreateShortcut "$SMPROGRAMS\$StartMenuFolder\DBC Viewer.lnk" "$INSTDIR\bin\dbcview.exe" + !insertmacro MUI_STARTMENU_WRITE_END + +SectionEnd + +Section /o "DBC Library" LIB + SetRegView 64 + + SetOutPath "$INSTDIR\lib" + File "${APP_BUILD_DIR}\dbc.lib" + File "${APP_BUILD_DIR_DEBUG}\dbcd.lib" + + SetOutPath "$INSTDIR\include\dbc" + File "..\include\dbc\*.*" + + SetOutPath "$INSTDIR\doc\dbc" + File /r "..\docs\manual\html\*.*" + + CreateShortcut "$SMPROGRAMS\$StartMenuFolder\DBC Library Documentation.lnk" \ + "$INSTDIR\doc\dbc\index.html" "" "$INSTDIR\img\document.ico" \ + 0 SW_SHOWNORMAL + + ${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2 + IntFmt $0 "0x%08X" $0 + WriteRegDWORD HKLM "${ARP}" "EstimatedSize" "$0" +SectionEnd + + +LangString DESC_CRT ${LANG_ENGLISH} "Microsoft Visual Studio Runtime." +LangString DESC_APP ${LANG_ENGLISH} "All executables." +LangString DESC_LIB ${LANG_ENGLISH} "DBC Library" + + +!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN + !insertmacro MUI_DESCRIPTION_TEXT ${MSCRT} $(DESC_CRT) + !insertmacro MUI_DESCRIPTION_TEXT ${APP} $(DESC_APP) + !insertmacro MUI_DESCRIPTION_TEXT ${LIB} $(DESC_LIB) +!insertmacro MUI_FUNCTION_DESCRIPTION_END + +;-------------------------------- +;Uninstaller Section + +Section "Uninstall" + SetRegView 64 + SetShellVarContext all + !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder + + Delete "$INSTDIR\Uninstall.exe" + + RMDir /r "$INSTDIR" + RMDir /r "$SMPROGRAMS\$StartMenuFolder" + + DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\DbcLib" + DeleteRegKey HKLM "Software\DbcLib" + +SectionEnd \ No newline at end of file diff --git a/a2llib-main/script/bison.cmake b/a2llib-main/script/bison.cmake new file mode 100644 index 0000000..73712a5 --- /dev/null +++ b/a2llib-main/script/bison.cmake @@ -0,0 +1,8 @@ +# Copyright 2022 Ingemar Hedvall +# SPDX-License-Identifier: MIT + +include(CMakePrintHelpers) +if (NOT BISON_FOUND) + find_package(BISON) + cmake_print_variables(BISON_FOUND BISON_EXECUTABLE BISON_VERSION) +endif() \ No newline at end of file diff --git a/a2llib-main/script/boost.cmake b/a2llib-main/script/boost.cmake new file mode 100644 index 0000000..7891856 --- /dev/null +++ b/a2llib-main/script/boost.cmake @@ -0,0 +1,32 @@ +# Copyright 2021 Ingemar Hedvall +# SPDX-License-Identifier: MIT + +if (NOT Boost_FOUND) + set(Boost_USE_STATIC_LIBS ON) + set(Boost_USE_MULTITHREADED ON) + set(Boost_ARCHITECTURE -x64) + set(Boost_NO_WARN_NEW_VERSIONS ON) + set(Boost_DEBUG OFF) + set(Boost_INCLUDE_DIR "C:/boost/include/boost-1_87") + include_directories(${Boost_INCLUDE_DIR}) + + + find_package(Boost COMPONENTS locale filesystem system) + message(STATUS "Boost Found (Try 1): " ${Boost_FOUND}) + message(STATUS "Boost Version: " ${Boost_VERSION_STRING}) + message(STATUS "Boost Include Dirs: " ${Boost_INCLUDE_DIRS}) + message(STATUS "Boost Library Dirs: " ${Boost_LIBRARY_DIRS}) + message(STATUS "Boost Libraries: " ${Boost_LIBRARIES}) + message(STATUS "Boost Root: " ${Boost_ROOT}) + if (NOT Boost_FOUND) + set(Boost_ROOT ${COMP_DIR}/boost/latest) + find_package(Boost REQUIRED COMPONENTS locale filesystem system) + + message(STATUS "Boost Found (Try 2): " ${Boost_FOUND}) + message(STATUS "Boost Version: " ${Boost_VERSION_STRING}) + message(STATUS "Boost Include Dirs: " ${Boost_INCLUDE_DIRS}) + message(STATUS "Boost Library Dirs: " ${Boost_LIBRARY_DIRS}) + message(STATUS "Boost Libraries: " ${Boost_LIBRARIES}) + endif() +endif() + diff --git a/a2llib-main/script/doxygen.cmake b/a2llib-main/script/doxygen.cmake new file mode 100644 index 0000000..0c2f0c6 --- /dev/null +++ b/a2llib-main/script/doxygen.cmake @@ -0,0 +1,8 @@ +# Copyright 2021 Ingemar Hedvall +# SPDX-License-Identifier: MIT +if (NOT DOXYGEN_FOUND) + find_package(Doxygen COMPONENTS dot mscgen dia) +endif() + +message(STATUS "Doxygen Found: " ${DOXYGEN_FOUND}) +message(STATUS "Doxygen Version: " ${DOXYGEN_VERSION}) diff --git a/a2llib-main/script/expat.cmake b/a2llib-main/script/expat.cmake new file mode 100644 index 0000000..1ce0e1d --- /dev/null +++ b/a2llib-main/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/a2llib-main/script/flex.cmake b/a2llib-main/script/flex.cmake new file mode 100644 index 0000000..f6303c4 --- /dev/null +++ b/a2llib-main/script/flex.cmake @@ -0,0 +1,8 @@ +# Copyright 2022 Ingemar Hedvall +# SPDX-License-Identifier: MIT + +include(CMakePrintHelpers) +if (NOT FLEX_FOUND) + find_package(FLEX 2.6) + cmake_print_variables(FLEX_FOUND FLEX_EXECUTABLE FLEX_VERSION FLEX_LIBRARIES FLEX_INCLUDE_DIRS) +endif() \ No newline at end of file diff --git a/a2llib-main/script/googletest.cmake b/a2llib-main/script/googletest.cmake new file mode 100644 index 0000000..8fb0f82 --- /dev/null +++ b/a2llib-main/script/googletest.cmake @@ -0,0 +1,16 @@ +# Copyright 2021 Ingemar Hedvall +# SPDX-License-Identifier: MIT + +include (FetchContent) + +include(FetchContent) +FetchContent_Declare(googletest + GIT_REPOSITORY https://github.com/google/googletest.git + GIT_TAG HEAD +) +# For Windows: Prevent overriding the parent project's compiler/linker settings +set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) +FetchContent_MakeAvailable(googletest) +message(STATUS "googletest Populated: " ${googletest_POPULATED}) +message(STATUS "googletest Source: " ${googletest_SOURCE_DIR}) +message(STATUS "googletest Binary: " ${googletest_BINARY_DIR}) \ No newline at end of file diff --git a/a2llib-main/script/utillib.cmake b/a2llib-main/script/utillib.cmake new file mode 100644 index 0000000..ffaaba6 --- /dev/null +++ b/a2llib-main/script/utillib.cmake @@ -0,0 +1,16 @@ +include (FetchContent) +FetchContent_Declare(utillib + GIT_REPOSITORY https://github.com/ihedvall/utillib.git + GIT_TAG HEAD) +set(UTIL_DOC OFF) +set(UTIL_TEST OFF) +set(UTIL_TOOLS OFF) +set(UTIL_LEX OFF) +#set(BUILD_SHARED_LIBS OFF) + +FetchContent_MakeAvailable(utillib) + +message(STATUS "UTILLIB Populated: " ${utillib_POPULATED}) +message(STATUS "UTILLIB Source Dir: " ${utillib_SOURCE_DIR}) +message(STATUS "UTILLIB Binary Dir: " ${utillib_BINARY_DIR}) +message(STATUS "UTILLIB Updates: " ${FETCHCONTENT_UPDATES_DISCONNECTED_UTILLIB}) \ No newline at end of file diff --git a/a2llib-main/script/wxwidgets.cmake b/a2llib-main/script/wxwidgets.cmake new file mode 100644 index 0000000..db89dcb --- /dev/null +++ b/a2llib-main/script/wxwidgets.cmake @@ -0,0 +1,54 @@ +# Copyright 2021 Ingemar Hedvall +# SPDX-License-Identifier: MIT + +if (NOT wxWidgets_FOUND ) + find_package(wxWidgets COMPONENTS stc richtext html xml propgrid adv core base) +endif() + +if (wxWidgets_FOUND) + include(${wxWidgets_USE_FILE}) +endif() + +if (NOT wxWidgets_FOUND) + if (WIN32) + set(wxWidgets_ROOT_DIR ${COMP_DIR}/wxwidgets/master) + + if (MINGW) + set(wxWidgets_LIB_DIR ${COMP_DIR}/wxwidgets/master/lib/gcc_x64_lib) + else() + set(wxWidgets_LIB_DIR ${COMP_DIR}/wxwidgets/master/lib/vc_x64_lib) + endif() + else() + set(CMAKE_FIND_ROOT_PATH ${COMP_DIR}/wxwidgets/master) + set(wxWidgets_USE_STATIC ON) + set(wxWidgets_USE_UNICODE ON) + if (CMAKE_BUILD_TYPE MATCHES "^[Dd]ebug") + set(wxWidgets_USE_DEBUG ON) + else() + set(wxWidgets_USE_DEBUG OFF) + endif() + set(wxWidgets_USE_UNIVERSAL OFF) + endif() + find_package(wxWidgets COMPONENTS stc richtext html xml propgrid adv core base ) + include(${wxWidgets_USE_FILE}) + +endif() + +message(STATUS "wxWidgets Build Type: " ${CMAKE_BUILD_TYPE}) +message(STATUS "wxWidgets Use Debug: " ${wxWidgets_USE_DEBUG}) +message(STATUS "wxWidgets Find Style: " ${wxWidgets_FIND_STYLE}) +message(STATUS "wxWidgets Lib Dir: " ${wxWidgets_LIB_DIR}) +message(STATUS "wxWidgets Config Exe : " ${wxWidgets_CONFIG_EXECUTABLE}) +message(STATUS "wxWidgets Cmake Root Path : " ${CMAKE_FIND_ROOT_PATH}) +message(STATUS "wxWidgets Root: " ${wxWidgets_ROOT_DIR}) +message(STATUS "wxWidgets Found: " ${wxWidgets_FOUND}) +message(STATUS "wxWidgets Include Dirs: " ${wxWidgets_INCLUDE_DIRS}) +message(STATUS "wxWidgets Library Dirs: " ${wxWidgets_LIBRARY_DIRS}) +message(STATUS "wxWidgets Libraries: " ${wxWidgets_LIBRARIES}) +message(STATUS "wxWidgets Include File: " ${wxWidgets_USE_FILE}) +message(STATUS "wxWidgets Definitions: " ${wxWidgets_DEFINITIONS}) +message(STATUS "wxWidgets Debug Definitions: " ${wxWidgets_DEFINITIONS_DEBUG}) +message(STATUS "wxWidgets CXX Flags: " ${wxWidgets_CXX_FLAGS}) + + + diff --git a/a2llib-main/src/FlexLexer.h b/a2llib-main/src/FlexLexer.h new file mode 100644 index 0000000..c4dad2b --- /dev/null +++ b/a2llib-main/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/a2llib-main/src/a2lenums.cpp b/a2llib-main/src/a2lenums.cpp new file mode 100644 index 0000000..b149e45 --- /dev/null +++ b/a2llib-main/src/a2lenums.cpp @@ -0,0 +1,496 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ +#include "a2l/a2lenums.h" +#include +namespace { + +template +T StringToEnum(const std::string& text, + const std::array, S>& list) { + auto type = T::UNKNOWN; + for (const auto& [idx_text, idx_type] : list) { + if (idx_text == text) { + type = idx_type; + break; + } + } + return type; +} + +template +std::string_view EnumToString(T type, + const std::array, S>& list) { + for (const auto& [idx_text, idx_type] : list) { + if (idx_type == type) { + return idx_text; + } + } + return "UNKNOWN"; +} + +template +a2l::EnumStringList EnumToStringList( + const std::array, S>& list) { + a2l::EnumStringList enum_list; + const auto end_type = T::UNKNOWN; + for (const auto& [idx_text, idx_type] : list) { + if (idx_type == end_type) { + break; + } + enum_list.emplace_back(idx_text); + } + return enum_list; +} + +} // end namespace + +namespace a2l { + +/*------------- ADDRESS TYPE ---------------------------*/ +using StringAddressType = std::pair; +constexpr std::array kAddressTypeList = { + StringAddressType("PBYTE", A2lAddressType::PBYTE), + StringAddressType("PWORD", A2lAddressType::PWORD), + StringAddressType("PLONG", A2lAddressType::PLONG), + StringAddressType("PLONGLONG", A2lAddressType::PLONGLONG), + StringAddressType("DIRECT", A2lAddressType::DIRECT) +}; + +A2lAddressType StringToAddressType(const std::string& text) { + return StringToEnum(text, kAddressTypeList); +} +std::string_view AddressTypeToString(A2lAddressType type) { + return EnumToString(type, kAddressTypeList); +} + +EnumStringList AddressTypeToStringList() { + return EnumToStringList(kAddressTypeList); +} + + +/* ----------------AXIS TYPE ------------------------*/ +using StringAxisType = std::pair; +constexpr std::array kAxisTypeList = { + StringAxisType("CURVE_AXIS", A2lAxisType::CURVE_AXIS), + StringAxisType("COM_AXIS", A2lAxisType::COM_AXIS), + StringAxisType("FIX_AXIS", A2lAxisType::FIX_AXIS), + StringAxisType("RES_AXIS", A2lAxisType::RES_AXIS), + StringAxisType("STD_AXIS", A2lAxisType::STD_AXIS) +}; + +A2lAxisType StringToAxisType(const std::string& text) { + return StringToEnum(text, kAxisTypeList); +} + +std::string_view AxisTypeToString(A2lAxisType type) { + return EnumToString(type, kAxisTypeList); +} + +EnumStringList AxisTypeToStringList() { + return EnumToStringList(kAxisTypeList); +} + +/*----------------- BYTE ORDER -------------------------*/ +using StringByteOrder = std::pair; +constexpr std::array kByteOrderList = { + StringByteOrder("MSB_FIRST", A2lByteOrder::MSB_FIRST), + StringByteOrder("MSB_LAST", A2lByteOrder::MSB_LAST), + StringByteOrder("MSB_FIRST_MSW_LAST", A2lByteOrder::MSB_FIRST_MSW_LAST), + StringByteOrder("MSB_LAST_MSW_FIRST", A2lByteOrder::MSB_LAST_MSW_FIRST) +}; + +A2lByteOrder StringToByteOrder(const std::string& text) { + return StringToEnum(text, kByteOrderList); +} +std::string_view ByteOrderToString(A2lByteOrder type) { + return EnumToString(type, kByteOrderList); +} + +EnumStringList ByteOrderToStringList() { + return EnumToStringList(kByteOrderList); +} + +/*--------------- CALIBRATION ACCESS ---------------------*/ +using StringCalibrationAccess = std::pair; +constexpr std::array kCalibrationAccessList = { + StringCalibrationAccess("CALIBRATION", A2lCalibrationAccess::CALIBRATION), + StringCalibrationAccess("NO_CALIBRATION", + A2lCalibrationAccess::NO_CALIBRATION), + StringCalibrationAccess("NOT_IN_MCD_SYSTEM", + A2lCalibrationAccess::NOT_IN_MCD_SYSTEM), + StringCalibrationAccess("OFFLINE_CALIBRATION", + A2lCalibrationAccess::OFFLINE_CALIBRATION) +}; + +A2lCalibrationAccess StringToCalibrationAccess(const std::string& text) { + return StringToEnum(text, kCalibrationAccessList); +} + +std::string_view CalibrationAccessToString(A2lCalibrationAccess access) { + return EnumToString(access, kCalibrationAccessList); +} + +EnumStringList CalibrationAccessToStringList() { + return EnumToStringList(kCalibrationAccessList); +} + +/*----------------- CHARACTERISTIC TYPE -----------------------------*/ +using StringCharacteristicType= std::pair; + +constexpr std::array kCharacteristicTypeList = { + StringCharacteristicType("ASCII", A2lCharacteristicType::ASCII), + StringCharacteristicType("CURVE", A2lCharacteristicType::CURVE), + StringCharacteristicType("MAP", A2lCharacteristicType::MAP), + StringCharacteristicType("CUBOID", A2lCharacteristicType::CUBOID), + StringCharacteristicType("CUBE_4", A2lCharacteristicType::CUBE_4), + StringCharacteristicType("CUBE_5", A2lCharacteristicType::CUBE_5), + StringCharacteristicType("VAL_BLK", A2lCharacteristicType::VAL_BLK), + StringCharacteristicType("VALUE", A2lCharacteristicType::VALUE), +}; + +A2lCharacteristicType StringToCharacteristicType(const std::string& text) { + return StringToEnum(text, kCharacteristicTypeList); +} + +std::string_view CharacteristicTypeToString(A2lCharacteristicType type) { + return EnumToString(type, kCharacteristicTypeList); +} + +EnumStringList CharacteristicTypeToStringList() { + return EnumToStringList(kCharacteristicTypeList); +} + +/*---------------------- CONVERSION TYPE ------------------------*/ +using StringConversionType = std::pair; + +constexpr std::array kConversionTypeList = { + StringConversionType("IDENTICAL", A2lConversionType::IDENTICAL), + StringConversionType("FORM", A2lConversionType::FORM), + StringConversionType("LINEAR", A2lConversionType::LINEAR), + StringConversionType("RAT_FUNC", A2lConversionType::RAT_FUNC), + StringConversionType("TAB_INP", A2lConversionType::TAB_INP), + StringConversionType("TAB_NOINTP", A2lConversionType::TAB_NOINTP), + StringConversionType("TAB_VERB", A2lConversionType::TAB_VERB), +}; + +A2lConversionType StringToConversionType(const std::string& text) { + return StringToEnum(text, kConversionTypeList); +} + +std::string_view ConversionTypeToString(A2lConversionType type) { + return EnumToString(type, kConversionTypeList); +} + +EnumStringList ConversionTypeToStringList() { + return EnumToStringList(kConversionTypeList); +} + +/*-------------- DAtA TYPE --------------------------*/ +using StringDataType = std::pair; + +constexpr std::array kDataTypeList = { + StringDataType("UBYTE", A2lDataType::UBYTE), + StringDataType("SBYTE", A2lDataType::SBYTE), + StringDataType("UWORD", A2lDataType::UWORD), + StringDataType("SWORD", A2lDataType::SWORD), + StringDataType("ULONG", A2lDataType::ULONG), + StringDataType("SLONG", A2lDataType::SLONG), + StringDataType("A_UINT64", A2lDataType::A_UINT64), + StringDataType("A_INT64", A2lDataType::A_INT64), + StringDataType("FLOAT16_IEEE", A2lDataType::FLOAT16_IEEE), + StringDataType("FLOAT32_IEEE", A2lDataType::FLOAT32_IEEE), + StringDataType("FLOAT64_IEEE", A2lDataType::FLOAT64_IEEE), +}; + +A2lDataType StringToDataType(const std::string& text) { + return StringToEnum(text, kDataTypeList); +} + +std::string_view DataTypeToString(A2lDataType type) { + return EnumToString(type, kDataTypeList); +} + +EnumStringList DataTypeToStringList() { + return EnumToStringList(kDataTypeList); +} + +/*--------------- DEPOSIT ---------------------*/ + +using StringDeposit = std::pair; +constexpr std::array kDepositList = { + StringDeposit("ABSOLUTE", A2lDeposit::A2L_ABSOLUTE), + StringDeposit("DIFFERENCE", A2lDeposit::A2L_DIFFERENCE) +}; + +A2lDeposit StringToDeposit(const std::string& text) { + return StringToEnum(text, kDepositList); +} + +std::string_view DepositToString(A2lDeposit deposit) { + return EnumToString(deposit, kDepositList); +} + +EnumStringList DepositToStringList() { + return EnumToStringList(kDepositList); +} + +/*----------------- ENCODING ---------------------------*/ +using StringEncoding = std::pair; +constexpr std::array kEncodingList = { + StringEncoding("", A2lEncoding::ASCII), + StringEncoding("UTF8", A2lEncoding::UTF8), + StringEncoding("UTF16", A2lEncoding::UTF16), + StringEncoding("UTF32", A2lEncoding::UTF32) +}; + +A2lEncoding StringToEncoding(const std::string& text) { + return StringToEnum(text, kEncodingList); +} + +std::string_view EncodingToString(A2lEncoding encoding) { + return EnumToString(encoding, kEncodingList); +} + +EnumStringList EncodingToStringList() { + return EnumToStringList(kEncodingList); +} + +/*----------------------- INDEX MODE --------------------*/ + +using StringIndexMode = std::pair; +constexpr std::array kIndexModeList = { + StringIndexMode("ALTERNATE_CURVES", A2lIndexMode::ALTERNATE_CURVES), + StringIndexMode("ALTERNATE_WITH_X", A2lIndexMode::ALTERNATE_WITH_X), + StringIndexMode("ALTERNATE_WITH_Y", A2lIndexMode::ALTERNATE_WITH_Y), + StringIndexMode("COLUMN_DIR", A2lIndexMode::COLUMN_DIR), + StringIndexMode("ROW_DIR", A2lIndexMode::ROW_DIR) +}; + +A2lIndexMode StringToIndexMode(const std::string& text) { + return StringToEnum(text, kIndexModeList); +} + +std::string_view IndexModeToString(A2lIndexMode mode) { + return EnumToString(mode, kIndexModeList); +} + +EnumStringList IndexModeToStringList() { + return EnumToStringList(kIndexModeList); +} + +/*----------------- INDEX ORDER --------------------------*/ + +using StringIndexOrder = std::pair; +constexpr std::array kIndexOrderList = { + StringIndexOrder("INDEX_INCR", A2lIndexOrder::INDEX_INCR), + StringIndexOrder("INDEX_DECR", A2lIndexOrder::INDEX_DECR) +}; + +A2lIndexOrder StringToIndexOrder(const std::string& text) { + return StringToEnum(text, kIndexOrderList); +} + +std::string_view IndexOrderToString(A2lIndexOrder order) { + return EnumToString(order, kIndexOrderList); +} + +EnumStringList IndexOrderToStringList() { + return EnumToStringList(kIndexOrderList); +} + +/*------------------ LAYOUT -----------------------------*/ +using StringLayout = std::pair; +constexpr std::array kLayoutList = { + StringLayout("ROW_DIR", A2lLayout::ROW_DIR), + StringLayout("COLUMN_DIR", A2lLayout::COLUMN_DIR) +}; + +A2lLayout StringToLayout(const std::string& text) { + return StringToEnum(text, kLayoutList); +} + +std::string_view LayoutToString(A2lLayout layout) { + return EnumToString(layout, kLayoutList); +} + +EnumStringList LayoutToStringList() { + return EnumToStringList(kLayoutList); +} + +/*------------------- MEMORY TYPE ------------------------*/ +using StringMemoryType = std::pair; +constexpr std::array kMemoryList = { + StringMemoryType("EEPROM", A2lMemoryType::EEPROM), + StringMemoryType("EPROM", A2lMemoryType::EPROM), + StringMemoryType("FLASH", A2lMemoryType::FLASH), + StringMemoryType("RAM", A2lMemoryType::RAM), + StringMemoryType("ROM", A2lMemoryType::ROM), + StringMemoryType("REGISTER", A2lMemoryType::REGISTER), + StringMemoryType("NOT_IN_ECU", A2lMemoryType::NOT_IN_ECU), +}; + +A2lMemoryType StringToMemoryType(const std::string& text) { + return StringToEnum(text, kMemoryList); +} + +std::string_view MemoryTypeToString(A2lMemoryType type) { + return EnumToString(type, kMemoryList); +} + +EnumStringList MemoryTypeToStringList() { + return EnumToStringList(kMemoryList); +} + + +/*------------ MEMORY ATTRIBUTE -------------------------*/ +using StringMemoryAttribute = std::pair; +constexpr std::array kAttributeList = { + StringMemoryAttribute("INTERN", A2lMemoryAttribute::INTERN), + StringMemoryAttribute("EXTERN", A2lMemoryAttribute::EXTERN), +}; + +A2lMemoryAttribute StringToMemoryAttribute(const std::string& text) { + return StringToEnum(text, kAttributeList); +} +std::string_view MemoryAttributeToString(A2lMemoryAttribute attr) { + return EnumToString(attr, kAttributeList); +} + +EnumStringList MemoryAttributeToStringList() { + return EnumToStringList(kAttributeList); +} + +/*-------------------------- MONOTONY -------------------------*/ +using StringMonotony = std::pair; +constexpr std::array kMonotonyList = { + StringMonotony("MON_DECREASE", A2lMonotony::MON_DECREASE), + StringMonotony("MON_INCREASE", A2lMonotony::MON_INCREASE), + StringMonotony("STRICT_DECREASE", A2lMonotony::STRICT_DECREASE), + StringMonotony("STRICT_INCREASE", A2lMonotony::STRICT_INCREASE), + StringMonotony("MONOTONOUS", A2lMonotony::MONOTONOUS), + StringMonotony("STRICT_MON", A2lMonotony::STRICT_MON), + StringMonotony("NOT_MON", A2lMonotony::NOT_MON), +}; +A2lMonotony StringToMonotony(const std::string& text) { + return StringToEnum(text, kMonotonyList); +} +std::string_view MonotonyToString(A2lMonotony type) { + return EnumToString(type, kMonotonyList); +} + +EnumStringList MonotonyToStringList() { + return EnumToStringList(kMonotonyList); +} + +/*------------------ PRG TYPE -----------------------------*/ +using StringPrgType = std::pair; +constexpr std::array kPrgList = { + std::pair("PRG_CODE", A2lPrgType::PRG_CODE), + std::pair("PRG_DATA", A2lPrgType::PRG_DATA), + std::pair("PRG_RESERVED", A2lPrgType::PRG_RESERVED), +}; + +A2lPrgType StringToPrgType(const std::string& text) { + return StringToEnum(text, kPrgList); +} + +std::string_view PrgTypeToString(A2lPrgType type) { + return EnumToString(type, kPrgList); +} + +EnumStringList PrgTypeToStringList() { + return EnumToStringList(kPrgList); +} + +/*----------------- SEGMENT TYPE -----------------------*/ +using StringSegmentType = std::pair; +constexpr std::array kSegmentList = { + std::pair("CALIBRATION_VARIABLES", A2lSegmentType::CALIBRATION_VARIABLES), + std::pair("CODE", A2lSegmentType::CODE), + std::pair("DATA", A2lSegmentType::DATA), + std::pair("EXCLUDE_FROM_FLASH", A2lSegmentType::EXCLUDE_FROM_FLASH), + std::pair("OFFLINE_DATA", A2lSegmentType::OFFLINE_DATA), + std::pair("RESERVED", A2lSegmentType::RESERVED), + std::pair("SERAM", A2lSegmentType::SERAM), + std::pair("VARIABLES", A2lSegmentType::VARIABLES), +}; + +A2lSegmentType StringToSegmentType(const std::string& text) { + return StringToEnum(text, kSegmentList); +} + +std::string_view SegmentTypeToString(A2lSegmentType type) { + return EnumToString(type, kSegmentList); +} + +EnumStringList SegmentTypeToStringList() { + return EnumToStringList(kSegmentList); +} + +/*------------------- TRIGGER ------------------------------*/ +using StringTrigger = std::pair; +constexpr std::array kTriggerList = { + std::pair("ON_CHANGE", A2lTrigger::ON_CHANGE), + std::pair("ON_USER_REQUEST", A2lTrigger::ON_USER_REQUEST), +}; + +A2lTrigger StringToTrigger(const std::string& text) { + return StringToEnum(text, kTriggerList); +} + +std::string_view TriggerToString(A2lTrigger trigger) { + return EnumToString(trigger, kTriggerList); +} + +EnumStringList TriggerToStringList() { + return EnumToStringList(kTriggerList); +} + +/*------------------ TYPEDEF TYPE ---------------------*/ +using StringTypedef = std::pair; +constexpr std::array kTypedefList = { + std::pair("TYPEDEF_AXIS", A2lTypedefType::TYPEDEF_AXIS), + std::pair("TYPEDEF_BLOB", A2lTypedefType::TYPEDEF_BLOB), + std::pair("TYPEDEF_CHARACTERISTIC", A2lTypedefType::TYPEDEF_CHARACTERISTIC), + std::pair("TYPEDEF_MEASUREMENT", A2lTypedefType::TYPEDEF_MEASUREMENT), + std::pair("TYPEDEF_STRUCTURE", A2lTypedefType::TYPEDEF_STRUCTURE), +}; + +A2lTypedefType StringToTypedefType(const std::string& text) { + return StringToEnum(text, kTypedefList); +} + +std::string_view TypedefTypeToString(A2lTypedefType type) { + return EnumToString(type, kTypedefList); +} + +EnumStringList TypedefTypeToStringList() { + return EnumToStringList(kTypedefList); +} + +/*------------------- UNIT TYPE ----------------------*/ +using StringUnit = std::pair; +constexpr std::array kUnitList = { + std::pair("DERIVED", A2lUnitType::DERIVED), + std::pair("EXTENDED_SI", A2lUnitType::EXTENDED_SI), +}; + +A2lUnitType StringToUnitType(const std::string& text) { + return StringToEnum(text, kUnitList); +} + +std::string_view UnitTypeToString(A2lUnitType type) { + return EnumToString(type, kUnitList); +} + +EnumStringList UnitTypeToStringList() { + return EnumToStringList(kUnitList); +} + +} diff --git a/a2llib-main/src/a2lfile.cpp b/a2llib-main/src/a2lfile.cpp new file mode 100644 index 0000000..6d1c8fc --- /dev/null +++ b/a2llib-main/src/a2lfile.cpp @@ -0,0 +1,67 @@ +/* +* Copyright 2022 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#include "a2l/a2lfile.h" +#include +#include +#include +#include +#include +#include +#include +#include "a2lscanner.h" +#include "a2lhelper.h" + + +namespace a2l { + +std::string A2lFile::Name() const { + return A2lHelper::GetStem(filename_); +} + +bool A2lFile::ParseFile() { + last_error_.clear(); + bool parse = true; + try { + // Read in the file into a memory stream and convert to UTF8 coding at + // the same time + std::istringstream utf8_stream; + A2lScanner::ReadAndConvertFile(filename_, utf8_stream); + A2lScanner scanner(utf8_stream); + scanner.InputFile(filename_); // Needed in case of include files. + scanner.Parent(this); + + // scanner.set_debug(2); + A2lParser parser(scanner, *this); + parse = parser.parse() == 0; + IsA2lFile(scanner.IsA2lFile()); + last_error_ = scanner.LastError(); + + } catch (const std::exception& err) { + last_error_ = err.what(); + parse = false; + } catch (...) { + parse = false; + } + return parse; +} + +void A2lFile::Merge(A2lFile &include_file) { + // If this isn't an A2L file i.e. missing the project header, then copy the entire project. + // Always move the modules + auto& dest_project = Project(); + auto& remote_project = include_file.Project(); + if (!IsA2lFile()) { + dest_project.Header() = remote_project.Header(); + } + auto& dest_list = dest_project.Modules(); + auto& source_list = remote_project.Modules(); + for (auto& itr : source_list) { + dest_project.AddModule(itr.second); + } + source_list.clear(); +} + +} // namespace a2l \ No newline at end of file diff --git a/a2llib-main/src/a2lflexer.cpp b/a2llib-main/src/a2lflexer.cpp new file mode 100644 index 0000000..1cc655f --- /dev/null +++ b/a2llib-main/src/a2lflexer.cpp @@ -0,0 +1,4119 @@ +#line 1 "D:/projects/a2llib/src/a2lflexer.cpp" + #include + #include + +#line 5 "D:/projects/a2llib/src/a2lflexer.cpp" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +/* %not-for-header */ +/* %if-c-only */ +/* %if-not-reentrant */ +/* %endif */ +/* %endif */ +/* %ok-for-header */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 4 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* %if-c++-only */ + /* The c++ scanner is a mess. The FlexLexer.h header file relies on the + * following macro. This is required in order to pass the c++-multiple-scanners + * test in the regression suite. We get reports that it breaks inheritance. + * We will address this in a future release of flex, or omit the C++ scanner + * altogether. + */ + #define yyFlexLexer a2lFlexLexer +/* %endif */ + +/* %if-c-only */ +/* %endif */ + +#ifdef yyalloc +#define a2lalloc_ALREADY_DEFINED +#else +#define yyalloc a2lalloc +#endif + +#ifdef yyrealloc +#define a2lrealloc_ALREADY_DEFINED +#else +#define yyrealloc a2lrealloc +#endif + +#ifdef yyfree +#define a2lfree_ALREADY_DEFINED +#else +#define yyfree a2lfree +#endif + +/* %if-c-only */ +/* %endif */ + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +/* %if-c-only */ +/* %endif */ + +/* %if-tables-serialization */ +/* %endif */ +/* end standard C headers. */ + +/* %if-c-or-c++ */ +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#ifndef SIZE_MAX +#define SIZE_MAX (~(size_t)0) +#endif + +#endif /* ! C99 */ + +#endif /* ! FLEXINT_H */ + +/* %endif */ + +/* begin standard C++ headers. */ +/* %if-c++-only */ +#include +#include +#include +#include +#include +/* end standard C++ headers. */ +/* %endif */ + +/* TODO: this is always defined, so inline it */ +#define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) +#else +#define yynoreturn +#endif + +/* %not-for-header */ +/* Returned upon end-of-file. */ +#define YY_NULL 0 +/* %ok-for-header */ + +/* %not-for-header */ +/* Promotes a possibly negative, possibly signed char to an + * integer in range [0..255] for use as an array index. + */ +#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) +/* %ok-for-header */ + +/* %if-reentrant */ +/* %endif */ + +/* %if-not-reentrant */ + +/* %endif */ + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN (yy_start) = 1 + 2 * +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START (((yy_start) - 1) / 2) +#define YYSTATE YY_START +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart( yyin ) +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else +#define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +/* %if-not-reentrant */ +extern int yyleng; +/* %endif */ + +/* %if-c-only */ +/* %if-not-reentrant */ +/* %endif */ +/* %endif */ + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires + * access to the local variable yy_act. Since yyless() is a macro, it would break + * existing scanners that call yyless() from OUTSIDE yylex. + * One obvious solution it to make yy_act a global. I tried that, and saw + * a 5% performance hit in a non-yylineno scanner, because yy_act is + * normally declared as a register variable-- so it is not worth it. + */ + #define YY_LESS_LINENO(n) \ + do { \ + int yyl;\ + for ( yyl = n; yyl < yyleng; ++yyl )\ + if ( yytext[yyl] == '\n' )\ + --yylineno;\ + }while(0) + #define YY_LINENO_REWIND_TO(dst) \ + do {\ + const char *p;\ + for ( p = yy_cp-1; p >= (dst); --p)\ + if ( *p == '\n' )\ + --yylineno;\ + }while(0) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) +#define unput(c) yyunput( c, (yytext_ptr) ) + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { +/* %if-c-only */ +/* %endif */ + +/* %if-c++-only */ + std::streambuf* yy_input_file; +/* %endif */ + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* %if-c-only Standard (non-C++) definition */ +/* %not-for-header */ +/* %if-not-reentrant */ +/* %endif */ +/* %ok-for-header */ + +/* %endif */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] + +/* %if-c-only Standard (non-C++) definition */ +/* %if-not-reentrant */ +/* %not-for-header */ +/* %ok-for-header */ + +/* %endif */ +/* %endif */ + +void *yyalloc ( yy_size_t ); +void *yyrealloc ( void *, yy_size_t ); +void yyfree ( void * ); + +#define yy_new_buffer yy_create_buffer +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */ +/* Begin user sect3 */ +#define YY_SKIP_YYWRAP + +#define FLEX_DEBUG +typedef flex_uint8_t YY_CHAR; + +#define yytext_ptr yytext + +#include + +inline int yyFlexLexer::yywrap() { return 1; } +int yyFlexLexer::yylex() + { + LexerError( "yyFlexLexer::yylex invoked but %option yyclass used" ); + return 0; + } + +#define YY_DECL int a2l:A2lScanner::yylex() + +/* %% [1.5] DFA */ + +/* %if-c-only Standard (non-C++) definition */ +/* %endif */ + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + (yytext_ptr) = yy_bp; \ +/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\ + yyleng = (int) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ +/* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\ + (yy_c_buf_p) = yy_cp; +/* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */ +#define YY_NUM_RULES 215 +#define YY_END_OF_BUFFER 216 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static const flex_int16_t yy_accept[1559] = + { 0, + 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, + 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, + 206, 206, 206, 206, 206, 206, 216, 214, 213, 213, + 214, 214, 214, 208, 208, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 213, 0, 206, 0, 209, + 0, 212, 0, 0, 0, 210, 208, 0, 0, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 0, 0, 0, 212, 0, + 0, 0, 210, 0, 210, 207, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 65, + 205, 70, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 0, 211, 0, 203, 0, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 30, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 148, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 181, 183, + 205, 205, 205, 205, 0, 0, 0, 0, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 85, 205, 90, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 202, 0, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 37, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 82, 205, 205, 205, 205, + + 92, 205, 205, 205, 205, 205, 97, 205, 99, 205, + 205, 205, 205, 205, 205, 205, 205, 111, 205, 205, + 205, 205, 205, 205, 120, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 0, + 0, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + + 205, 205, 205, 57, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 83, 205, 205, 205, 205, + 200, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 109, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 130, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 194, 195, 0, 0, 204, 205, 205, + 3, 205, 205, 205, 205, 205, 205, 205, 20, 205, + + 28, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 48, 205, 50, 205, 205, 205, 205, + 58, 205, 205, 205, 205, 69, 205, 205, 205, 205, + 205, 205, 205, 87, 205, 205, 0, 205, 96, 205, + 205, 205, 101, 205, 103, 205, 205, 205, 205, 205, + 205, 112, 205, 205, 205, 124, 125, 121, 122, 123, + 205, 205, 128, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 139, 140, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 169, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + + 205, 205, 205, 205, 205, 205, 0, 0, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 41, 205, 205, 205, + 205, 205, 205, 52, 205, 205, 205, 205, 63, 64, + 60, 61, 62, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 0, 205, 205, 205, 199, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 127, 129, 205, 132, 205, 205, 205, 136, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 165, 205, 205, 168, 205, 205, 205, 205, 205, + + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 0, 0, 205, + 205, 205, 12, 16, 205, 205, 205, 19, 25, 26, + 205, 22, 23, 24, 205, 205, 31, 205, 205, 205, + 205, 205, 205, 43, 205, 205, 47, 205, 205, 205, + 205, 205, 205, 205, 205, 71, 205, 205, 205, 81, + 205, 205, 201, 205, 205, 205, 205, 205, 205, 98, + 205, 102, 205, 205, 205, 205, 110, 108, 205, 205, + 205, 205, 131, 133, 205, 205, 205, 205, 205, 146, + 147, 142, 143, 144, 145, 153, 154, 150, 151, 152, + + 205, 205, 160, 161, 157, 158, 159, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 190, 205, 205, 205, 197, 0, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 51, 205, 205, 205, 205, 66, 205, 205, 205, 205, + 84, 205, 205, 205, 91, 205, 205, 205, 205, 104, + 105, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 141, 155, 205, 205, 205, 205, 205, 205, 170, + + 205, 205, 205, 173, 205, 205, 205, 205, 205, 205, + 184, 205, 185, 205, 205, 205, 205, 205, 205, 205, + 0, 2, 4, 205, 205, 205, 205, 205, 205, 205, + 205, 17, 205, 205, 21, 205, 205, 205, 205, 205, + 205, 40, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 73, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 119, 205, 205, + 205, 205, 205, 156, 205, 205, 205, 205, 167, 205, + 205, 149, 205, 176, 177, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 0, 205, 205, + + 205, 205, 205, 205, 205, 205, 205, 1, 205, 29, + 205, 205, 205, 205, 38, 205, 42, 205, 205, 205, + 205, 54, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 88, 205, 205, 205, 205, 205, 106, 205, 116, + 117, 113, 114, 115, 205, 205, 134, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 187, 205, 205, 205, 192, 205, + 198, 5, 205, 205, 10, 11, 205, 205, 205, 205, + 27, 205, 205, 205, 36, 205, 205, 205, 205, 49, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + + 205, 205, 93, 95, 94, 205, 107, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 193, 205, 205, 205, 205, 205, + 205, 9, 205, 205, 15, 18, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 72, + 205, 205, 205, 205, 205, 100, 205, 126, 205, 137, + 205, 205, 205, 205, 205, 205, 172, 205, 205, 205, + 205, 205, 182, 205, 205, 189, 205, 205, 205, 205, + 205, 13, 205, 205, 205, 205, 205, 44, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + + 89, 118, 205, 205, 205, 205, 205, 205, 171, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 14, 205, 205, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 74, 75, 79, 80, 76, 77, + 78, 86, 205, 205, 205, 205, 164, 205, 205, 205, + 205, 205, 180, 205, 205, 205, 205, 205, 205, 205, + 32, 33, 35, 205, 205, 205, 205, 53, 205, 59, + 205, 205, 135, 138, 205, 205, 205, 205, 205, 205, + 205, 186, 188, 205, 205, 205, 205, 205, 205, 39, + 45, 205, 205, 205, 205, 205, 205, 205, 166, 205, + + 205, 205, 179, 205, 205, 205, 205, 205, 205, 46, + 205, 205, 205, 205, 205, 163, 205, 205, 205, 205, + 205, 205, 205, 205, 205, 55, 205, 67, 205, 205, + 205, 205, 205, 205, 205, 6, 7, 8, 205, 205, + 68, 162, 174, 205, 178, 205, 196, 34, 205, 175, + 205, 56, 205, 205, 205, 205, 191, 0 + } ; + +static const YY_CHAR yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 4, 1, 1, 1, 1, 1, 5, + 5, 6, 7, 1, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 18, 18, 1, 1, 1, + 1, 1, 1, 1, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 5, 45, 5, 1, 46, 1, 47, 48, 49, 50, + + 51, 47, 52, 53, 54, 53, 53, 55, 53, 56, + 53, 53, 53, 53, 53, 53, 57, 53, 53, 58, + 53, 53, 59, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static const YY_CHAR yy_meta[60] = + { 0, + 1, 1, 2, 1, 3, 1, 4, 5, 6, 3, + 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, + 8, 8, 9, 8, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 10, 3, 3, 1, 3, 8, 8, 8, 8, + 9, 3, 3, 3, 3, 3, 3, 10, 1 + } ; + +static const flex_int16_t yy_base[1570] = + { 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1685, 1686, 58, 60, + 60, 54, 67, 65, 66, 90, 49, 61, 59, 77, + 98, 45, 1661, 61, 0, 116, 117, 57, 105, 65, + 115, 120, 61, 96, 83, 149, 110, 1679, 1679, 144, + 1675, 0, 1629, 1623, 1622, 118, 0, 153, 0, 0, + 1646, 1654, 1648, 1642, 118, 1654, 1645, 1633, 1637, 1631, + 1638, 1648, 139, 1627, 136, 1627, 141, 1627, 1624, 1641, + 1632, 1624, 1621, 1616, 1636, 1620, 1636, 1622, 1620, 1633, + + 1632, 1627, 1603, 140, 1605, 1623, 1615, 1624, 142, 159, + 157, 1598, 1612, 1618, 1603, 1617, 148, 1606, 164, 162, + 1605, 1610, 157, 1615, 174, 172, 163, 1599, 1615, 1599, + 1605, 1608, 1594, 1593, 1592, 153, 1621, 198, 0, 1574, + 1575, 1575, 176, 200, 208, 0, 1593, 1586, 1596, 1587, + 1600, 207, 1584, 1580, 1570, 1595, 1591, 1586, 1576, 1587, + 1576, 192, 1563, 1568, 1569, 1587, 188, 210, 210, 1559, + 1571, 0, 1570, 1579, 1555, 1554, 1568, 1567, 1576, 1557, + 1559, 1572, 1561, 1570, 1552, 1552, 1558, 1555, 1549, 1559, + 1539, 1538, 1547, 1536, 1544, 1547, 212, 1546, 217, 1558, + + 1540, 1530, 1539, 1542, 1536, 1544, 1549, 1537, 1523, 1545, + 1541, 1520, 1527, 1540, 1531, 1539, 1515, 1522, 1525, 1519, + 1511, 1522, 1535, 1516, 1530, 1520, 1528, 1512, 1513, 210, + 1511, 1509, 1540, 1686, 1491, 1686, 1489, 1497, 215, 1510, + 1503, 1497, 1506, 1502, 1524, 1490, 209, 0, 1489, 1514, + 1514, 1508, 220, 1504, 1494, 1506, 1490, 1504, 1493, 1479, + 1485, 1502, 1490, 1484, 1484, 1489, 1472, 226, 1495, 1480, + 1483, 230, 1474, 227, 1490, 1474, 1477, 1488, 1486, 1470, + 1488, 1468, 1486, 1481, 1464, 1456, 1463, 1469, 1469, 1471, + 227, 1458, 1460, 1465, 1464, 233, 1455, 1450, 1467, 1467, + + 1466, 1465, 1456, 1445, 1462, 1438, 1460, 1436, 1445, 239, + 1444, 1441, 1459, 0, 1439, 1430, 1433, 1455, 230, 1427, + 1451, 247, 1441, 1437, 1446, 1447, 1430, 1444, 1419, 1418, + 1444, 255, 1435, 1422, 1454, 199, 1403, 1401, 1417, 1419, + 1432, 1423, 1434, 1406, 1420, 1417, 1403, 246, 1429, 1413, + 1413, 1409, 1423, 1406, 1406, 1395, 1403, 1406, 1402, 1394, + 1390, 1404, 1397, 1403, 1406, 1409, 1403, 1406, 1409, 1394, + 1404, 1406, 1397, 1377, 1400, 1379, 1387, 1400, 1380, 1387, + 1370, 1388, 0, 1368, 1377, 1385, 1373, 1364, 1377, 1389, + 1369, 1369, 1368, 1381, 1376, 1360, 1365, 1377, 1363, 1355, + + 1351, 1373, 1362, 1375, 1360, 1365, 1345, 1353, 1353, 1350, + 1364, 1350, 1339, 1345, 1362, 232, 1360, 1355, 1344, 1356, + 1346, 1337, 1330, 1353, 1328, 1350, 1338, 1349, 1349, 1332, + 1331, 1329, 1327, 1329, 1337, 1333, 1331, 1315, 1336, 1336, + 1337, 1321, 1324, 1333, 249, 1321, 1330, 1333, 1328, 1317, + 1330, 281, 1298, 1324, 1309, 1311, 1321, 1305, 1305, 1307, + 1302, 1299, 1315, 1299, 1313, 1298, 1311, 1297, 1313, 1293, + 1284, 1302, 250, 1290, 1297, 1289, 1291, 1305, 1300, 1295, + 1283, 1301, 1296, 1280, 1279, 1273, 1281, 1292, 1283, 1280, + 1280, 1287, 1282, 1262, 1277, 0, 1287, 1274, 1271, 1267, + + 0, 1278, 1282, 1265, 1278, 1261, 0, 1271, 0, 1277, + 1258, 1248, 1274, 1268, 1268, 1244, 1259, 0, 1257, 1251, + 1254, 1248, 1257, 1262, 0, 1236, 1262, 1253, 1247, 1246, + 1239, 1244, 1239, 1228, 1254, 1239, 258, 1244, 1247, 1232, + 1246, 1234, 1224, 1232, 1242, 1217, 1216, 1234, 1221, 1227, + 1225, 1234, 1210, 1209, 1224, 1220, 1228, 1218, 1223, 1211, + 1226, 1228, 1219, 1209, 1225, 1212, 261, 1210, 1211, 291, + 1189, 1203, 1192, 1208, 1204, 1208, 1207, 1200, 1199, 1208, + 1193, 1192, 1191, 1198, 1190, 1203, 1186, 1200, 1192, 1184, + 1197, 1200, 1180, 1194, 1186, 1188, 1191, 1171, 1176, 1167, + + 1164, 1173, 1176, 0, 1184, 1160, 1159, 1168, 1176, 1177, + 1182, 1178, 1162, 1179, 1158, 1150, 1172, 1162, 1174, 1141, + 294, 1125, 1131, 1102, 1105, 1091, 61, 146, 180, 219, + 267, 269, 273, 270, 0, 259, 257, 272, 286, 292, + 272, 273, 279, 286, 268, 285, 289, 287, 283, 281, + 284, 289, 285, 302, 299, 290, 293, 290, 297, 294, + 312, 295, 289, 301, 317, 300, 304, 311, 321, 324, + 308, 299, 314, 322, 304, 315, 316, 315, 334, 318, + 329, 334, 339, 0, 313, 347, 337, 1686, 325, 325, + 0, 326, 332, 322, 335, 330, 333, 349, 325, 351, + + 0, 354, 351, 348, 340, 350, 345, 341, 360, 362, + 350, 360, 351, 0, 358, 340, 364, 348, 370, 352, + 0, 364, 377, 371, 375, 0, 359, 351, 352, 357, + 377, 374, 383, 401, 378, 385, 405, 390, 0, 374, + 387, 373, 0, 386, 0, 391, 392, 397, 394, 386, + 389, 0, 389, 386, 395, 0, 0, 0, 0, 0, + 387, 404, 0, 390, 397, 387, 393, 413, 414, 400, + 396, 400, 0, 0, 410, 392, 393, 417, 418, 396, + 421, 421, 407, 423, 425, 411, 416, 0, 424, 409, + 420, 411, 424, 437, 419, 434, 440, 439, 444, 442, + + 439, 428, 437, 449, 435, 451, 442, 429, 449, 434, + 432, 447, 457, 458, 439, 446, 448, 470, 468, 450, + 453, 457, 464, 460, 461, 468, 449, 476, 459, 462, + 467, 463, 469, 0, 483, 482, 458, 483, 0, 0, + 0, 0, 0, 470, 472, 480, 480, 477, 488, 479, + 485, 481, 517, 491, 492, 504, 1686, 492, 502, 488, + 491, 497, 492, 498, 489, 508, 505, 503, 498, 514, + 515, 503, 0, 0, 507, 0, 518, 499, 522, 0, + 508, 502, 522, 536, 539, 515, 516, 542, 527, 529, + 517, 0, 510, 532, 0, 528, 527, 530, 530, 541, + + 523, 536, 541, 545, 531, 547, 533, 539, 536, 553, + 539, 565, 552, 564, 552, 572, 566, 563, 572, 562, + 562, 577, 552, 0, 567, 566, 575, 0, 0, 0, + 580, 0, 0, 0, 575, 579, 0, 576, 572, 587, + 565, 579, 577, 568, 569, 570, 0, 571, 586, 590, + 583, 601, 600, 587, 606, 0, 599, 608, 591, 0, + 589, 591, 1686, 604, 609, 596, 596, 597, 605, 0, + 614, 0, 612, 601, 607, 610, 0, 0, 605, 607, + 598, 622, 0, 0, 613, 609, 625, 603, 612, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + 629, 614, 0, 0, 0, 0, 0, 617, 621, 628, + 635, 624, 629, 636, 623, 622, 626, 636, 631, 646, + 647, 631, 632, 632, 648, 634, 634, 646, 652, 652, + 0, 649, 639, 659, 1686, 660, 648, 658, 639, 653, + 652, 652, 653, 657, 650, 666, 658, 668, 670, 661, + 650, 659, 679, 664, 678, 678, 666, 680, 685, 669, + 0, 667, 684, 682, 677, 664, 673, 681, 677, 668, + 0, 679, 679, 681, 0, 691, 692, 697, 690, 0, + 0, 683, 700, 678, 701, 684, 696, 689, 706, 699, + 694, 0, 0, 695, 710, 698, 703, 703, 705, 0, + + 692, 701, 702, 695, 705, 723, 708, 708, 707, 710, + 0, 721, 0, 726, 717, 728, 721, 720, 721, 719, + 718, 0, 0, 719, 725, 721, 728, 725, 743, 727, + 741, 0, 719, 734, 0, 721, 736, 750, 743, 735, + 733, 0, 749, 755, 733, 755, 755, 756, 744, 763, + 745, 761, 758, 759, 741, 754, 766, 752, 754, 759, + 755, 762, 772, 758, 765, 783, 781, 0, 778, 764, + 767, 781, 782, 0, 769, 785, 783, 778, 0, 780, + 792, 0, 785, 0, 0, 794, 775, 794, 789, 785, + 783, 788, 789, 799, 791, 788, 809, 810, 807, 812, + + 815, 808, 812, 815, 809, 795, 805, 0, 797, 0, + 819, 822, 819, 822, 0, 825, 0, 813, 825, 825, + 824, 803, 823, 815, 825, 811, 821, 817, 834, 819, + 827, 0, 832, 828, 818, 824, 831, 0, 827, 0, + 0, 0, 0, 0, 845, 835, 0, 841, 837, 845, + 834, 826, 827, 840, 848, 844, 845, 839, 858, 844, + 843, 849, 858, 857, 0, 839, 854, 841, 0, 867, + 1686, 0, 851, 875, 0, 0, 868, 867, 855, 870, + 0, 874, 864, 859, 0, 866, 874, 874, 865, 0, + 870, 866, 885, 881, 868, 875, 871, 882, 883, 874, + + 889, 880, 0, 0, 0, 876, 0, 892, 878, 880, + 880, 888, 874, 891, 886, 890, 892, 887, 880, 889, + 890, 906, 891, 899, 0, 895, 912, 896, 914, 898, + 925, 0, 908, 913, 0, 0, 918, 921, 918, 907, + 923, 928, 925, 910, 912, 930, 925, 930, 908, 0, + 918, 919, 911, 926, 927, 0, 923, 0, 923, 0, + 939, 930, 945, 942, 934, 938, 0, 935, 923, 947, + 940, 936, 0, 935, 941, 0, 949, 953, 960, 965, + 964, 0, 948, 944, 952, 950, 957, 0, 953, 949, + 956, 961, 951, 967, 959, 959, 955, 956, 980, 959, + + 0, 0, 971, 967, 976, 958, 978, 980, 0, 984, + 972, 970, 984, 985, 982, 979, 992, 976, 967, 968, + 969, 0, 979, 994, 996, 981, 995, 984, 1002, 1005, + 1004, 992, 992, 1006, 0, 0, 0, 0, 0, 0, + 0, 0, 1010, 994, 1009, 1001, 0, 1003, 1008, 1017, + 1011, 1007, 0, 1019, 1021, 1006, 1016, 1017, 1018, 1019, + 0, 1001, 0, 1005, 1026, 1027, 1015, 0, 1016, 0, + 1026, 1030, 0, 0, 1018, 1017, 1019, 1035, 1031, 1023, + 1023, 0, 0, 1043, 1026, 1041, 1042, 1043, 1029, 0, + 0, 1031, 1042, 1043, 1038, 1035, 1050, 1036, 0, 1054, + + 1053, 1039, 0, 1057, 1041, 1057, 1058, 1059, 1060, 0, + 1063, 1048, 1054, 1064, 1050, 0, 1051, 1069, 1064, 1054, + 1066, 1071, 1072, 1073, 1055, 0, 1060, 0, 1061, 1063, + 1064, 1064, 1082, 1081, 1084, 0, 0, 0, 1068, 1080, + 0, 0, 0, 1071, 0, 1073, 0, 0, 1089, 0, + 1084, 0, 1075, 1075, 1087, 1094, 0, 1686, 1115, 1120, + 1128, 1133, 1142, 1152, 1156, 1162, 1163, 1172, 1182 + } ; + +static const flex_int16_t yy_def[1570] = + { 0, + 1558, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1558, 1558, 1558, 1558, + 1559, 1558, 1558, 1560, 1560, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1558, 1559, 1558, 1559, 1562, + 1563, 1564, 1558, 1558, 1558, 1565, 35, 1566, 1567, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1559, 1563, 1568, 1564, 1558, + 1558, 1558, 1565, 1558, 1558, 1567, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1569, 1558, 1558, 1558, 1558, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1569, 1568, 1558, 1558, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1558, 1558, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1558, + 1558, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1558, 1558, 1558, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1558, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + + 1561, 1561, 1561, 1561, 1561, 1561, 1558, 1558, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1558, 1561, 1561, 1561, 1558, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1558, 1558, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1558, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1558, 1558, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1558, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1558, 1561, 1561, + + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1558, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 0, 1558, 1558, + 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558 + } ; + +static const flex_int16_t yy_nxt[1746] = + { 0, + 28, 29, 30, 31, 28, 28, 32, 32, 28, 33, + 34, 35, 35, 35, 35, 35, 35, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 45, 46, + 47, 48, 49, 50, 45, 51, 52, 53, 54, 55, + 45, 45, 45, 45, 28, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 28, 56, + 56, 56, 56, 58, 60, 60, 60, 60, 60, 60, + 60, 60, 61, 66, 66, 78, 62, 86, 79, 81, + 99, 87, 102, 100, 103, 88, 82, 68, 68, 112, + 117, 80, 104, 83, 84, 113, 129, 89, 743, 85, + + 118, 133, 71, 130, 59, 134, 69, 1558, 90, 135, + 91, 72, 92, 58, 63, 68, 68, 64, 93, 73, + 65, 74, 69, 1558, 94, 75, 76, 131, 114, 95, + 96, 77, 132, 97, 105, 109, 98, 119, 106, 110, + 68, 120, 107, 115, 116, 122, 123, 121, 108, 111, + 56, 56, 66, 151, 59, 124, 58, 125, 126, 144, + 144, 160, 127, 152, 167, 128, 68, 744, 68, 161, + 162, 164, 165, 185, 168, 192, 186, 195, 197, 193, + 204, 215, 207, 194, 208, 187, 211, 209, 198, 196, + 205, 221, 218, 223, 68, 212, 219, 59, 68, 224, + + 210, 745, 216, 138, 336, 222, 261, 234, 234, 220, + 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, + 145, 145, 145, 145, 145, 145, 68, 243, 254, 255, + 265, 256, 263, 262, 294, 298, 331, 340, 355, 349, + 244, 350, 264, 266, 371, 379, 372, 267, 376, 299, + 295, 397, 300, 403, 746, 332, 429, 296, 356, 418, + 341, 377, 398, 419, 532, 380, 404, 463, 430, 420, + 433, 434, 533, 444, 562, 445, 651, 421, 446, 464, + 591, 465, 570, 570, 563, 447, 448, 592, 652, 593, + 682, 449, 570, 570, 683, 737, 737, 747, 748, 750, + + 751, 752, 753, 754, 755, 749, 756, 757, 761, 686, + 762, 763, 764, 765, 766, 767, 768, 687, 769, 770, + 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, + 781, 783, 784, 758, 759, 760, 785, 786, 787, 788, + 789, 791, 792, 793, 794, 795, 796, 782, 790, 797, + 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, + 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, + 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, + 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, + 838, 839, 840, 844, 845, 846, 847, 848, 849, 850, + + 851, 852, 853, 853, 855, 856, 737, 737, 858, 859, + 860, 861, 862, 863, 864, 865, 866, 867, 841, 842, + 843, 868, 869, 870, 871, 872, 873, 874, 875, 876, + 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, + 887, 888, 889, 890, 891, 892, 854, 893, 894, 895, + 896, 897, 898, 899, 900, 901, 902, 903, 906, 907, + 908, 909, 910, 857, 911, 912, 913, 904, 914, 915, + 916, 917, 918, 905, 919, 920, 921, 922, 923, 924, + 925, 926, 927, 928, 929, 930, 935, 936, 937, 938, + 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, + + 949, 950, 951, 952, 953, 931, 954, 955, 956, 957, + 958, 932, 933, 934, 959, 960, 961, 962, 853, 853, + 964, 966, 967, 968, 969, 970, 971, 972, 973, 974, + 965, 975, 976, 977, 978, 979, 980, 981, 982, 983, + 984, 985, 986, 987, 988, 989, 1001, 1002, 1008, 1009, + 990, 991, 1010, 996, 997, 1011, 1003, 1004, 1012, 1013, + 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, + 1024, 1025, 1026, 1027, 1028, 963, 992, 993, 994, 995, + 998, 999, 1000, 1005, 1006, 1007, 1029, 1030, 1031, 1032, + 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1044, 1045, 1046, + + 1040, 1047, 1048, 1041, 1049, 1050, 1042, 1051, 1052, 1053, + 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1043, 1061, 1062, + 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, + 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, + 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, + 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, + 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, + 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, + 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1132, 1133, 1130, + 1134, 1135, 1136, 1137, 1131, 1138, 1139, 1140, 1141, 1142, + + 1143, 1144, 1145, 1146, 1147, 1148, 1149, 1150, 1151, 1152, + 1153, 1154, 1155, 1156, 1157, 1158, 1159, 1160, 1161, 1162, + 1163, 1164, 1165, 1166, 1167, 1168, 1169, 1170, 1171, 1172, + 1173, 1174, 1175, 1176, 1177, 1178, 1179, 1180, 1181, 1182, + 1183, 1184, 1185, 1186, 1187, 1188, 1189, 1190, 1191, 1192, + 1193, 1194, 1195, 1196, 1197, 1198, 1199, 1200, 1201, 1202, + 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211, 1214, + 1215, 1216, 1217, 1218, 1219, 1212, 1220, 1221, 1222, 1223, + 1213, 1224, 1225, 1226, 1227, 1228, 1229, 1230, 1231, 1232, + 1233, 1234, 1235, 1236, 1237, 1238, 1239, 1240, 1241, 1245, + + 1246, 1247, 1248, 1249, 1250, 1251, 1252, 1253, 1254, 1255, + 1256, 1257, 1259, 1260, 1261, 1262, 1263, 1258, 1264, 1265, + 1266, 1267, 1268, 1269, 1242, 1243, 1244, 1270, 1271, 1272, + 1273, 1274, 1275, 1276, 1277, 1278, 1279, 1280, 1281, 1282, + 1283, 1284, 1285, 1286, 1287, 1288, 1289, 1290, 1291, 1292, + 1293, 1294, 1295, 1296, 1297, 1298, 1300, 1301, 1302, 1303, + 1304, 1305, 1306, 1299, 1307, 1308, 1309, 1310, 1311, 1312, + 1313, 1314, 1315, 1316, 1317, 1318, 1319, 1320, 1321, 1322, + 1323, 1324, 1325, 1326, 1327, 1328, 1329, 1330, 1331, 1332, + 1333, 1334, 1335, 1336, 1337, 1338, 1339, 1340, 1341, 1342, + + 1343, 1344, 1345, 1346, 1347, 1348, 1349, 1350, 1351, 1352, + 1353, 1354, 1355, 1356, 1357, 1358, 1359, 1360, 1361, 1362, + 1363, 1364, 1365, 1366, 1367, 1368, 1369, 1370, 1371, 1372, + 1373, 1374, 1375, 1376, 1377, 1378, 1379, 1382, 1380, 1383, + 1384, 1381, 1385, 1386, 1387, 1388, 1389, 1390, 1391, 1392, + 1393, 1394, 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, + 1403, 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1412, + 1413, 1414, 1415, 1416, 1417, 1418, 1419, 1420, 1421, 1422, + 1423, 1424, 1425, 1426, 1427, 1428, 1429, 1430, 1431, 1432, + 1433, 1434, 1435, 1436, 1437, 1438, 1442, 1443, 1444, 1445, + + 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, 1454, 1455, + 1456, 1457, 1458, 1459, 1460, 1461, 1462, 1463, 1464, 1465, + 1466, 1439, 1440, 1441, 1467, 1468, 1469, 1470, 1471, 1472, + 1473, 1474, 1475, 1476, 1477, 1478, 1479, 1480, 1481, 1482, + 1483, 1484, 1485, 1486, 1487, 1488, 1489, 1490, 1491, 1492, + 1493, 1494, 1495, 1496, 1497, 1498, 1499, 1500, 1501, 1502, + 1503, 1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511, 1512, + 1513, 1514, 1515, 1516, 1517, 1518, 1519, 1520, 1521, 1522, + 1523, 1524, 1525, 1526, 1527, 1528, 1529, 1530, 1531, 1532, + 1533, 1534, 1535, 1536, 1537, 1538, 1539, 1540, 1541, 1542, + + 1543, 1544, 1545, 1546, 1547, 1548, 1549, 1550, 1551, 1552, + 1553, 1554, 1555, 1556, 1557, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 67, 67, 742, 67, 67, + 70, 741, 70, 70, 70, 70, 70, 70, 60, 60, + 740, 60, 137, 137, 137, 137, 137, 137, 137, 137, + 137, 137, 139, 739, 139, 139, 139, 139, 139, 139, + 139, 139, 143, 738, 143, 145, 145, 736, 145, 146, + 146, 146, 233, 233, 233, 233, 233, 233, 233, 233, + 233, 233, 335, 335, 335, 335, 335, 335, 335, 335, + 335, 335, 735, 734, 733, 732, 731, 730, 729, 728, + + 727, 726, 725, 724, 723, 722, 721, 720, 719, 718, + 717, 716, 715, 714, 713, 712, 711, 710, 709, 708, + 707, 706, 705, 704, 703, 702, 701, 700, 699, 698, + 697, 696, 695, 694, 693, 692, 691, 690, 689, 688, + 685, 684, 681, 680, 679, 678, 677, 676, 675, 674, + 673, 672, 671, 670, 669, 668, 667, 666, 665, 664, + 663, 662, 661, 660, 659, 658, 657, 656, 655, 654, + 653, 650, 649, 648, 647, 646, 645, 644, 643, 642, + 641, 640, 639, 638, 637, 636, 635, 634, 633, 632, + 631, 630, 629, 628, 627, 626, 625, 624, 623, 622, + + 621, 620, 619, 618, 617, 616, 615, 614, 613, 612, + 611, 610, 609, 608, 607, 606, 605, 604, 603, 602, + 601, 600, 599, 598, 597, 596, 595, 594, 590, 589, + 588, 587, 586, 585, 584, 583, 582, 581, 580, 579, + 578, 577, 576, 575, 574, 573, 572, 571, 569, 568, + 567, 566, 565, 564, 561, 560, 559, 558, 557, 556, + 555, 554, 553, 552, 551, 550, 549, 548, 547, 546, + 545, 544, 543, 542, 541, 540, 539, 538, 537, 536, + 535, 534, 531, 530, 529, 528, 527, 526, 525, 524, + 523, 522, 521, 520, 519, 518, 517, 516, 515, 514, + + 513, 512, 511, 510, 509, 508, 507, 506, 505, 504, + 503, 502, 501, 500, 499, 498, 497, 496, 495, 494, + 493, 492, 491, 490, 489, 488, 487, 486, 485, 484, + 483, 482, 481, 480, 479, 478, 477, 476, 475, 474, + 473, 472, 471, 470, 469, 468, 467, 466, 462, 461, + 460, 459, 458, 457, 456, 455, 454, 453, 452, 336, + 451, 450, 443, 442, 441, 440, 439, 438, 437, 436, + 435, 432, 431, 428, 427, 426, 425, 424, 423, 422, + 417, 416, 415, 414, 413, 412, 411, 410, 409, 408, + 407, 406, 405, 402, 401, 400, 399, 396, 395, 394, + + 393, 392, 391, 390, 389, 388, 387, 386, 385, 384, + 383, 382, 381, 378, 375, 374, 373, 370, 369, 368, + 367, 366, 365, 364, 363, 362, 361, 360, 359, 358, + 357, 354, 353, 352, 351, 348, 347, 346, 345, 344, + 343, 342, 339, 338, 337, 336, 334, 333, 330, 329, + 328, 327, 326, 325, 324, 323, 322, 321, 320, 319, + 318, 317, 316, 315, 314, 313, 312, 311, 310, 309, + 308, 307, 306, 305, 304, 303, 302, 301, 297, 293, + 292, 291, 290, 289, 288, 287, 286, 285, 284, 283, + 282, 281, 280, 279, 278, 277, 276, 275, 274, 273, + + 272, 271, 270, 269, 268, 260, 259, 258, 257, 253, + 252, 251, 250, 249, 248, 247, 246, 245, 242, 241, + 240, 239, 238, 237, 236, 235, 138, 232, 231, 230, + 229, 228, 227, 226, 225, 217, 214, 213, 206, 203, + 202, 201, 200, 199, 191, 190, 189, 188, 184, 183, + 182, 181, 180, 179, 178, 177, 176, 175, 174, 173, + 172, 171, 170, 169, 166, 163, 159, 158, 157, 156, + 155, 154, 153, 150, 149, 148, 147, 142, 141, 140, + 138, 1558, 136, 101, 1558, 27, 1558, 1558, 1558, 1558, + 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, + + 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, + 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, + 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, + 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, + 1558, 1558, 1558, 1558, 1558 + } ; + +static const flex_int16_t yy_chk[1746] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 29, + 29, 30, 30, 31, 32, 32, 32, 32, 32, 32, + 32, 32, 33, 34, 35, 37, 33, 39, 37, 38, + 42, 39, 44, 42, 44, 39, 38, 34, 35, 48, + 50, 37, 44, 38, 38, 48, 53, 40, 627, 38, + + 50, 55, 36, 53, 31, 55, 34, 35, 40, 55, + 40, 36, 40, 57, 33, 34, 35, 33, 40, 36, + 33, 36, 34, 35, 41, 36, 36, 54, 49, 41, + 41, 36, 54, 41, 46, 47, 41, 51, 46, 47, + 66, 51, 46, 49, 49, 52, 52, 51, 46, 47, + 56, 56, 60, 75, 57, 52, 136, 52, 52, 68, + 68, 83, 52, 75, 87, 52, 60, 628, 66, 83, + 83, 85, 85, 104, 87, 109, 104, 110, 111, 109, + 117, 123, 119, 109, 119, 104, 120, 119, 111, 110, + 117, 126, 125, 127, 60, 120, 125, 136, 143, 127, + + 119, 629, 123, 138, 336, 126, 167, 138, 336, 125, + 144, 144, 144, 144, 144, 144, 144, 144, 145, 145, + 145, 145, 145, 145, 145, 145, 143, 152, 162, 162, + 169, 162, 168, 167, 197, 199, 230, 239, 253, 247, + 152, 247, 168, 169, 268, 274, 268, 169, 272, 199, + 197, 291, 199, 296, 630, 230, 319, 197, 253, 310, + 239, 272, 291, 310, 416, 274, 296, 348, 319, 310, + 322, 322, 416, 332, 445, 332, 537, 310, 332, 348, + 473, 348, 452, 452, 445, 332, 332, 473, 537, 473, + 567, 332, 570, 570, 567, 621, 621, 631, 632, 633, + + 634, 636, 637, 638, 639, 632, 640, 640, 641, 570, + 642, 643, 644, 645, 646, 647, 648, 570, 649, 650, + 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, + 661, 662, 663, 640, 640, 640, 664, 665, 666, 667, + 668, 669, 670, 671, 672, 673, 674, 661, 668, 675, + 676, 677, 678, 679, 680, 681, 682, 683, 685, 686, + 687, 689, 690, 692, 693, 694, 695, 696, 697, 698, + 699, 700, 702, 703, 704, 705, 706, 707, 708, 709, + 710, 711, 712, 713, 715, 716, 717, 718, 719, 720, + 722, 723, 723, 724, 725, 727, 728, 729, 730, 731, + + 732, 733, 734, 734, 735, 736, 737, 737, 738, 740, + 741, 742, 744, 746, 747, 748, 749, 750, 723, 723, + 723, 751, 753, 754, 755, 761, 762, 764, 765, 766, + 767, 768, 769, 770, 771, 772, 775, 776, 777, 778, + 779, 780, 781, 782, 783, 784, 734, 785, 786, 787, + 789, 790, 791, 792, 793, 794, 794, 794, 795, 796, + 797, 798, 799, 737, 800, 801, 802, 794, 803, 804, + 805, 806, 807, 794, 808, 809, 810, 811, 812, 813, + 814, 815, 816, 817, 818, 818, 819, 820, 821, 822, + 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, + + 833, 835, 836, 837, 838, 818, 844, 845, 846, 847, + 848, 818, 818, 818, 849, 850, 851, 852, 853, 853, + 854, 855, 856, 858, 859, 860, 861, 862, 863, 864, + 854, 865, 866, 867, 868, 869, 870, 871, 872, 875, + 877, 878, 879, 881, 882, 883, 886, 887, 889, 890, + 884, 884, 891, 885, 885, 893, 888, 888, 894, 896, + 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, + 907, 908, 909, 910, 911, 853, 884, 884, 884, 884, + 885, 885, 885, 888, 888, 888, 912, 913, 914, 915, + 916, 917, 918, 919, 920, 921, 922, 923, 925, 926, + + 922, 927, 931, 922, 935, 936, 922, 938, 939, 940, + 941, 942, 943, 944, 945, 946, 948, 922, 949, 950, + 951, 952, 953, 954, 955, 957, 958, 959, 961, 962, + 964, 965, 966, 967, 968, 969, 971, 973, 974, 975, + 976, 979, 980, 981, 982, 985, 986, 987, 988, 989, + 1001, 1002, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, + 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, + 1026, 1027, 1028, 1029, 1030, 1032, 1033, 1034, 1036, 1037, + 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1044, + 1047, 1048, 1049, 1050, 1044, 1051, 1052, 1053, 1054, 1055, + + 1056, 1057, 1058, 1059, 1060, 1062, 1063, 1064, 1065, 1066, + 1067, 1068, 1069, 1070, 1072, 1073, 1074, 1076, 1077, 1078, + 1079, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, + 1091, 1094, 1095, 1096, 1097, 1098, 1099, 1101, 1102, 1103, + 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1112, 1114, 1115, + 1116, 1117, 1118, 1119, 1120, 1121, 1124, 1125, 1126, 1127, + 1128, 1129, 1130, 1131, 1133, 1134, 1136, 1137, 1138, 1139, + 1140, 1141, 1143, 1144, 1145, 1138, 1146, 1147, 1148, 1149, + 1138, 1150, 1151, 1152, 1153, 1154, 1155, 1156, 1157, 1158, + 1159, 1160, 1161, 1162, 1163, 1164, 1165, 1166, 1166, 1167, + + 1169, 1170, 1171, 1172, 1173, 1175, 1176, 1177, 1178, 1180, + 1181, 1183, 1186, 1187, 1188, 1189, 1190, 1183, 1191, 1192, + 1193, 1194, 1195, 1196, 1166, 1166, 1166, 1197, 1198, 1199, + 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1209, 1211, + 1212, 1213, 1214, 1216, 1218, 1219, 1220, 1221, 1222, 1223, + 1224, 1225, 1226, 1227, 1228, 1229, 1230, 1231, 1233, 1234, + 1235, 1236, 1237, 1229, 1239, 1245, 1246, 1248, 1249, 1250, + 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1259, 1260, + 1261, 1262, 1263, 1264, 1266, 1267, 1268, 1270, 1273, 1274, + 1277, 1278, 1279, 1280, 1282, 1283, 1284, 1286, 1287, 1288, + + 1289, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, + 1300, 1301, 1302, 1306, 1308, 1309, 1310, 1311, 1312, 1313, + 1314, 1315, 1316, 1317, 1318, 1319, 1320, 1321, 1322, 1323, + 1324, 1326, 1327, 1328, 1329, 1330, 1331, 1333, 1331, 1334, + 1337, 1331, 1338, 1339, 1340, 1341, 1342, 1343, 1344, 1345, + 1346, 1347, 1348, 1349, 1351, 1352, 1353, 1354, 1355, 1357, + 1359, 1361, 1362, 1363, 1364, 1365, 1366, 1368, 1369, 1370, + 1371, 1372, 1374, 1375, 1377, 1378, 1379, 1380, 1381, 1383, + 1384, 1385, 1386, 1387, 1389, 1390, 1391, 1392, 1393, 1394, + 1395, 1396, 1397, 1398, 1399, 1399, 1400, 1403, 1404, 1405, + + 1406, 1407, 1408, 1410, 1411, 1412, 1413, 1414, 1415, 1416, + 1417, 1418, 1419, 1420, 1421, 1423, 1424, 1425, 1426, 1427, + 1428, 1399, 1399, 1399, 1429, 1430, 1431, 1432, 1433, 1434, + 1443, 1444, 1445, 1446, 1448, 1449, 1450, 1451, 1452, 1454, + 1455, 1456, 1457, 1458, 1459, 1460, 1462, 1464, 1465, 1466, + 1467, 1469, 1471, 1472, 1475, 1476, 1477, 1478, 1479, 1480, + 1481, 1484, 1485, 1486, 1487, 1488, 1489, 1492, 1493, 1494, + 1495, 1496, 1497, 1498, 1500, 1501, 1502, 1504, 1505, 1506, + 1507, 1508, 1509, 1511, 1512, 1513, 1514, 1515, 1517, 1518, + 1519, 1520, 1521, 1522, 1523, 1524, 1525, 1527, 1529, 1530, + + 1531, 1532, 1533, 1534, 1535, 1539, 1540, 1544, 1546, 1549, + 1551, 1553, 1554, 1555, 1556, 1559, 1559, 1559, 1559, 1559, + 1559, 1559, 1559, 1559, 1559, 1560, 1560, 626, 1560, 1560, + 1561, 625, 1561, 1561, 1561, 1561, 1561, 1561, 1562, 1562, + 624, 1562, 1563, 1563, 1563, 1563, 1563, 1563, 1563, 1563, + 1563, 1563, 1564, 623, 1564, 1564, 1564, 1564, 1564, 1564, + 1564, 1564, 1565, 622, 1565, 1566, 1566, 620, 1566, 1567, + 1567, 1567, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, + 1568, 1568, 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569, + 1569, 1569, 619, 618, 617, 616, 615, 614, 613, 612, + + 611, 610, 609, 608, 607, 606, 605, 603, 602, 601, + 600, 599, 598, 597, 596, 595, 594, 593, 592, 591, + 590, 589, 588, 587, 586, 585, 584, 583, 582, 581, + 580, 579, 578, 577, 576, 575, 574, 573, 572, 571, + 569, 568, 566, 565, 564, 563, 562, 561, 560, 559, + 558, 557, 556, 555, 554, 553, 552, 551, 550, 549, + 548, 547, 546, 545, 544, 543, 542, 541, 540, 539, + 538, 536, 535, 534, 533, 532, 531, 530, 529, 528, + 527, 526, 524, 523, 522, 521, 520, 519, 517, 516, + 515, 514, 513, 512, 511, 510, 508, 506, 505, 504, + + 503, 502, 500, 499, 498, 497, 495, 494, 493, 492, + 491, 490, 489, 488, 487, 486, 485, 484, 483, 482, + 481, 480, 479, 478, 477, 476, 475, 474, 472, 471, + 470, 469, 468, 467, 466, 465, 464, 463, 462, 461, + 460, 459, 458, 457, 456, 455, 454, 453, 451, 450, + 449, 448, 447, 446, 444, 443, 442, 441, 440, 439, + 438, 437, 436, 435, 434, 433, 432, 431, 430, 429, + 428, 427, 426, 425, 424, 423, 422, 421, 420, 419, + 418, 417, 415, 414, 413, 412, 411, 410, 409, 408, + 407, 406, 405, 404, 403, 402, 401, 400, 399, 398, + + 397, 396, 395, 394, 393, 392, 391, 390, 389, 388, + 387, 386, 385, 384, 382, 381, 380, 379, 378, 377, + 376, 375, 374, 373, 372, 371, 370, 369, 368, 367, + 366, 365, 364, 363, 362, 361, 360, 359, 358, 357, + 356, 355, 354, 353, 352, 351, 350, 349, 347, 346, + 345, 344, 343, 342, 341, 340, 339, 338, 337, 335, + 334, 333, 331, 330, 329, 328, 327, 326, 325, 324, + 323, 321, 320, 318, 317, 316, 315, 313, 312, 311, + 309, 308, 307, 306, 305, 304, 303, 302, 301, 300, + 299, 298, 297, 295, 294, 293, 292, 290, 289, 288, + + 287, 286, 285, 284, 283, 282, 281, 280, 279, 278, + 277, 276, 275, 273, 271, 270, 269, 267, 266, 265, + 264, 263, 262, 261, 260, 259, 258, 257, 256, 255, + 254, 252, 251, 250, 249, 246, 245, 244, 243, 242, + 241, 240, 238, 237, 235, 233, 232, 231, 229, 228, + 227, 226, 225, 224, 223, 222, 221, 220, 219, 218, + 217, 216, 215, 214, 213, 212, 211, 210, 209, 208, + 207, 206, 205, 204, 203, 202, 201, 200, 198, 196, + 195, 194, 193, 192, 191, 190, 189, 188, 187, 186, + 185, 184, 183, 182, 181, 180, 179, 178, 177, 176, + + 175, 174, 173, 171, 170, 166, 165, 164, 163, 161, + 160, 159, 158, 157, 156, 155, 154, 153, 151, 150, + 149, 148, 147, 142, 141, 140, 137, 135, 134, 133, + 132, 131, 130, 129, 128, 124, 122, 121, 118, 116, + 115, 114, 113, 112, 108, 107, 106, 105, 103, 102, + 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, + 91, 90, 89, 88, 86, 84, 82, 81, 80, 79, + 78, 77, 76, 74, 73, 72, 71, 65, 64, 63, + 61, 59, 58, 43, 27, 1558, 1558, 1558, 1558, 1558, + 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, + + 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, + 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, + 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, + 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, + 1558, 1558, 1558, 1558, 1558 + } ; + +/* Table of booleans, true if rule could match eol. */ +static const flex_int32_t yy_rule_can_match_eol[216] = + { 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, + 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, }; + +static const flex_int16_t yy_rule_linenum[215] = + { 0, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + + 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, + 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, + 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, + 239, 240, 241, 242, 243, 244, 246, 254, 261, 268, + + 275, 277, 278, 280, 286, 294, 305, 353, 363, 373, + 384, 385, 386, 387 + } ; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +#line 1 "D:/projects/a2llib/src/a2lflexer.l" + +#line 7 "D:/projects/a2llib/src/a2lflexer.l" + #include "a2lscanner.h" + #undef YY_DECL + #define YY_DECL int a2l::A2lScanner::a2llex(a2l::A2lParser::value_type* yy_value) + using token = a2l::A2lParser::token; +#line 1462 "D:/projects/a2llib/src/a2lflexer.cpp" +#define YY_NO_UNISTD_H 1 +#define YY_NO_INPUT 1 +#line 34 "D:/projects/a2llib/src/a2lflexer.l" + /* \"([^\"\\]|(\\.))*\" */ + +#line 1468 "D:/projects/a2llib/src/a2lflexer.cpp" + +#define INITIAL 0 +#define PRI 1 +#define VERSION 2 +#define TIMESTAMP 3 +#define HOSTNAME 4 +#define APPNAME 5 +#define PROCID 6 +#define MSGID 7 +#define SD 8 +#define SDELEMENT 9 +#define SDPAR 10 +#define SDVALUE 11 +#define MSG 12 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +#include +/* %endif */ +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +/* %if-c-only Reentrant structure and macros (non-C++). */ +/* %if-reentrant */ +/* %if-c-only */ +/* %endif */ +/* %if-reentrant */ +/* %endif */ +/* %endif End reentrant structures and macros. */ +/* %if-bison-bridge */ +/* %endif */ +/* %not-for-header */ +/* %ok-for-header */ + +/* %endif */ + +#ifndef yytext_ptr +static void yy_flex_strncpy ( char *, const char *, int ); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen ( const char * ); +#endif + +#ifndef YY_NO_INPUT +/* %if-c-only Standard (non-C++) definition */ +/* %not-for-header */ +/* %ok-for-header */ + +/* %endif */ +#endif + +/* %if-c-only */ +/* %endif */ + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else +#define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* %if-c-only Standard (non-C++) definition */ +/* %endif */ +/* %if-c++-only C++ definition */ +#define ECHO LexerOutput( yytext, yyleng ) +/* %endif */ +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ +/* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\ +\ +/* %if-c++-only C++ definition \ */\ + if ( (int)(result = LexerInput( (char *) buf, max_size )) < 0 ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); +/* %endif */ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +#define YY_FATAL_ERROR(msg) LexerError( msg ) +/* %endif */ +#endif + +/* %if-tables-serialization structures and prototypes */ +/* %not-for-header */ +/* %ok-for-header */ + +/* %not-for-header */ +/* %tables-yydmap generated elements */ +/* %endif */ +/* end tables serialization structures and prototypes */ + +/* %ok-for-header */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 +/* %if-c-only Standard (non-C++) definition */ +/* %endif */ +/* %if-c++-only C++ definition */ +#define YY_DECL int yyFlexLexer::yylex() +/* %endif */ +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK /*LINTED*/break; +#endif + +/* %% [6.0] YY_RULE_SETUP definition goes here */ +#define YY_RULE_SETUP \ + YY_USER_ACTION + +/* %not-for-header */ +/** The main scanner function which does all the work. + */ +YY_DECL +{ + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + + if ( !(yy_init) ) + { + (yy_init) = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ + + if ( ! yyin ) +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + yyin.rdbuf(std::cin.rdbuf()); +/* %endif */ + + if ( ! yyout ) +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + yyout.rdbuf(std::cout.rdbuf()); +/* %endif */ + + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE ); + } + + yy_load_buffer_state( ); + } + + { +/* %% [7.0] user's declarations go here */ +#line 40 "D:/projects/a2llib/src/a2lflexer.l" + + + yylval = yy_value; + + + +#line 1679 "D:/projects/a2llib/src/a2lflexer.cpp" + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + { +/* %% [8.0] yymore()-related code goes here */ + yy_cp = (yy_c_buf_p); + + /* Support of yytext. */ + *yy_cp = (yy_hold_char); + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + +/* %% [9.0] code to set up and find next match goes here */ + yy_current_state = (yy_start); +yy_match: + do + { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 1559 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + ++yy_cp; + } + while ( yy_current_state != 1558 ); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + +yy_find_action: +/* %% [10.0] code to find the action number goes here */ + yy_act = yy_accept[yy_current_state]; + + YY_DO_BEFORE_ACTION; + +/* %% [11.0] code for yylineno update goes here */ + + if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) + { + int yyl; + for ( yyl = 0; yyl < yyleng; ++yyl ) + if ( yytext[yyl] == '\n' ) + + yylineno++; +; + } + +do_action: /* This label is used only to access EOF actions. */ + +/* %% [12.0] debug code goes here */ + if ( yy_flex_debug ) + { + if ( yy_act == 0 ) + std::cerr << "--scanner backing up\n"; + else if ( yy_act < 215 ) + std::cerr << "--accepting rule at line " << yy_rule_linenum[yy_act] << + "(\"" << yytext << "\")\n"; + else if ( yy_act == 215 ) + std::cerr << "--accepting default rule (\"" << yytext << "\")\n"; + else if ( yy_act == 216 ) + std::cerr << "--(end of buffer or a NUL)\n"; + else + std::cerr << "--EOF (start condition " << YY_START << ")\n"; + } + + switch ( yy_act ) + { /* beginning of action switch */ +/* %% [13.0] actions go here */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + +case 1: +YY_RULE_SETUP +#line 46 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::ASAP2_VERSION; } + YY_BREAK +case 2: +YY_RULE_SETUP +#line 47 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::A2ML_VERSION; } + YY_BREAK +case 3: +YY_RULE_SETUP +#line 48 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::ADDR_EPK; } + YY_BREAK +case 4: +YY_RULE_SETUP +#line 49 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::ADDRESS_TYPE; } + YY_BREAK +case 5: +YY_RULE_SETUP +#line 50 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::ALIGNMENT_BYTE; } + YY_BREAK +case 6: +YY_RULE_SETUP +#line 51 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::ALIGNMENT_FLOAT16_IEEE; } + YY_BREAK +case 7: +YY_RULE_SETUP +#line 52 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::ALIGNMENT_FLOAT32_IEEE; } + YY_BREAK +case 8: +YY_RULE_SETUP +#line 53 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::ALIGNMENT_FLOAT64_IEEE; } + YY_BREAK +case 9: +YY_RULE_SETUP +#line 54 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::ALIGNMENT_INT64; } + YY_BREAK +case 10: +YY_RULE_SETUP +#line 55 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::ALIGNMENT_LONG; } + YY_BREAK +case 11: +YY_RULE_SETUP +#line 56 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::ALIGNMENT_WORD; } + YY_BREAK +case 12: +YY_RULE_SETUP +#line 57 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::ANNOTATION; } + YY_BREAK +case 13: +YY_RULE_SETUP +#line 58 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::ANNOTATION_LABEL; } + YY_BREAK +case 14: +YY_RULE_SETUP +#line 59 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::ANNOTATION_ORIGIN; } + YY_BREAK +case 15: +YY_RULE_SETUP +#line 60 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::ANNOTATION_TEXT; } + YY_BREAK +case 16: +YY_RULE_SETUP +#line 61 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::ARRAY_SIZE; } + YY_BREAK +case 17: +YY_RULE_SETUP +#line 62 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::AR_COMPONENT; } + YY_BREAK +case 18: +YY_RULE_SETUP +#line 63 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::AR_PROTOTYPE_OF; } + YY_BREAK +case 19: +YY_RULE_SETUP +#line 64 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::AXIS_DESCR; } + YY_BREAK +case 20: +YY_RULE_SETUP +#line 65 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::AXIS_PTS; } + YY_BREAK +case 21: +YY_RULE_SETUP +#line 66 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::AXIS_PTS_REF; } + YY_BREAK +case 22: +YY_RULE_SETUP +#line 67 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::AXIS_PTS_X; } + YY_BREAK +case 23: +YY_RULE_SETUP +#line 68 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::AXIS_PTS_Y; } + YY_BREAK +case 24: +YY_RULE_SETUP +#line 69 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::AXIS_PTS_Z; } + YY_BREAK +case 25: +YY_RULE_SETUP +#line 70 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::AXIS_PTS_4; } + YY_BREAK +case 26: +YY_RULE_SETUP +#line 71 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::AXIS_PTS_5; } + YY_BREAK +case 27: +YY_RULE_SETUP +#line 72 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::AXIS_RESCALE_X; } + YY_BREAK +case 28: +YY_RULE_SETUP +#line 73 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::BIT_MASK; } + YY_BREAK +case 29: +YY_RULE_SETUP +#line 74 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::BIT_OPERATION; } + YY_BREAK +case 30: +YY_RULE_SETUP +#line 75 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::BLOB; } + YY_BREAK +case 31: +YY_RULE_SETUP +#line 76 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::A2L_BYTE_ORDER; } + YY_BREAK +case 32: +YY_RULE_SETUP +#line 77 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::CALIBRATION_ACCESS; } + YY_BREAK +case 33: +YY_RULE_SETUP +#line 78 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::CALIBRATION_HANDLE; } + YY_BREAK +case 34: +YY_RULE_SETUP +#line 79 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::CALIBRATION_HANDLE_TEXT; } + YY_BREAK +case 35: +YY_RULE_SETUP +#line 80 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::CALIBRATION_METHOD; } + YY_BREAK +case 36: +YY_RULE_SETUP +#line 81 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::CHARACTERISTIC; } + YY_BREAK +case 37: +YY_RULE_SETUP +#line 82 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::COEFFS; } + YY_BREAK +case 38: +YY_RULE_SETUP +#line 83 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::COEFFS_LINEAR; } + YY_BREAK +case 39: +YY_RULE_SETUP +#line 84 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::COMPARISON_QUANTITY; } + YY_BREAK +case 40: +YY_RULE_SETUP +#line 85 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::COMPU_METHOD; } + YY_BREAK +case 41: +YY_RULE_SETUP +#line 86 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::COMPU_TAB; } + YY_BREAK +case 42: +YY_RULE_SETUP +#line 87 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::COMPU_TAB_REF; } + YY_BREAK +case 43: +YY_RULE_SETUP +#line 88 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::COMPU_VTAB; } + YY_BREAK +case 44: +YY_RULE_SETUP +#line 89 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::COMPU_VTAB_RANGE; } + YY_BREAK +case 45: +YY_RULE_SETUP +#line 90 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::CONSISTENT_EXCHANGE; } + YY_BREAK +case 46: +YY_RULE_SETUP +#line 91 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::CONTROLLER_ADDRESSES; } + YY_BREAK +case 47: +YY_RULE_SETUP +#line 92 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::CONVERSION; } + YY_BREAK +case 48: +YY_RULE_SETUP +#line 93 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::CPU_TYPE; } + YY_BREAK +case 49: +YY_RULE_SETUP +#line 94 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::CURVE_AXIS_REF; } + YY_BREAK +case 50: +YY_RULE_SETUP +#line 95 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::CUSTOMER; } + YY_BREAK +case 51: +YY_RULE_SETUP +#line 96 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::CUSTOMER_NO; } + YY_BREAK +case 52: +YY_RULE_SETUP +#line 97 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::DATA_SIZE; } + YY_BREAK +case 53: +YY_RULE_SETUP +#line 98 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::DEF_CHARACTERISTIC; } + YY_BREAK +case 54: +YY_RULE_SETUP +#line 99 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::DEFAULT_VALUE; } + YY_BREAK +case 55: +YY_RULE_SETUP +#line 100 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::DEFAULT_VALUE_NUMERIC; } + YY_BREAK +case 56: +YY_RULE_SETUP +#line 101 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::DEPENDENT_CHARACTERISTIC; } + YY_BREAK +case 57: +YY_RULE_SETUP +#line 102 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::DEPOSIT; } + YY_BREAK +case 58: +YY_RULE_SETUP +#line 103 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::DISCRETE; } + YY_BREAK +case 59: +YY_RULE_SETUP +#line 104 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::DISPLAY_IDENTIFIER; } + YY_BREAK +case 60: +YY_RULE_SETUP +#line 105 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::DIST_OP_X; } + YY_BREAK +case 61: +YY_RULE_SETUP +#line 106 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::DIST_OP_Y; } + YY_BREAK +case 62: +YY_RULE_SETUP +#line 107 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::DIST_OP_Z; } + YY_BREAK +case 63: +YY_RULE_SETUP +#line 108 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::DIST_OP_4; } + YY_BREAK +case 64: +YY_RULE_SETUP +#line 109 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::DIST_OP_5; } + YY_BREAK +case 65: +YY_RULE_SETUP +#line 110 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::ECU; } + YY_BREAK +case 66: +YY_RULE_SETUP +#line 111 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::ECU_ADDRESS; } + YY_BREAK +case 67: +YY_RULE_SETUP +#line 112 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::ECU_ADDRESS_EXTENSION; } + YY_BREAK +case 68: +YY_RULE_SETUP +#line 113 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::ECU_CALIBRATION_OFFSET; } + YY_BREAK +case 69: +YY_RULE_SETUP +#line 114 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::ENCODING; } + YY_BREAK +case 70: +YY_RULE_SETUP +#line 115 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::EPK; } + YY_BREAK +case 71: +YY_RULE_SETUP +#line 116 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::ERROR_MASK; } + YY_BREAK +case 72: +YY_RULE_SETUP +#line 117 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::EXTENDED_LIMITS; } + YY_BREAK +case 73: +YY_RULE_SETUP +#line 118 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::FIX_AXIS_PAR; } + YY_BREAK +case 74: +YY_RULE_SETUP +#line 119 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::FIX_AXIS_PAR_DIST; } + YY_BREAK +case 75: +YY_RULE_SETUP +#line 120 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::FIX_AXIS_PAR_LIST; } + YY_BREAK +case 76: +YY_RULE_SETUP +#line 121 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::FIX_NO_AXIS_PTS_X; } + YY_BREAK +case 77: +YY_RULE_SETUP +#line 122 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::FIX_NO_AXIS_PTS_Y; } + YY_BREAK +case 78: +YY_RULE_SETUP +#line 123 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::FIX_NO_AXIS_PTS_Z; } + YY_BREAK +case 79: +YY_RULE_SETUP +#line 124 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::FIX_NO_AXIS_PTS_4; } + YY_BREAK +case 80: +YY_RULE_SETUP +#line 125 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::FIX_NO_AXIS_PTS_5; } + YY_BREAK +case 81: +YY_RULE_SETUP +#line 126 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::FNC_VALUES; } + YY_BREAK +case 82: +YY_RULE_SETUP +#line 127 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::FORMAT; } + YY_BREAK +case 83: +YY_RULE_SETUP +#line 128 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::FORMULA; } + YY_BREAK +case 84: +YY_RULE_SETUP +#line 129 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::FORMULA_INV; } + YY_BREAK +case 85: +YY_RULE_SETUP +#line 130 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::FRAME; } + YY_BREAK +case 86: +YY_RULE_SETUP +#line 131 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::FRAME_MEASUREMENT; } + YY_BREAK +case 87: +YY_RULE_SETUP +#line 132 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::FUNCTION; } + YY_BREAK +case 88: +YY_RULE_SETUP +#line 133 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::FUNCTION_LIST; } + YY_BREAK +case 89: +YY_RULE_SETUP +#line 134 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::FUNCTION_VERSION; } + YY_BREAK +case 90: +YY_RULE_SETUP +#line 135 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::GROUP; } + YY_BREAK +case 91: +YY_RULE_SETUP +#line 136 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::GUARD_RAILS; } + YY_BREAK +case 92: +YY_RULE_SETUP +#line 137 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::HEADER; } + YY_BREAK +case 93: +YY_RULE_SETUP +#line 138 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::IDENTIFICATION; } + YY_BREAK +case 94: +YY_RULE_SETUP +#line 139 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::IN_MEASUREMENT; } + YY_BREAK +case 95: +YY_RULE_SETUP +#line 140 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::INPUT_QUANTITY; } + YY_BREAK +case 96: +YY_RULE_SETUP +#line 141 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::INSTANCE; } + YY_BREAK +case 97: +YY_RULE_SETUP +#line 142 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::LAYOUT; } + YY_BREAK +case 98: +YY_RULE_SETUP +#line 143 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::LEFT_SHIFT; } + YY_BREAK +case 99: +YY_RULE_SETUP +#line 144 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::LIMITS; } + YY_BREAK +case 100: +YY_RULE_SETUP +#line 145 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::LOC_MEASUREMENT; } + YY_BREAK +case 101: +YY_RULE_SETUP +#line 146 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::MAP_LIST; } + YY_BREAK +case 102: +YY_RULE_SETUP +#line 147 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::MATRIX_DIM; } + YY_BREAK +case 103: +YY_RULE_SETUP +#line 148 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::MAX_GRAD; } + YY_BREAK +case 104: +YY_RULE_SETUP +#line 149 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::MAX_REFRESH; } + YY_BREAK +case 105: +YY_RULE_SETUP +#line 150 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::MEASUREMENT; } + YY_BREAK +case 106: +YY_RULE_SETUP +#line 151 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::MEMORY_LAYOUT; } + YY_BREAK +case 107: +YY_RULE_SETUP +#line 152 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::MEMORY_SEGMENT; } + YY_BREAK +case 108: +YY_RULE_SETUP +#line 153 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::MOD_COMMON; } + YY_BREAK +case 109: +YY_RULE_SETUP +#line 154 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::MOD_PAR; } + YY_BREAK +case 110: +YY_RULE_SETUP +#line 155 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::MODEL_LINK; } + YY_BREAK +case 111: +YY_RULE_SETUP +#line 156 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::MODULE; } + YY_BREAK +case 112: +YY_RULE_SETUP +#line 157 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::MONOTONY; } + YY_BREAK +case 113: +YY_RULE_SETUP +#line 158 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::NO_AXIS_PTS_X; } + YY_BREAK +case 114: +YY_RULE_SETUP +#line 159 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::NO_AXIS_PTS_Y; } + YY_BREAK +case 115: +YY_RULE_SETUP +#line 160 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::NO_AXIS_PTS_Z; } + YY_BREAK +case 116: +YY_RULE_SETUP +#line 161 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::NO_AXIS_PTS_4; } + YY_BREAK +case 117: +YY_RULE_SETUP +#line 162 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::NO_AXIS_PTS_5; } + YY_BREAK +case 118: +YY_RULE_SETUP +#line 163 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::NO_OF_INTERFACES; } + YY_BREAK +case 119: +YY_RULE_SETUP +#line 164 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::NO_RESCALE_X; } + YY_BREAK +case 120: +YY_RULE_SETUP +#line 165 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::NUMBER; } + YY_BREAK +case 121: +YY_RULE_SETUP +#line 166 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::OFFSET_X; } + YY_BREAK +case 122: +YY_RULE_SETUP +#line 167 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::OFFSET_Y; } + YY_BREAK +case 123: +YY_RULE_SETUP +#line 168 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::OFFSET_Z; } + YY_BREAK +case 124: +YY_RULE_SETUP +#line 169 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::OFFSET_4; } + YY_BREAK +case 125: +YY_RULE_SETUP +#line 170 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::OFFSET_5; } + YY_BREAK +case 126: +YY_RULE_SETUP +#line 171 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::OUT_MEASUREMENT; } + YY_BREAK +case 127: +YY_RULE_SETUP +#line 172 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::OVERWRITE; } + YY_BREAK +case 128: +YY_RULE_SETUP +#line 173 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::PHONE_NO; } + YY_BREAK +case 129: +YY_RULE_SETUP +#line 174 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::PHYS_UNIT; } + YY_BREAK +case 130: +YY_RULE_SETUP +#line 175 "D:/projects/a2llib/src/a2lflexer.l" +{ + found_ = true; + return token::PROJECT; + } + YY_BREAK +case 131: +YY_RULE_SETUP +#line 179 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::PROJECT_NO; } + YY_BREAK +case 132: +YY_RULE_SETUP +#line 180 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::READ_ONLY; } + YY_BREAK +case 133: +YY_RULE_SETUP +#line 181 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::READ_WRITE; } + YY_BREAK +case 134: +YY_RULE_SETUP +#line 182 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::RECORD_LAYOUT; } + YY_BREAK +case 135: +YY_RULE_SETUP +#line 183 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::REF_CHARACTERISTIC; } + YY_BREAK +case 136: +YY_RULE_SETUP +#line 184 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::REF_GROUP; } + YY_BREAK +case 137: +YY_RULE_SETUP +#line 185 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::REF_MEASUREMENT; } + YY_BREAK +case 138: +YY_RULE_SETUP +#line 186 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::REF_MEMORY_SEGMENT; } + YY_BREAK +case 139: +YY_RULE_SETUP +#line 187 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::REF_UNIT; } + YY_BREAK +case 140: +YY_RULE_SETUP +#line 188 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::RESERVED; } + YY_BREAK +case 141: +YY_RULE_SETUP +#line 189 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::RIGHT_SHIFT; } + YY_BREAK +case 142: +YY_RULE_SETUP +#line 190 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::RIP_ADDR_W; } + YY_BREAK +case 143: +YY_RULE_SETUP +#line 191 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::RIP_ADDR_X; } + YY_BREAK +case 144: +YY_RULE_SETUP +#line 192 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::RIP_ADDR_Y; } + YY_BREAK +case 145: +YY_RULE_SETUP +#line 193 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::RIP_ADDR_Z; } + YY_BREAK +case 146: +YY_RULE_SETUP +#line 194 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::RIP_ADDR_4; } + YY_BREAK +case 147: +YY_RULE_SETUP +#line 195 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::RIP_ADDR_5; } + YY_BREAK +case 148: +YY_RULE_SETUP +#line 196 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::ROOT; } + YY_BREAK +case 149: +YY_RULE_SETUP +#line 197 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::S_REC_LAYOUT; } /* Deprecated */ + YY_BREAK +case 150: +YY_RULE_SETUP +#line 198 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::SHIFT_OP_X; } + YY_BREAK +case 151: +YY_RULE_SETUP +#line 199 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::SHIFT_OP_Y; } + YY_BREAK +case 152: +YY_RULE_SETUP +#line 200 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::SHIFT_OP_Z; } + YY_BREAK +case 153: +YY_RULE_SETUP +#line 201 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::SHIFT_OP_4; } + YY_BREAK +case 154: +YY_RULE_SETUP +#line 202 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::SHIFT_OP_5; } + YY_BREAK +case 155: +YY_RULE_SETUP +#line 203 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::SIGN_EXTEND; } + YY_BREAK +case 156: +YY_RULE_SETUP +#line 204 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::SI_EXPONENTS; } + YY_BREAK +case 157: +YY_RULE_SETUP +#line 205 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::SRC_ADDR_X; } + YY_BREAK +case 158: +YY_RULE_SETUP +#line 206 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::SRC_ADDR_Y; } + YY_BREAK +case 159: +YY_RULE_SETUP +#line 207 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::SRC_ADDR_Z; } + YY_BREAK +case 160: +YY_RULE_SETUP +#line 208 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::SRC_ADDR_4; } + YY_BREAK +case 161: +YY_RULE_SETUP +#line 209 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::SRC_ADDR_5; } + YY_BREAK +case 162: +YY_RULE_SETUP +#line 210 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::STATIC_ADDRESS_OFFSETS; } + YY_BREAK +case 163: +YY_RULE_SETUP +#line 211 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::STATIC_RECORD_LAYOUT; } + YY_BREAK +case 164: +YY_RULE_SETUP +#line 212 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::STATUS_STRING_REF; } + YY_BREAK +case 165: +YY_RULE_SETUP +#line 213 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::STEP_SIZE; } + YY_BREAK +case 166: +YY_RULE_SETUP +#line 214 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::STRUCTURE_COMPONENT; } + YY_BREAK +case 167: +YY_RULE_SETUP +#line 215 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::SUB_FUNCTION; } + YY_BREAK +case 168: +YY_RULE_SETUP +#line 216 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::SUB_GROUP; } + YY_BREAK +case 169: +YY_RULE_SETUP +#line 217 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::SUPPLIER; } + YY_BREAK +case 170: +YY_RULE_SETUP +#line 218 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::SYMBOL_LINK; } + YY_BREAK +case 171: +YY_RULE_SETUP +#line 219 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::SYMBOL_TYPE_LINK; } + YY_BREAK +case 172: +YY_RULE_SETUP +#line 220 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::SYSTEM_CONSTANT; } + YY_BREAK +case 173: +YY_RULE_SETUP +#line 221 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::TRANSFORMER; } + YY_BREAK +case 174: +YY_RULE_SETUP +#line 222 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::TRANSFORMER_IN_OBJECTS; } + YY_BREAK +case 175: +YY_RULE_SETUP +#line 223 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::TRANSFORMER_OUT_OBJECTS; } + YY_BREAK +case 176: +YY_RULE_SETUP +#line 224 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::TYPEDEF_AXIS; } + YY_BREAK +case 177: +YY_RULE_SETUP +#line 225 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::TYPEDEF_BLOB; } + YY_BREAK +case 178: +YY_RULE_SETUP +#line 226 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::TYPEDEF_CHARACTERISTIC; } + YY_BREAK +case 179: +YY_RULE_SETUP +#line 227 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::TYPEDEF_MEASUREMENT; } + YY_BREAK +case 180: +YY_RULE_SETUP +#line 228 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::TYPEDEF_STRUCTURE; } + YY_BREAK +case 181: +YY_RULE_SETUP +#line 229 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::UNIT; } + YY_BREAK +case 182: +YY_RULE_SETUP +#line 230 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::UNIT_CONVERSION; } + YY_BREAK +case 183: +YY_RULE_SETUP +#line 231 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::USER; } + YY_BREAK +case 184: +YY_RULE_SETUP +#line 232 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::USER_RIGHTS; } + YY_BREAK +case 185: +YY_RULE_SETUP +#line 233 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::VAR_ADDRESS; } + YY_BREAK +case 186: +YY_RULE_SETUP +#line 234 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::VAR_CHARACTERISTIC; } + YY_BREAK +case 187: +YY_RULE_SETUP +#line 235 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::VAR_CRITERION; } + YY_BREAK +case 188: +YY_RULE_SETUP +#line 236 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::VAR_FORBIDDEN_COMB; } + YY_BREAK +case 189: +YY_RULE_SETUP +#line 237 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::VAR_MEASUREMENT; } + YY_BREAK +case 190: +YY_RULE_SETUP +#line 238 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::VAR_NAMING; } + YY_BREAK +case 191: +YY_RULE_SETUP +#line 239 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::VAR_SELECTION_CHARACTERISTIC; } + YY_BREAK +case 192: +YY_RULE_SETUP +#line 240 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::VAR_SEPARATOR; } + YY_BREAK +case 193: +YY_RULE_SETUP +#line 241 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::VARIANT_CODING; } + YY_BREAK +case 194: +YY_RULE_SETUP +#line 242 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::A2L_VERSION; } + YY_BREAK +case 195: +YY_RULE_SETUP +#line 243 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::VIRTUAL; } + YY_BREAK +case 196: +YY_RULE_SETUP +#line 244 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::VIRTUAL_CHARACTERISTIC; } + YY_BREAK +case 197: +/* rule 197 can match eol */ +YY_RULE_SETUP +#line 246 "D:/projects/a2llib/src/a2lflexer.l" +{ + // Read in the format specification + if (yylval != nullptr) { + yylval->emplace(ReadA2ML()); + } + return token::A2ML; + } + YY_BREAK +case 198: +/* rule 198 can match eol */ +YY_RULE_SETUP +#line 254 "D:/projects/a2llib/src/a2lflexer.l" +{ + // Read in the if_data string + if (yylval != nullptr) { + yylval->emplace(ReadIfData()); + } + return token::IF_DATA; + } + YY_BREAK +case 199: +/* rule 199 can match eol */ +YY_RULE_SETUP +#line 261 "D:/projects/a2llib/src/a2lflexer.l" +{ + // Read in the if_data string until end of line + if(yylval != nullptr ) { + yylval->emplace(ReadIfDataMultiLine()); + } + return token::IF_DATA; + } + YY_BREAK +case 200: +YY_RULE_SETUP +#line 268 "D:/projects/a2llib/src/a2lflexer.l" +{ + // Read in the if_data string until end of line + if (yylval != nullptr) { + yylval->emplace(ReadIfDataSingleLine()); + } + return token::IF_DATA; + } + YY_BREAK +case 201: +/* rule 201 can match eol */ +YY_RULE_SETUP +#line 275 "D:/projects/a2llib/src/a2lflexer.l" +{ SkipUntil('}'); } + YY_BREAK +case 202: +YY_RULE_SETUP +#line 277 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::A2L_BEGIN; } + YY_BREAK +case 203: +YY_RULE_SETUP +#line 278 "D:/projects/a2llib/src/a2lflexer.l" +{ return token::A2L_END; } + YY_BREAK +case 204: +YY_RULE_SETUP +#line 280 "D:/projects/a2llib/src/a2lflexer.l" +{ + FixIncludeFile(); + } + YY_BREAK +case 205: +YY_RULE_SETUP +#line 286 "D:/projects/a2llib/src/a2lflexer.l" +{ + const std::string temp(yytext); + if (yylval != nullptr) { + yylval->emplace(temp); + } + return token::IDENT; + } + YY_BREAK +case 206: +/* rule 206 can match eol */ +YY_RULE_SETUP +#line 294 "D:/projects/a2llib/src/a2lflexer.l" +{ + const size_t len = strlen(yytext); + std::string temp; + if (len > 2) { + temp = yytext + 1; + temp.pop_back(); + } + yylval->emplace(temp); + return token::STRING; + } + YY_BREAK +case 207: +YY_RULE_SETUP +#line 305 "D:/projects/a2llib/src/a2lflexer.l" +{ + uint64_t address = 0; + for ( size_t index = 0; yytext[ index ] != '\0'; ++index ) { + if ( index < 2 ) continue; + const char token = yytext[index]; + switch ( token ) { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + address *= 16; + address += token - '0'; + break; + + case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + address *= 16; + address += token - 'A' + 10; + break; + + case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + address *= 16; + address += token - 'a' + 10; + break; + + default: + break; + } + } + + yylval->emplace(address); + return token::HEX; + } + YY_BREAK +case 208: +YY_RULE_SETUP +#line 353 "D:/projects/a2llib/src/a2lflexer.l" +{ + uint64_t temp = 0; + try { + temp = std::stoull(yytext); + } catch (const std::exception& ) { + + } + yylval->emplace(temp); + return token::UINT; + } + YY_BREAK +case 209: +YY_RULE_SETUP +#line 363 "D:/projects/a2llib/src/a2lflexer.l" +{ + int64_t temp = 0; + try { + temp = std::stoll(yytext); + } catch (const std::exception& ) { + + } + yylval->emplace(temp); + return token::INT; + } + YY_BREAK +case 210: +YY_RULE_SETUP +#line 373 "D:/projects/a2llib/src/a2lflexer.l" +{ + double temp = 0.0; + try { + temp = std::stod(yytext); + } catch (const std::exception&) { + + } + yylval->emplace(temp); + return token::FLOAT; + } + YY_BREAK +case 211: +/* rule 211 can match eol */ +YY_RULE_SETUP +#line 384 "D:/projects/a2llib/src/a2lflexer.l" +{ } /* Multi line comments */ + YY_BREAK +case 212: +YY_RULE_SETUP +#line 385 "D:/projects/a2llib/src/a2lflexer.l" +{ /* Single line comment */ } + YY_BREAK +case 213: +/* rule 213 can match eol */ +YY_RULE_SETUP +#line 386 "D:/projects/a2llib/src/a2lflexer.l" +{} + YY_BREAK +case 214: +YY_RULE_SETUP +#line 387 "D:/projects/a2llib/src/a2lflexer.l" +{} + YY_BREAK +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(PRI): +case YY_STATE_EOF(VERSION): +case YY_STATE_EOF(TIMESTAMP): +case YY_STATE_EOF(HOSTNAME): +case YY_STATE_EOF(APPNAME): +case YY_STATE_EOF(PROCID): +case YY_STATE_EOF(MSGID): +case YY_STATE_EOF(SD): +case YY_STATE_EOF(SDELEMENT): +case YY_STATE_EOF(SDPAR): +case YY_STATE_EOF(SDVALUE): +case YY_STATE_EOF(MSG): +#line 388 "D:/projects/a2llib/src/a2lflexer.l" +{ + if (file_stack_.size() <= 1) { + yyterminate(); + } else { + auto& last_item = file_stack_.back(); + yy_delete_buffer(last_item.buffer_state); + file_stack_.pop_back(); + auto& current_item = file_stack_.back(); + yy_switch_to_buffer(current_item.buffer_state); + } + } + YY_BREAK +case 215: +YY_RULE_SETUP +#line 399 "D:/projects/a2llib/src/a2lflexer.l" +ECHO; + YY_BREAK +#line 2990 "D:/projects/a2llib/src/a2lflexer.cpp" + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin.rdbuf(); +/* %endif */ + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { +/* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */ + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( yywrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ +} /* end of yylex */ +/* %ok-for-header */ + +/* %if-c++-only */ +/* %not-for-header */ +/* The contents of this function are C++ specific, so the () macro is not used. + * This constructor simply maintains backward compatibility. + * DEPRECATED + */ +yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout ): + yyin(arg_yyin ? arg_yyin->rdbuf() : std::cin.rdbuf()), + yyout(arg_yyout ? arg_yyout->rdbuf() : std::cout.rdbuf()) +{ + ctor_common(); +} + +/* The contents of this function are C++ specific, so the () macro is not used. + */ +yyFlexLexer::yyFlexLexer( std::istream& arg_yyin, std::ostream& arg_yyout ): + yyin(arg_yyin.rdbuf()), + yyout(arg_yyout.rdbuf()) +{ + ctor_common(); +} + +/* The contents of this function are C++ specific, so the () macro is not used. + */ +void yyFlexLexer::ctor_common() +{ + yy_c_buf_p = 0; + yy_init = 0; + yy_start = 0; + yy_flex_debug = 0; + yylineno = 1; // this will only get updated if %option yylineno + + yy_did_buffer_switch_on_eof = 0; + + yy_looking_for_trail_begin = 0; + yy_more_flag = 0; + yy_more_len = 0; + yy_more_offset = yy_prev_more_offset = 0; + + yy_start_stack_ptr = yy_start_stack_depth = 0; + yy_start_stack = NULL; + + yy_buffer_stack = NULL; + yy_buffer_stack_top = 0; + yy_buffer_stack_max = 0; + + yy_state_buf = 0; + +} + +/* The contents of this function are C++ specific, so the () macro is not used. + */ +yyFlexLexer::~yyFlexLexer() +{ + delete [] yy_state_buf; + yyfree( yy_start_stack ); + yy_delete_buffer( YY_CURRENT_BUFFER ); + yyfree( yy_buffer_stack ); +} + +/* The contents of this function are C++ specific, so the () macro is not used. + */ +void yyFlexLexer::switch_streams( std::istream& new_in, std::ostream& new_out ) +{ + // was if( new_in ) + yy_delete_buffer( YY_CURRENT_BUFFER ); + yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE ) ); + + // was if( new_out ) + yyout.rdbuf(new_out.rdbuf()); +} + +/* The contents of this function are C++ specific, so the () macro is not used. + */ +void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out ) +{ + if( ! new_in ) { + new_in = &yyin; + } + + if ( ! new_out ) { + new_out = &yyout; + } + + switch_streams(*new_in, *new_out); +} + +#ifdef YY_INTERACTIVE +int yyFlexLexer::LexerInput( char* buf, int /* max_size */ ) +#else +int yyFlexLexer::LexerInput( char* buf, int max_size ) +#endif +{ + if ( yyin.eof() || yyin.fail() ) + return 0; + +#ifdef YY_INTERACTIVE + yyin.get( buf[0] ); + + if ( yyin.eof() ) + return 0; + + if ( yyin.bad() ) + return -1; + + return 1; + +#else + (void) yyin.read( buf, max_size ); + + if ( yyin.bad() ) + return -1; + else + return yyin.gcount(); +#endif +} + +void yyFlexLexer::LexerOutput( const char* buf, int size ) +{ + (void) yyout.write( buf, size ); +} +/* %ok-for-header */ + +/* %endif */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +int yyFlexLexer::yy_get_next_buffer() +/* %endif */ +{ + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = (yytext_ptr); + int number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1); + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); + } + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + +/* %if-c-only */ +/* %not-for-header */ +/* %endif */ +/* %if-c++-only */ + yy_state_type yyFlexLexer::yy_get_previous_state() +/* %endif */ +{ + yy_state_type yy_current_state; + char *yy_cp; + +/* %% [15.0] code to get the start state into yy_current_state goes here */ + yy_current_state = (yy_start); + + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) + { +/* %% [16.0] code to find the next state goes here */ + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 1559 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state ) +/* %endif */ +{ + int yy_is_jam; + /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */ + char *yy_cp = (yy_c_buf_p); + + YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 1559 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 1558); + + return yy_is_jam ? 0 : yy_current_state; +} + +#ifndef YY_NO_UNPUT +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yyunput( int c, char* yy_bp) +/* %endif */ +{ + char *yy_cp; + + yy_cp = (yy_c_buf_p); + + /* undo effects of setting up yytext */ + *yy_cp = (yy_hold_char); + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + int number_to_move = (yy_n_chars) + 2; + char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; + char *source = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; + + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = + (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + +/* %% [18.0] update yylineno here */ + + if ( c == '\n' ){ + --yylineno; + } + + (yytext_ptr) = yy_bp; + (yy_hold_char) = *yy_cp; + (yy_c_buf_p) = yy_cp; +} +/* %if-c-only */ +/* %endif */ +#endif + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + int yyFlexLexer::yyinput() +/* %endif */ +{ + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + int offset = (int) ((yy_c_buf_p) - (yytext_ptr)); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( ) ) + return 0; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } + + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve yytext */ + (yy_hold_char) = *++(yy_c_buf_p); + +/* %% [19.0] update BOL and yylineno */ + if ( c == '\n' ) + + yylineno++; +; + + return c; +} +/* %if-c-only */ +/* %endif */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yyrestart( std::istream& input_file ) +/* %endif */ +{ + + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE ); + } + + yy_init_buffer( YY_CURRENT_BUFFER, input_file ); + yy_load_buffer_state( ); +} + +/* %if-c++-only */ +/** Delegate to the new version that takes an istream reference. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ +void yyFlexLexer::yyrestart( std::istream* input_file ) +{ + if( ! input_file ) { + input_file = &yyin; + } + yyrestart( *input_file ); +} +/* %endif */ + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) +/* %endif */ +{ + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( ); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + (yy_did_buffer_switch_on_eof) = 1; +} + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_load_buffer_state() +/* %endif */ +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + yyin.rdbuf(YY_CURRENT_BUFFER_LVALUE->yy_input_file); +/* %endif */ + (yy_hold_char) = *(yy_c_buf_p); +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream& file, int size ) +/* %endif */ +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + yy_init_buffer( b, file ); + + return b; +} + +/* %if-c++-only */ +/** Delegate creation of buffers to the new version that takes an istream reference. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ + YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size ) +{ + return yy_create_buffer( *file, size ); +} +/* %endif */ + +/** Destroy the buffer. + * @param b a buffer created with yy_create_buffer() + * + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b ) +/* %endif */ +{ + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + yyfree( (void *) b->yy_ch_buf ); + + yyfree( (void *) b ); +} + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a yyrestart() or at EOF. + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream& file ) +/* %endif */ + +{ + int oerrno = errno; + + yy_flush_buffer( b ); + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + b->yy_input_file = file.rdbuf(); +/* %endif */ + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + b->yy_is_interactive = 0; +/* %endif */ + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b ) +/* %endif */ +{ + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( ); +} + +/* %if-c-or-c++ */ +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +void yyFlexLexer::yypush_buffer_state (YY_BUFFER_STATE new_buffer) +/* %endif */ +{ + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; +} +/* %endif */ + +/* %if-c-or-c++ */ +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +void yyFlexLexer::yypop_buffer_state (void) +/* %endif */ +{ + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } +} +/* %endif */ + +/* %if-c-or-c++ */ +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +void yyFlexLexer::yyensure_buffer_stack(void) +/* %endif */ +{ + yy_size_t num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } +} +/* %endif */ + +/* %if-c-only */ +/* %endif */ + +/* %if-c-only */ +/* %endif */ + +/* %if-c-only */ +/* %endif */ + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_push_state( int _new_state ) +/* %endif */ +{ + if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) ) + { + yy_size_t new_size; + + (yy_start_stack_depth) += YY_START_STACK_INCR; + new_size = (yy_size_t) (yy_start_stack_depth) * sizeof( int ); + + if ( ! (yy_start_stack) ) + (yy_start_stack) = (int *) yyalloc( new_size ); + + else + (yy_start_stack) = (int *) yyrealloc( + (void *) (yy_start_stack), new_size ); + + if ( ! (yy_start_stack) ) + YY_FATAL_ERROR( "out of memory expanding start-condition stack" ); + } + + (yy_start_stack)[(yy_start_stack_ptr)++] = YY_START; + + BEGIN(_new_state); +} + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_pop_state() +/* %endif */ +{ + if ( --(yy_start_stack_ptr) < 0 ) + YY_FATAL_ERROR( "start-condition stack underflow" ); + + BEGIN((yy_start_stack)[(yy_start_stack_ptr)]); +} + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + int yyFlexLexer::yy_top_state() +/* %endif */ +{ + return (yy_start_stack)[(yy_start_stack_ptr) - 1]; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +void yyFlexLexer::LexerError( const char* msg ) +{ + std::cerr << msg << std::endl; + exit( YY_EXIT_FAILURE ); +} +/* %endif */ + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = (yy_hold_char); \ + (yy_c_buf_p) = yytext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/* %if-c-only */ +/* %if-reentrant */ +/* %endif */ +/* %if-reentrant */ +/* %endif */ +/* %endif */ + +/* %if-reentrant */ +/* %if-bison-bridge */ +/* %endif */ +/* %endif if-c-only */ + +/* %if-c-only */ +/* %endif */ + +/* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */ +/* %if-reentrant */ +/* %endif */ +/* %endif */ + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, const char * s2, int n ) +{ + + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (const char * s ) +{ + int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *yyalloc (yy_size_t size ) +{ + return malloc(size); +} + +void *yyrealloc (void * ptr, yy_size_t size ) +{ + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); +} + +void yyfree (void * ptr ) +{ + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ +} + +/* %if-tables-serialization definitions */ +/* %define-yytables The name for this specific scanner's tables. */ +#define YYTABLES_NAME "yytables" +/* %endif */ + +/* %ok-for-header */ + +#line 399 "D:/projects/a2llib/src/a2lflexer.l" + + + + diff --git a/a2llib-main/src/a2lflexer.l b/a2llib-main/src/a2lflexer.l new file mode 100644 index 0000000..0c475b5 --- /dev/null +++ b/a2llib-main/src/a2lflexer.l @@ -0,0 +1,400 @@ +%top { + #include + #include + +} +%{ + #include "a2lscanner.h" + #undef YY_DECL + #define YY_DECL int a2l::A2lScanner::a2llex(a2l::A2lParser::value_type* yy_value) + using token = a2l::A2lParser::token; +%} + +%option prefix="a2l" +%option 8bit +%option nounistd +%option noyywrap +%option debug +%option never-interactive +%option c++ +%option yyclass="a2l:A2lScanner" +%option yylineno +%option noinput +%option nounput + + +ws [ \t\n\v\f\r]+ +signed_number [-+]?[0-9]+ +unsigned_number [0-9]+ +hexnumber 0[xX][0-9a-fA-F]+ +float_val [-+]?[0-9]+(\.[0-9]*)?([eE][-+]?[0-9]+)? +ident [a-zA-Z_]([\[\]()/_a-zA-Z0-9.-]*)? +string (\"(\\.|[^\\"])*\")* + /* \"([^\"\\]|(\\.))*\" */ +nl [\n\r] +keyword [A-Z_0-9]+ + + +%s PRI VERSION TIMESTAMP HOSTNAME APPNAME PROCID MSGID SD SDELEMENT SDPAR SDVALUE MSG +%% +%{ + yylval = yy_value; +%} + + +"ASAP2_VERSION" { return token::ASAP2_VERSION; } +"A2ML_VERSION" { return token::A2ML_VERSION; } +"ADDR_EPK" { return token::ADDR_EPK; } +"ADDRESS_TYPE" { return token::ADDRESS_TYPE; } +"ALIGNMENT_BYTE" { return token::ALIGNMENT_BYTE; } +"ALIGNMENT_FLOAT16_IEEE" { return token::ALIGNMENT_FLOAT16_IEEE; } +"ALIGNMENT_FLOAT32_IEEE" { return token::ALIGNMENT_FLOAT32_IEEE; } +"ALIGNMENT_FLOAT64_IEEE" { return token::ALIGNMENT_FLOAT64_IEEE; } +"ALIGNMENT_INT64" { return token::ALIGNMENT_INT64; } +"ALIGNMENT_LONG" { return token::ALIGNMENT_LONG; } +"ALIGNMENT_WORD" { return token::ALIGNMENT_WORD; } +"ANNOTATION" { return token::ANNOTATION; } +"ANNOTATION_LABEL" { return token::ANNOTATION_LABEL; } +"ANNOTATION_ORIGIN" { return token::ANNOTATION_ORIGIN; } +"ANNOTATION_TEXT" { return token::ANNOTATION_TEXT; } +"ARRAY_SIZE" { return token::ARRAY_SIZE; } +"AR_COMPONENT" { return token::AR_COMPONENT; } +"AR_PROTOTYPE_OF" { return token::AR_PROTOTYPE_OF; } +"AXIS_DESCR" { return token::AXIS_DESCR; } +"AXIS_PTS" { return token::AXIS_PTS; } +"AXIS_PTS_REF" { return token::AXIS_PTS_REF; } +"AXIS_PTS_X" { return token::AXIS_PTS_X; } +"AXIS_PTS_Y" { return token::AXIS_PTS_Y; } +"AXIS_PTS_Z" { return token::AXIS_PTS_Z; } +"AXIS_PTS_4" { return token::AXIS_PTS_4; } +"AXIS_PTS_5" { return token::AXIS_PTS_5; } +"AXIS_RESCALE_X" { return token::AXIS_RESCALE_X; } +"BIT_MASK" { return token::BIT_MASK; } +"BIT_OPERATION" { return token::BIT_OPERATION; } +"BLOB" { return token::BLOB; } +"BYTE_ORDER" { return token::A2L_BYTE_ORDER; } +"CALIBRATION_ACCESS" { return token::CALIBRATION_ACCESS; } +"CALIBRATION_HANDLE" { return token::CALIBRATION_HANDLE; } +"CALIBRATION_HANDLE_TEXT" { return token::CALIBRATION_HANDLE_TEXT; } +"CALIBRATION_METHOD" { return token::CALIBRATION_METHOD; } +"CHARACTERISTIC" { return token::CHARACTERISTIC; } +"COEFFS" { return token::COEFFS; } +"COEFFS_LINEAR" { return token::COEFFS_LINEAR; } +"COMPARISON_QUANTITY" { return token::COMPARISON_QUANTITY; } +"COMPU_METHOD" { return token::COMPU_METHOD; } +"COMPU_TAB" { return token::COMPU_TAB; } +"COMPU_TAB_REF" { return token::COMPU_TAB_REF; } +"COMPU_VTAB" { return token::COMPU_VTAB; } +"COMPU_VTAB_RANGE" { return token::COMPU_VTAB_RANGE; } +"CONSISTENT_EXCHANGE" { return token::CONSISTENT_EXCHANGE; } +"CONTROLLER_ADDRESSES" { return token::CONTROLLER_ADDRESSES; } +"CONVERSION" { return token::CONVERSION; } +"CPU_TYPE" { return token::CPU_TYPE; } +"CURVE_AXIS_REF" { return token::CURVE_AXIS_REF; } +"CUSTOMER" { return token::CUSTOMER; } +"CUSTOMER_NO" { return token::CUSTOMER_NO; } +"DATA_SIZE" { return token::DATA_SIZE; } +"DEF_CHARACTERISTIC" { return token::DEF_CHARACTERISTIC; } +"DEFAULT_VALUE" { return token::DEFAULT_VALUE; } +"DEFAULT_VALUE_NUMERIC" { return token::DEFAULT_VALUE_NUMERIC; } +"DEPENDENT_CHARACTERISTIC" { return token::DEPENDENT_CHARACTERISTIC; } +"DEPOSIT" { return token::DEPOSIT; } +"DISCRETE" { return token::DISCRETE; } +"DISPLAY_IDENTIFIER" { return token::DISPLAY_IDENTIFIER; } +"DIST_OP_X" { return token::DIST_OP_X; } +"DIST_OP_Y" { return token::DIST_OP_Y; } +"DIST_OP_Z" { return token::DIST_OP_Z; } +"DIST_OP_4" { return token::DIST_OP_4; } +"DIST_OP_5" { return token::DIST_OP_5; } +"ECU" { return token::ECU; } +"ECU_ADDRESS" { return token::ECU_ADDRESS; } +"ECU_ADDRESS_EXTENSION" { return token::ECU_ADDRESS_EXTENSION; } +"ECU_CALIBRATION_OFFSET" { return token::ECU_CALIBRATION_OFFSET; } +"ENCODING" { return token::ENCODING; } +"EPK" { return token::EPK; } +"ERROR_MASK" { return token::ERROR_MASK; } +"EXTENDED_LIMITS" { return token::EXTENDED_LIMITS; } +"FIX_AXIS_PAR" { return token::FIX_AXIS_PAR; } +"FIX_AXIS_PAR_DIST" { return token::FIX_AXIS_PAR_DIST; } +"FIX_AXIS_PAR_LIST" { return token::FIX_AXIS_PAR_LIST; } +"FIX_NO_AXIS_PTS_X" { return token::FIX_NO_AXIS_PTS_X; } +"FIX_NO_AXIS_PTS_Y" { return token::FIX_NO_AXIS_PTS_Y; } +"FIX_NO_AXIS_PTS_Z" { return token::FIX_NO_AXIS_PTS_Z; } +"FIX_NO_AXIS_PTS_4" { return token::FIX_NO_AXIS_PTS_4; } +"FIX_NO_AXIS_PTS_5" { return token::FIX_NO_AXIS_PTS_5; } +"FNC_VALUES" { return token::FNC_VALUES; } +"FORMAT" { return token::FORMAT; } +"FORMULA" { return token::FORMULA; } +"FORMULA_INV" { return token::FORMULA_INV; } +"FRAME" { return token::FRAME; } +"FRAME_MEASUREMENT" { return token::FRAME_MEASUREMENT; } +"FUNCTION" { return token::FUNCTION; } +"FUNCTION_LIST" { return token::FUNCTION_LIST; } +"FUNCTION_VERSION" { return token::FUNCTION_VERSION; } +"GROUP" { return token::GROUP; } +"GUARD_RAILS" { return token::GUARD_RAILS; } +"HEADER" { return token::HEADER; } +"IDENTIFICATION" { return token::IDENTIFICATION; } +"IN_MEASUREMENT" { return token::IN_MEASUREMENT; } +"INPUT_QUANTITY" { return token::INPUT_QUANTITY; } +"INSTANCE" { return token::INSTANCE; } +"LAYOUT" { return token::LAYOUT; } +"LEFT_SHIFT" { return token::LEFT_SHIFT; } +"LIMITS" { return token::LIMITS; } +"LOC_MEASUREMENT" { return token::LOC_MEASUREMENT; } +"MAP_LIST" { return token::MAP_LIST; } +"MATRIX_DIM" { return token::MATRIX_DIM; } +"MAX_GRAD" { return token::MAX_GRAD; } +"MAX_REFRESH" { return token::MAX_REFRESH; } +"MEASUREMENT" { return token::MEASUREMENT; } +"MEMORY_LAYOUT" { return token::MEMORY_LAYOUT; } +"MEMORY_SEGMENT" { return token::MEMORY_SEGMENT; } +"MOD_COMMON" { return token::MOD_COMMON; } +"MOD_PAR" { return token::MOD_PAR; } +"MODEL_LINK" { return token::MODEL_LINK; } +"MODULE" { return token::MODULE; } +"MONOTONY" { return token::MONOTONY; } +"NO_AXIS_PTS_X" { return token::NO_AXIS_PTS_X; } +"NO_AXIS_PTS_Y" { return token::NO_AXIS_PTS_Y; } +"NO_AXIS_PTS_Z" { return token::NO_AXIS_PTS_Z; } +"NO_AXIS_PTS_4" { return token::NO_AXIS_PTS_4; } +"NO_AXIS_PTS_5" { return token::NO_AXIS_PTS_5; } +"NO_OF_INTERFACES" { return token::NO_OF_INTERFACES; } +"NO_RESCALE_X" { return token::NO_RESCALE_X; } +"NUMBER" { return token::NUMBER; } +"OFFSET_X" { return token::OFFSET_X; } +"OFFSET_Y" { return token::OFFSET_Y; } +"OFFSET_Z" { return token::OFFSET_Z; } +"OFFSET_4" { return token::OFFSET_4; } +"OFFSET_5" { return token::OFFSET_5; } +"OUT_MEASUREMENT" { return token::OUT_MEASUREMENT; } +"OVERWRITE" { return token::OVERWRITE; } +"PHONE_NO" { return token::PHONE_NO; } +"PHYS_UNIT" { return token::PHYS_UNIT; } +"PROJECT" { + found_ = true; + return token::PROJECT; + } +"PROJECT_NO" { return token::PROJECT_NO; } +"READ_ONLY" { return token::READ_ONLY; } +"READ_WRITE" { return token::READ_WRITE; } +"RECORD_LAYOUT" { return token::RECORD_LAYOUT; } +"REF_CHARACTERISTIC" { return token::REF_CHARACTERISTIC; } +"REF_GROUP" { return token::REF_GROUP; } +"REF_MEASUREMENT" { return token::REF_MEASUREMENT; } +"REF_MEMORY_SEGMENT" { return token::REF_MEMORY_SEGMENT; } +"REF_UNIT" { return token::REF_UNIT; } +"RESERVED" { return token::RESERVED; } +"RIGHT_SHIFT" { return token::RIGHT_SHIFT; } +"RIP_ADDR_W" { return token::RIP_ADDR_W; } +"RIP_ADDR_X" { return token::RIP_ADDR_X; } +"RIP_ADDR_Y" { return token::RIP_ADDR_Y; } +"RIP_ADDR_Z" { return token::RIP_ADDR_Z; } +"RIP_ADDR_4" { return token::RIP_ADDR_4; } +"RIP_ADDR_5" { return token::RIP_ADDR_5; } +"ROOT" { return token::ROOT; } +"S_REC_LAYOUT" { return token::S_REC_LAYOUT; } /* Deprecated */ +"SHIFT_OP_X" { return token::SHIFT_OP_X; } +"SHIFT_OP_Y" { return token::SHIFT_OP_Y; } +"SHIFT_OP_Z" { return token::SHIFT_OP_Z; } +"SHIFT_OP_4" { return token::SHIFT_OP_4; } +"SHIFT_OP_5" { return token::SHIFT_OP_5; } +"SIGN_EXTEND" { return token::SIGN_EXTEND; } +"SI_EXPONENTS" { return token::SI_EXPONENTS; } +"SRC_ADDR_X" { return token::SRC_ADDR_X; } +"SRC_ADDR_Y" { return token::SRC_ADDR_Y; } +"SRC_ADDR_Z" { return token::SRC_ADDR_Z; } +"SRC_ADDR_4" { return token::SRC_ADDR_4; } +"SRC_ADDR_5" { return token::SRC_ADDR_5; } +"STATIC_ADDRESS_OFFSETS" { return token::STATIC_ADDRESS_OFFSETS; } +"STATIC_RECORD_LAYOUT" { return token::STATIC_RECORD_LAYOUT; } +"STATUS_STRING_REF" { return token::STATUS_STRING_REF; } +"STEP_SIZE" { return token::STEP_SIZE; } +"STRUCTURE_COMPONENT" { return token::STRUCTURE_COMPONENT; } +"SUB_FUNCTION" { return token::SUB_FUNCTION; } +"SUB_GROUP" { return token::SUB_GROUP; } +"SUPPLIER" { return token::SUPPLIER; } +"SYMBOL_LINK" { return token::SYMBOL_LINK; } +"SYMBOL_TYPE_LINK" { return token::SYMBOL_TYPE_LINK; } +"SYSTEM_CONSTANT" { return token::SYSTEM_CONSTANT; } +"TRANSFORMER" { return token::TRANSFORMER; } +"TRANSFORMER_IN_OBJECTS" { return token::TRANSFORMER_IN_OBJECTS; } +"TRANSFORMER_OUT_OBJECTS" { return token::TRANSFORMER_OUT_OBJECTS; } +"TYPEDEF_AXIS" { return token::TYPEDEF_AXIS; } +"TYPEDEF_BLOB" { return token::TYPEDEF_BLOB; } +"TYPEDEF_CHARACTERISTIC" { return token::TYPEDEF_CHARACTERISTIC; } +"TYPEDEF_MEASUREMENT" { return token::TYPEDEF_MEASUREMENT; } +"TYPEDEF_STRUCTURE" { return token::TYPEDEF_STRUCTURE; } +"UNIT" { return token::UNIT; } +"UNIT_CONVERSION" { return token::UNIT_CONVERSION; } +"USER" { return token::USER; } +"USER_RIGHTS" { return token::USER_RIGHTS; } +"VAR_ADDRESS" { return token::VAR_ADDRESS; } +"VAR_CHARACTERISTIC" { return token::VAR_CHARACTERISTIC; } +"VAR_CRITERION" { return token::VAR_CRITERION; } +"VAR_FORBIDDEN_COMB" { return token::VAR_FORBIDDEN_COMB; } +"VAR_MEASUREMENT" { return token::VAR_MEASUREMENT; } +"VAR_NAMING" { return token::VAR_NAMING; } +"VAR_SELECTION_CHARACTERISTIC" { return token::VAR_SELECTION_CHARACTERISTIC; } +"VAR_SEPARATOR" { return token::VAR_SEPARATOR; } +"VARIANT_CODING" { return token::VARIANT_CODING; } +"VERSION" { return token::A2L_VERSION; } +"VIRTUAL" { return token::VIRTUAL; } +"VIRTUAL_CHARACTERISTIC" { return token::VIRTUAL_CHARACTERISTIC; } + +"/begin"{ws}"A2ML" { + // Read in the format specification + if (yylval != nullptr) { + yylval->emplace(ReadA2ML()); + } + return token::A2ML; + } + +"/begin"{ws}"IF_DATA" { + // Read in the if_data string + if (yylval != nullptr) { + yylval->emplace(ReadIfData()); + } + return token::IF_DATA; + } +"IF_DATA"{ws}"{" { + // Read in the if_data string until end of line + if(yylval != nullptr ) { + yylval->emplace(ReadIfDataMultiLine()); + } + return token::IF_DATA; + } +"IF_DATA" { + // Read in the if_data string until end of line + if (yylval != nullptr) { + yylval->emplace(ReadIfDataSingleLine()); + } + return token::IF_DATA; + } +"FUNCTION"{ws}"{" { SkipUntil('}'); } + +"/begin" { return token::A2L_BEGIN; } +"/end" { return token::A2L_END; } + +"/include" { + FixIncludeFile(); + } + + + +{ident} { + const std::string temp(yytext); + if (yylval != nullptr) { + yylval->emplace(temp); + } + return token::IDENT; + } + +{string} { + const size_t len = strlen(yytext); + std::string temp; + if (len > 2) { + temp = yytext + 1; + temp.pop_back(); + } + yylval->emplace(temp); + return token::STRING; + } + +{hexnumber} { + uint64_t address = 0; + for ( size_t index = 0; yytext[ index ] != '\0'; ++index ) { + if ( index < 2 ) continue; + const char token = yytext[index]; + switch ( token ) { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + address *= 16; + address += token - '0'; + break; + + case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + address *= 16; + address += token - 'A' + 10; + break; + + case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + address *= 16; + address += token - 'a' + 10; + break; + + default: + break; + } + } + + yylval->emplace(address); + return token::HEX; + } + {unsigned_number} { + uint64_t temp = 0; + try { + temp = std::stoull(yytext); + } catch (const std::exception& ) { + + } + yylval->emplace(temp); + return token::UINT; + } + {signed_number} { + int64_t temp = 0; + try { + temp = std::stoll(yytext); + } catch (const std::exception& ) { + + } + yylval->emplace(temp); + return token::INT; + } +{float_val} { + double temp = 0.0; + try { + temp = std::stod(yytext); + } catch (const std::exception&) { + + } + yylval->emplace(temp); + return token::FLOAT; + } + +[/][*][^*]*[*]+([^*/][^*]*[*]+)*[/] { } /* Multi line comments */ +"//".* { /* Single line comment */ } +{ws} {} +. {} +<> { + if (file_stack_.size() <= 1) { + yyterminate(); + } else { + auto& last_item = file_stack_.back(); + yy_delete_buffer(last_item.buffer_state); + file_stack_.pop_back(); + auto& current_item = file_stack_.back(); + yy_switch_to_buffer(current_item.buffer_state); + } + } +%% + + diff --git a/a2llib-main/src/a2lhelper.cpp b/a2llib-main/src/a2lhelper.cpp new file mode 100644 index 0000000..f28a547 --- /dev/null +++ b/a2llib-main/src/a2lhelper.cpp @@ -0,0 +1,706 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#include "a2lhelper.h" +#include +#include +#include + +namespace { +constexpr uint8_t kMask[8] = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80}; +using signed64 = union { + int64_t val1 : 1; + int64_t val2 : 2; + int64_t val3 : 3; + int64_t val4 : 4; + int64_t val5 : 5; + int64_t val6 : 6; + int64_t val7 : 7; + int64_t val8 : 8; + int64_t val9 : 9; + int64_t val10 : 10; + int64_t val11 : 11; + int64_t val12 : 12; + int64_t val13 : 13; + int64_t val14 : 14; + int64_t val15 : 15; + int64_t val16 : 16; + int64_t val17 : 17; + int64_t val18 : 18; + int64_t val19 : 19; + int64_t val20 : 20; + int64_t val21 : 21; + int64_t val22 : 22; + int64_t val23 : 23; + int64_t val24 : 24; + int64_t val25 : 25; + int64_t val26 : 26; + int64_t val27 : 27; + int64_t val28 : 28; + int64_t val29 : 29; + int64_t val30 : 30; + int64_t val31 : 31; + int64_t val32 : 32; + int64_t val33 : 33; + int64_t val34 : 34; + int64_t val35 : 35; + int64_t val36 : 36; + int64_t val37 : 37; + int64_t val38 : 38; + int64_t val39 : 39; + int64_t val40 : 40; + int64_t val41 : 41; + int64_t val42 : 42; + int64_t val43 : 43; + int64_t val44 : 44; + int64_t val45 : 45; + int64_t val46 : 46; + int64_t val47 : 47; + int64_t val48 : 48; + int64_t val49 : 49; + int64_t val50 : 50; + int64_t val51 : 51; + int64_t val52 : 52; + int64_t val53 : 53; + int64_t val54 : 54; + int64_t val55 : 55; + int64_t val56 : 56; + int64_t val57 : 57; + int64_t val58 : 58; + int64_t val59 : 59; + int64_t val60 : 60; + int64_t val61 : 61; + int64_t val62 : 62; + int64_t val63 : 63; + int64_t val64 : 64; +}; + +} // end namespace empty + +namespace a2l { + +void A2lHelper::DoubleToRaw(bool little_endian, size_t start, size_t length, + double value, uint8_t* dest) { + if (dest == nullptr || length < 64) { + return; + } + length = 64; + + uint64_t mask = 1ULL << 63; + uint64_t temp = 0; + memcpy(&temp, &value, sizeof(temp)); + + auto bit = little_endian ? static_cast(start + length - 1) + : static_cast(start); + + auto byte = bit / 8; + bit %= 8; + + for (size_t index = 0; index < length; ++index) { + if ((temp & mask) != 0) { + dest[byte] |= kMask[bit]; + } else { + dest[byte] &= ~kMask[bit]; + } + mask >>= 1; + --bit; + if (bit < 0) { + bit = 7; + little_endian ? --byte : ++byte; + } + if (byte >= (start + length) /8) { + // Buffer overrun. Most likely invalid start bit + break; + } + } +} + +void A2lHelper::FloatToRaw(bool little_endian, size_t start, size_t length, + float value, uint8_t* raw) { + if (raw == nullptr || length < 32) { + return; + } + length = 32; + uint32_t mask = 1UL << 31; + uint32_t temp = 0; + memcpy(&temp, &value, sizeof(temp)); + + auto bit = little_endian ? static_cast(start + length - 1) + : static_cast(start); + + auto byte = bit / 8; + bit %= 8; + for (size_t index = 0; index < length; ++index) { + if ((temp & mask) != 0) { + raw[byte] |= kMask[bit]; + } else { + raw[byte] &= ~kMask[bit]; + } + mask >>= 1; + --bit; + if (bit < 0) { + bit = 7; + little_endian ? --byte : ++byte; + } + if (byte >= (start + length) / 8) { + // Buffer overrun. Most likely invalid start bit + break; + } + } +} + +void A2lHelper::SignedToRaw(bool little_endian, size_t start, size_t length, + int64_t value, uint8_t* raw) { + if (raw == nullptr || length == 0) { + return; + } + + signed64 temp_val{}; + + switch (length) { + case 1: + temp_val.val1 = value; + break; + case 2: + temp_val.val2 = value; + break; + case 3: + temp_val.val3 = value; + break; + case 4: + temp_val.val4 = value; + break; + case 5: + temp_val.val5 = value; + break; + case 6: + temp_val.val6 = value; + break; + case 7: + temp_val.val7 = value; + break; + case 8: + temp_val.val8 = value; + break; + case 9: + temp_val.val9 = value; + break; + case 10: + temp_val.val10 = value; + break; + case 11: + temp_val.val11 = value; + break; + case 12: + temp_val.val12 = value; + break; + case 13: + temp_val.val13 = value; + break; + case 14: + temp_val.val14 = value; + break; + case 15: + temp_val.val15 = value; + break; + case 16: + temp_val.val16 = value; + break; + case 17: + temp_val.val17 = value; + break; + case 18: + temp_val.val18 = value; + break; + case 19: + temp_val.val19 = value; + break; + case 20: + temp_val.val20 = value; + break; + case 21: + temp_val.val21 = value; + break; + case 22: + temp_val.val22 = value; + break; + case 23: + temp_val.val23 = value; + break; + case 24: + temp_val.val24 = value; + break; + case 25: + temp_val.val25 = value; + break; + case 26: + temp_val.val26 = value; + break; + case 27: + temp_val.val27 = value; + break; + case 28: + temp_val.val28 = value; + break; + case 29: + temp_val.val29 = value; + break; + case 30: + temp_val.val30 = value; + break; + case 31: + temp_val.val31 = value; + break; + case 32: + temp_val.val32 = value; + break; + case 33: + temp_val.val33 = value; + break; + case 34: + temp_val.val34 = value; + break; + case 35: + temp_val.val35 = value; + break; + case 36: + temp_val.val36 = value; + break; + case 37: + temp_val.val37 = value; + break; + case 38: + temp_val.val38 = value; + break; + case 39: + temp_val.val39 = value; + break; + case 40: + temp_val.val40 = value; + break; + case 41: + temp_val.val41 = value; + break; + case 42: + temp_val.val42 = value; + break; + case 43: + temp_val.val43 = value; + break; + case 44: + temp_val.val44 = value; + break; + case 45: + temp_val.val45 = value; + break; + case 46: + temp_val.val46 = value; + break; + case 47: + temp_val.val47 = value; + break; + case 48: + temp_val.val48 = value; + break; + case 49: + temp_val.val49 = value; + break; + case 50: + temp_val.val50 = value; + break; + case 51: + temp_val.val51 = value; + break; + case 52: + temp_val.val52 = value; + break; + case 53: + temp_val.val53 = value; + break; + case 54: + temp_val.val54 = value; + break; + case 55: + temp_val.val55 = value; + break; + case 56: + temp_val.val56 = value; + break; + case 57: + temp_val.val57 = value; + break; + case 58: + temp_val.val58 = value; + break; + case 59: + temp_val.val59 = value; + break; + case 60: + temp_val.val60 = value; + break; + case 61: + temp_val.val61 = value; + break; + case 62: + temp_val.val62 = value; + break; + case 63: + temp_val.val63 = value; + break; + case 64: + temp_val.val64 = value; + break; + default: + return; + } + + uint64_t mask = 1ULL << (length - 1); + uint64_t temp = 0; + memcpy(&temp, &temp_val, sizeof(temp)); + auto bit = little_endian ? static_cast(start + length - 1) + : static_cast(start); + auto byte = bit / 8; + bit %= 8; + for (size_t index = 0; index < length; ++index) { + if ((temp & mask) != 0) { + raw[byte] |= kMask[bit]; + } else { + raw[byte] &= ~kMask[bit]; + } + mask >>= 1; + --bit; + if (bit < 0) { + bit = 7; + little_endian ? --byte : ++byte; + } + } +} + +void A2lHelper::UnsignedToRaw(bool little_endian, size_t start, size_t length, + uint64_t value, uint8_t* raw) { + if (raw == nullptr || length == 0) { + return; + } + + uint64_t mask = 1ULL << (length - 1); + auto bit = little_endian ? static_cast(start + length - 1) + : static_cast(start); + auto byte = bit / 8; + bit %= 8; + + for (size_t index = 0; index < length; ++index) { + if ((value & mask) != 0) { + raw[byte] |= kMask[bit]; + } else { + raw[byte] &= ~kMask[bit]; + } + mask >>= 1; + --bit; + if (bit < 0) { + bit = 7; + little_endian ? --byte : ++byte; + } + } +} + +std::vector A2lHelper::RawToByteArray(size_t start, size_t length, + const unsigned char* raw ) +{ + // Only byte aligned strings are supported + if ( raw == nullptr || (length % 8) != 0 || (start % 8) != 0) { + return {}; + } + const auto byte_start = start / 8; + const auto byte_size = length / 8; + std::vector temp; + temp.resize(byte_size, 0); + memcpy(temp.data(), raw + byte_start, byte_size); + return temp; +} + +double A2lHelper::RawToDouble(bool little_endian, size_t start, size_t length, + const unsigned char* raw ) +{ + double value = 0.0; + uint64_t temp = 0; + uint64_t mask = 1ULL << ( length - 1 ); + auto bit = little_endian ? static_cast(start + length - 1) + : static_cast(start); + auto byte = bit / 8; + bit %= 8; + for (size_t index = 0; index < length; ++index ) { + if ((raw[byte] & kMask[bit] ) != 0) { + temp |= mask; + } + mask >>= 1; + --bit; + if (bit < 0) { + bit = 7; + little_endian ? --byte : ++byte; + } + } + memcpy( &value, &temp, sizeof(value)); + return value; +} + +float A2lHelper::RawToFloat(bool little_endian, size_t start, size_t length, + const unsigned char* raw ) +{ + float value = 0.0; + uint32_t temp = 0; + uint32_t mask = 1ULL << ( length - 1 ); + auto bit = little_endian ? static_cast(start + length - 1) + : static_cast(start); + auto byte = bit / 8; + bit %= 8; + for (size_t index = 0; index < length; ++index ) { + if ((raw[byte] & kMask[bit] ) != 0) { + temp |= mask; + } + mask >>= 1; + --bit; + if (bit < 0) { + bit = 7; + little_endian ? --byte : ++byte; + } + } + memcpy( &value, &temp, sizeof(value)); + return value; +} + +int64_t A2lHelper::RawToSigned(bool little_endian, size_t start, size_t length, + const uint8_t* raw ) +{ + int64_t value = 0; + + uint64_t temp = 0; + auto bit = little_endian ? static_cast(start + length - 1) + : static_cast(start); + auto byte = bit / 8; + bit %= 8; + + for (size_t index = 0; index < length; ++index) { + if ( index > 0 ) temp <<= 1; + if ((raw[byte] & kMask[bit]) != 0) { + temp |= 1; + } + --bit; + if (bit < 0) { + bit = 7; + little_endian ? --byte : ++byte; + } + } + + signed64 temp_value {}; + memcpy( &temp_value, &temp, sizeof(temp)); + + switch ( length ) { + case 1: value = temp_value.val1; break; + case 2: value = temp_value.val2; break; + case 3: value = temp_value.val3; break; + case 4: value = temp_value.val4; break; + case 5: value = temp_value.val5; break; + case 6: value = temp_value.val6; break; + case 7: value = temp_value.val7; break; + case 8: value = temp_value.val8; break; + case 9: value = temp_value.val9; break; + case 10: value = temp_value.val10; break; + case 11: value = temp_value.val11; break; + case 12: value = temp_value.val12; break; + case 13: value = temp_value.val13; break; + case 14: value = temp_value.val14; break; + case 15: value = temp_value.val15; break; + case 16: value = temp_value.val16; break; + case 17: value = temp_value.val17; break; + case 18: value = temp_value.val18; break; + case 19: value = temp_value.val19; break; + case 20: value = temp_value.val20; break; + case 21: value = temp_value.val21; break; + case 22: value = temp_value.val22; break; + case 23: value = temp_value.val23; break; + case 24: value = temp_value.val24; break; + case 25: value = temp_value.val25; break; + case 26: value = temp_value.val26; break; + case 27: value = temp_value.val27; break; + case 28: value = temp_value.val28; break; + case 29: value = temp_value.val29; break; + case 30: value = temp_value.val30; break; + case 31: value = temp_value.val31; break; + case 32: value = temp_value.val32; break; + case 33: value = temp_value.val33; break; + case 34: value = temp_value.val34; break; + case 35: value = temp_value.val35; break; + case 36: value = temp_value.val36; break; + case 37: value = temp_value.val37; break; + case 38: value = temp_value.val38; break; + case 39: value = temp_value.val39; break; + case 40: value = temp_value.val40; break; + case 41: value = temp_value.val41; break; + case 42: value = temp_value.val42; break; + case 43: value = temp_value.val43; break; + case 44: value = temp_value.val44; break; + case 45: value = temp_value.val45; break; + case 46: value = temp_value.val46; break; + case 47: value = temp_value.val47; break; + case 48: value = temp_value.val48; break; + case 49: value = temp_value.val49; break; + case 50: value = temp_value.val50; break; + case 51: value = temp_value.val51; break; + case 52: value = temp_value.val52; break; + case 53: value = temp_value.val53; break; + case 54: value = temp_value.val54; break; + case 55: value = temp_value.val55; break; + case 56: value = temp_value.val56; break; + case 57: value = temp_value.val57; break; + case 58: value = temp_value.val58; break; + case 59: value = temp_value.val59; break; + case 60: value = temp_value.val60; break; + case 61: value = temp_value.val61; break; + case 62: value = temp_value.val62; break; + case 63: value = temp_value.val63; break; + case 64: value = temp_value.val64; break; + default: + break; + } + return value; +} + +uint64_t A2lHelper::RawToUnsigned(bool little_endian, size_t start, + size_t length, const uint8_t* raw) +{ + uint64_t value = 0; + + auto bit = little_endian ? static_cast(start + length - 1) + : static_cast(start); + auto byte = bit / 8; + bit %= 8; + + for (size_t index = 0; index < length; ++index) { + if (index > 0) { + value <<= 1; + } + if ((raw[byte] & kMask[bit]) != 0) { + value |= 1; + } + --bit; + if (bit < 0) { + bit = 7; + little_endian ? --byte : ++byte; + } + } + return value; +} + +void A2lHelper::SetAllBits(size_t start, size_t length, uint8_t* raw ) { + if (raw == nullptr) { + return; + } + + for ( size_t index = 0; index < length; ++index) { + auto bit = start + index; + const auto byte = bit / 8; + bit %= 8; + raw[byte] |= kMask[bit]; + } +} + +bool A2lHelper::IsAllBitsSet(size_t start, size_t length, const uint8_t* raw) { + if (raw == nullptr) { + return true; + } + if (length <= 1) { + return false; // 1 bit cannot have an invalid flag + } + for (size_t index = 0; index < length; ++index) { + auto bit = start + index; + const auto byte = bit / 8; + bit %= 8; + if ((raw[byte] & kMask[bit]) == 0 ) { + return false; + } + } + return true; +} + +std::string A2lHelper::GetStem(const std::string& path) { + // First parse out the file name + const auto last_back_pos = path.find_last_of('\\'); + const auto back_pos = last_back_pos != std::string::npos; + + const auto last_forward_pos = path.find_last_of('/'); + const auto forward_pos = last_forward_pos != std::string::npos; + + std::string filename; + if (back_pos && forward_pos) { + if ( last_back_pos > last_forward_pos) { + // Use backward slash position + filename = path.substr(last_back_pos + 1); + } else { + // Use forward slash position + filename = path.substr(last_forward_pos + 1); + } + } else if (back_pos) { + filename = path.substr(last_back_pos + 1); + } else if (forward_pos) { + filename = path.substr(last_forward_pos + 1); + } else { + filename = path; + } + // Strip out the extension + std::string stem; + const auto last_dot_pos = filename.find_last_of('.'); + if (last_dot_pos != std::string::npos) { + stem = filename.substr(0,last_dot_pos); + } else { + stem = filename; + } + + return stem; +} + +bool A2lHelper::FileExist(const std::string& path) { + std::ifstream temp(path); + return temp.good(); +} + +bool A2lHelper::IsLittleEndian() { + constexpr int temp = 1; + return *((const int8_t*) &temp) == 1; +} + +std::string A2lHelper::ParseIfDataProtocol(const std::string& input) { + constexpr std::string_view begin = "/begin"; + constexpr std::string_view if_data = "IF_DATA"; + size_t pos = 0; + if (strncmp(input.data(), begin.data(), begin.size()) != 0) { + return {}; + } + pos += begin.size(); + while (std::isspace(input[pos])) { + ++pos; + } + if (strncmp(input.data() + pos, if_data.data(), if_data.size()) != 0) { + return {}; + } + pos += if_data.size(); + while (std::isspace(input[pos])) { + ++pos; + } + std::ostringstream protocol; + while (input[pos] != '\0' && !std::isspace(input[pos])) { + protocol << input[pos]; + ++pos; + } + return protocol.str(); +} + +int A2lHelper::stricmp(const char *__s1, const char *__s2) { +#if (_MSC_VER) + return _stricmp(__s1, __s2); +#else + return strcasecmp(__s1, __s2); +#endif +} +} diff --git a/a2llib-main/src/a2lhelper.h b/a2llib-main/src/a2lhelper.h new file mode 100644 index 0000000..2c4fb54 --- /dev/null +++ b/a2llib-main/src/a2lhelper.h @@ -0,0 +1,55 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ +#pragma once + +#include +#include +#include + +namespace a2l { +class A2lHelper { + public: + static void DoubleToRaw(bool little_endian, size_t start, size_t length, + double value, uint8_t* dest); + + static void FloatToRaw(bool little_endian, size_t start, size_t length, + float value, uint8_t* dest); + + static void SignedToRaw(bool little_endian, size_t start, size_t length, + int64_t value, uint8_t* raw); + + static void UnsignedToRaw(bool little_endian, size_t start, size_t length, + uint64_t value, uint8_t* raw); + + static std::vector RawToByteArray(size_t start, size_t length, + const unsigned char* raw); + + static double RawToDouble(bool little_endian, size_t start, size_t length, + const unsigned char* raw); + + static float RawToFloat(bool little_endian, size_t start, size_t length, + const unsigned char* raw); + + static int64_t RawToSigned(bool little_endian, size_t start, size_t length, + const uint8_t* raw); + + static uint64_t RawToUnsigned(bool little_endian, size_t start, size_t length, + const uint8_t* raw); + + static void SetAllBits(size_t start, size_t length, uint8_t* raw); + + static bool IsAllBitsSet(size_t start, size_t length, const uint8_t* raw); + + static std::string GetStem(const std::string& path); + + static bool FileExist(const std::string& path); + + static bool IsLittleEndian(); + + static std::string ParseIfDataProtocol(const std::string& input); + static int stricmp(const char *__s1, const char *__s2); +}; + +} // end namespace \ No newline at end of file diff --git a/a2llib-main/src/a2lobject.cpp b/a2llib-main/src/a2lobject.cpp new file mode 100644 index 0000000..0986e6d --- /dev/null +++ b/a2llib-main/src/a2lobject.cpp @@ -0,0 +1,32 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#include "a2l/a2lobject.h" +#include +#include +#include "a2lhelper.h" +namespace a2l { + +void A2lObject::AddIfData(const std::string& input) { + const auto protocol = A2lHelper::ParseIfDataProtocol(input); + if (protocol.empty()) { + return; + } + if_data_list_.emplace(protocol,input); +} + +void A2lObject::AddAnnotation(const A2lAnnotation& annotation) { + annotation_list_.emplace_back(annotation); +} + +bool A2lObject::HaveIfData(const std::string_view& protocol) const { + return std::any_of(if_data_list_.cbegin(), if_data_list_.cend(), + [&] (const auto& itr) { + return itr.first == protocol; + }); +} + +} // end namespace a2l + diff --git a/a2llib-main/src/a2lparser.cpp b/a2llib-main/src/a2lparser.cpp new file mode 100644 index 0000000..f528381 --- /dev/null +++ b/a2llib-main/src/a2lparser.cpp @@ -0,0 +1,7918 @@ +// A Bison parser, made by GNU Bison 3.8.2. + +// Skeleton implementation for Bison LALR(1) parsers in C++ + +// Copyright (C) 2002-2015, 2018-2021 Free Software Foundation, Inc. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// As a special exception, you may create a larger work that contains +// part or all of the Bison parser skeleton and distribute that work +// under terms of your choice, so long as that work isn't itself a +// parser generator using the skeleton or a modified version thereof +// as a parser skeleton. Alternatively, if you modify or redistribute +// the parser skeleton itself, you may (at your option) remove this +// special exception, which will cause the skeleton and the resulting +// Bison output files to be licensed under the GNU General Public +// License without this special exception. + +// This special exception was added by the Free Software Foundation in +// version 2.2 of Bison. + +// DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, +// especially those whose name start with YY_ or yy_. They are +// private implementation details that can be changed or removed. + + +// Take the name prefix into account. +#define yylex a2llex + + + +#include "a2lparser.hpp" + + +// Unqualified %code blocks. +#line 26 "D:/projects/a2llib/src/a2lparser.y" + #include "a2l/a2lstructs.h" + #include + #include "a2lscanner.h" + #include "a2l/a2lfile.h" + #include "a2lhelper.h" + #include + + + #undef yylex + #define yylex scanner.a2llex + +#line 60 "D:/projects/a2llib/src/a2lparser.cpp" + + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include // FIXME: INFRINGES ON USER NAME SPACE. +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif +#endif + + +// Whether we are compiled with exception support. +#ifndef YY_EXCEPTIONS +# if defined __GNUC__ && !defined __EXCEPTIONS +# define YY_EXCEPTIONS 0 +# else +# define YY_EXCEPTIONS 1 +# endif +#endif + + + +// Enable debugging if requested. +#if A2LDEBUG + +// A pseudo ostream that takes yydebug_ into account. +# define YYCDEBUG if (yydebug_) (*yycdebug_) + +# define YY_SYMBOL_PRINT(Title, Symbol) \ + do { \ + if (yydebug_) \ + { \ + *yycdebug_ << Title << ' '; \ + yy_print_ (*yycdebug_, Symbol); \ + *yycdebug_ << '\n'; \ + } \ + } while (false) + +# define YY_REDUCE_PRINT(Rule) \ + do { \ + if (yydebug_) \ + yy_reduce_print_ (Rule); \ + } while (false) + +# define YY_STACK_PRINT() \ + do { \ + if (yydebug_) \ + yy_stack_print_ (); \ + } while (false) + +#else // !A2LDEBUG + +# define YYCDEBUG if (false) std::cerr +# define YY_SYMBOL_PRINT(Title, Symbol) YY_USE (Symbol) +# define YY_REDUCE_PRINT(Rule) static_cast (0) +# define YY_STACK_PRINT() static_cast (0) + +#endif // !A2LDEBUG + +#define yyerrok (yyerrstatus_ = 0) +#define yyclearin (yyla.clear ()) + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab +#define YYRECOVERING() (!!yyerrstatus_) + +#line 5 "D:/projects/a2llib/src/a2lparser.y" +namespace a2l { +#line 134 "D:/projects/a2llib/src/a2lparser.cpp" + + /// Build a parser object. + A2lParser::A2lParser (a2l::A2lScanner &scanner_yyarg, a2l::A2lFile &file_yyarg) +#if A2LDEBUG + : yydebug_ (false), + yycdebug_ (&std::cerr), +#else + : +#endif + scanner (scanner_yyarg), + file (file_yyarg) + {} + + A2lParser::~A2lParser () + {} + + A2lParser::syntax_error::~syntax_error () YY_NOEXCEPT YY_NOTHROW + {} + + /*---------. + | symbol. | + `---------*/ + + // basic_symbol. + template + A2lParser::basic_symbol::basic_symbol (const basic_symbol& that) + : Base (that) + , value () + { + switch (this->kind ()) + { + case symbol_kind::S_address_type: // address_type + value.copy< A2lAddressType > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_annotation: // annotation + case symbol_kind::S_annotation_attributes: // annotation_attributes + value.copy< A2lAnnotation > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_axis_pts_x: // axis_pts_x + case symbol_kind::S_axis_pts_y: // axis_pts_y + case symbol_kind::S_axis_pts_z: // axis_pts_z + case symbol_kind::S_axis_pts_4: // axis_pts_4 + case symbol_kind::S_axis_pts_5: // axis_pts_5 + value.copy< A2lAxisPts > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_axis_rescale_x: // axis_rescale_x + value.copy< A2lAxisRescale > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_bit_operation: // bit_operation + value.copy< A2lBitOperation > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_byte_order: // byte_order + value.copy< A2lByteOrder > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_calibration_access: // calibration_access + value.copy< A2lCalibrationAccess > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_calibration_handle: // calibration_handle + value.copy< A2lCalibrationHandle > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_calibration_method: // calibration_method + value.copy< A2lCalibrationMethod > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_dependent_characteristic: // dependent_characteristic + case symbol_kind::S_virtual_characteristic: // virtual_characteristic + value.copy< A2lDependentCharacteristic > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_deposit: // deposit + value.copy< A2lDeposit > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_dist_op_x: // dist_op_x + case symbol_kind::S_dist_op_y: // dist_op_y + case symbol_kind::S_dist_op_z: // dist_op_z + case symbol_kind::S_dist_op_4: // dist_op_4 + case symbol_kind::S_dist_op_5: // dist_op_5 + case symbol_kind::S_no_axis_pts_x: // no_axis_pts_x + case symbol_kind::S_no_axis_pts_y: // no_axis_pts_y + case symbol_kind::S_no_axis_pts_z: // no_axis_pts_z + case symbol_kind::S_no_axis_pts_4: // no_axis_pts_4 + case symbol_kind::S_no_axis_pts_5: // no_axis_pts_5 + case symbol_kind::S_no_rescale_x: // no_rescale_x + case symbol_kind::S_offset_x: // offset_x + case symbol_kind::S_offset_y: // offset_y + case symbol_kind::S_offset_z: // offset_z + case symbol_kind::S_offset_4: // offset_4 + case symbol_kind::S_offset_5: // offset_5 + case symbol_kind::S_reserved: // reserved + case symbol_kind::S_rip_addr_w: // rip_addr_w + case symbol_kind::S_rip_addr_x: // rip_addr_x + case symbol_kind::S_rip_addr_y: // rip_addr_y + case symbol_kind::S_rip_addr_z: // rip_addr_z + case symbol_kind::S_rip_addr_4: // rip_addr_4 + case symbol_kind::S_rip_addr_5: // rip_addr_5 + case symbol_kind::S_shift_op_x: // shift_op_x + case symbol_kind::S_shift_op_y: // shift_op_y + case symbol_kind::S_shift_op_z: // shift_op_z + case symbol_kind::S_shift_op_4: // shift_op_4 + case symbol_kind::S_shift_op_5: // shift_op_5 + case symbol_kind::S_src_addr_x: // src_addr_x + case symbol_kind::S_src_addr_y: // src_addr_y + case symbol_kind::S_src_addr_z: // src_addr_z + case symbol_kind::S_src_addr_4: // src_addr_4 + case symbol_kind::S_src_addr_5: // src_addr_5 + value.copy< A2lDistOp > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_encoding: // encoding + value.copy< A2lEncoding > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_extended_limits: // extended_limits + value.copy< A2lExtendedLimits > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_fix_axis_par: // fix_axis_par + value.copy< A2lFixAxisPar > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_fix_axis_par_dist: // fix_axis_par_dist + value.copy< A2lFixAxisParDist > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_fnc_values: // fnc_values + value.copy< A2lFncValue > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_identification: // identification + value.copy< A2lIdentification > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_layout: // layout + value.copy< A2lLayout > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_limits: // limits + value.copy< A2lLimits > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_max_refresh: // max_refresh + value.copy< A2lMaxRefresh > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_memory_layout: // memory_layout + value.copy< A2lMemoryLayout > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_memory_segment: // memory_segment + value.copy< A2lMemorySegment > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_monotony: // monotony + value.copy< A2lMonotony > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_prg_type: // prg_type + value.copy< A2lSegmentType > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_si_exponents: // si_exponents + value.copy< A2lSiExponents > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_symbol_link: // symbol_link + value.copy< A2lSymbolLink > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_var_characteristic: // var_characteristic + value.copy< A2lVarCharacteristic > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_var_criterion: // var_criterion + value.copy< A2lVarCriterion > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_FLOAT: // FLOAT + case symbol_kind::S_any_float: // any_float + case symbol_kind::S_default_value_numeric: // default_value_numeric + case symbol_kind::S_max_grad: // max_grad + case symbol_kind::S_step_size: // step_size + value.copy< double > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_INT: // INT + case symbol_kind::S_any_int: // any_int + case symbol_kind::S_ecu_address_extension: // ecu_address_extension + case symbol_kind::S_ecu_calibration_offset: // ecu_calibration_offset + value.copy< int64_t > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_float_pair_list: // float_pair_list + value.copy< std::map > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_float_string_list: // float_string_list + value.copy< std::map > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_float_range_list: // float_range_list + value.copy< std::map, std::string> > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_key_value_list: // key_value_list + case symbol_kind::S_memory_layout_attributes: // memory_layout_attributes + case symbol_kind::S_memory_segment_attributes: // memory_segment_attributes + case symbol_kind::S_var_forbidden_comb: // var_forbidden_comb + value.copy< std::map > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_unit_conversion: // unit_conversion + value.copy< std::pair > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_formula: // formula + case symbol_kind::S_system_constant: // system_constant + value.copy< std::pair > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_IDENT: // IDENT + case symbol_kind::S_STRING: // STRING + case symbol_kind::S_A2ML: // A2ML + case symbol_kind::S_IF_DATA: // IF_DATA + case symbol_kind::S_ar_component_attribute: // ar_component_attribute + case symbol_kind::S_calibration_handle_attribute: // calibration_handle_attribute + case symbol_kind::S_formula_attribute: // formula_attribute + case symbol_kind::S_a2ml: // a2ml + case symbol_kind::S_annotation_label: // annotation_label + case symbol_kind::S_annotation_origin: // annotation_origin + case symbol_kind::S_ar_prototype_of: // ar_prototype_of + case symbol_kind::S_axis_pts_ref: // axis_pts_ref + case symbol_kind::S_calibration_handle_text: // calibration_handle_text + case symbol_kind::S_comparison_quantity: // comparison_quantity + case symbol_kind::S_compu_tab_ref: // compu_tab_ref + case symbol_kind::S_conversion: // conversion + case symbol_kind::S_cpu_type: // cpu_type + case symbol_kind::S_curve_axis_ref: // curve_axis_ref + case symbol_kind::S_customer: // customer + case symbol_kind::S_customer_no: // customer_no + case symbol_kind::S_default_value: // default_value + case symbol_kind::S_display_identifier: // display_identifier + case symbol_kind::S_ecu: // ecu + case symbol_kind::S_epk: // epk + case symbol_kind::S_format: // format + case symbol_kind::S_formula_inv: // formula_inv + case symbol_kind::S_function_version: // function_version + case symbol_kind::S_if_data: // if_data + case symbol_kind::S_input_quantity: // input_quantity + case symbol_kind::S_model_link: // model_link + case symbol_kind::S_phone_no: // phone_no + case symbol_kind::S_phys_unit: // phys_unit + case symbol_kind::S_proj_no: // proj_no + case symbol_kind::S_project_no: // project_no + case symbol_kind::S_ref_memory_segment: // ref_memory_segment + case symbol_kind::S_ref_unit: // ref_unit + case symbol_kind::S_status_string_ref: // status_string_ref + case symbol_kind::S_supplier: // supplier + case symbol_kind::S_symbol_type_link: // symbol_type_link + case symbol_kind::S_user: // user + case symbol_kind::S_var_measurement: // var_measurement + case symbol_kind::S_var_naming: // var_naming + case symbol_kind::S_var_selection_characteristic: // var_selection_characteristic + case symbol_kind::S_var_separator: // var_separator + case symbol_kind::S_version: // version + value.copy< std::string > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_calibration_method_attributes: // calibration_method_attributes + value.copy< std::vector > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_float_list: // float_list + case symbol_kind::S_fix_axis_par_list: // fix_axis_par_list + case symbol_kind::S_coeffs: // coeffs + case symbol_kind::S_coeffs_linear: // coeffs_linear + value.copy< std::vector > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_int_list: // int_list + value.copy< std::vector > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_string_list: // string_list + case symbol_kind::S_ident_list: // ident_list + case symbol_kind::S_annotation_text: // annotation_text + case symbol_kind::S_def_characteristic: // def_characteristic + case symbol_kind::S_function_list: // function_list + case symbol_kind::S_in_measurement: // in_measurement + case symbol_kind::S_loc_measurement: // loc_measurement + case symbol_kind::S_map_list: // map_list + case symbol_kind::S_out_measurement: // out_measurement + case symbol_kind::S_ref_characteristic: // ref_characteristic + case symbol_kind::S_ref_group: // ref_group + case symbol_kind::S_ref_measurement: // ref_measurement + case symbol_kind::S_sub_function: // sub_function + case symbol_kind::S_sub_group: // sub_group + case symbol_kind::S_transformer_in_objects: // transformer_in_objects + case symbol_kind::S_transformer_out_objects: // transformer_out_objects + case symbol_kind::S_virtual: // virtual + case symbol_kind::S_frame_measurement: // frame_measurement + value.copy< std::vector > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_uint_list: // uint_list + case symbol_kind::S_var_address: // var_address + case symbol_kind::S_var_characteristic_attribute: // var_characteristic_attribute + case symbol_kind::S_matrix_dim: // matrix_dim + value.copy< std::vector > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_UINT: // UINT + case symbol_kind::S_HEX: // HEX + case symbol_kind::S_any_uint: // any_uint + case symbol_kind::S_addr_epk: // addr_epk + case symbol_kind::S_alignment_byte: // alignment_byte + case symbol_kind::S_alignment_float16_ieee: // alignment_float16_ieee + case symbol_kind::S_alignment_float32_ieee: // alignment_float32_ieee + case symbol_kind::S_alignment_float64_ieee: // alignment_float64_ieee + case symbol_kind::S_alignment_int64: // alignment_int64 + case symbol_kind::S_alignment_long: // alignment_long + case symbol_kind::S_alignment_word: // alignment_word + case symbol_kind::S_array_size: // array_size + case symbol_kind::S_bit_mask: // bit_mask + case symbol_kind::S_data_size: // data_size + case symbol_kind::S_ecu_address: // ecu_address + case symbol_kind::S_error_mask: // error_mask + case symbol_kind::S_fix_no_axis_pts_x: // fix_no_axis_pts_x + case symbol_kind::S_fix_no_axis_pts_y: // fix_no_axis_pts_y + case symbol_kind::S_fix_no_axis_pts_z: // fix_no_axis_pts_z + case symbol_kind::S_fix_no_axis_pts_4: // fix_no_axis_pts_4 + case symbol_kind::S_fix_no_axis_pts_5: // fix_no_axis_pts_5 + case symbol_kind::S_left_shift: // left_shift + case symbol_kind::S_no_of_interfaces: // no_of_interfaces + case symbol_kind::S_number: // number + case symbol_kind::S_right_shift: // right_shift + value.copy< uint64_t > (YY_MOVE (that.value)); + break; + + default: + break; + } + + } + + + + + template + A2lParser::symbol_kind_type + A2lParser::basic_symbol::type_get () const YY_NOEXCEPT + { + return this->kind (); + } + + + template + bool + A2lParser::basic_symbol::empty () const YY_NOEXCEPT + { + return this->kind () == symbol_kind::S_YYEMPTY; + } + + template + void + A2lParser::basic_symbol::move (basic_symbol& s) + { + super_type::move (s); + switch (this->kind ()) + { + case symbol_kind::S_address_type: // address_type + value.move< A2lAddressType > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_annotation: // annotation + case symbol_kind::S_annotation_attributes: // annotation_attributes + value.move< A2lAnnotation > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_axis_pts_x: // axis_pts_x + case symbol_kind::S_axis_pts_y: // axis_pts_y + case symbol_kind::S_axis_pts_z: // axis_pts_z + case symbol_kind::S_axis_pts_4: // axis_pts_4 + case symbol_kind::S_axis_pts_5: // axis_pts_5 + value.move< A2lAxisPts > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_axis_rescale_x: // axis_rescale_x + value.move< A2lAxisRescale > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_bit_operation: // bit_operation + value.move< A2lBitOperation > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_byte_order: // byte_order + value.move< A2lByteOrder > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_calibration_access: // calibration_access + value.move< A2lCalibrationAccess > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_calibration_handle: // calibration_handle + value.move< A2lCalibrationHandle > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_calibration_method: // calibration_method + value.move< A2lCalibrationMethod > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_dependent_characteristic: // dependent_characteristic + case symbol_kind::S_virtual_characteristic: // virtual_characteristic + value.move< A2lDependentCharacteristic > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_deposit: // deposit + value.move< A2lDeposit > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_dist_op_x: // dist_op_x + case symbol_kind::S_dist_op_y: // dist_op_y + case symbol_kind::S_dist_op_z: // dist_op_z + case symbol_kind::S_dist_op_4: // dist_op_4 + case symbol_kind::S_dist_op_5: // dist_op_5 + case symbol_kind::S_no_axis_pts_x: // no_axis_pts_x + case symbol_kind::S_no_axis_pts_y: // no_axis_pts_y + case symbol_kind::S_no_axis_pts_z: // no_axis_pts_z + case symbol_kind::S_no_axis_pts_4: // no_axis_pts_4 + case symbol_kind::S_no_axis_pts_5: // no_axis_pts_5 + case symbol_kind::S_no_rescale_x: // no_rescale_x + case symbol_kind::S_offset_x: // offset_x + case symbol_kind::S_offset_y: // offset_y + case symbol_kind::S_offset_z: // offset_z + case symbol_kind::S_offset_4: // offset_4 + case symbol_kind::S_offset_5: // offset_5 + case symbol_kind::S_reserved: // reserved + case symbol_kind::S_rip_addr_w: // rip_addr_w + case symbol_kind::S_rip_addr_x: // rip_addr_x + case symbol_kind::S_rip_addr_y: // rip_addr_y + case symbol_kind::S_rip_addr_z: // rip_addr_z + case symbol_kind::S_rip_addr_4: // rip_addr_4 + case symbol_kind::S_rip_addr_5: // rip_addr_5 + case symbol_kind::S_shift_op_x: // shift_op_x + case symbol_kind::S_shift_op_y: // shift_op_y + case symbol_kind::S_shift_op_z: // shift_op_z + case symbol_kind::S_shift_op_4: // shift_op_4 + case symbol_kind::S_shift_op_5: // shift_op_5 + case symbol_kind::S_src_addr_x: // src_addr_x + case symbol_kind::S_src_addr_y: // src_addr_y + case symbol_kind::S_src_addr_z: // src_addr_z + case symbol_kind::S_src_addr_4: // src_addr_4 + case symbol_kind::S_src_addr_5: // src_addr_5 + value.move< A2lDistOp > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_encoding: // encoding + value.move< A2lEncoding > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_extended_limits: // extended_limits + value.move< A2lExtendedLimits > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_fix_axis_par: // fix_axis_par + value.move< A2lFixAxisPar > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_fix_axis_par_dist: // fix_axis_par_dist + value.move< A2lFixAxisParDist > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_fnc_values: // fnc_values + value.move< A2lFncValue > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_identification: // identification + value.move< A2lIdentification > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_layout: // layout + value.move< A2lLayout > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_limits: // limits + value.move< A2lLimits > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_max_refresh: // max_refresh + value.move< A2lMaxRefresh > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_memory_layout: // memory_layout + value.move< A2lMemoryLayout > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_memory_segment: // memory_segment + value.move< A2lMemorySegment > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_monotony: // monotony + value.move< A2lMonotony > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_prg_type: // prg_type + value.move< A2lSegmentType > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_si_exponents: // si_exponents + value.move< A2lSiExponents > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_symbol_link: // symbol_link + value.move< A2lSymbolLink > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_var_characteristic: // var_characteristic + value.move< A2lVarCharacteristic > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_var_criterion: // var_criterion + value.move< A2lVarCriterion > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_FLOAT: // FLOAT + case symbol_kind::S_any_float: // any_float + case symbol_kind::S_default_value_numeric: // default_value_numeric + case symbol_kind::S_max_grad: // max_grad + case symbol_kind::S_step_size: // step_size + value.move< double > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_INT: // INT + case symbol_kind::S_any_int: // any_int + case symbol_kind::S_ecu_address_extension: // ecu_address_extension + case symbol_kind::S_ecu_calibration_offset: // ecu_calibration_offset + value.move< int64_t > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_float_pair_list: // float_pair_list + value.move< std::map > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_float_string_list: // float_string_list + value.move< std::map > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_float_range_list: // float_range_list + value.move< std::map, std::string> > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_key_value_list: // key_value_list + case symbol_kind::S_memory_layout_attributes: // memory_layout_attributes + case symbol_kind::S_memory_segment_attributes: // memory_segment_attributes + case symbol_kind::S_var_forbidden_comb: // var_forbidden_comb + value.move< std::map > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_unit_conversion: // unit_conversion + value.move< std::pair > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_formula: // formula + case symbol_kind::S_system_constant: // system_constant + value.move< std::pair > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_IDENT: // IDENT + case symbol_kind::S_STRING: // STRING + case symbol_kind::S_A2ML: // A2ML + case symbol_kind::S_IF_DATA: // IF_DATA + case symbol_kind::S_ar_component_attribute: // ar_component_attribute + case symbol_kind::S_calibration_handle_attribute: // calibration_handle_attribute + case symbol_kind::S_formula_attribute: // formula_attribute + case symbol_kind::S_a2ml: // a2ml + case symbol_kind::S_annotation_label: // annotation_label + case symbol_kind::S_annotation_origin: // annotation_origin + case symbol_kind::S_ar_prototype_of: // ar_prototype_of + case symbol_kind::S_axis_pts_ref: // axis_pts_ref + case symbol_kind::S_calibration_handle_text: // calibration_handle_text + case symbol_kind::S_comparison_quantity: // comparison_quantity + case symbol_kind::S_compu_tab_ref: // compu_tab_ref + case symbol_kind::S_conversion: // conversion + case symbol_kind::S_cpu_type: // cpu_type + case symbol_kind::S_curve_axis_ref: // curve_axis_ref + case symbol_kind::S_customer: // customer + case symbol_kind::S_customer_no: // customer_no + case symbol_kind::S_default_value: // default_value + case symbol_kind::S_display_identifier: // display_identifier + case symbol_kind::S_ecu: // ecu + case symbol_kind::S_epk: // epk + case symbol_kind::S_format: // format + case symbol_kind::S_formula_inv: // formula_inv + case symbol_kind::S_function_version: // function_version + case symbol_kind::S_if_data: // if_data + case symbol_kind::S_input_quantity: // input_quantity + case symbol_kind::S_model_link: // model_link + case symbol_kind::S_phone_no: // phone_no + case symbol_kind::S_phys_unit: // phys_unit + case symbol_kind::S_proj_no: // proj_no + case symbol_kind::S_project_no: // project_no + case symbol_kind::S_ref_memory_segment: // ref_memory_segment + case symbol_kind::S_ref_unit: // ref_unit + case symbol_kind::S_status_string_ref: // status_string_ref + case symbol_kind::S_supplier: // supplier + case symbol_kind::S_symbol_type_link: // symbol_type_link + case symbol_kind::S_user: // user + case symbol_kind::S_var_measurement: // var_measurement + case symbol_kind::S_var_naming: // var_naming + case symbol_kind::S_var_selection_characteristic: // var_selection_characteristic + case symbol_kind::S_var_separator: // var_separator + case symbol_kind::S_version: // version + value.move< std::string > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_calibration_method_attributes: // calibration_method_attributes + value.move< std::vector > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_float_list: // float_list + case symbol_kind::S_fix_axis_par_list: // fix_axis_par_list + case symbol_kind::S_coeffs: // coeffs + case symbol_kind::S_coeffs_linear: // coeffs_linear + value.move< std::vector > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_int_list: // int_list + value.move< std::vector > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_string_list: // string_list + case symbol_kind::S_ident_list: // ident_list + case symbol_kind::S_annotation_text: // annotation_text + case symbol_kind::S_def_characteristic: // def_characteristic + case symbol_kind::S_function_list: // function_list + case symbol_kind::S_in_measurement: // in_measurement + case symbol_kind::S_loc_measurement: // loc_measurement + case symbol_kind::S_map_list: // map_list + case symbol_kind::S_out_measurement: // out_measurement + case symbol_kind::S_ref_characteristic: // ref_characteristic + case symbol_kind::S_ref_group: // ref_group + case symbol_kind::S_ref_measurement: // ref_measurement + case symbol_kind::S_sub_function: // sub_function + case symbol_kind::S_sub_group: // sub_group + case symbol_kind::S_transformer_in_objects: // transformer_in_objects + case symbol_kind::S_transformer_out_objects: // transformer_out_objects + case symbol_kind::S_virtual: // virtual + case symbol_kind::S_frame_measurement: // frame_measurement + value.move< std::vector > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_uint_list: // uint_list + case symbol_kind::S_var_address: // var_address + case symbol_kind::S_var_characteristic_attribute: // var_characteristic_attribute + case symbol_kind::S_matrix_dim: // matrix_dim + value.move< std::vector > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_UINT: // UINT + case symbol_kind::S_HEX: // HEX + case symbol_kind::S_any_uint: // any_uint + case symbol_kind::S_addr_epk: // addr_epk + case symbol_kind::S_alignment_byte: // alignment_byte + case symbol_kind::S_alignment_float16_ieee: // alignment_float16_ieee + case symbol_kind::S_alignment_float32_ieee: // alignment_float32_ieee + case symbol_kind::S_alignment_float64_ieee: // alignment_float64_ieee + case symbol_kind::S_alignment_int64: // alignment_int64 + case symbol_kind::S_alignment_long: // alignment_long + case symbol_kind::S_alignment_word: // alignment_word + case symbol_kind::S_array_size: // array_size + case symbol_kind::S_bit_mask: // bit_mask + case symbol_kind::S_data_size: // data_size + case symbol_kind::S_ecu_address: // ecu_address + case symbol_kind::S_error_mask: // error_mask + case symbol_kind::S_fix_no_axis_pts_x: // fix_no_axis_pts_x + case symbol_kind::S_fix_no_axis_pts_y: // fix_no_axis_pts_y + case symbol_kind::S_fix_no_axis_pts_z: // fix_no_axis_pts_z + case symbol_kind::S_fix_no_axis_pts_4: // fix_no_axis_pts_4 + case symbol_kind::S_fix_no_axis_pts_5: // fix_no_axis_pts_5 + case symbol_kind::S_left_shift: // left_shift + case symbol_kind::S_no_of_interfaces: // no_of_interfaces + case symbol_kind::S_number: // number + case symbol_kind::S_right_shift: // right_shift + value.move< uint64_t > (YY_MOVE (s.value)); + break; + + default: + break; + } + + } + + // by_kind. + A2lParser::by_kind::by_kind () YY_NOEXCEPT + : kind_ (symbol_kind::S_YYEMPTY) + {} + +#if 201103L <= YY_CPLUSPLUS + A2lParser::by_kind::by_kind (by_kind&& that) YY_NOEXCEPT + : kind_ (that.kind_) + { + that.clear (); + } +#endif + + A2lParser::by_kind::by_kind (const by_kind& that) YY_NOEXCEPT + : kind_ (that.kind_) + {} + + A2lParser::by_kind::by_kind (token_kind_type t) YY_NOEXCEPT + : kind_ (yytranslate_ (t)) + {} + + + + void + A2lParser::by_kind::clear () YY_NOEXCEPT + { + kind_ = symbol_kind::S_YYEMPTY; + } + + void + A2lParser::by_kind::move (by_kind& that) + { + kind_ = that.kind_; + that.clear (); + } + + A2lParser::symbol_kind_type + A2lParser::by_kind::kind () const YY_NOEXCEPT + { + return kind_; + } + + + A2lParser::symbol_kind_type + A2lParser::by_kind::type_get () const YY_NOEXCEPT + { + return this->kind (); + } + + + + // by_state. + A2lParser::by_state::by_state () YY_NOEXCEPT + : state (empty_state) + {} + + A2lParser::by_state::by_state (const by_state& that) YY_NOEXCEPT + : state (that.state) + {} + + void + A2lParser::by_state::clear () YY_NOEXCEPT + { + state = empty_state; + } + + void + A2lParser::by_state::move (by_state& that) + { + state = that.state; + that.clear (); + } + + A2lParser::by_state::by_state (state_type s) YY_NOEXCEPT + : state (s) + {} + + A2lParser::symbol_kind_type + A2lParser::by_state::kind () const YY_NOEXCEPT + { + if (state == empty_state) + return symbol_kind::S_YYEMPTY; + else + return YY_CAST (symbol_kind_type, yystos_[+state]); + } + + A2lParser::stack_symbol_type::stack_symbol_type () + {} + + A2lParser::stack_symbol_type::stack_symbol_type (YY_RVREF (stack_symbol_type) that) + : super_type (YY_MOVE (that.state)) + { + switch (that.kind ()) + { + case symbol_kind::S_address_type: // address_type + value.YY_MOVE_OR_COPY< A2lAddressType > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_annotation: // annotation + case symbol_kind::S_annotation_attributes: // annotation_attributes + value.YY_MOVE_OR_COPY< A2lAnnotation > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_axis_pts_x: // axis_pts_x + case symbol_kind::S_axis_pts_y: // axis_pts_y + case symbol_kind::S_axis_pts_z: // axis_pts_z + case symbol_kind::S_axis_pts_4: // axis_pts_4 + case symbol_kind::S_axis_pts_5: // axis_pts_5 + value.YY_MOVE_OR_COPY< A2lAxisPts > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_axis_rescale_x: // axis_rescale_x + value.YY_MOVE_OR_COPY< A2lAxisRescale > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_bit_operation: // bit_operation + value.YY_MOVE_OR_COPY< A2lBitOperation > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_byte_order: // byte_order + value.YY_MOVE_OR_COPY< A2lByteOrder > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_calibration_access: // calibration_access + value.YY_MOVE_OR_COPY< A2lCalibrationAccess > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_calibration_handle: // calibration_handle + value.YY_MOVE_OR_COPY< A2lCalibrationHandle > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_calibration_method: // calibration_method + value.YY_MOVE_OR_COPY< A2lCalibrationMethod > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_dependent_characteristic: // dependent_characteristic + case symbol_kind::S_virtual_characteristic: // virtual_characteristic + value.YY_MOVE_OR_COPY< A2lDependentCharacteristic > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_deposit: // deposit + value.YY_MOVE_OR_COPY< A2lDeposit > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_dist_op_x: // dist_op_x + case symbol_kind::S_dist_op_y: // dist_op_y + case symbol_kind::S_dist_op_z: // dist_op_z + case symbol_kind::S_dist_op_4: // dist_op_4 + case symbol_kind::S_dist_op_5: // dist_op_5 + case symbol_kind::S_no_axis_pts_x: // no_axis_pts_x + case symbol_kind::S_no_axis_pts_y: // no_axis_pts_y + case symbol_kind::S_no_axis_pts_z: // no_axis_pts_z + case symbol_kind::S_no_axis_pts_4: // no_axis_pts_4 + case symbol_kind::S_no_axis_pts_5: // no_axis_pts_5 + case symbol_kind::S_no_rescale_x: // no_rescale_x + case symbol_kind::S_offset_x: // offset_x + case symbol_kind::S_offset_y: // offset_y + case symbol_kind::S_offset_z: // offset_z + case symbol_kind::S_offset_4: // offset_4 + case symbol_kind::S_offset_5: // offset_5 + case symbol_kind::S_reserved: // reserved + case symbol_kind::S_rip_addr_w: // rip_addr_w + case symbol_kind::S_rip_addr_x: // rip_addr_x + case symbol_kind::S_rip_addr_y: // rip_addr_y + case symbol_kind::S_rip_addr_z: // rip_addr_z + case symbol_kind::S_rip_addr_4: // rip_addr_4 + case symbol_kind::S_rip_addr_5: // rip_addr_5 + case symbol_kind::S_shift_op_x: // shift_op_x + case symbol_kind::S_shift_op_y: // shift_op_y + case symbol_kind::S_shift_op_z: // shift_op_z + case symbol_kind::S_shift_op_4: // shift_op_4 + case symbol_kind::S_shift_op_5: // shift_op_5 + case symbol_kind::S_src_addr_x: // src_addr_x + case symbol_kind::S_src_addr_y: // src_addr_y + case symbol_kind::S_src_addr_z: // src_addr_z + case symbol_kind::S_src_addr_4: // src_addr_4 + case symbol_kind::S_src_addr_5: // src_addr_5 + value.YY_MOVE_OR_COPY< A2lDistOp > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_encoding: // encoding + value.YY_MOVE_OR_COPY< A2lEncoding > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_extended_limits: // extended_limits + value.YY_MOVE_OR_COPY< A2lExtendedLimits > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_fix_axis_par: // fix_axis_par + value.YY_MOVE_OR_COPY< A2lFixAxisPar > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_fix_axis_par_dist: // fix_axis_par_dist + value.YY_MOVE_OR_COPY< A2lFixAxisParDist > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_fnc_values: // fnc_values + value.YY_MOVE_OR_COPY< A2lFncValue > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_identification: // identification + value.YY_MOVE_OR_COPY< A2lIdentification > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_layout: // layout + value.YY_MOVE_OR_COPY< A2lLayout > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_limits: // limits + value.YY_MOVE_OR_COPY< A2lLimits > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_max_refresh: // max_refresh + value.YY_MOVE_OR_COPY< A2lMaxRefresh > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_memory_layout: // memory_layout + value.YY_MOVE_OR_COPY< A2lMemoryLayout > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_memory_segment: // memory_segment + value.YY_MOVE_OR_COPY< A2lMemorySegment > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_monotony: // monotony + value.YY_MOVE_OR_COPY< A2lMonotony > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_prg_type: // prg_type + value.YY_MOVE_OR_COPY< A2lSegmentType > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_si_exponents: // si_exponents + value.YY_MOVE_OR_COPY< A2lSiExponents > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_symbol_link: // symbol_link + value.YY_MOVE_OR_COPY< A2lSymbolLink > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_var_characteristic: // var_characteristic + value.YY_MOVE_OR_COPY< A2lVarCharacteristic > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_var_criterion: // var_criterion + value.YY_MOVE_OR_COPY< A2lVarCriterion > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_FLOAT: // FLOAT + case symbol_kind::S_any_float: // any_float + case symbol_kind::S_default_value_numeric: // default_value_numeric + case symbol_kind::S_max_grad: // max_grad + case symbol_kind::S_step_size: // step_size + value.YY_MOVE_OR_COPY< double > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_INT: // INT + case symbol_kind::S_any_int: // any_int + case symbol_kind::S_ecu_address_extension: // ecu_address_extension + case symbol_kind::S_ecu_calibration_offset: // ecu_calibration_offset + value.YY_MOVE_OR_COPY< int64_t > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_float_pair_list: // float_pair_list + value.YY_MOVE_OR_COPY< std::map > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_float_string_list: // float_string_list + value.YY_MOVE_OR_COPY< std::map > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_float_range_list: // float_range_list + value.YY_MOVE_OR_COPY< std::map, std::string> > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_key_value_list: // key_value_list + case symbol_kind::S_memory_layout_attributes: // memory_layout_attributes + case symbol_kind::S_memory_segment_attributes: // memory_segment_attributes + case symbol_kind::S_var_forbidden_comb: // var_forbidden_comb + value.YY_MOVE_OR_COPY< std::map > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_unit_conversion: // unit_conversion + value.YY_MOVE_OR_COPY< std::pair > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_formula: // formula + case symbol_kind::S_system_constant: // system_constant + value.YY_MOVE_OR_COPY< std::pair > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_IDENT: // IDENT + case symbol_kind::S_STRING: // STRING + case symbol_kind::S_A2ML: // A2ML + case symbol_kind::S_IF_DATA: // IF_DATA + case symbol_kind::S_ar_component_attribute: // ar_component_attribute + case symbol_kind::S_calibration_handle_attribute: // calibration_handle_attribute + case symbol_kind::S_formula_attribute: // formula_attribute + case symbol_kind::S_a2ml: // a2ml + case symbol_kind::S_annotation_label: // annotation_label + case symbol_kind::S_annotation_origin: // annotation_origin + case symbol_kind::S_ar_prototype_of: // ar_prototype_of + case symbol_kind::S_axis_pts_ref: // axis_pts_ref + case symbol_kind::S_calibration_handle_text: // calibration_handle_text + case symbol_kind::S_comparison_quantity: // comparison_quantity + case symbol_kind::S_compu_tab_ref: // compu_tab_ref + case symbol_kind::S_conversion: // conversion + case symbol_kind::S_cpu_type: // cpu_type + case symbol_kind::S_curve_axis_ref: // curve_axis_ref + case symbol_kind::S_customer: // customer + case symbol_kind::S_customer_no: // customer_no + case symbol_kind::S_default_value: // default_value + case symbol_kind::S_display_identifier: // display_identifier + case symbol_kind::S_ecu: // ecu + case symbol_kind::S_epk: // epk + case symbol_kind::S_format: // format + case symbol_kind::S_formula_inv: // formula_inv + case symbol_kind::S_function_version: // function_version + case symbol_kind::S_if_data: // if_data + case symbol_kind::S_input_quantity: // input_quantity + case symbol_kind::S_model_link: // model_link + case symbol_kind::S_phone_no: // phone_no + case symbol_kind::S_phys_unit: // phys_unit + case symbol_kind::S_proj_no: // proj_no + case symbol_kind::S_project_no: // project_no + case symbol_kind::S_ref_memory_segment: // ref_memory_segment + case symbol_kind::S_ref_unit: // ref_unit + case symbol_kind::S_status_string_ref: // status_string_ref + case symbol_kind::S_supplier: // supplier + case symbol_kind::S_symbol_type_link: // symbol_type_link + case symbol_kind::S_user: // user + case symbol_kind::S_var_measurement: // var_measurement + case symbol_kind::S_var_naming: // var_naming + case symbol_kind::S_var_selection_characteristic: // var_selection_characteristic + case symbol_kind::S_var_separator: // var_separator + case symbol_kind::S_version: // version + value.YY_MOVE_OR_COPY< std::string > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_calibration_method_attributes: // calibration_method_attributes + value.YY_MOVE_OR_COPY< std::vector > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_float_list: // float_list + case symbol_kind::S_fix_axis_par_list: // fix_axis_par_list + case symbol_kind::S_coeffs: // coeffs + case symbol_kind::S_coeffs_linear: // coeffs_linear + value.YY_MOVE_OR_COPY< std::vector > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_int_list: // int_list + value.YY_MOVE_OR_COPY< std::vector > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_string_list: // string_list + case symbol_kind::S_ident_list: // ident_list + case symbol_kind::S_annotation_text: // annotation_text + case symbol_kind::S_def_characteristic: // def_characteristic + case symbol_kind::S_function_list: // function_list + case symbol_kind::S_in_measurement: // in_measurement + case symbol_kind::S_loc_measurement: // loc_measurement + case symbol_kind::S_map_list: // map_list + case symbol_kind::S_out_measurement: // out_measurement + case symbol_kind::S_ref_characteristic: // ref_characteristic + case symbol_kind::S_ref_group: // ref_group + case symbol_kind::S_ref_measurement: // ref_measurement + case symbol_kind::S_sub_function: // sub_function + case symbol_kind::S_sub_group: // sub_group + case symbol_kind::S_transformer_in_objects: // transformer_in_objects + case symbol_kind::S_transformer_out_objects: // transformer_out_objects + case symbol_kind::S_virtual: // virtual + case symbol_kind::S_frame_measurement: // frame_measurement + value.YY_MOVE_OR_COPY< std::vector > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_uint_list: // uint_list + case symbol_kind::S_var_address: // var_address + case symbol_kind::S_var_characteristic_attribute: // var_characteristic_attribute + case symbol_kind::S_matrix_dim: // matrix_dim + value.YY_MOVE_OR_COPY< std::vector > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_UINT: // UINT + case symbol_kind::S_HEX: // HEX + case symbol_kind::S_any_uint: // any_uint + case symbol_kind::S_addr_epk: // addr_epk + case symbol_kind::S_alignment_byte: // alignment_byte + case symbol_kind::S_alignment_float16_ieee: // alignment_float16_ieee + case symbol_kind::S_alignment_float32_ieee: // alignment_float32_ieee + case symbol_kind::S_alignment_float64_ieee: // alignment_float64_ieee + case symbol_kind::S_alignment_int64: // alignment_int64 + case symbol_kind::S_alignment_long: // alignment_long + case symbol_kind::S_alignment_word: // alignment_word + case symbol_kind::S_array_size: // array_size + case symbol_kind::S_bit_mask: // bit_mask + case symbol_kind::S_data_size: // data_size + case symbol_kind::S_ecu_address: // ecu_address + case symbol_kind::S_error_mask: // error_mask + case symbol_kind::S_fix_no_axis_pts_x: // fix_no_axis_pts_x + case symbol_kind::S_fix_no_axis_pts_y: // fix_no_axis_pts_y + case symbol_kind::S_fix_no_axis_pts_z: // fix_no_axis_pts_z + case symbol_kind::S_fix_no_axis_pts_4: // fix_no_axis_pts_4 + case symbol_kind::S_fix_no_axis_pts_5: // fix_no_axis_pts_5 + case symbol_kind::S_left_shift: // left_shift + case symbol_kind::S_no_of_interfaces: // no_of_interfaces + case symbol_kind::S_number: // number + case symbol_kind::S_right_shift: // right_shift + value.YY_MOVE_OR_COPY< uint64_t > (YY_MOVE (that.value)); + break; + + default: + break; + } + +#if 201103L <= YY_CPLUSPLUS + // that is emptied. + that.state = empty_state; +#endif + } + + A2lParser::stack_symbol_type::stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) that) + : super_type (s) + { + switch (that.kind ()) + { + case symbol_kind::S_address_type: // address_type + value.move< A2lAddressType > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_annotation: // annotation + case symbol_kind::S_annotation_attributes: // annotation_attributes + value.move< A2lAnnotation > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_axis_pts_x: // axis_pts_x + case symbol_kind::S_axis_pts_y: // axis_pts_y + case symbol_kind::S_axis_pts_z: // axis_pts_z + case symbol_kind::S_axis_pts_4: // axis_pts_4 + case symbol_kind::S_axis_pts_5: // axis_pts_5 + value.move< A2lAxisPts > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_axis_rescale_x: // axis_rescale_x + value.move< A2lAxisRescale > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_bit_operation: // bit_operation + value.move< A2lBitOperation > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_byte_order: // byte_order + value.move< A2lByteOrder > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_calibration_access: // calibration_access + value.move< A2lCalibrationAccess > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_calibration_handle: // calibration_handle + value.move< A2lCalibrationHandle > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_calibration_method: // calibration_method + value.move< A2lCalibrationMethod > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_dependent_characteristic: // dependent_characteristic + case symbol_kind::S_virtual_characteristic: // virtual_characteristic + value.move< A2lDependentCharacteristic > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_deposit: // deposit + value.move< A2lDeposit > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_dist_op_x: // dist_op_x + case symbol_kind::S_dist_op_y: // dist_op_y + case symbol_kind::S_dist_op_z: // dist_op_z + case symbol_kind::S_dist_op_4: // dist_op_4 + case symbol_kind::S_dist_op_5: // dist_op_5 + case symbol_kind::S_no_axis_pts_x: // no_axis_pts_x + case symbol_kind::S_no_axis_pts_y: // no_axis_pts_y + case symbol_kind::S_no_axis_pts_z: // no_axis_pts_z + case symbol_kind::S_no_axis_pts_4: // no_axis_pts_4 + case symbol_kind::S_no_axis_pts_5: // no_axis_pts_5 + case symbol_kind::S_no_rescale_x: // no_rescale_x + case symbol_kind::S_offset_x: // offset_x + case symbol_kind::S_offset_y: // offset_y + case symbol_kind::S_offset_z: // offset_z + case symbol_kind::S_offset_4: // offset_4 + case symbol_kind::S_offset_5: // offset_5 + case symbol_kind::S_reserved: // reserved + case symbol_kind::S_rip_addr_w: // rip_addr_w + case symbol_kind::S_rip_addr_x: // rip_addr_x + case symbol_kind::S_rip_addr_y: // rip_addr_y + case symbol_kind::S_rip_addr_z: // rip_addr_z + case symbol_kind::S_rip_addr_4: // rip_addr_4 + case symbol_kind::S_rip_addr_5: // rip_addr_5 + case symbol_kind::S_shift_op_x: // shift_op_x + case symbol_kind::S_shift_op_y: // shift_op_y + case symbol_kind::S_shift_op_z: // shift_op_z + case symbol_kind::S_shift_op_4: // shift_op_4 + case symbol_kind::S_shift_op_5: // shift_op_5 + case symbol_kind::S_src_addr_x: // src_addr_x + case symbol_kind::S_src_addr_y: // src_addr_y + case symbol_kind::S_src_addr_z: // src_addr_z + case symbol_kind::S_src_addr_4: // src_addr_4 + case symbol_kind::S_src_addr_5: // src_addr_5 + value.move< A2lDistOp > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_encoding: // encoding + value.move< A2lEncoding > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_extended_limits: // extended_limits + value.move< A2lExtendedLimits > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_fix_axis_par: // fix_axis_par + value.move< A2lFixAxisPar > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_fix_axis_par_dist: // fix_axis_par_dist + value.move< A2lFixAxisParDist > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_fnc_values: // fnc_values + value.move< A2lFncValue > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_identification: // identification + value.move< A2lIdentification > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_layout: // layout + value.move< A2lLayout > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_limits: // limits + value.move< A2lLimits > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_max_refresh: // max_refresh + value.move< A2lMaxRefresh > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_memory_layout: // memory_layout + value.move< A2lMemoryLayout > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_memory_segment: // memory_segment + value.move< A2lMemorySegment > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_monotony: // monotony + value.move< A2lMonotony > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_prg_type: // prg_type + value.move< A2lSegmentType > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_si_exponents: // si_exponents + value.move< A2lSiExponents > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_symbol_link: // symbol_link + value.move< A2lSymbolLink > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_var_characteristic: // var_characteristic + value.move< A2lVarCharacteristic > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_var_criterion: // var_criterion + value.move< A2lVarCriterion > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_FLOAT: // FLOAT + case symbol_kind::S_any_float: // any_float + case symbol_kind::S_default_value_numeric: // default_value_numeric + case symbol_kind::S_max_grad: // max_grad + case symbol_kind::S_step_size: // step_size + value.move< double > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_INT: // INT + case symbol_kind::S_any_int: // any_int + case symbol_kind::S_ecu_address_extension: // ecu_address_extension + case symbol_kind::S_ecu_calibration_offset: // ecu_calibration_offset + value.move< int64_t > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_float_pair_list: // float_pair_list + value.move< std::map > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_float_string_list: // float_string_list + value.move< std::map > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_float_range_list: // float_range_list + value.move< std::map, std::string> > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_key_value_list: // key_value_list + case symbol_kind::S_memory_layout_attributes: // memory_layout_attributes + case symbol_kind::S_memory_segment_attributes: // memory_segment_attributes + case symbol_kind::S_var_forbidden_comb: // var_forbidden_comb + value.move< std::map > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_unit_conversion: // unit_conversion + value.move< std::pair > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_formula: // formula + case symbol_kind::S_system_constant: // system_constant + value.move< std::pair > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_IDENT: // IDENT + case symbol_kind::S_STRING: // STRING + case symbol_kind::S_A2ML: // A2ML + case symbol_kind::S_IF_DATA: // IF_DATA + case symbol_kind::S_ar_component_attribute: // ar_component_attribute + case symbol_kind::S_calibration_handle_attribute: // calibration_handle_attribute + case symbol_kind::S_formula_attribute: // formula_attribute + case symbol_kind::S_a2ml: // a2ml + case symbol_kind::S_annotation_label: // annotation_label + case symbol_kind::S_annotation_origin: // annotation_origin + case symbol_kind::S_ar_prototype_of: // ar_prototype_of + case symbol_kind::S_axis_pts_ref: // axis_pts_ref + case symbol_kind::S_calibration_handle_text: // calibration_handle_text + case symbol_kind::S_comparison_quantity: // comparison_quantity + case symbol_kind::S_compu_tab_ref: // compu_tab_ref + case symbol_kind::S_conversion: // conversion + case symbol_kind::S_cpu_type: // cpu_type + case symbol_kind::S_curve_axis_ref: // curve_axis_ref + case symbol_kind::S_customer: // customer + case symbol_kind::S_customer_no: // customer_no + case symbol_kind::S_default_value: // default_value + case symbol_kind::S_display_identifier: // display_identifier + case symbol_kind::S_ecu: // ecu + case symbol_kind::S_epk: // epk + case symbol_kind::S_format: // format + case symbol_kind::S_formula_inv: // formula_inv + case symbol_kind::S_function_version: // function_version + case symbol_kind::S_if_data: // if_data + case symbol_kind::S_input_quantity: // input_quantity + case symbol_kind::S_model_link: // model_link + case symbol_kind::S_phone_no: // phone_no + case symbol_kind::S_phys_unit: // phys_unit + case symbol_kind::S_proj_no: // proj_no + case symbol_kind::S_project_no: // project_no + case symbol_kind::S_ref_memory_segment: // ref_memory_segment + case symbol_kind::S_ref_unit: // ref_unit + case symbol_kind::S_status_string_ref: // status_string_ref + case symbol_kind::S_supplier: // supplier + case symbol_kind::S_symbol_type_link: // symbol_type_link + case symbol_kind::S_user: // user + case symbol_kind::S_var_measurement: // var_measurement + case symbol_kind::S_var_naming: // var_naming + case symbol_kind::S_var_selection_characteristic: // var_selection_characteristic + case symbol_kind::S_var_separator: // var_separator + case symbol_kind::S_version: // version + value.move< std::string > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_calibration_method_attributes: // calibration_method_attributes + value.move< std::vector > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_float_list: // float_list + case symbol_kind::S_fix_axis_par_list: // fix_axis_par_list + case symbol_kind::S_coeffs: // coeffs + case symbol_kind::S_coeffs_linear: // coeffs_linear + value.move< std::vector > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_int_list: // int_list + value.move< std::vector > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_string_list: // string_list + case symbol_kind::S_ident_list: // ident_list + case symbol_kind::S_annotation_text: // annotation_text + case symbol_kind::S_def_characteristic: // def_characteristic + case symbol_kind::S_function_list: // function_list + case symbol_kind::S_in_measurement: // in_measurement + case symbol_kind::S_loc_measurement: // loc_measurement + case symbol_kind::S_map_list: // map_list + case symbol_kind::S_out_measurement: // out_measurement + case symbol_kind::S_ref_characteristic: // ref_characteristic + case symbol_kind::S_ref_group: // ref_group + case symbol_kind::S_ref_measurement: // ref_measurement + case symbol_kind::S_sub_function: // sub_function + case symbol_kind::S_sub_group: // sub_group + case symbol_kind::S_transformer_in_objects: // transformer_in_objects + case symbol_kind::S_transformer_out_objects: // transformer_out_objects + case symbol_kind::S_virtual: // virtual + case symbol_kind::S_frame_measurement: // frame_measurement + value.move< std::vector > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_uint_list: // uint_list + case symbol_kind::S_var_address: // var_address + case symbol_kind::S_var_characteristic_attribute: // var_characteristic_attribute + case symbol_kind::S_matrix_dim: // matrix_dim + value.move< std::vector > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_UINT: // UINT + case symbol_kind::S_HEX: // HEX + case symbol_kind::S_any_uint: // any_uint + case symbol_kind::S_addr_epk: // addr_epk + case symbol_kind::S_alignment_byte: // alignment_byte + case symbol_kind::S_alignment_float16_ieee: // alignment_float16_ieee + case symbol_kind::S_alignment_float32_ieee: // alignment_float32_ieee + case symbol_kind::S_alignment_float64_ieee: // alignment_float64_ieee + case symbol_kind::S_alignment_int64: // alignment_int64 + case symbol_kind::S_alignment_long: // alignment_long + case symbol_kind::S_alignment_word: // alignment_word + case symbol_kind::S_array_size: // array_size + case symbol_kind::S_bit_mask: // bit_mask + case symbol_kind::S_data_size: // data_size + case symbol_kind::S_ecu_address: // ecu_address + case symbol_kind::S_error_mask: // error_mask + case symbol_kind::S_fix_no_axis_pts_x: // fix_no_axis_pts_x + case symbol_kind::S_fix_no_axis_pts_y: // fix_no_axis_pts_y + case symbol_kind::S_fix_no_axis_pts_z: // fix_no_axis_pts_z + case symbol_kind::S_fix_no_axis_pts_4: // fix_no_axis_pts_4 + case symbol_kind::S_fix_no_axis_pts_5: // fix_no_axis_pts_5 + case symbol_kind::S_left_shift: // left_shift + case symbol_kind::S_no_of_interfaces: // no_of_interfaces + case symbol_kind::S_number: // number + case symbol_kind::S_right_shift: // right_shift + value.move< uint64_t > (YY_MOVE (that.value)); + break; + + default: + break; + } + + // that is emptied. + that.kind_ = symbol_kind::S_YYEMPTY; + } + +#if YY_CPLUSPLUS < 201103L + A2lParser::stack_symbol_type& + A2lParser::stack_symbol_type::operator= (const stack_symbol_type& that) + { + state = that.state; + switch (that.kind ()) + { + case symbol_kind::S_address_type: // address_type + value.copy< A2lAddressType > (that.value); + break; + + case symbol_kind::S_annotation: // annotation + case symbol_kind::S_annotation_attributes: // annotation_attributes + value.copy< A2lAnnotation > (that.value); + break; + + case symbol_kind::S_axis_pts_x: // axis_pts_x + case symbol_kind::S_axis_pts_y: // axis_pts_y + case symbol_kind::S_axis_pts_z: // axis_pts_z + case symbol_kind::S_axis_pts_4: // axis_pts_4 + case symbol_kind::S_axis_pts_5: // axis_pts_5 + value.copy< A2lAxisPts > (that.value); + break; + + case symbol_kind::S_axis_rescale_x: // axis_rescale_x + value.copy< A2lAxisRescale > (that.value); + break; + + case symbol_kind::S_bit_operation: // bit_operation + value.copy< A2lBitOperation > (that.value); + break; + + case symbol_kind::S_byte_order: // byte_order + value.copy< A2lByteOrder > (that.value); + break; + + case symbol_kind::S_calibration_access: // calibration_access + value.copy< A2lCalibrationAccess > (that.value); + break; + + case symbol_kind::S_calibration_handle: // calibration_handle + value.copy< A2lCalibrationHandle > (that.value); + break; + + case symbol_kind::S_calibration_method: // calibration_method + value.copy< A2lCalibrationMethod > (that.value); + break; + + case symbol_kind::S_dependent_characteristic: // dependent_characteristic + case symbol_kind::S_virtual_characteristic: // virtual_characteristic + value.copy< A2lDependentCharacteristic > (that.value); + break; + + case symbol_kind::S_deposit: // deposit + value.copy< A2lDeposit > (that.value); + break; + + case symbol_kind::S_dist_op_x: // dist_op_x + case symbol_kind::S_dist_op_y: // dist_op_y + case symbol_kind::S_dist_op_z: // dist_op_z + case symbol_kind::S_dist_op_4: // dist_op_4 + case symbol_kind::S_dist_op_5: // dist_op_5 + case symbol_kind::S_no_axis_pts_x: // no_axis_pts_x + case symbol_kind::S_no_axis_pts_y: // no_axis_pts_y + case symbol_kind::S_no_axis_pts_z: // no_axis_pts_z + case symbol_kind::S_no_axis_pts_4: // no_axis_pts_4 + case symbol_kind::S_no_axis_pts_5: // no_axis_pts_5 + case symbol_kind::S_no_rescale_x: // no_rescale_x + case symbol_kind::S_offset_x: // offset_x + case symbol_kind::S_offset_y: // offset_y + case symbol_kind::S_offset_z: // offset_z + case symbol_kind::S_offset_4: // offset_4 + case symbol_kind::S_offset_5: // offset_5 + case symbol_kind::S_reserved: // reserved + case symbol_kind::S_rip_addr_w: // rip_addr_w + case symbol_kind::S_rip_addr_x: // rip_addr_x + case symbol_kind::S_rip_addr_y: // rip_addr_y + case symbol_kind::S_rip_addr_z: // rip_addr_z + case symbol_kind::S_rip_addr_4: // rip_addr_4 + case symbol_kind::S_rip_addr_5: // rip_addr_5 + case symbol_kind::S_shift_op_x: // shift_op_x + case symbol_kind::S_shift_op_y: // shift_op_y + case symbol_kind::S_shift_op_z: // shift_op_z + case symbol_kind::S_shift_op_4: // shift_op_4 + case symbol_kind::S_shift_op_5: // shift_op_5 + case symbol_kind::S_src_addr_x: // src_addr_x + case symbol_kind::S_src_addr_y: // src_addr_y + case symbol_kind::S_src_addr_z: // src_addr_z + case symbol_kind::S_src_addr_4: // src_addr_4 + case symbol_kind::S_src_addr_5: // src_addr_5 + value.copy< A2lDistOp > (that.value); + break; + + case symbol_kind::S_encoding: // encoding + value.copy< A2lEncoding > (that.value); + break; + + case symbol_kind::S_extended_limits: // extended_limits + value.copy< A2lExtendedLimits > (that.value); + break; + + case symbol_kind::S_fix_axis_par: // fix_axis_par + value.copy< A2lFixAxisPar > (that.value); + break; + + case symbol_kind::S_fix_axis_par_dist: // fix_axis_par_dist + value.copy< A2lFixAxisParDist > (that.value); + break; + + case symbol_kind::S_fnc_values: // fnc_values + value.copy< A2lFncValue > (that.value); + break; + + case symbol_kind::S_identification: // identification + value.copy< A2lIdentification > (that.value); + break; + + case symbol_kind::S_layout: // layout + value.copy< A2lLayout > (that.value); + break; + + case symbol_kind::S_limits: // limits + value.copy< A2lLimits > (that.value); + break; + + case symbol_kind::S_max_refresh: // max_refresh + value.copy< A2lMaxRefresh > (that.value); + break; + + case symbol_kind::S_memory_layout: // memory_layout + value.copy< A2lMemoryLayout > (that.value); + break; + + case symbol_kind::S_memory_segment: // memory_segment + value.copy< A2lMemorySegment > (that.value); + break; + + case symbol_kind::S_monotony: // monotony + value.copy< A2lMonotony > (that.value); + break; + + case symbol_kind::S_prg_type: // prg_type + value.copy< A2lSegmentType > (that.value); + break; + + case symbol_kind::S_si_exponents: // si_exponents + value.copy< A2lSiExponents > (that.value); + break; + + case symbol_kind::S_symbol_link: // symbol_link + value.copy< A2lSymbolLink > (that.value); + break; + + case symbol_kind::S_var_characteristic: // var_characteristic + value.copy< A2lVarCharacteristic > (that.value); + break; + + case symbol_kind::S_var_criterion: // var_criterion + value.copy< A2lVarCriterion > (that.value); + break; + + case symbol_kind::S_FLOAT: // FLOAT + case symbol_kind::S_any_float: // any_float + case symbol_kind::S_default_value_numeric: // default_value_numeric + case symbol_kind::S_max_grad: // max_grad + case symbol_kind::S_step_size: // step_size + value.copy< double > (that.value); + break; + + case symbol_kind::S_INT: // INT + case symbol_kind::S_any_int: // any_int + case symbol_kind::S_ecu_address_extension: // ecu_address_extension + case symbol_kind::S_ecu_calibration_offset: // ecu_calibration_offset + value.copy< int64_t > (that.value); + break; + + case symbol_kind::S_float_pair_list: // float_pair_list + value.copy< std::map > (that.value); + break; + + case symbol_kind::S_float_string_list: // float_string_list + value.copy< std::map > (that.value); + break; + + case symbol_kind::S_float_range_list: // float_range_list + value.copy< std::map, std::string> > (that.value); + break; + + case symbol_kind::S_key_value_list: // key_value_list + case symbol_kind::S_memory_layout_attributes: // memory_layout_attributes + case symbol_kind::S_memory_segment_attributes: // memory_segment_attributes + case symbol_kind::S_var_forbidden_comb: // var_forbidden_comb + value.copy< std::map > (that.value); + break; + + case symbol_kind::S_unit_conversion: // unit_conversion + value.copy< std::pair > (that.value); + break; + + case symbol_kind::S_formula: // formula + case symbol_kind::S_system_constant: // system_constant + value.copy< std::pair > (that.value); + break; + + case symbol_kind::S_IDENT: // IDENT + case symbol_kind::S_STRING: // STRING + case symbol_kind::S_A2ML: // A2ML + case symbol_kind::S_IF_DATA: // IF_DATA + case symbol_kind::S_ar_component_attribute: // ar_component_attribute + case symbol_kind::S_calibration_handle_attribute: // calibration_handle_attribute + case symbol_kind::S_formula_attribute: // formula_attribute + case symbol_kind::S_a2ml: // a2ml + case symbol_kind::S_annotation_label: // annotation_label + case symbol_kind::S_annotation_origin: // annotation_origin + case symbol_kind::S_ar_prototype_of: // ar_prototype_of + case symbol_kind::S_axis_pts_ref: // axis_pts_ref + case symbol_kind::S_calibration_handle_text: // calibration_handle_text + case symbol_kind::S_comparison_quantity: // comparison_quantity + case symbol_kind::S_compu_tab_ref: // compu_tab_ref + case symbol_kind::S_conversion: // conversion + case symbol_kind::S_cpu_type: // cpu_type + case symbol_kind::S_curve_axis_ref: // curve_axis_ref + case symbol_kind::S_customer: // customer + case symbol_kind::S_customer_no: // customer_no + case symbol_kind::S_default_value: // default_value + case symbol_kind::S_display_identifier: // display_identifier + case symbol_kind::S_ecu: // ecu + case symbol_kind::S_epk: // epk + case symbol_kind::S_format: // format + case symbol_kind::S_formula_inv: // formula_inv + case symbol_kind::S_function_version: // function_version + case symbol_kind::S_if_data: // if_data + case symbol_kind::S_input_quantity: // input_quantity + case symbol_kind::S_model_link: // model_link + case symbol_kind::S_phone_no: // phone_no + case symbol_kind::S_phys_unit: // phys_unit + case symbol_kind::S_proj_no: // proj_no + case symbol_kind::S_project_no: // project_no + case symbol_kind::S_ref_memory_segment: // ref_memory_segment + case symbol_kind::S_ref_unit: // ref_unit + case symbol_kind::S_status_string_ref: // status_string_ref + case symbol_kind::S_supplier: // supplier + case symbol_kind::S_symbol_type_link: // symbol_type_link + case symbol_kind::S_user: // user + case symbol_kind::S_var_measurement: // var_measurement + case symbol_kind::S_var_naming: // var_naming + case symbol_kind::S_var_selection_characteristic: // var_selection_characteristic + case symbol_kind::S_var_separator: // var_separator + case symbol_kind::S_version: // version + value.copy< std::string > (that.value); + break; + + case symbol_kind::S_calibration_method_attributes: // calibration_method_attributes + value.copy< std::vector > (that.value); + break; + + case symbol_kind::S_float_list: // float_list + case symbol_kind::S_fix_axis_par_list: // fix_axis_par_list + case symbol_kind::S_coeffs: // coeffs + case symbol_kind::S_coeffs_linear: // coeffs_linear + value.copy< std::vector > (that.value); + break; + + case symbol_kind::S_int_list: // int_list + value.copy< std::vector > (that.value); + break; + + case symbol_kind::S_string_list: // string_list + case symbol_kind::S_ident_list: // ident_list + case symbol_kind::S_annotation_text: // annotation_text + case symbol_kind::S_def_characteristic: // def_characteristic + case symbol_kind::S_function_list: // function_list + case symbol_kind::S_in_measurement: // in_measurement + case symbol_kind::S_loc_measurement: // loc_measurement + case symbol_kind::S_map_list: // map_list + case symbol_kind::S_out_measurement: // out_measurement + case symbol_kind::S_ref_characteristic: // ref_characteristic + case symbol_kind::S_ref_group: // ref_group + case symbol_kind::S_ref_measurement: // ref_measurement + case symbol_kind::S_sub_function: // sub_function + case symbol_kind::S_sub_group: // sub_group + case symbol_kind::S_transformer_in_objects: // transformer_in_objects + case symbol_kind::S_transformer_out_objects: // transformer_out_objects + case symbol_kind::S_virtual: // virtual + case symbol_kind::S_frame_measurement: // frame_measurement + value.copy< std::vector > (that.value); + break; + + case symbol_kind::S_uint_list: // uint_list + case symbol_kind::S_var_address: // var_address + case symbol_kind::S_var_characteristic_attribute: // var_characteristic_attribute + case symbol_kind::S_matrix_dim: // matrix_dim + value.copy< std::vector > (that.value); + break; + + case symbol_kind::S_UINT: // UINT + case symbol_kind::S_HEX: // HEX + case symbol_kind::S_any_uint: // any_uint + case symbol_kind::S_addr_epk: // addr_epk + case symbol_kind::S_alignment_byte: // alignment_byte + case symbol_kind::S_alignment_float16_ieee: // alignment_float16_ieee + case symbol_kind::S_alignment_float32_ieee: // alignment_float32_ieee + case symbol_kind::S_alignment_float64_ieee: // alignment_float64_ieee + case symbol_kind::S_alignment_int64: // alignment_int64 + case symbol_kind::S_alignment_long: // alignment_long + case symbol_kind::S_alignment_word: // alignment_word + case symbol_kind::S_array_size: // array_size + case symbol_kind::S_bit_mask: // bit_mask + case symbol_kind::S_data_size: // data_size + case symbol_kind::S_ecu_address: // ecu_address + case symbol_kind::S_error_mask: // error_mask + case symbol_kind::S_fix_no_axis_pts_x: // fix_no_axis_pts_x + case symbol_kind::S_fix_no_axis_pts_y: // fix_no_axis_pts_y + case symbol_kind::S_fix_no_axis_pts_z: // fix_no_axis_pts_z + case symbol_kind::S_fix_no_axis_pts_4: // fix_no_axis_pts_4 + case symbol_kind::S_fix_no_axis_pts_5: // fix_no_axis_pts_5 + case symbol_kind::S_left_shift: // left_shift + case symbol_kind::S_no_of_interfaces: // no_of_interfaces + case symbol_kind::S_number: // number + case symbol_kind::S_right_shift: // right_shift + value.copy< uint64_t > (that.value); + break; + + default: + break; + } + + return *this; + } + + A2lParser::stack_symbol_type& + A2lParser::stack_symbol_type::operator= (stack_symbol_type& that) + { + state = that.state; + switch (that.kind ()) + { + case symbol_kind::S_address_type: // address_type + value.move< A2lAddressType > (that.value); + break; + + case symbol_kind::S_annotation: // annotation + case symbol_kind::S_annotation_attributes: // annotation_attributes + value.move< A2lAnnotation > (that.value); + break; + + case symbol_kind::S_axis_pts_x: // axis_pts_x + case symbol_kind::S_axis_pts_y: // axis_pts_y + case symbol_kind::S_axis_pts_z: // axis_pts_z + case symbol_kind::S_axis_pts_4: // axis_pts_4 + case symbol_kind::S_axis_pts_5: // axis_pts_5 + value.move< A2lAxisPts > (that.value); + break; + + case symbol_kind::S_axis_rescale_x: // axis_rescale_x + value.move< A2lAxisRescale > (that.value); + break; + + case symbol_kind::S_bit_operation: // bit_operation + value.move< A2lBitOperation > (that.value); + break; + + case symbol_kind::S_byte_order: // byte_order + value.move< A2lByteOrder > (that.value); + break; + + case symbol_kind::S_calibration_access: // calibration_access + value.move< A2lCalibrationAccess > (that.value); + break; + + case symbol_kind::S_calibration_handle: // calibration_handle + value.move< A2lCalibrationHandle > (that.value); + break; + + case symbol_kind::S_calibration_method: // calibration_method + value.move< A2lCalibrationMethod > (that.value); + break; + + case symbol_kind::S_dependent_characteristic: // dependent_characteristic + case symbol_kind::S_virtual_characteristic: // virtual_characteristic + value.move< A2lDependentCharacteristic > (that.value); + break; + + case symbol_kind::S_deposit: // deposit + value.move< A2lDeposit > (that.value); + break; + + case symbol_kind::S_dist_op_x: // dist_op_x + case symbol_kind::S_dist_op_y: // dist_op_y + case symbol_kind::S_dist_op_z: // dist_op_z + case symbol_kind::S_dist_op_4: // dist_op_4 + case symbol_kind::S_dist_op_5: // dist_op_5 + case symbol_kind::S_no_axis_pts_x: // no_axis_pts_x + case symbol_kind::S_no_axis_pts_y: // no_axis_pts_y + case symbol_kind::S_no_axis_pts_z: // no_axis_pts_z + case symbol_kind::S_no_axis_pts_4: // no_axis_pts_4 + case symbol_kind::S_no_axis_pts_5: // no_axis_pts_5 + case symbol_kind::S_no_rescale_x: // no_rescale_x + case symbol_kind::S_offset_x: // offset_x + case symbol_kind::S_offset_y: // offset_y + case symbol_kind::S_offset_z: // offset_z + case symbol_kind::S_offset_4: // offset_4 + case symbol_kind::S_offset_5: // offset_5 + case symbol_kind::S_reserved: // reserved + case symbol_kind::S_rip_addr_w: // rip_addr_w + case symbol_kind::S_rip_addr_x: // rip_addr_x + case symbol_kind::S_rip_addr_y: // rip_addr_y + case symbol_kind::S_rip_addr_z: // rip_addr_z + case symbol_kind::S_rip_addr_4: // rip_addr_4 + case symbol_kind::S_rip_addr_5: // rip_addr_5 + case symbol_kind::S_shift_op_x: // shift_op_x + case symbol_kind::S_shift_op_y: // shift_op_y + case symbol_kind::S_shift_op_z: // shift_op_z + case symbol_kind::S_shift_op_4: // shift_op_4 + case symbol_kind::S_shift_op_5: // shift_op_5 + case symbol_kind::S_src_addr_x: // src_addr_x + case symbol_kind::S_src_addr_y: // src_addr_y + case symbol_kind::S_src_addr_z: // src_addr_z + case symbol_kind::S_src_addr_4: // src_addr_4 + case symbol_kind::S_src_addr_5: // src_addr_5 + value.move< A2lDistOp > (that.value); + break; + + case symbol_kind::S_encoding: // encoding + value.move< A2lEncoding > (that.value); + break; + + case symbol_kind::S_extended_limits: // extended_limits + value.move< A2lExtendedLimits > (that.value); + break; + + case symbol_kind::S_fix_axis_par: // fix_axis_par + value.move< A2lFixAxisPar > (that.value); + break; + + case symbol_kind::S_fix_axis_par_dist: // fix_axis_par_dist + value.move< A2lFixAxisParDist > (that.value); + break; + + case symbol_kind::S_fnc_values: // fnc_values + value.move< A2lFncValue > (that.value); + break; + + case symbol_kind::S_identification: // identification + value.move< A2lIdentification > (that.value); + break; + + case symbol_kind::S_layout: // layout + value.move< A2lLayout > (that.value); + break; + + case symbol_kind::S_limits: // limits + value.move< A2lLimits > (that.value); + break; + + case symbol_kind::S_max_refresh: // max_refresh + value.move< A2lMaxRefresh > (that.value); + break; + + case symbol_kind::S_memory_layout: // memory_layout + value.move< A2lMemoryLayout > (that.value); + break; + + case symbol_kind::S_memory_segment: // memory_segment + value.move< A2lMemorySegment > (that.value); + break; + + case symbol_kind::S_monotony: // monotony + value.move< A2lMonotony > (that.value); + break; + + case symbol_kind::S_prg_type: // prg_type + value.move< A2lSegmentType > (that.value); + break; + + case symbol_kind::S_si_exponents: // si_exponents + value.move< A2lSiExponents > (that.value); + break; + + case symbol_kind::S_symbol_link: // symbol_link + value.move< A2lSymbolLink > (that.value); + break; + + case symbol_kind::S_var_characteristic: // var_characteristic + value.move< A2lVarCharacteristic > (that.value); + break; + + case symbol_kind::S_var_criterion: // var_criterion + value.move< A2lVarCriterion > (that.value); + break; + + case symbol_kind::S_FLOAT: // FLOAT + case symbol_kind::S_any_float: // any_float + case symbol_kind::S_default_value_numeric: // default_value_numeric + case symbol_kind::S_max_grad: // max_grad + case symbol_kind::S_step_size: // step_size + value.move< double > (that.value); + break; + + case symbol_kind::S_INT: // INT + case symbol_kind::S_any_int: // any_int + case symbol_kind::S_ecu_address_extension: // ecu_address_extension + case symbol_kind::S_ecu_calibration_offset: // ecu_calibration_offset + value.move< int64_t > (that.value); + break; + + case symbol_kind::S_float_pair_list: // float_pair_list + value.move< std::map > (that.value); + break; + + case symbol_kind::S_float_string_list: // float_string_list + value.move< std::map > (that.value); + break; + + case symbol_kind::S_float_range_list: // float_range_list + value.move< std::map, std::string> > (that.value); + break; + + case symbol_kind::S_key_value_list: // key_value_list + case symbol_kind::S_memory_layout_attributes: // memory_layout_attributes + case symbol_kind::S_memory_segment_attributes: // memory_segment_attributes + case symbol_kind::S_var_forbidden_comb: // var_forbidden_comb + value.move< std::map > (that.value); + break; + + case symbol_kind::S_unit_conversion: // unit_conversion + value.move< std::pair > (that.value); + break; + + case symbol_kind::S_formula: // formula + case symbol_kind::S_system_constant: // system_constant + value.move< std::pair > (that.value); + break; + + case symbol_kind::S_IDENT: // IDENT + case symbol_kind::S_STRING: // STRING + case symbol_kind::S_A2ML: // A2ML + case symbol_kind::S_IF_DATA: // IF_DATA + case symbol_kind::S_ar_component_attribute: // ar_component_attribute + case symbol_kind::S_calibration_handle_attribute: // calibration_handle_attribute + case symbol_kind::S_formula_attribute: // formula_attribute + case symbol_kind::S_a2ml: // a2ml + case symbol_kind::S_annotation_label: // annotation_label + case symbol_kind::S_annotation_origin: // annotation_origin + case symbol_kind::S_ar_prototype_of: // ar_prototype_of + case symbol_kind::S_axis_pts_ref: // axis_pts_ref + case symbol_kind::S_calibration_handle_text: // calibration_handle_text + case symbol_kind::S_comparison_quantity: // comparison_quantity + case symbol_kind::S_compu_tab_ref: // compu_tab_ref + case symbol_kind::S_conversion: // conversion + case symbol_kind::S_cpu_type: // cpu_type + case symbol_kind::S_curve_axis_ref: // curve_axis_ref + case symbol_kind::S_customer: // customer + case symbol_kind::S_customer_no: // customer_no + case symbol_kind::S_default_value: // default_value + case symbol_kind::S_display_identifier: // display_identifier + case symbol_kind::S_ecu: // ecu + case symbol_kind::S_epk: // epk + case symbol_kind::S_format: // format + case symbol_kind::S_formula_inv: // formula_inv + case symbol_kind::S_function_version: // function_version + case symbol_kind::S_if_data: // if_data + case symbol_kind::S_input_quantity: // input_quantity + case symbol_kind::S_model_link: // model_link + case symbol_kind::S_phone_no: // phone_no + case symbol_kind::S_phys_unit: // phys_unit + case symbol_kind::S_proj_no: // proj_no + case symbol_kind::S_project_no: // project_no + case symbol_kind::S_ref_memory_segment: // ref_memory_segment + case symbol_kind::S_ref_unit: // ref_unit + case symbol_kind::S_status_string_ref: // status_string_ref + case symbol_kind::S_supplier: // supplier + case symbol_kind::S_symbol_type_link: // symbol_type_link + case symbol_kind::S_user: // user + case symbol_kind::S_var_measurement: // var_measurement + case symbol_kind::S_var_naming: // var_naming + case symbol_kind::S_var_selection_characteristic: // var_selection_characteristic + case symbol_kind::S_var_separator: // var_separator + case symbol_kind::S_version: // version + value.move< std::string > (that.value); + break; + + case symbol_kind::S_calibration_method_attributes: // calibration_method_attributes + value.move< std::vector > (that.value); + break; + + case symbol_kind::S_float_list: // float_list + case symbol_kind::S_fix_axis_par_list: // fix_axis_par_list + case symbol_kind::S_coeffs: // coeffs + case symbol_kind::S_coeffs_linear: // coeffs_linear + value.move< std::vector > (that.value); + break; + + case symbol_kind::S_int_list: // int_list + value.move< std::vector > (that.value); + break; + + case symbol_kind::S_string_list: // string_list + case symbol_kind::S_ident_list: // ident_list + case symbol_kind::S_annotation_text: // annotation_text + case symbol_kind::S_def_characteristic: // def_characteristic + case symbol_kind::S_function_list: // function_list + case symbol_kind::S_in_measurement: // in_measurement + case symbol_kind::S_loc_measurement: // loc_measurement + case symbol_kind::S_map_list: // map_list + case symbol_kind::S_out_measurement: // out_measurement + case symbol_kind::S_ref_characteristic: // ref_characteristic + case symbol_kind::S_ref_group: // ref_group + case symbol_kind::S_ref_measurement: // ref_measurement + case symbol_kind::S_sub_function: // sub_function + case symbol_kind::S_sub_group: // sub_group + case symbol_kind::S_transformer_in_objects: // transformer_in_objects + case symbol_kind::S_transformer_out_objects: // transformer_out_objects + case symbol_kind::S_virtual: // virtual + case symbol_kind::S_frame_measurement: // frame_measurement + value.move< std::vector > (that.value); + break; + + case symbol_kind::S_uint_list: // uint_list + case symbol_kind::S_var_address: // var_address + case symbol_kind::S_var_characteristic_attribute: // var_characteristic_attribute + case symbol_kind::S_matrix_dim: // matrix_dim + value.move< std::vector > (that.value); + break; + + case symbol_kind::S_UINT: // UINT + case symbol_kind::S_HEX: // HEX + case symbol_kind::S_any_uint: // any_uint + case symbol_kind::S_addr_epk: // addr_epk + case symbol_kind::S_alignment_byte: // alignment_byte + case symbol_kind::S_alignment_float16_ieee: // alignment_float16_ieee + case symbol_kind::S_alignment_float32_ieee: // alignment_float32_ieee + case symbol_kind::S_alignment_float64_ieee: // alignment_float64_ieee + case symbol_kind::S_alignment_int64: // alignment_int64 + case symbol_kind::S_alignment_long: // alignment_long + case symbol_kind::S_alignment_word: // alignment_word + case symbol_kind::S_array_size: // array_size + case symbol_kind::S_bit_mask: // bit_mask + case symbol_kind::S_data_size: // data_size + case symbol_kind::S_ecu_address: // ecu_address + case symbol_kind::S_error_mask: // error_mask + case symbol_kind::S_fix_no_axis_pts_x: // fix_no_axis_pts_x + case symbol_kind::S_fix_no_axis_pts_y: // fix_no_axis_pts_y + case symbol_kind::S_fix_no_axis_pts_z: // fix_no_axis_pts_z + case symbol_kind::S_fix_no_axis_pts_4: // fix_no_axis_pts_4 + case symbol_kind::S_fix_no_axis_pts_5: // fix_no_axis_pts_5 + case symbol_kind::S_left_shift: // left_shift + case symbol_kind::S_no_of_interfaces: // no_of_interfaces + case symbol_kind::S_number: // number + case symbol_kind::S_right_shift: // right_shift + value.move< uint64_t > (that.value); + break; + + default: + break; + } + + // that is emptied. + that.state = empty_state; + return *this; + } +#endif + + template + void + A2lParser::yy_destroy_ (const char* yymsg, basic_symbol& yysym) const + { + if (yymsg) + YY_SYMBOL_PRINT (yymsg, yysym); + } + +#if A2LDEBUG + template + void + A2lParser::yy_print_ (std::ostream& yyo, const basic_symbol& yysym) const + { + std::ostream& yyoutput = yyo; + YY_USE (yyoutput); + if (yysym.empty ()) + yyo << "empty symbol"; + else + { + symbol_kind_type yykind = yysym.kind (); + yyo << (yykind < YYNTOKENS ? "token" : "nterm") + << ' ' << yysym.name () << " ("; + YY_USE (yykind); + yyo << ')'; + } + } +#endif + + void + A2lParser::yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym) + { + if (m) + YY_SYMBOL_PRINT (m, sym); + yystack_.push (YY_MOVE (sym)); + } + + void + A2lParser::yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym) + { +#if 201103L <= YY_CPLUSPLUS + yypush_ (m, stack_symbol_type (s, std::move (sym))); +#else + stack_symbol_type ss (s, sym); + yypush_ (m, ss); +#endif + } + + void + A2lParser::yypop_ (int n) YY_NOEXCEPT + { + yystack_.pop (n); + } + +#if A2LDEBUG + std::ostream& + A2lParser::debug_stream () const + { + return *yycdebug_; + } + + void + A2lParser::set_debug_stream (std::ostream& o) + { + yycdebug_ = &o; + } + + + A2lParser::debug_level_type + A2lParser::debug_level () const + { + return yydebug_; + } + + void + A2lParser::set_debug_level (debug_level_type l) + { + yydebug_ = l; + } +#endif // A2LDEBUG + + A2lParser::state_type + A2lParser::yy_lr_goto_state_ (state_type yystate, int yysym) + { + int yyr = yypgoto_[yysym - YYNTOKENS] + yystate; + if (0 <= yyr && yyr <= yylast_ && yycheck_[yyr] == yystate) + return yytable_[yyr]; + else + return yydefgoto_[yysym - YYNTOKENS]; + } + + bool + A2lParser::yy_pact_value_is_default_ (int yyvalue) YY_NOEXCEPT + { + return yyvalue == yypact_ninf_; + } + + bool + A2lParser::yy_table_value_is_error_ (int yyvalue) YY_NOEXCEPT + { + return yyvalue == yytable_ninf_; + } + + int + A2lParser::operator() () + { + return parse (); + } + + int + A2lParser::parse () + { + int yyn; + /// Length of the RHS of the rule being reduced. + int yylen = 0; + + // Error handling. + int yynerrs_ = 0; + int yyerrstatus_ = 0; + + /// The lookahead symbol. + symbol_type yyla; + + /// The return value of parse (). + int yyresult; + +#if YY_EXCEPTIONS + try +#endif // YY_EXCEPTIONS + { + YYCDEBUG << "Starting parse\n"; + + + /* Initialize the stack. The initial state will be set in + yynewstate, since the latter expects the semantical and the + location values to have been already stored, initialize these + stacks with a primary value. */ + yystack_.clear (); + yypush_ (YY_NULLPTR, 0, YY_MOVE (yyla)); + + /*-----------------------------------------------. + | yynewstate -- push a new symbol on the stack. | + `-----------------------------------------------*/ + yynewstate: + YYCDEBUG << "Entering state " << int (yystack_[0].state) << '\n'; + YY_STACK_PRINT (); + + // Accept? + if (yystack_[0].state == yyfinal_) + YYACCEPT; + + goto yybackup; + + + /*-----------. + | yybackup. | + `-----------*/ + yybackup: + // Try to take a decision without lookahead. + yyn = yypact_[+yystack_[0].state]; + if (yy_pact_value_is_default_ (yyn)) + goto yydefault; + + // Read a lookahead token. + if (yyla.empty ()) + { + YYCDEBUG << "Reading a token\n"; +#if YY_EXCEPTIONS + try +#endif // YY_EXCEPTIONS + { + yyla.kind_ = yytranslate_ (yylex (&yyla.value)); + } +#if YY_EXCEPTIONS + catch (const syntax_error& yyexc) + { + YYCDEBUG << "Caught exception: " << yyexc.what() << '\n'; + error (yyexc); + goto yyerrlab1; + } +#endif // YY_EXCEPTIONS + } + YY_SYMBOL_PRINT ("Next token is", yyla); + + if (yyla.kind () == symbol_kind::S_YYerror) + { + // The scanner already issued an error message, process directly + // to error recovery. But do not keep the error token as + // lookahead, it is too special and may lead us to an endless + // loop in error recovery. */ + yyla.kind_ = symbol_kind::S_YYUNDEF; + goto yyerrlab1; + } + + /* If the proper action on seeing token YYLA.TYPE is to reduce or + to detect an error, take that action. */ + yyn += yyla.kind (); + if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.kind ()) + { + goto yydefault; + } + + // Reduce or error. + yyn = yytable_[yyn]; + if (yyn <= 0) + { + if (yy_table_value_is_error_ (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + // Count tokens shifted since error; after three, turn off error status. + if (yyerrstatus_) + --yyerrstatus_; + + // Shift the lookahead token. + yypush_ ("Shifting", state_type (yyn), YY_MOVE (yyla)); + goto yynewstate; + + + /*-----------------------------------------------------------. + | yydefault -- do the default action for the current state. | + `-----------------------------------------------------------*/ + yydefault: + yyn = yydefact_[+yystack_[0].state]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + + /*-----------------------------. + | yyreduce -- do a reduction. | + `-----------------------------*/ + yyreduce: + yylen = yyr2_[yyn]; + { + stack_symbol_type yylhs; + yylhs.state = yy_lr_goto_state_ (yystack_[yylen].state, yyr1_[yyn]); + /* Variants are always initialized to an empty instance of the + correct type. The default '$$ = $1' action is NOT applied + when using variants. */ + switch (yyr1_[yyn]) + { + case symbol_kind::S_address_type: // address_type + yylhs.value.emplace< A2lAddressType > (); + break; + + case symbol_kind::S_annotation: // annotation + case symbol_kind::S_annotation_attributes: // annotation_attributes + yylhs.value.emplace< A2lAnnotation > (); + break; + + case symbol_kind::S_axis_pts_x: // axis_pts_x + case symbol_kind::S_axis_pts_y: // axis_pts_y + case symbol_kind::S_axis_pts_z: // axis_pts_z + case symbol_kind::S_axis_pts_4: // axis_pts_4 + case symbol_kind::S_axis_pts_5: // axis_pts_5 + yylhs.value.emplace< A2lAxisPts > (); + break; + + case symbol_kind::S_axis_rescale_x: // axis_rescale_x + yylhs.value.emplace< A2lAxisRescale > (); + break; + + case symbol_kind::S_bit_operation: // bit_operation + yylhs.value.emplace< A2lBitOperation > (); + break; + + case symbol_kind::S_byte_order: // byte_order + yylhs.value.emplace< A2lByteOrder > (); + break; + + case symbol_kind::S_calibration_access: // calibration_access + yylhs.value.emplace< A2lCalibrationAccess > (); + break; + + case symbol_kind::S_calibration_handle: // calibration_handle + yylhs.value.emplace< A2lCalibrationHandle > (); + break; + + case symbol_kind::S_calibration_method: // calibration_method + yylhs.value.emplace< A2lCalibrationMethod > (); + break; + + case symbol_kind::S_dependent_characteristic: // dependent_characteristic + case symbol_kind::S_virtual_characteristic: // virtual_characteristic + yylhs.value.emplace< A2lDependentCharacteristic > (); + break; + + case symbol_kind::S_deposit: // deposit + yylhs.value.emplace< A2lDeposit > (); + break; + + case symbol_kind::S_dist_op_x: // dist_op_x + case symbol_kind::S_dist_op_y: // dist_op_y + case symbol_kind::S_dist_op_z: // dist_op_z + case symbol_kind::S_dist_op_4: // dist_op_4 + case symbol_kind::S_dist_op_5: // dist_op_5 + case symbol_kind::S_no_axis_pts_x: // no_axis_pts_x + case symbol_kind::S_no_axis_pts_y: // no_axis_pts_y + case symbol_kind::S_no_axis_pts_z: // no_axis_pts_z + case symbol_kind::S_no_axis_pts_4: // no_axis_pts_4 + case symbol_kind::S_no_axis_pts_5: // no_axis_pts_5 + case symbol_kind::S_no_rescale_x: // no_rescale_x + case symbol_kind::S_offset_x: // offset_x + case symbol_kind::S_offset_y: // offset_y + case symbol_kind::S_offset_z: // offset_z + case symbol_kind::S_offset_4: // offset_4 + case symbol_kind::S_offset_5: // offset_5 + case symbol_kind::S_reserved: // reserved + case symbol_kind::S_rip_addr_w: // rip_addr_w + case symbol_kind::S_rip_addr_x: // rip_addr_x + case symbol_kind::S_rip_addr_y: // rip_addr_y + case symbol_kind::S_rip_addr_z: // rip_addr_z + case symbol_kind::S_rip_addr_4: // rip_addr_4 + case symbol_kind::S_rip_addr_5: // rip_addr_5 + case symbol_kind::S_shift_op_x: // shift_op_x + case symbol_kind::S_shift_op_y: // shift_op_y + case symbol_kind::S_shift_op_z: // shift_op_z + case symbol_kind::S_shift_op_4: // shift_op_4 + case symbol_kind::S_shift_op_5: // shift_op_5 + case symbol_kind::S_src_addr_x: // src_addr_x + case symbol_kind::S_src_addr_y: // src_addr_y + case symbol_kind::S_src_addr_z: // src_addr_z + case symbol_kind::S_src_addr_4: // src_addr_4 + case symbol_kind::S_src_addr_5: // src_addr_5 + yylhs.value.emplace< A2lDistOp > (); + break; + + case symbol_kind::S_encoding: // encoding + yylhs.value.emplace< A2lEncoding > (); + break; + + case symbol_kind::S_extended_limits: // extended_limits + yylhs.value.emplace< A2lExtendedLimits > (); + break; + + case symbol_kind::S_fix_axis_par: // fix_axis_par + yylhs.value.emplace< A2lFixAxisPar > (); + break; + + case symbol_kind::S_fix_axis_par_dist: // fix_axis_par_dist + yylhs.value.emplace< A2lFixAxisParDist > (); + break; + + case symbol_kind::S_fnc_values: // fnc_values + yylhs.value.emplace< A2lFncValue > (); + break; + + case symbol_kind::S_identification: // identification + yylhs.value.emplace< A2lIdentification > (); + break; + + case symbol_kind::S_layout: // layout + yylhs.value.emplace< A2lLayout > (); + break; + + case symbol_kind::S_limits: // limits + yylhs.value.emplace< A2lLimits > (); + break; + + case symbol_kind::S_max_refresh: // max_refresh + yylhs.value.emplace< A2lMaxRefresh > (); + break; + + case symbol_kind::S_memory_layout: // memory_layout + yylhs.value.emplace< A2lMemoryLayout > (); + break; + + case symbol_kind::S_memory_segment: // memory_segment + yylhs.value.emplace< A2lMemorySegment > (); + break; + + case symbol_kind::S_monotony: // monotony + yylhs.value.emplace< A2lMonotony > (); + break; + + case symbol_kind::S_prg_type: // prg_type + yylhs.value.emplace< A2lSegmentType > (); + break; + + case symbol_kind::S_si_exponents: // si_exponents + yylhs.value.emplace< A2lSiExponents > (); + break; + + case symbol_kind::S_symbol_link: // symbol_link + yylhs.value.emplace< A2lSymbolLink > (); + break; + + case symbol_kind::S_var_characteristic: // var_characteristic + yylhs.value.emplace< A2lVarCharacteristic > (); + break; + + case symbol_kind::S_var_criterion: // var_criterion + yylhs.value.emplace< A2lVarCriterion > (); + break; + + case symbol_kind::S_FLOAT: // FLOAT + case symbol_kind::S_any_float: // any_float + case symbol_kind::S_default_value_numeric: // default_value_numeric + case symbol_kind::S_max_grad: // max_grad + case symbol_kind::S_step_size: // step_size + yylhs.value.emplace< double > (); + break; + + case symbol_kind::S_INT: // INT + case symbol_kind::S_any_int: // any_int + case symbol_kind::S_ecu_address_extension: // ecu_address_extension + case symbol_kind::S_ecu_calibration_offset: // ecu_calibration_offset + yylhs.value.emplace< int64_t > (); + break; + + case symbol_kind::S_float_pair_list: // float_pair_list + yylhs.value.emplace< std::map > (); + break; + + case symbol_kind::S_float_string_list: // float_string_list + yylhs.value.emplace< std::map > (); + break; + + case symbol_kind::S_float_range_list: // float_range_list + yylhs.value.emplace< std::map, std::string> > (); + break; + + case symbol_kind::S_key_value_list: // key_value_list + case symbol_kind::S_memory_layout_attributes: // memory_layout_attributes + case symbol_kind::S_memory_segment_attributes: // memory_segment_attributes + case symbol_kind::S_var_forbidden_comb: // var_forbidden_comb + yylhs.value.emplace< std::map > (); + break; + + case symbol_kind::S_unit_conversion: // unit_conversion + yylhs.value.emplace< std::pair > (); + break; + + case symbol_kind::S_formula: // formula + case symbol_kind::S_system_constant: // system_constant + yylhs.value.emplace< std::pair > (); + break; + + case symbol_kind::S_IDENT: // IDENT + case symbol_kind::S_STRING: // STRING + case symbol_kind::S_A2ML: // A2ML + case symbol_kind::S_IF_DATA: // IF_DATA + case symbol_kind::S_ar_component_attribute: // ar_component_attribute + case symbol_kind::S_calibration_handle_attribute: // calibration_handle_attribute + case symbol_kind::S_formula_attribute: // formula_attribute + case symbol_kind::S_a2ml: // a2ml + case symbol_kind::S_annotation_label: // annotation_label + case symbol_kind::S_annotation_origin: // annotation_origin + case symbol_kind::S_ar_prototype_of: // ar_prototype_of + case symbol_kind::S_axis_pts_ref: // axis_pts_ref + case symbol_kind::S_calibration_handle_text: // calibration_handle_text + case symbol_kind::S_comparison_quantity: // comparison_quantity + case symbol_kind::S_compu_tab_ref: // compu_tab_ref + case symbol_kind::S_conversion: // conversion + case symbol_kind::S_cpu_type: // cpu_type + case symbol_kind::S_curve_axis_ref: // curve_axis_ref + case symbol_kind::S_customer: // customer + case symbol_kind::S_customer_no: // customer_no + case symbol_kind::S_default_value: // default_value + case symbol_kind::S_display_identifier: // display_identifier + case symbol_kind::S_ecu: // ecu + case symbol_kind::S_epk: // epk + case symbol_kind::S_format: // format + case symbol_kind::S_formula_inv: // formula_inv + case symbol_kind::S_function_version: // function_version + case symbol_kind::S_if_data: // if_data + case symbol_kind::S_input_quantity: // input_quantity + case symbol_kind::S_model_link: // model_link + case symbol_kind::S_phone_no: // phone_no + case symbol_kind::S_phys_unit: // phys_unit + case symbol_kind::S_proj_no: // proj_no + case symbol_kind::S_project_no: // project_no + case symbol_kind::S_ref_memory_segment: // ref_memory_segment + case symbol_kind::S_ref_unit: // ref_unit + case symbol_kind::S_status_string_ref: // status_string_ref + case symbol_kind::S_supplier: // supplier + case symbol_kind::S_symbol_type_link: // symbol_type_link + case symbol_kind::S_user: // user + case symbol_kind::S_var_measurement: // var_measurement + case symbol_kind::S_var_naming: // var_naming + case symbol_kind::S_var_selection_characteristic: // var_selection_characteristic + case symbol_kind::S_var_separator: // var_separator + case symbol_kind::S_version: // version + yylhs.value.emplace< std::string > (); + break; + + case symbol_kind::S_calibration_method_attributes: // calibration_method_attributes + yylhs.value.emplace< std::vector > (); + break; + + case symbol_kind::S_float_list: // float_list + case symbol_kind::S_fix_axis_par_list: // fix_axis_par_list + case symbol_kind::S_coeffs: // coeffs + case symbol_kind::S_coeffs_linear: // coeffs_linear + yylhs.value.emplace< std::vector > (); + break; + + case symbol_kind::S_int_list: // int_list + yylhs.value.emplace< std::vector > (); + break; + + case symbol_kind::S_string_list: // string_list + case symbol_kind::S_ident_list: // ident_list + case symbol_kind::S_annotation_text: // annotation_text + case symbol_kind::S_def_characteristic: // def_characteristic + case symbol_kind::S_function_list: // function_list + case symbol_kind::S_in_measurement: // in_measurement + case symbol_kind::S_loc_measurement: // loc_measurement + case symbol_kind::S_map_list: // map_list + case symbol_kind::S_out_measurement: // out_measurement + case symbol_kind::S_ref_characteristic: // ref_characteristic + case symbol_kind::S_ref_group: // ref_group + case symbol_kind::S_ref_measurement: // ref_measurement + case symbol_kind::S_sub_function: // sub_function + case symbol_kind::S_sub_group: // sub_group + case symbol_kind::S_transformer_in_objects: // transformer_in_objects + case symbol_kind::S_transformer_out_objects: // transformer_out_objects + case symbol_kind::S_virtual: // virtual + case symbol_kind::S_frame_measurement: // frame_measurement + yylhs.value.emplace< std::vector > (); + break; + + case symbol_kind::S_uint_list: // uint_list + case symbol_kind::S_var_address: // var_address + case symbol_kind::S_var_characteristic_attribute: // var_characteristic_attribute + case symbol_kind::S_matrix_dim: // matrix_dim + yylhs.value.emplace< std::vector > (); + break; + + case symbol_kind::S_UINT: // UINT + case symbol_kind::S_HEX: // HEX + case symbol_kind::S_any_uint: // any_uint + case symbol_kind::S_addr_epk: // addr_epk + case symbol_kind::S_alignment_byte: // alignment_byte + case symbol_kind::S_alignment_float16_ieee: // alignment_float16_ieee + case symbol_kind::S_alignment_float32_ieee: // alignment_float32_ieee + case symbol_kind::S_alignment_float64_ieee: // alignment_float64_ieee + case symbol_kind::S_alignment_int64: // alignment_int64 + case symbol_kind::S_alignment_long: // alignment_long + case symbol_kind::S_alignment_word: // alignment_word + case symbol_kind::S_array_size: // array_size + case symbol_kind::S_bit_mask: // bit_mask + case symbol_kind::S_data_size: // data_size + case symbol_kind::S_ecu_address: // ecu_address + case symbol_kind::S_error_mask: // error_mask + case symbol_kind::S_fix_no_axis_pts_x: // fix_no_axis_pts_x + case symbol_kind::S_fix_no_axis_pts_y: // fix_no_axis_pts_y + case symbol_kind::S_fix_no_axis_pts_z: // fix_no_axis_pts_z + case symbol_kind::S_fix_no_axis_pts_4: // fix_no_axis_pts_4 + case symbol_kind::S_fix_no_axis_pts_5: // fix_no_axis_pts_5 + case symbol_kind::S_left_shift: // left_shift + case symbol_kind::S_no_of_interfaces: // no_of_interfaces + case symbol_kind::S_number: // number + case symbol_kind::S_right_shift: // right_shift + yylhs.value.emplace< uint64_t > (); + break; + + default: + break; + } + + + + // Perform the reduction. + YY_REDUCE_PRINT (yyn); +#if YY_EXCEPTIONS + try +#endif // YY_EXCEPTIONS + { + switch (yyn) + { + case 2: // any_uint: UINT +#line 433 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < uint64_t > () = yystack_[0].value.as < uint64_t > (); } +#line 2822 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 3: // any_uint: HEX +#line 434 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < uint64_t > () = yystack_[0].value.as < uint64_t > (); } +#line 2828 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 4: // any_int: INT +#line 436 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < int64_t > () = yystack_[0].value.as < int64_t > (); } +#line 2834 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 5: // any_int: UINT +#line 437 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < int64_t > () = static_cast(yystack_[0].value.as < uint64_t > ()); } +#line 2840 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 6: // any_int: HEX +#line 438 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < int64_t > () = static_cast(yystack_[0].value.as < uint64_t > ()); } +#line 2846 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 7: // any_float: FLOAT +#line 440 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < double > () = yystack_[0].value.as < double > (); } +#line 2852 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 8: // any_float: INT +#line 441 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < double > () = static_cast(yystack_[0].value.as < int64_t > ()); } +#line 2858 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 9: // any_float: UINT +#line 442 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < double > () = static_cast(yystack_[0].value.as < uint64_t > ()); } +#line 2864 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 10: // any_float: HEX +#line 443 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < double > () = static_cast(yystack_[0].value.as < uint64_t > ()); } +#line 2870 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 11: // int_list: %empty +#line 445 "D:/projects/a2llib/src/a2lparser.y" + {} +#line 2876 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 12: // int_list: int_list any_int +#line 446 "D:/projects/a2llib/src/a2lparser.y" + {yylhs.value.as < std::vector > () = yystack_[1].value.as < std::vector > (); yylhs.value.as < std::vector > ().emplace_back(yystack_[0].value.as < int64_t > ()); } +#line 2882 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 13: // uint_list: %empty +#line 448 "D:/projects/a2llib/src/a2lparser.y" + {} +#line 2888 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 14: // uint_list: uint_list any_uint +#line 449 "D:/projects/a2llib/src/a2lparser.y" + {yylhs.value.as < std::vector > () = yystack_[1].value.as < std::vector > (); yylhs.value.as < std::vector > ().emplace_back(yystack_[0].value.as < uint64_t > ()); } +#line 2894 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 15: // float_list: %empty +#line 451 "D:/projects/a2llib/src/a2lparser.y" + {} +#line 2900 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 16: // float_list: float_list any_float +#line 452 "D:/projects/a2llib/src/a2lparser.y" + {yylhs.value.as < std::vector > () = yystack_[1].value.as < std::vector > (); yylhs.value.as < std::vector > ().emplace_back(yystack_[0].value.as < double > ()); } +#line 2906 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 17: // float_pair_list: %empty +#line 454 "D:/projects/a2llib/src/a2lparser.y" + {} +#line 2912 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 18: // float_pair_list: float_pair_list any_float any_float +#line 455 "D:/projects/a2llib/src/a2lparser.y" + {yylhs.value.as < std::map > () = yystack_[2].value.as < std::map > (); yylhs.value.as < std::map > ().emplace(yystack_[1].value.as < double > (),yystack_[0].value.as < double > ()); } +#line 2918 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 19: // float_string_list: %empty +#line 457 "D:/projects/a2llib/src/a2lparser.y" + {} +#line 2924 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 20: // float_string_list: float_string_list any_float STRING +#line 458 "D:/projects/a2llib/src/a2lparser.y" + {yylhs.value.as < std::map > () = yystack_[2].value.as < std::map > (); yylhs.value.as < std::map > ().emplace(yystack_[1].value.as < double > (),yystack_[0].value.as < std::string > ()); } +#line 2930 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 21: // float_range_list: %empty +#line 460 "D:/projects/a2llib/src/a2lparser.y" + {} +#line 2936 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 22: // float_range_list: float_range_list any_float any_float STRING +#line 461 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < std::map, std::string> > () = yystack_[3].value.as < std::map, std::string> > (); + yylhs.value.as < std::map, std::string> > ().emplace(std::pair(yystack_[2].value.as < double > (),yystack_[1].value.as < double > ()),yystack_[0].value.as < std::string > ()); } +#line 2944 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 23: // string_list: %empty +#line 465 "D:/projects/a2llib/src/a2lparser.y" + {} +#line 2950 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 24: // string_list: string_list STRING +#line 466 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::vector > () = yystack_[1].value.as < std::vector > (); } +#line 2956 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 25: // ident_list: %empty +#line 468 "D:/projects/a2llib/src/a2lparser.y" + {} +#line 2962 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 26: // ident_list: ident_list IDENT +#line 469 "D:/projects/a2llib/src/a2lparser.y" + {yylhs.value.as < std::vector > () = yystack_[1].value.as < std::vector > (); yylhs.value.as < std::vector > ().emplace_back(yystack_[0].value.as < std::string > ()); } +#line 2968 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 27: // key_value_list: %empty +#line 471 "D:/projects/a2llib/src/a2lparser.y" + {} +#line 2974 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 28: // key_value_list: key_value_list IDENT IDENT +#line 472 "D:/projects/a2llib/src/a2lparser.y" + {yylhs.value.as < std::map > () = yystack_[2].value.as < std::map > (); yylhs.value.as < std::map > ().emplace(yystack_[1].value.as < std::string > (),yystack_[0].value.as < std::string > ()); } +#line 2980 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 33: // annotation: A2L_BEGIN ANNOTATION annotation_attributes A2L_END ANNOTATION +#line 480 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < A2lAnnotation > () = yystack_[2].value.as < A2lAnnotation > ();} +#line 2986 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 34: // annotation_attributes: %empty +#line 481 "D:/projects/a2llib/src/a2lparser.y" + {} +#line 2992 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 35: // annotation_attributes: annotation_attributes annotation_label +#line 482 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < A2lAnnotation > () = yystack_[1].value.as < A2lAnnotation > (); yylhs.value.as < A2lAnnotation > ().Label = yystack_[0].value.as < std::string > ();} +#line 2998 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 36: // annotation_attributes: annotation_attributes annotation_origin +#line 483 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < A2lAnnotation > () = yystack_[1].value.as < A2lAnnotation > (); yylhs.value.as < A2lAnnotation > ().Origin = yystack_[0].value.as < std::string > ();} +#line 3004 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 37: // annotation_attributes: annotation_attributes annotation_text +#line 484 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < A2lAnnotation > () = yystack_[1].value.as < A2lAnnotation > (); yylhs.value.as < A2lAnnotation > ().Text = yystack_[0].value.as < std::vector > ();} +#line 3010 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 38: // annotation_text: A2L_BEGIN ANNOTATION_TEXT string_list A2L_END ANNOTATION_TEXT +#line 486 "D:/projects/a2llib/src/a2lparser.y" + {yylhs.value.as < std::vector > () = yystack_[2].value.as < std::vector > ();} +#line 3016 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 39: // ar_component: A2L_BEGIN AR_COMPONENT STRING ar_component_attribute A2L_END AR_COMPONENT +#line 488 "D:/projects/a2llib/src/a2lparser.y" + { + auto& func = scanner.CurrentFunction(); + func.ComponentType(yystack_[3].value.as < std::string > ()); + func.PrototypeOf(yystack_[2].value.as < std::string > ()); + } +#line 3026 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 40: // ar_component_attribute: %empty +#line 493 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = std::string(); } +#line 3032 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 41: // ar_component_attribute: ar_prototype_of +#line 494 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 3038 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 42: // axis_descr: A2L_BEGIN AXIS_DESCR IDENT IDENT IDENT any_uint any_float any_float axis_descr_attributes A2L_END AXIS_DESCR +#line 497 "D:/projects/a2llib/src/a2lparser.y" + { + auto& descr = scanner.CurrentAxisDescr(); + descr.AxisType(StringToAxisType(yystack_[8].value.as < std::string > ())); + descr.InputQuantity(yystack_[7].value.as < std::string > ()); + descr.Conversion(yystack_[6].value.as < std::string > ()); + descr.MaxAxisPoints(yystack_[5].value.as < uint64_t > ()); + descr.LowerLimit(yystack_[4].value.as < double > ()); + descr.UpperLimit(yystack_[3].value.as < double > ()); + } +#line 3052 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 45: // axis_descr_attribute: annotation +#line 508 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisDescr().AddAnnotation(yystack_[0].value.as < A2lAnnotation > ()); } +#line 3058 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 46: // axis_descr_attribute: axis_pts_ref +#line 509 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisDescr().AxisPtsRef(yystack_[0].value.as < std::string > ()); } +#line 3064 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 47: // axis_descr_attribute: byte_order +#line 510 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisDescr().ByteOrder(yystack_[0].value.as < A2lByteOrder > ()); } +#line 3070 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 48: // axis_descr_attribute: curve_axis_ref +#line 511 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisDescr().CurveAxisRef(yystack_[0].value.as < std::string > ()); } +#line 3076 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 49: // axis_descr_attribute: deposit +#line 512 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisDescr().Deposit(yystack_[0].value.as < A2lDeposit > ()); } +#line 3082 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 50: // axis_descr_attribute: extended_limits +#line 513 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisDescr().ExtendedLimits(yystack_[0].value.as < A2lExtendedLimits > ()); } +#line 3088 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 51: // axis_descr_attribute: fix_axis_par +#line 514 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisDescr().FixAxisPar(yystack_[0].value.as < A2lFixAxisPar > ()); } +#line 3094 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 52: // axis_descr_attribute: fix_axis_par_dist +#line 515 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisDescr().FixAxisParDist(yystack_[0].value.as < A2lFixAxisParDist > ()); } +#line 3100 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 53: // axis_descr_attribute: fix_axis_par_list +#line 516 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisDescr().FixAxisParList(yystack_[0].value.as < std::vector > ()); } +#line 3106 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 54: // axis_descr_attribute: format +#line 517 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisDescr().Format(yystack_[0].value.as < std::string > ()); } +#line 3112 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 55: // axis_descr_attribute: max_grad +#line 518 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisDescr().MaxGradient(yystack_[0].value.as < double > ()); } +#line 3118 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 56: // axis_descr_attribute: monotony +#line 519 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisDescr().Monotony(yystack_[0].value.as < A2lMonotony > ()); } +#line 3124 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 57: // axis_descr_attribute: phys_unit +#line 520 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisDescr().PhysUnit(yystack_[0].value.as < std::string > ()); } +#line 3130 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 58: // axis_descr_attribute: read_only +#line 521 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisDescr().ReadOnly(true); } +#line 3136 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 59: // axis_descr_attribute: step_size +#line 522 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisDescr().StepSize(yystack_[0].value.as < double > ()); } +#line 3142 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 60: // axis_pts: A2L_BEGIN AXIS_PTS IDENT STRING any_uint IDENT IDENT any_float IDENT any_uint any_float any_float axis_pts_attributes A2L_END AXIS_PTS +#line 525 "D:/projects/a2llib/src/a2lparser.y" + { + auto& pts = scanner.CurrentAxisPts(); + pts.Name(yystack_[12].value.as < std::string > ()); + pts.Description(yystack_[11].value.as < std::string > ()); + pts.Address(yystack_[10].value.as < uint64_t > ()); + pts.InputQuantity(yystack_[9].value.as < std::string > ()); + pts.RefRecord(yystack_[8].value.as < std::string > ()); + pts.MaxDiff(yystack_[7].value.as < double > ()); + pts.Conversion(yystack_[6].value.as < std::string > ()); + pts.MaxAxisPoints(yystack_[5].value.as < uint64_t > ()); + pts.LowerLimit(yystack_[4].value.as < double > ()); + pts.UpperLimit(yystack_[3].value.as < double > ()); + } +#line 3160 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 63: // axis_pts_attribute: annotation +#line 540 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisPts().AddAnnotation(yystack_[0].value.as < A2lAnnotation > ()); } +#line 3166 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 64: // axis_pts_attribute: byte_order +#line 541 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisPts().ByteOrder(yystack_[0].value.as < A2lByteOrder > ()); } +#line 3172 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 65: // axis_pts_attribute: calibration_access +#line 542 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisPts().CalibrationAccess(yystack_[0].value.as < A2lCalibrationAccess > ()); } +#line 3178 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 66: // axis_pts_attribute: deposit +#line 543 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisPts().Deposit(yystack_[0].value.as < A2lDeposit > ()); } +#line 3184 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 67: // axis_pts_attribute: display_identifier +#line 544 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisPts().DisplayIdentifier(yystack_[0].value.as < std::string > ()); } +#line 3190 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 68: // axis_pts_attribute: ecu_address_extension +#line 545 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisPts().EcuAddressExtension(yystack_[0].value.as < int64_t > ()); } +#line 3196 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 69: // axis_pts_attribute: extended_limits +#line 546 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisPts().ExtendedLimits(yystack_[0].value.as < A2lExtendedLimits > ()); } +#line 3202 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 70: // axis_pts_attribute: format +#line 547 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisPts().Format(yystack_[0].value.as < std::string > ()); } +#line 3208 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 71: // axis_pts_attribute: function_list +#line 548 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisPts().FunctionList(yystack_[0].value.as < std::vector > ()); } +#line 3214 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 72: // axis_pts_attribute: guard_rails +#line 549 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisPts().GuardRails(true); } +#line 3220 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 73: // axis_pts_attribute: if_data +#line 550 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisPts().AddIfData(yystack_[0].value.as < std::string > ()); } +#line 3226 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 74: // axis_pts_attribute: max_refresh +#line 551 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisPts().MaxRefresh(yystack_[0].value.as < A2lMaxRefresh > ()); } +#line 3232 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 75: // axis_pts_attribute: model_link +#line 552 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisPts().ModelLink(yystack_[0].value.as < std::string > ()); } +#line 3238 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 76: // axis_pts_attribute: monotony +#line 553 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisPts().Monotony(yystack_[0].value.as < A2lMonotony > ()); } +#line 3244 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 77: // axis_pts_attribute: phys_unit +#line 554 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisPts().PhysUnit(yystack_[0].value.as < std::string > ()); } +#line 3250 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 78: // axis_pts_attribute: read_only +#line 555 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisPts().ReadOnly(true); } +#line 3256 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 79: // axis_pts_attribute: ref_memory_segment +#line 556 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisPts().RefMemorySegment(yystack_[0].value.as < std::string > ()); } +#line 3262 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 80: // axis_pts_attribute: step_size +#line 557 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisPts().StepSize(yystack_[0].value.as < double > ()); } +#line 3268 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 81: // axis_pts_attribute: symbol_link +#line 558 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentAxisPts().SymbolLink(yystack_[0].value.as < A2lSymbolLink > ()); } +#line 3274 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 82: // bit_operation: A2L_BEGIN BIT_OPERATION bit_operation_attributes A2L_END BIT_OPERATION +#line 560 "D:/projects/a2llib/src/a2lparser.y" + { + auto& operation = scanner.CurrentBitOperation(); + yylhs.value.as < A2lBitOperation > () = operation; + operation = {}; +} +#line 3284 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 85: // bit_operation_attribute: left_shift +#line 567 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentBitOperation().LeftShift = yystack_[0].value.as < uint64_t > (); } +#line 3290 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 86: // bit_operation_attribute: right_shift +#line 568 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentBitOperation().RightShift = yystack_[0].value.as < uint64_t > (); } +#line 3296 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 87: // bit_operation_attribute: sign_extend +#line 569 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentBitOperation().SignExtended = true; } +#line 3302 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 88: // blob: A2L_BEGIN BLOB IDENT STRING any_uint any_uint blob_attributes A2L_END BLOB +#line 571 "D:/projects/a2llib/src/a2lparser.y" + { + auto& blob = scanner.CurrentBlob(); + blob.Name(yystack_[6].value.as < std::string > ()); + blob.Description(yystack_[5].value.as < std::string > ()); + blob.Address(yystack_[4].value.as < uint64_t > ()); + blob.Size(yystack_[3].value.as < uint64_t > ()); +} +#line 3314 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 91: // blob_attribute: address_type +#line 580 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentBlob().AddressType(yystack_[0].value.as < A2lAddressType > ()); } +#line 3320 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 92: // blob_attribute: annotation +#line 581 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentBlob().AddAnnotation(yystack_[0].value.as < A2lAnnotation > ()); } +#line 3326 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 93: // blob_attribute: calibration_access +#line 582 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentBlob().CalibrationAccess(yystack_[0].value.as < A2lCalibrationAccess > ()); } +#line 3332 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 94: // blob_attribute: display_identifier +#line 583 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentBlob().DisplayIdentifier(yystack_[0].value.as < std::string > ()); } +#line 3338 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 95: // blob_attribute: ecu_address_extension +#line 584 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentBlob().EcuAddressExtension(yystack_[0].value.as < int64_t > ()); } +#line 3344 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 96: // blob_attribute: if_data +#line 585 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentBlob().AddIfData(yystack_[0].value.as < std::string > ()); } +#line 3350 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 97: // blob_attribute: max_refresh +#line 586 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentBlob().MaxRefresh(yystack_[0].value.as < A2lMaxRefresh > ()); } +#line 3356 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 98: // blob_attribute: model_link +#line 587 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentBlob().ModelLink(yystack_[0].value.as < std::string > ()); } +#line 3362 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 99: // blob_attribute: symbol_link +#line 588 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentBlob().SymbolLink(yystack_[0].value.as < A2lSymbolLink > ()); } +#line 3368 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 100: // calibration_handle: A2L_BEGIN CALIBRATION_HANDLE int_list calibration_handle_attribute A2L_END CALIBRATION_HANDLE +#line 590 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lCalibrationHandle > ().HandleList = yystack_[3].value.as < std::vector > (); + yylhs.value.as < A2lCalibrationHandle > ().Comment = yystack_[2].value.as < std::string > (); +} +#line 3377 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 101: // calibration_handle_attribute: %empty +#line 594 "D:/projects/a2llib/src/a2lparser.y" + {} +#line 3383 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 102: // calibration_handle_attribute: calibration_handle_text +#line 595 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 3389 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 103: // calibration_method: A2L_BEGIN CALIBRATION_METHOD STRING any_uint calibration_method_attributes A2L_END CALIBRATION_METHOD +#line 598 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lCalibrationMethod > ().Method = yystack_[4].value.as < std::string > (); + yylhs.value.as < A2lCalibrationMethod > ().Version = yystack_[3].value.as < uint64_t > (); + yylhs.value.as < A2lCalibrationMethod > ().CalibrationHandleList = yystack_[2].value.as < std::vector > (); + } +#line 3399 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 104: // calibration_method_attributes: %empty +#line 603 "D:/projects/a2llib/src/a2lparser.y" + {} +#line 3405 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 105: // calibration_method_attributes: calibration_method_attributes calibration_handle +#line 604 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < std::vector > () = yystack_[1].value.as < std::vector > (); + yylhs.value.as < std::vector > ().emplace_back(yystack_[0].value.as < A2lCalibrationHandle > ()); + } +#line 3414 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 106: // characteristic: A2L_BEGIN CHARACTERISTIC IDENT STRING IDENT any_uint IDENT any_float IDENT any_float any_float characteristic_attributes A2L_END CHARACTERISTIC +#line 610 "D:/projects/a2llib/src/a2lparser.y" + { + auto& object = scanner.CurrentCharacteristic(); + object.Name(yystack_[11].value.as < std::string > ()); + object.Description(yystack_[10].value.as < std::string > ()); + object.Type(StringToCharacteristicType(yystack_[9].value.as < std::string > ())); + object.Address(yystack_[8].value.as < uint64_t > ()); + object.Deposit(yystack_[7].value.as < std::string > ()); + object.MaxDiff(yystack_[6].value.as < double > ()); + object.Conversion(yystack_[5].value.as < std::string > ()); + object.LowerLimit(yystack_[4].value.as < double > ()); + object.UpperLimit(yystack_[3].value.as < double > ()); + } +#line 3431 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 109: // characteristic_attribute: annotation +#line 624 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCharacteristic().AddAnnotation(yystack_[0].value.as < A2lAnnotation > ()); } +#line 3437 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 110: // characteristic_attribute: axis_descr +#line 625 "D:/projects/a2llib/src/a2lparser.y" + { auto& object = scanner.CurrentCharacteristic(); + object.AddAxisDescr(scanner.ReleaseAxisDescr()); + } +#line 3445 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 111: // characteristic_attribute: bit_mask +#line 628 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCharacteristic().BitMask(yystack_[0].value.as < uint64_t > ()); } +#line 3451 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 112: // characteristic_attribute: byte_order +#line 629 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCharacteristic().ByteOrder(yystack_[0].value.as < A2lByteOrder > ()); } +#line 3457 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 113: // characteristic_attribute: calibration_access +#line 630 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCharacteristic().CalibrationAccess(yystack_[0].value.as < A2lCalibrationAccess > ()); } +#line 3463 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 114: // characteristic_attribute: comparison_quantity +#line 631 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCharacteristic().ComparisonQuantity(yystack_[0].value.as < std::string > ()); } +#line 3469 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 115: // characteristic_attribute: dependent_characteristic +#line 632 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCharacteristic().DependentCharacteristic(yystack_[0].value.as < A2lDependentCharacteristic > ()); } +#line 3475 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 116: // characteristic_attribute: discrete +#line 633 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCharacteristic().Discrete(true); } +#line 3481 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 117: // characteristic_attribute: display_identifier +#line 634 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCharacteristic().DisplayIdentifier(yystack_[0].value.as < std::string > ()); } +#line 3487 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 118: // characteristic_attribute: ecu_address_extension +#line 635 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCharacteristic().EcuAddressExtension(yystack_[0].value.as < int64_t > ()); } +#line 3493 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 119: // characteristic_attribute: encoding +#line 636 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCharacteristic().Encoding(yystack_[0].value.as < A2lEncoding > ()); } +#line 3499 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 120: // characteristic_attribute: extended_limits +#line 637 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCharacteristic().ExtendedLimits(yystack_[0].value.as < A2lExtendedLimits > ()); } +#line 3505 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 121: // characteristic_attribute: format +#line 638 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCharacteristic().Format(yystack_[0].value.as < std::string > ()); } +#line 3511 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 122: // characteristic_attribute: function_list +#line 639 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCharacteristic().FunctionList(yystack_[0].value.as < std::vector > ()); } +#line 3517 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 123: // characteristic_attribute: guard_rails +#line 640 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCharacteristic().GuardRails(true); } +#line 3523 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 124: // characteristic_attribute: if_data +#line 641 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCharacteristic().AddIfData(yystack_[0].value.as < std::string > ()); } +#line 3529 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 125: // characteristic_attribute: map_list +#line 642 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCharacteristic().MapList(yystack_[0].value.as < std::vector > ()); } +#line 3535 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 126: // characteristic_attribute: matrix_dim +#line 643 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCharacteristic().MatrixDim(yystack_[0].value.as < std::vector > ()); } +#line 3541 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 127: // characteristic_attribute: max_refresh +#line 644 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCharacteristic().MaxRefresh(yystack_[0].value.as < A2lMaxRefresh > ()); } +#line 3547 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 128: // characteristic_attribute: model_link +#line 645 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCharacteristic().ModelLink(yystack_[0].value.as < std::string > ()); } +#line 3553 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 129: // characteristic_attribute: number +#line 646 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCharacteristic().Number(yystack_[0].value.as < uint64_t > ()); } +#line 3559 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 130: // characteristic_attribute: phys_unit +#line 647 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCharacteristic().PhysUnit(yystack_[0].value.as < std::string > ()); } +#line 3565 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 131: // characteristic_attribute: read_only +#line 648 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCharacteristic().ReadOnly(true); } +#line 3571 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 132: // characteristic_attribute: ref_memory_segment +#line 649 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCharacteristic().RefMemorySegment(yystack_[0].value.as < std::string > ()); } +#line 3577 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 133: // characteristic_attribute: step_size +#line 650 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCharacteristic().StepSize(yystack_[0].value.as < double > ()); } +#line 3583 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 134: // characteristic_attribute: symbol_link +#line 651 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCharacteristic().SymbolLink(yystack_[0].value.as < A2lSymbolLink > ()); } +#line 3589 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 135: // characteristic_attribute: virtual_characteristic +#line 652 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCharacteristic().VirtualCharacteristic(yystack_[0].value.as < A2lDependentCharacteristic > ()); } +#line 3595 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 136: // compu_method: A2L_BEGIN COMPU_METHOD IDENT STRING IDENT STRING STRING compu_method_attributes A2L_END COMPU_METHOD +#line 654 "D:/projects/a2llib/src/a2lparser.y" + { + auto& method = scanner.CurrentCompuMethod(); + method.Name(yystack_[7].value.as < std::string > ()); + method.Description(yystack_[6].value.as < std::string > ()); + method.Type(StringToConversionType(yystack_[5].value.as < std::string > ())); + method.Format(yystack_[4].value.as < std::string > ()); + method.PhysUnit(yystack_[3].value.as < std::string > ()); +} +#line 3608 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 139: // compu_method_attribute: coeffs +#line 665 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCompuMethod().Coeffs(yystack_[0].value.as < std::vector > ()); } +#line 3614 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 140: // compu_method_attribute: coeffs_linear +#line 666 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCompuMethod().CoeffsLinear(yystack_[0].value.as < std::vector > ()); } +#line 3620 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 141: // compu_method_attribute: compu_tab_ref +#line 667 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCompuMethod().CompuTabRef(yystack_[0].value.as < std::string > ()); } +#line 3626 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 142: // compu_method_attribute: formula +#line 668 "D:/projects/a2llib/src/a2lparser.y" + { + auto& method = scanner.CurrentCompuMethod(); + method.Formula(yystack_[0].value.as < std::pair > ().first); + method.Formula(yystack_[0].value.as < std::pair > ().second); + } +#line 3636 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 143: // compu_method_attribute: ref_unit +#line 673 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCompuMethod().RefUnit(yystack_[0].value.as < std::string > ()); } +#line 3642 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 144: // compu_method_attribute: status_string_ref +#line 674 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCompuMethod().StatusStringRef(yystack_[0].value.as < std::string > ()); } +#line 3648 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 145: // compu_tab: A2L_BEGIN COMPU_TAB IDENT STRING IDENT any_uint float_pair_list compu_tab_attributes A2L_END COMPU_TAB +#line 677 "D:/projects/a2llib/src/a2lparser.y" + { + auto& tab = scanner.CurrentCompuTab(); + tab.Name(yystack_[7].value.as < std::string > ()); + tab.Description(yystack_[6].value.as < std::string > ()); + tab.Type(StringToConversionType(yystack_[5].value.as < std::string > ())); + tab.Rows(yystack_[4].value.as < uint64_t > ()); + tab.KeyValueList(yystack_[3].value.as < std::map > ()); + } +#line 3661 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 148: // compu_tab_attribute: default_value +#line 687 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCompuTab().DefaultValue(yystack_[0].value.as < std::string > ()); } +#line 3667 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 149: // compu_tab_attribute: default_value_numeric +#line 688 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCompuTab().DefaultValueNumeric(yystack_[0].value.as < double > ()); } +#line 3673 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 150: // compu_vtab: A2L_BEGIN COMPU_VTAB IDENT STRING IDENT any_uint float_string_list compu_vtab_attributes A2L_END COMPU_VTAB +#line 691 "D:/projects/a2llib/src/a2lparser.y" + { + auto& tab = scanner.CurrentCompuVtab(); + tab.Name(yystack_[7].value.as < std::string > ()); + tab.Description(yystack_[6].value.as < std::string > ()); + tab.Type(StringToConversionType(yystack_[5].value.as < std::string > ())); + tab.Rows(yystack_[4].value.as < uint64_t > ()); + tab.KeyValueList(yystack_[3].value.as < std::map > ()); + } +#line 3686 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 153: // compu_vtab_attribute: default_value +#line 701 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCompuVtab().DefaultValue(yystack_[0].value.as < std::string > ()); } +#line 3692 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 154: // compu_vtab_range: A2L_BEGIN COMPU_VTAB_RANGE IDENT STRING any_uint float_range_list compu_vtab_range_attributes A2L_END COMPU_VTAB_RANGE +#line 704 "D:/projects/a2llib/src/a2lparser.y" + { + auto& tab = scanner.CurrentCompuVtabRange(); + tab.Name(yystack_[6].value.as < std::string > ()); + tab.Description(yystack_[5].value.as < std::string > ()); + tab.Rows(yystack_[4].value.as < uint64_t > ()); + tab.KeyValueList(yystack_[3].value.as < std::map, std::string> > ()); + } +#line 3704 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 157: // compu_vtab_range_attribute: default_value +#line 713 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentCompuVtabRange().DefaultValue(yystack_[0].value.as < std::string > ()); } +#line 3710 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 161: // controller_address: any_uint IDENT any_uint any_uint +#line 720 "D:/projects/a2llib/src/a2lparser.y" + { + A2lControllerAddress address; + address.Index = yystack_[3].value.as < uint64_t > (); + address.ByteOrder = StringToByteOrder(yystack_[2].value.as < std::string > ()); + address.StartAddress = yystack_[1].value.as < uint64_t > (); + address.Length = yystack_[0].value.as < uint64_t > (); + auto& module = scanner.CurrentModule(); + module.AddControllerAddress(address); + } +#line 3724 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 162: // def_characteristic: A2L_BEGIN DEF_CHARACTERISTIC ident_list A2L_END DEF_CHARACTERISTIC +#line 730 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::vector > () = yystack_[2].value.as < std::vector > (); } +#line 3730 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 163: // dependent_characteristic: A2L_BEGIN DEPENDENT_CHARACTERISTIC STRING ident_list A2L_END DEPENDENT_CHARACTERISTIC +#line 733 "D:/projects/a2llib/src/a2lparser.y" + {yylhs.value.as < A2lDependentCharacteristic > () = {yystack_[3].value.as < std::string > (), yystack_[2].value.as < std::vector > ()}; } +#line 3736 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 164: // fix_axis_par_list: A2L_BEGIN FIX_AXIS_PAR_LIST float_list A2L_END FIX_AXIS_PAR_LIST +#line 735 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::vector > () = yystack_[2].value.as < std::vector > (); } +#line 3742 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 165: // formula: A2L_BEGIN FORMULA STRING formula_attribute A2L_END FORMULA +#line 737 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::pair > () = {yystack_[3].value.as < std::string > (),yystack_[2].value.as < std::string > ()}; } +#line 3748 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 166: // formula_attribute: %empty +#line 738 "D:/projects/a2llib/src/a2lparser.y" + {} +#line 3754 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 167: // formula_attribute: formula_inv +#line 739 "D:/projects/a2llib/src/a2lparser.y" + {yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > ();} +#line 3760 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 168: // frame: A2L_BEGIN FRAME IDENT STRING any_uint any_uint frame_attributes A2L_END FRAME +#line 741 "D:/projects/a2llib/src/a2lparser.y" + { + auto& frame = scanner.CurrentFrame(); + frame.Name(yystack_[6].value.as < std::string > ()); + frame.Description(yystack_[5].value.as < std::string > ()); + frame.ScalingUnit(yystack_[4].value.as < uint64_t > ()); + frame.Rate(yystack_[3].value.as < uint64_t > ()); +} +#line 3772 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 171: // frame_attribute: frame_measurement +#line 750 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentFrame().FrameMeasurement(yystack_[0].value.as < std::vector > ()); } +#line 3778 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 172: // frame_attribute: if_data +#line 751 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentFrame().AddIfData(yystack_[0].value.as < std::string > ()); } +#line 3784 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 173: // function: A2L_BEGIN FUNCTION IDENT STRING function_attributes A2L_END FUNCTION +#line 753 "D:/projects/a2llib/src/a2lparser.y" + { + auto& func = scanner.CurrentFunction(); + func.Name(yystack_[4].value.as < std::string > ()); + func.Description(yystack_[3].value.as < std::string > ()); +} +#line 3794 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 176: // function_attribute: annotation +#line 760 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentFunction().AddAnnotation(yystack_[0].value.as < A2lAnnotation > ());} +#line 3800 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 178: // function_attribute: def_characteristic +#line 762 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentFunction().DefaultCharacteristics(yystack_[0].value.as < std::vector > ());} +#line 3806 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 179: // function_attribute: function_version +#line 763 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentFunction().Version(yystack_[0].value.as < std::string > ());} +#line 3812 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 180: // function_attribute: if_data +#line 764 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentFunction().AddIfData(yystack_[0].value.as < std::string > ());} +#line 3818 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 181: // function_attribute: in_measurement +#line 765 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentFunction().InMeasurements(yystack_[0].value.as < std::vector > ());} +#line 3824 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 182: // function_attribute: loc_measurement +#line 766 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentFunction().LocMeasurements(yystack_[0].value.as < std::vector > ());} +#line 3830 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 183: // function_attribute: out_measurement +#line 767 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentFunction().OutMeasurements(yystack_[0].value.as < std::vector > ());} +#line 3836 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 184: // function_attribute: ref_characteristic +#line 768 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentFunction().RefCharacteristics(yystack_[0].value.as < std::vector > ());} +#line 3842 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 185: // function_attribute: sub_function +#line 769 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentFunction().SubFunctions(yystack_[0].value.as < std::vector > ());} +#line 3848 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 186: // function_list: A2L_BEGIN FUNCTION_LIST ident_list A2L_END FUNCTION_LIST +#line 771 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::vector > () = yystack_[2].value.as < std::vector > ();} +#line 3854 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 187: // function_list: FUNCTION_LIST ident_list +#line 772 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::vector > () = yystack_[0].value.as < std::vector > (); } +#line 3860 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 188: // group: A2L_BEGIN GROUP IDENT STRING group_attributes A2L_END GROUP +#line 774 "D:/projects/a2llib/src/a2lparser.y" + { + auto& group = scanner.CurrentGroup(); + group.Name(yystack_[4].value.as < std::string > ()); + group.Description(yystack_[3].value.as < std::string > ()); +} +#line 3870 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 191: // group_attribute: annotation +#line 782 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentGroup().AddAnnotation(yystack_[0].value.as < A2lAnnotation > ()); } +#line 3876 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 192: // group_attribute: function_list +#line 783 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentGroup().FunctionList(yystack_[0].value.as < std::vector > ()); } +#line 3882 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 193: // group_attribute: if_data +#line 784 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentGroup().AddIfData(yystack_[0].value.as < std::string > ()); } +#line 3888 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 194: // group_attribute: ref_characteristic +#line 785 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentGroup().RefCharacteristics(yystack_[0].value.as < std::vector > ()); } +#line 3894 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 195: // group_attribute: ref_measurement +#line 786 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentGroup().RefMeasurements(yystack_[0].value.as < std::vector > ()); } +#line 3900 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 196: // group_attribute: root +#line 787 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentGroup().Root(true); } +#line 3906 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 197: // group_attribute: sub_group +#line 788 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentGroup().SubGroups(yystack_[0].value.as < std::vector > ()); } +#line 3912 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 198: // header: A2L_BEGIN HEADER STRING header_attributes A2L_END HEADER +#line 790 "D:/projects/a2llib/src/a2lparser.y" + { + auto& header = file.Project().Header(); + header.Comment = yystack_[3].value.as < std::string > (); +} +#line 3921 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 201: // header_attribute: project_no +#line 798 "D:/projects/a2llib/src/a2lparser.y" + { + auto& header = file.Project().Header(); + header.ProjectNo = yystack_[0].value.as < std::string > (); +} +#line 3930 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 202: // header_attribute: version +#line 801 "D:/projects/a2llib/src/a2lparser.y" + { + auto& header = file.Project().Header(); + header.VersionNo = yystack_[0].value.as < std::string > (); +} +#line 3939 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 203: // in_measurement: A2L_BEGIN IN_MEASUREMENT ident_list A2L_END IN_MEASUREMENT +#line 806 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::vector > () = yystack_[2].value.as < std::vector > (); } +#line 3945 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 204: // instance: A2L_BEGIN INSTANCE IDENT STRING IDENT any_uint instance_attributes A2L_END INSTANCE +#line 808 "D:/projects/a2llib/src/a2lparser.y" + { + auto& instance = scanner.CurrentInstance(); + instance.Name(yystack_[6].value.as < std::string > ()); + instance.Description(yystack_[5].value.as < std::string > ()); + instance.RefTypeDef(yystack_[4].value.as < std::string > ()); + instance.Address(yystack_[3].value.as < uint64_t > ()); +} +#line 3957 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 207: // instance_attribute: address_type +#line 817 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentInstance().AddressType(yystack_[0].value.as < A2lAddressType > ()); } +#line 3963 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 208: // instance_attribute: annotation +#line 818 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentInstance().AddAnnotation(yystack_[0].value.as < A2lAnnotation > ()); } +#line 3969 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 209: // instance_attribute: calibration_access +#line 819 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentInstance().CalibrationAccess(yystack_[0].value.as < A2lCalibrationAccess > ()); } +#line 3975 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 210: // instance_attribute: display_identifier +#line 820 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentInstance().DisplayIdentifier(yystack_[0].value.as < std::string > ()); } +#line 3981 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 211: // instance_attribute: ecu_address_extension +#line 821 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentInstance().EcuAddressExtension(yystack_[0].value.as < int64_t > ()); } +#line 3987 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 212: // instance_attribute: if_data +#line 822 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentInstance().AddIfData(yystack_[0].value.as < std::string > ()); } +#line 3993 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 213: // instance_attribute: layout +#line 823 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentInstance().Layout(yystack_[0].value.as < A2lLayout > ()); } +#line 3999 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 214: // instance_attribute: matrix_dim +#line 824 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentInstance().MatrixDim(yystack_[0].value.as < std::vector > ()); } +#line 4005 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 215: // instance_attribute: max_refresh +#line 825 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentInstance().MaxRefresh(yystack_[0].value.as < A2lMaxRefresh > ()); } +#line 4011 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 216: // instance_attribute: model_link +#line 826 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentInstance().ModelLink(yystack_[0].value.as < std::string > ()); } +#line 4017 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 217: // instance_attribute: overwrite +#line 827 "D:/projects/a2llib/src/a2lparser.y" + { auto& instance = scanner.CurrentInstance(); + instance.AddOverwrite(scanner.ReleaseOverwrite()); } +#line 4024 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 218: // instance_attribute: read_write +#line 829 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentInstance().ReadWrite(true); } +#line 4030 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 219: // instance_attribute: symbol_link +#line 830 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentInstance().SymbolLink(yystack_[0].value.as < A2lSymbolLink > ()); } +#line 4036 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 220: // loc_measurement: A2L_BEGIN LOC_MEASUREMENT ident_list A2L_END LOC_MEASUREMENT +#line 832 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::vector > () = yystack_[2].value.as < std::vector > ();} +#line 4042 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 221: // map_list: A2L_BEGIN MAP_LIST ident_list A2L_END MAP_LIST +#line 834 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::vector > () = yystack_[2].value.as < std::vector > ();} +#line 4048 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 222: // measurement: A2L_BEGIN MEASUREMENT IDENT STRING IDENT IDENT any_uint any_float any_float any_float measurement_attributes A2L_END MEASUREMENT +#line 837 "D:/projects/a2llib/src/a2lparser.y" + { + auto& meas = scanner.CurrentMeasurement(); + meas.Name(yystack_[10].value.as < std::string > ()); + meas.Description(yystack_[9].value.as < std::string > ()); + meas.DataType(StringToDataType(yystack_[8].value.as < std::string > ())); + meas.Conversion(yystack_[7].value.as < std::string > ()); + meas.Resolution(yystack_[6].value.as < uint64_t > ()); + meas.Accuracy(yystack_[5].value.as < double > ()); + meas.LowerLimit(yystack_[4].value.as < double > ()); + meas.UpperLimit(yystack_[3].value.as < double > ()); + } +#line 4064 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 225: // measurement_attribute: address_type +#line 850 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentMeasurement().AddressType(yystack_[0].value.as < A2lAddressType > ()); } +#line 4070 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 226: // measurement_attribute: annotation +#line 851 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentMeasurement().AddAnnotation(yystack_[0].value.as < A2lAnnotation > ()); } +#line 4076 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 227: // measurement_attribute: array_size +#line 852 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentMeasurement().ArraySize(yystack_[0].value.as < uint64_t > ()); } +#line 4082 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 228: // measurement_attribute: bit_mask +#line 853 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentMeasurement().BitMask(yystack_[0].value.as < uint64_t > ()); } +#line 4088 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 229: // measurement_attribute: bit_operation +#line 854 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentMeasurement().BitOperation(yystack_[0].value.as < A2lBitOperation > ()); } +#line 4094 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 230: // measurement_attribute: byte_order +#line 855 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentMeasurement().ByteOrder(yystack_[0].value.as < A2lByteOrder > ()); } +#line 4100 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 231: // measurement_attribute: discrete +#line 856 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentMeasurement().Discrete(true); } +#line 4106 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 232: // measurement_attribute: display_identifier +#line 857 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentMeasurement().DisplayIdentifier(yystack_[0].value.as < std::string > ()); } +#line 4112 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 233: // measurement_attribute: ecu_address +#line 858 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentMeasurement().EcuAddress(yystack_[0].value.as < uint64_t > ()); } +#line 4118 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 234: // measurement_attribute: ecu_address_extension +#line 859 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentMeasurement().EcuAddressExtension(yystack_[0].value.as < int64_t > ()); } +#line 4124 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 235: // measurement_attribute: error_mask +#line 860 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentMeasurement().ErrorMask(yystack_[0].value.as < uint64_t > ()); } +#line 4130 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 236: // measurement_attribute: format +#line 861 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentMeasurement().Format(yystack_[0].value.as < std::string > ()); } +#line 4136 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 237: // measurement_attribute: function_list +#line 862 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentMeasurement().FunctionList(yystack_[0].value.as < std::vector > ()); } +#line 4142 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 238: // measurement_attribute: if_data +#line 863 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentMeasurement().AddIfData(yystack_[0].value.as < std::string > ()); } +#line 4148 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 239: // measurement_attribute: layout +#line 864 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentMeasurement().Layout(yystack_[0].value.as < A2lLayout > ()); } +#line 4154 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 240: // measurement_attribute: matrix_dim +#line 865 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentMeasurement().MatrixDim(yystack_[0].value.as < std::vector > ()); } +#line 4160 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 241: // measurement_attribute: max_refresh +#line 866 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentMeasurement().MaxRefresh(yystack_[0].value.as < A2lMaxRefresh > ()); } +#line 4166 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 242: // measurement_attribute: model_link +#line 867 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentMeasurement().ModelLink(yystack_[0].value.as < std::string > ()); } +#line 4172 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 243: // measurement_attribute: phys_unit +#line 868 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentMeasurement().PhysUnit(yystack_[0].value.as < std::string > ()); } +#line 4178 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 244: // measurement_attribute: read_write +#line 869 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentMeasurement().ReadWrite(true); } +#line 4184 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 245: // measurement_attribute: ref_memory_segment +#line 870 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentMeasurement().RefMemorySegment(yystack_[0].value.as < std::string > ()); } +#line 4190 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 246: // measurement_attribute: symbol_link +#line 871 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentMeasurement().SymbolLink(yystack_[0].value.as < A2lSymbolLink > ()); } +#line 4196 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 247: // measurement_attribute: virtual +#line 872 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentMeasurement().Virtuals(yystack_[0].value.as < std::vector > ()); } +#line 4202 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 248: // memory_layout: A2L_BEGIN MEMORY_LAYOUT IDENT any_uint any_uint int_list memory_layout_attributes A2L_END MEMORY_LAYOUT +#line 875 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lMemoryLayout > ().Type = StringToPrgType(yystack_[6].value.as < std::string > ()); + yylhs.value.as < A2lMemoryLayout > ().Address = yystack_[5].value.as < uint64_t > (); + yylhs.value.as < A2lMemoryLayout > ().Size = yystack_[4].value.as < uint64_t > (); + yylhs.value.as < A2lMemoryLayout > ().OffsetList = yystack_[3].value.as < std::vector > (); + } +#line 4213 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 249: // memory_layout_attributes: %empty +#line 881 "D:/projects/a2llib/src/a2lparser.y" + {} +#line 4219 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 250: // memory_layout_attributes: memory_layout_attributes if_data +#line 882 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < std::map > () = yystack_[1].value.as < std::map > (); + yylhs.value.as < std::map > ().emplace(A2lHelper::ParseIfDataProtocol(yystack_[0].value.as < std::string > ()), yystack_[0].value.as < std::string > ()); + } +#line 4228 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 251: // prg_type: RESERVED +#line 887 "D:/projects/a2llib/src/a2lparser.y" + {yylhs.value.as < A2lSegmentType > () = A2lSegmentType::RESERVED; } +#line 4234 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 252: // prg_type: IDENT +#line 888 "D:/projects/a2llib/src/a2lparser.y" + {yylhs.value.as < A2lSegmentType > () = StringToSegmentType(yystack_[0].value.as < std::string > ()); } +#line 4240 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 253: // memory_segment: A2L_BEGIN MEMORY_SEGMENT IDENT STRING prg_type IDENT IDENT any_uint any_uint int_list memory_segment_attributes A2L_END MEMORY_SEGMENT +#line 891 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lMemorySegment > ().Name = yystack_[10].value.as < std::string > (); + yylhs.value.as < A2lMemorySegment > ().Description = yystack_[9].value.as < std::string > (); + yylhs.value.as < A2lMemorySegment > ().SegmentType = yystack_[8].value.as < A2lSegmentType > (); + yylhs.value.as < A2lMemorySegment > ().MemoryType = StringToMemoryType(yystack_[7].value.as < std::string > ()); + yylhs.value.as < A2lMemorySegment > ().Attribute = StringToMemoryAttribute(yystack_[6].value.as < std::string > ()); + yylhs.value.as < A2lMemorySegment > ().Address = yystack_[5].value.as < uint64_t > (); + yylhs.value.as < A2lMemorySegment > ().Size = yystack_[4].value.as < uint64_t > (); + yylhs.value.as < A2lMemorySegment > ().OffsetList = yystack_[3].value.as < std::vector > (); + yylhs.value.as < A2lMemorySegment > ().IfDataList = yystack_[2].value.as < std::map > (); + } +#line 4256 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 254: // memory_segment_attributes: %empty +#line 902 "D:/projects/a2llib/src/a2lparser.y" + {} +#line 4262 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 255: // memory_segment_attributes: memory_segment_attributes if_data +#line 903 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < std::map > () = yystack_[1].value.as < std::map > (); + yylhs.value.as < std::map > ().emplace(A2lHelper::ParseIfDataProtocol(yystack_[0].value.as < std::string > ()), yystack_[0].value.as < std::string > ()); + } +#line 4271 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 256: // mod_common: A2L_BEGIN MOD_COMMON STRING mod_common_attributes A2L_END MOD_COMMON +#line 907 "D:/projects/a2llib/src/a2lparser.y" + { + auto& common = scanner.CurrentModule().ModCommon(); + common.Comment = yystack_[3].value.as < std::string > (); +} +#line 4280 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 259: // mod_common_attribute: alignment_byte +#line 914 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentModule().ModCommon().AlignmentByte = yystack_[0].value.as < uint64_t > (); } +#line 4286 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 260: // mod_common_attribute: alignment_float16_ieee +#line 915 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentModule().ModCommon().AlignmentFloat16 = yystack_[0].value.as < uint64_t > (); } +#line 4292 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 261: // mod_common_attribute: alignment_float32_ieee +#line 916 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentModule().ModCommon().AlignmentFloat32 = yystack_[0].value.as < uint64_t > (); } +#line 4298 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 262: // mod_common_attribute: alignment_float64_ieee +#line 917 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentModule().ModCommon().AlignmentFloat64 = yystack_[0].value.as < uint64_t > (); } +#line 4304 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 263: // mod_common_attribute: alignment_int64 +#line 918 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentModule().ModCommon().AlignmentInt64 = yystack_[0].value.as < uint64_t > (); } +#line 4310 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 264: // mod_common_attribute: alignment_long +#line 919 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentModule().ModCommon().AlignmentLong = yystack_[0].value.as < uint64_t > (); } +#line 4316 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 265: // mod_common_attribute: alignment_word +#line 920 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentModule().ModCommon().AlignmentWord = yystack_[0].value.as < uint64_t > (); } +#line 4322 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 266: // mod_common_attribute: byte_order +#line 921 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentModule().ModCommon().ByteOrder = yystack_[0].value.as < A2lByteOrder > (); } +#line 4328 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 267: // mod_common_attribute: data_size +#line 922 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentModule().ModCommon().DataSize = yystack_[0].value.as < uint64_t > (); } +#line 4334 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 268: // mod_common_attribute: deposit +#line 923 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentModule().ModCommon().Deposit = yystack_[0].value.as < A2lDeposit > (); } +#line 4340 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 270: // mod_par: A2L_BEGIN MOD_PAR STRING mod_par_attributes A2L_END MOD_PAR +#line 926 "D:/projects/a2llib/src/a2lparser.y" + { + auto& par = scanner.CurrentModule().ModPar(); + par.Comment = yystack_[3].value.as < std::string > (); +} +#line 4349 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 273: // mod_par_attribute: addr_epk +#line 932 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentModule().ModPar().AddressEpkList.emplace_back(yystack_[0].value.as < uint64_t > ()); } +#line 4355 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 274: // mod_par_attribute: calibration_method +#line 933 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentModule().ModPar().CalibrationMethodList.emplace_back(yystack_[0].value.as < A2lCalibrationMethod > ()); } +#line 4361 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 275: // mod_par_attribute: cpu_type +#line 934 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentModule().ModPar().CpuType = yystack_[0].value.as < std::string > (); } +#line 4367 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 276: // mod_par_attribute: customer +#line 935 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentModule().ModPar().Customer = yystack_[0].value.as < std::string > (); } +#line 4373 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 277: // mod_par_attribute: customer_no +#line 936 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentModule().ModPar().CustomerNo = yystack_[0].value.as < std::string > (); } +#line 4379 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 278: // mod_par_attribute: ecu +#line 937 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentModule().ModPar().Ecu = yystack_[0].value.as < std::string > (); } +#line 4385 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 279: // mod_par_attribute: ecu_calibration_offset +#line 938 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentModule().ModPar().EcuCalibrationOffset = yystack_[0].value.as < int64_t > (); } +#line 4391 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 280: // mod_par_attribute: epk +#line 939 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentModule().ModPar().Epk = yystack_[0].value.as < std::string > (); } +#line 4397 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 281: // mod_par_attribute: memory_layout +#line 940 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentModule().ModPar().MemoryLayoutList.emplace_back(yystack_[0].value.as < A2lMemoryLayout > ()); } +#line 4403 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 282: // mod_par_attribute: memory_segment +#line 941 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentModule().ModPar().MemorySegmentList.emplace_back(yystack_[0].value.as < A2lMemorySegment > ()); } +#line 4409 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 283: // mod_par_attribute: no_of_interfaces +#line 942 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentModule().ModPar().NoOfInterfaces = yystack_[0].value.as < uint64_t > (); } +#line 4415 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 284: // mod_par_attribute: phone_no +#line 943 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentModule().ModPar().PhoneNo = yystack_[0].value.as < std::string > (); } +#line 4421 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 285: // mod_par_attribute: supplier +#line 944 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentModule().ModPar().Supplier = yystack_[0].value.as < std::string > (); } +#line 4427 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 286: // mod_par_attribute: system_constant +#line 945 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentModule().ModPar().SystemConstantList.emplace(yystack_[0].value.as < std::pair > ().first, yystack_[0].value.as < std::pair > ().second); } +#line 4433 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 287: // mod_par_attribute: user +#line 946 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentModule().ModPar().User = yystack_[0].value.as < std::string > (); } +#line 4439 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 288: // mod_par_attribute: version +#line 947 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentModule().ModPar().Version = yystack_[0].value.as < std::string > (); } +#line 4445 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 289: // module: A2L_BEGIN MODULE IDENT STRING module_attributes A2L_END MODULE +#line 949 "D:/projects/a2llib/src/a2lparser.y" + { + auto& module = scanner.CurrentModule(); + module.Name(yystack_[4].value.as < std::string > ()); + module.Description(yystack_[3].value.as < std::string > ()); +} +#line 4455 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 292: // module_attribute: a2ml +#line 957 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentModule().A2ml(yystack_[0].value.as < std::string > ()); } +#line 4461 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 293: // module_attribute: axis_pts +#line 958 "D:/projects/a2llib/src/a2lparser.y" + { + auto& module = scanner.CurrentModule(); + module.AddAxisPts(scanner.ReleaseAxisPts()); } +#line 4469 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 294: // module_attribute: blob +#line 961 "D:/projects/a2llib/src/a2lparser.y" + { + auto& module = scanner.CurrentModule(); + module.AddBlob(scanner.ReleaseBlob()); } +#line 4477 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 295: // module_attribute: characteristic +#line 964 "D:/projects/a2llib/src/a2lparser.y" + { + auto& module = scanner.CurrentModule(); + module.AddCharacteristic(scanner.ReleaseCharacteristic()); } +#line 4485 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 296: // module_attribute: compu_method +#line 967 "D:/projects/a2llib/src/a2lparser.y" + { + auto& module = scanner.CurrentModule(); + module.AddCompuMethod(scanner.ReleaseCompuMethod()); } +#line 4493 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 297: // module_attribute: compu_tab +#line 970 "D:/projects/a2llib/src/a2lparser.y" + { + auto& module = scanner.CurrentModule(); + module.AddCompuTab(scanner.ReleaseCompuTab()); } +#line 4501 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 298: // module_attribute: compu_vtab +#line 973 "D:/projects/a2llib/src/a2lparser.y" + { + auto& module = scanner.CurrentModule(); + module.AddCompuVtab(scanner.ReleaseCompuVtab()); } +#line 4509 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 299: // module_attribute: compu_vtab_range +#line 976 "D:/projects/a2llib/src/a2lparser.y" + { + auto& module = scanner.CurrentModule(); + module.AddCompuVtabRange(scanner.ReleaseCompuVtabRange()); } +#line 4517 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 300: // module_attribute: controller_addresses +#line 979 "D:/projects/a2llib/src/a2lparser.y" + {} +#line 4523 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 301: // module_attribute: frame +#line 980 "D:/projects/a2llib/src/a2lparser.y" + { + auto& module = scanner.CurrentModule(); + module.AddFrame(scanner.ReleaseFrame()); } +#line 4531 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 302: // module_attribute: function +#line 983 "D:/projects/a2llib/src/a2lparser.y" + { + auto& module = scanner.CurrentModule(); + module.AddFunction(scanner.ReleaseFunction()); } +#line 4539 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 303: // module_attribute: group +#line 986 "D:/projects/a2llib/src/a2lparser.y" + { + auto& module = scanner.CurrentModule(); + module.AddGroup(scanner.ReleaseGroup()); } +#line 4547 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 304: // module_attribute: if_data +#line 989 "D:/projects/a2llib/src/a2lparser.y" + { + auto& module = scanner.CurrentModule(); + module.AddIfData(yystack_[0].value.as < std::string > ()); } +#line 4555 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 305: // module_attribute: instance +#line 992 "D:/projects/a2llib/src/a2lparser.y" + { + auto& module = scanner.CurrentModule(); + module.AddInstance(scanner.ReleaseInstance()); } +#line 4563 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 306: // module_attribute: measurement +#line 995 "D:/projects/a2llib/src/a2lparser.y" + { + auto& module = scanner.CurrentModule(); + module.AddMeasurement(scanner.ReleaseMeasurement()); } +#line 4571 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 309: // module_attribute: record_layout +#line 1000 "D:/projects/a2llib/src/a2lparser.y" + { + auto& module = scanner.CurrentModule(); + module.AddRecordLayout(scanner.ReleaseRecordLayout()); } +#line 4579 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 310: // module_attribute: transformer +#line 1003 "D:/projects/a2llib/src/a2lparser.y" + { + auto& module = scanner.CurrentModule(); + module.AddTransformer(scanner.ReleaseTransformer()); } +#line 4587 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 311: // module_attribute: typedef_axis +#line 1006 "D:/projects/a2llib/src/a2lparser.y" + { + auto& module = scanner.CurrentModule(); + module.AddTypedefAxis(scanner.ReleaseTypedefAxis()); } +#line 4595 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 312: // module_attribute: typedef_blob +#line 1009 "D:/projects/a2llib/src/a2lparser.y" + { + auto& module = scanner.CurrentModule(); + module.AddTypedefBlob(scanner.ReleaseTypedefBlob()); } +#line 4603 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 313: // module_attribute: typedef_characteristic +#line 1012 "D:/projects/a2llib/src/a2lparser.y" + { + auto& module = scanner.CurrentModule(); + module.AddTypedefCharacteristic(scanner.ReleaseTypedefCharacteristic()); } +#line 4611 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 314: // module_attribute: typedef_measurement +#line 1015 "D:/projects/a2llib/src/a2lparser.y" + { + auto& module = scanner.CurrentModule(); + module.AddTypedefMeasurement(scanner.ReleaseTypedefMeasurement()); } +#line 4619 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 315: // module_attribute: typedef_structure +#line 1018 "D:/projects/a2llib/src/a2lparser.y" + { + auto& module = scanner.CurrentModule(); + module.AddTypedefStructure(scanner.ReleaseTypedefStructure()); } +#line 4627 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 316: // module_attribute: unit +#line 1021 "D:/projects/a2llib/src/a2lparser.y" + { + auto& module = scanner.CurrentModule(); + module.AddUnit(scanner.ReleaseUnit()); } +#line 4635 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 317: // module_attribute: user_rights +#line 1024 "D:/projects/a2llib/src/a2lparser.y" + { + auto& module = scanner.CurrentModule(); + module.AddUserRight(scanner.ReleaseUserRight()); } +#line 4643 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 319: // out_measurement: A2L_BEGIN OUT_MEASUREMENT ident_list A2L_END OUT_MEASUREMENT +#line 1029 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::vector > () = yystack_[2].value.as < std::vector > (); } +#line 4649 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 320: // overwrite: A2L_BEGIN OVERWRITE IDENT any_uint overwrite_attributes A2L_END OVERWRITE +#line 1031 "D:/projects/a2llib/src/a2lparser.y" + { + auto& overwrite = scanner.CurrentOverwrite(); + overwrite.Name(yystack_[4].value.as < std::string > ()); + overwrite.AxisNo(yystack_[3].value.as < uint64_t > ()); +} +#line 4659 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 323: // overwrite_attribute: conversion +#line 1038 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentOverwrite().Conversion(yystack_[0].value.as < std::string > ()); } +#line 4665 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 324: // overwrite_attribute: extended_limits +#line 1039 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentOverwrite().ExtendedLimits(yystack_[0].value.as < A2lExtendedLimits > ()); } +#line 4671 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 325: // overwrite_attribute: format +#line 1040 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentOverwrite().Format(yystack_[0].value.as < std::string > ()); } +#line 4677 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 326: // overwrite_attribute: input_quantity +#line 1041 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentOverwrite().InputQuantity(yystack_[0].value.as < std::string > ()); } +#line 4683 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 327: // overwrite_attribute: limits +#line 1042 "D:/projects/a2llib/src/a2lparser.y" + { + scanner.CurrentOverwrite().LowerLimit(yystack_[0].value.as < A2lLimits > ().LowerLimit); + scanner.CurrentOverwrite().UpperLimit(yystack_[0].value.as < A2lLimits > ().UpperLimit); + } +#line 4692 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 328: // overwrite_attribute: monotony +#line 1046 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentOverwrite().Monotony(yystack_[0].value.as < A2lMonotony > ()); } +#line 4698 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 329: // overwrite_attribute: phys_unit +#line 1047 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentOverwrite().PhysUnit(yystack_[0].value.as < std::string > ()); } +#line 4704 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 330: // project: A2L_BEGIN PROJECT IDENT STRING project_attributes A2L_END PROJECT +#line 1049 "D:/projects/a2llib/src/a2lparser.y" + { + auto& project = file.Project(); + project.Name(yystack_[4].value.as < std::string > ()); + project.Description(yystack_[3].value.as < std::string > ()); +} +#line 4714 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 334: // project_attribute: module +#line 1059 "D:/projects/a2llib/src/a2lparser.y" + { + auto& project = file.Project(); + project.AddModule(scanner.ReleaseModule()); + } +#line 4723 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 335: // record_layout: A2L_BEGIN RECORD_LAYOUT IDENT record_layout_attributes A2L_END RECORD_LAYOUT +#line 1064 "D:/projects/a2llib/src/a2lparser.y" + { + auto& rec = scanner.CurrentRecordLayout(); + rec.Name(yystack_[3].value.as < std::string > ()); +} +#line 4732 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 338: // record_layout_attribute: alignment_byte +#line 1070 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().AlignmentByte(yystack_[0].value.as < uint64_t > ()); } +#line 4738 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 339: // record_layout_attribute: alignment_float16_ieee +#line 1071 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().AlignmentFloat16(yystack_[0].value.as < uint64_t > ()); } +#line 4744 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 340: // record_layout_attribute: alignment_float32_ieee +#line 1072 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().AlignmentFloat32(yystack_[0].value.as < uint64_t > ()); } +#line 4750 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 341: // record_layout_attribute: alignment_float64_ieee +#line 1073 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().AlignmentFloat64(yystack_[0].value.as < uint64_t > ()); } +#line 4756 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 342: // record_layout_attribute: alignment_int64 +#line 1074 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().AlignmentInt64(yystack_[0].value.as < uint64_t > ()); } +#line 4762 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 343: // record_layout_attribute: alignment_long +#line 1075 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().AlignmentLong(yystack_[0].value.as < uint64_t > ()); } +#line 4768 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 344: // record_layout_attribute: alignment_word +#line 1076 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().AlignmentWord(yystack_[0].value.as < uint64_t > ()); } +#line 4774 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 345: // record_layout_attribute: axis_pts_x +#line 1077 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().AxisPtsX(yystack_[0].value.as < A2lAxisPts > ()); } +#line 4780 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 346: // record_layout_attribute: axis_pts_y +#line 1078 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().AxisPtsY(yystack_[0].value.as < A2lAxisPts > ()); } +#line 4786 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 347: // record_layout_attribute: axis_pts_z +#line 1079 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().AxisPtsZ(yystack_[0].value.as < A2lAxisPts > ()); } +#line 4792 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 348: // record_layout_attribute: axis_pts_4 +#line 1080 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().AxisPts4(yystack_[0].value.as < A2lAxisPts > ()); } +#line 4798 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 349: // record_layout_attribute: axis_pts_5 +#line 1081 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().AxisPts5(yystack_[0].value.as < A2lAxisPts > ()); } +#line 4804 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 350: // record_layout_attribute: axis_rescale_x +#line 1082 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().AxisRescaleX(yystack_[0].value.as < A2lAxisRescale > ()); } +#line 4810 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 351: // record_layout_attribute: dist_op_x +#line 1083 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().DistOpX(yystack_[0].value.as < A2lDistOp > ()); } +#line 4816 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 352: // record_layout_attribute: dist_op_y +#line 1084 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().DistOpY(yystack_[0].value.as < A2lDistOp > ()); } +#line 4822 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 353: // record_layout_attribute: dist_op_z +#line 1085 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().DistOpZ(yystack_[0].value.as < A2lDistOp > ()); } +#line 4828 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 354: // record_layout_attribute: dist_op_4 +#line 1086 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().DistOp4(yystack_[0].value.as < A2lDistOp > ()); } +#line 4834 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 355: // record_layout_attribute: dist_op_5 +#line 1087 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().DistOp5(yystack_[0].value.as < A2lDistOp > ()); } +#line 4840 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 356: // record_layout_attribute: fix_no_axis_pts_x +#line 1088 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().FixNoAxisPtsX(yystack_[0].value.as < uint64_t > ()); } +#line 4846 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 357: // record_layout_attribute: fix_no_axis_pts_y +#line 1089 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().FixNoAxisPtsY(yystack_[0].value.as < uint64_t > ()); } +#line 4852 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 358: // record_layout_attribute: fix_no_axis_pts_z +#line 1090 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().FixNoAxisPtsZ(yystack_[0].value.as < uint64_t > ()); } +#line 4858 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 359: // record_layout_attribute: fix_no_axis_pts_4 +#line 1091 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().FixNoAxisPts4(yystack_[0].value.as < uint64_t > ()); } +#line 4864 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 360: // record_layout_attribute: fix_no_axis_pts_5 +#line 1092 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().FixNoAxisPts5(yystack_[0].value.as < uint64_t > ()); } +#line 4870 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 361: // record_layout_attribute: fnc_values +#line 1093 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().FncValues(yystack_[0].value.as < A2lFncValue > ()); } +#line 4876 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 362: // record_layout_attribute: identification +#line 1094 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().Identification(yystack_[0].value.as < A2lIdentification > ()); } +#line 4882 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 363: // record_layout_attribute: no_axis_pts_x +#line 1095 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().NoAxisPtsX(yystack_[0].value.as < A2lDistOp > ()); } +#line 4888 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 364: // record_layout_attribute: no_axis_pts_y +#line 1096 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().NoAxisPtsY(yystack_[0].value.as < A2lDistOp > ()); } +#line 4894 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 365: // record_layout_attribute: no_axis_pts_z +#line 1097 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().NoAxisPtsZ(yystack_[0].value.as < A2lDistOp > ()); } +#line 4900 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 366: // record_layout_attribute: no_axis_pts_4 +#line 1098 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().NoAxisPts4(yystack_[0].value.as < A2lDistOp > ()); } +#line 4906 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 367: // record_layout_attribute: no_axis_pts_5 +#line 1099 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().NoAxisPts5(yystack_[0].value.as < A2lDistOp > ()); } +#line 4912 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 368: // record_layout_attribute: no_rescale_x +#line 1100 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().NoRescaleX(yystack_[0].value.as < A2lDistOp > ()); } +#line 4918 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 369: // record_layout_attribute: offset_x +#line 1101 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().OffsetX(yystack_[0].value.as < A2lDistOp > ()); } +#line 4924 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 370: // record_layout_attribute: offset_y +#line 1102 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().OffsetY(yystack_[0].value.as < A2lDistOp > ()); } +#line 4930 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 371: // record_layout_attribute: offset_z +#line 1103 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().OffsetZ(yystack_[0].value.as < A2lDistOp > ()); } +#line 4936 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 372: // record_layout_attribute: offset_4 +#line 1104 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().Offset4(yystack_[0].value.as < A2lDistOp > ()); } +#line 4942 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 373: // record_layout_attribute: offset_5 +#line 1105 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().Offset5(yystack_[0].value.as < A2lDistOp > ()); } +#line 4948 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 374: // record_layout_attribute: reserved +#line 1106 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().AddReserved(yystack_[0].value.as < A2lDistOp > ()); } +#line 4954 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 375: // record_layout_attribute: rip_addr_w +#line 1107 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().RipAddrW(yystack_[0].value.as < A2lDistOp > ()); } +#line 4960 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 376: // record_layout_attribute: rip_addr_x +#line 1108 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().RipAddrX(yystack_[0].value.as < A2lDistOp > ()); } +#line 4966 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 377: // record_layout_attribute: rip_addr_y +#line 1109 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().RipAddrY(yystack_[0].value.as < A2lDistOp > ()); } +#line 4972 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 378: // record_layout_attribute: rip_addr_z +#line 1110 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().RipAddrZ(yystack_[0].value.as < A2lDistOp > ()); } +#line 4978 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 379: // record_layout_attribute: rip_addr_4 +#line 1111 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().RipAddr4(yystack_[0].value.as < A2lDistOp > ()); } +#line 4984 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 380: // record_layout_attribute: rip_addr_5 +#line 1112 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().RipAddr5(yystack_[0].value.as < A2lDistOp > ()); } +#line 4990 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 381: // record_layout_attribute: src_addr_x +#line 1113 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().SrcAddrX(yystack_[0].value.as < A2lDistOp > ()); } +#line 4996 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 382: // record_layout_attribute: src_addr_y +#line 1114 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().SrcAddrY(yystack_[0].value.as < A2lDistOp > ()); } +#line 5002 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 383: // record_layout_attribute: src_addr_z +#line 1115 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().SrcAddrZ(yystack_[0].value.as < A2lDistOp > ()); } +#line 5008 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 384: // record_layout_attribute: src_addr_4 +#line 1116 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().SrcAddr4(yystack_[0].value.as < A2lDistOp > ()); } +#line 5014 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 385: // record_layout_attribute: src_addr_5 +#line 1117 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().SrcAddr5(yystack_[0].value.as < A2lDistOp > ()); } +#line 5020 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 386: // record_layout_attribute: shift_op_x +#line 1118 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().ShiftOpX(yystack_[0].value.as < A2lDistOp > ()); } +#line 5026 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 387: // record_layout_attribute: shift_op_y +#line 1119 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().ShiftOpY(yystack_[0].value.as < A2lDistOp > ()); } +#line 5032 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 388: // record_layout_attribute: shift_op_z +#line 1120 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().ShiftOpZ(yystack_[0].value.as < A2lDistOp > ()); } +#line 5038 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 389: // record_layout_attribute: shift_op_4 +#line 1121 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().ShiftOp4(yystack_[0].value.as < A2lDistOp > ()); } +#line 5044 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 390: // record_layout_attribute: shift_op_5 +#line 1122 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().ShiftOp5(yystack_[0].value.as < A2lDistOp > ()); } +#line 5050 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 391: // record_layout_attribute: static_address_offsets +#line 1123 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().StaticAddressOffsets(true); } +#line 5056 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 392: // record_layout_attribute: static_record_layout +#line 1124 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentRecordLayout().StaticRecordLayout(true); } +#line 5062 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 393: // ref_characteristic: A2L_BEGIN REF_CHARACTERISTIC ident_list A2L_END REF_CHARACTERISTIC +#line 1126 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::vector > () = yystack_[2].value.as < std::vector > (); } +#line 5068 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 394: // ref_group: A2L_BEGIN REF_GROUP ident_list A2L_END REF_GROUP +#line 1127 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::vector > () = yystack_[2].value.as < std::vector > (); } +#line 5074 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 395: // ref_measurement: A2L_BEGIN REF_MEASUREMENT ident_list A2L_END REF_MEASUREMENT +#line 1128 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::vector > () = yystack_[2].value.as < std::vector > (); } +#line 5080 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 396: // structure_component: A2L_BEGIN STRUCTURE_COMPONENT IDENT IDENT any_uint structure_component_attributes A2L_END STRUCTURE_COMPONENT +#line 1131 "D:/projects/a2llib/src/a2lparser.y" + { + auto& structure = scanner.CurrentStructureComponent(); + structure.Name = yystack_[5].value.as < std::string > (); + structure.Typedef = yystack_[4].value.as < std::string > (); + structure.AddressOffset = yystack_[3].value.as < uint64_t > (); + } +#line 5091 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 399: // structure_component_attribute: address_type +#line 1139 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentStructureComponent().AddressType = yystack_[0].value.as < A2lAddressType > (); } +#line 5097 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 400: // structure_component_attribute: layout +#line 1140 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentStructureComponent().Layout = yystack_[0].value.as < A2lLayout > (); } +#line 5103 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 401: // structure_component_attribute: matrix_dim +#line 1141 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentStructureComponent().MatrixDim = yystack_[0].value.as < std::vector > (); } +#line 5109 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 402: // structure_component_attribute: symbol_type_link +#line 1142 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentStructureComponent().SymbolTypeLink = yystack_[0].value.as < std::string > (); } +#line 5115 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 403: // sub_function: A2L_BEGIN SUB_FUNCTION ident_list A2L_END SUB_FUNCTION +#line 1144 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::vector > () = yystack_[2].value.as < std::vector > (); } +#line 5121 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 404: // sub_group: A2L_BEGIN SUB_GROUP ident_list A2L_END SUB_GROUP +#line 1145 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::vector > () = yystack_[2].value.as < std::vector > (); } +#line 5127 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 405: // transformer: A2L_BEGIN TRANSFORMER IDENT STRING STRING STRING any_uint IDENT IDENT transformer_attributes A2L_END TRANSFORMER +#line 1148 "D:/projects/a2llib/src/a2lparser.y" + { + auto& transformer = scanner.CurrentTransformer(); + transformer.Name(yystack_[9].value.as < std::string > ()); + transformer.Version(yystack_[8].value.as < std::string > ()); + transformer.Executable32(yystack_[7].value.as < std::string > ()); + transformer.Executable64(yystack_[6].value.as < std::string > ()); + transformer.Timeout(yystack_[5].value.as < uint64_t > ()); + transformer.Trigger(StringToTrigger(yystack_[4].value.as < std::string > ())); + transformer.InverseTransformer(yystack_[3].value.as < std::string > ()); + } +#line 5142 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 408: // transformer_attribute: transformer_in_objects +#line 1160 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentTransformer().TransformerInObjects(yystack_[0].value.as < std::vector > ()); } +#line 5148 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 409: // transformer_attribute: transformer_out_objects +#line 1161 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentTransformer().TransformerOutObjects(yystack_[0].value.as < std::vector > ()); } +#line 5154 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 410: // transformer_in_objects: A2L_BEGIN TRANSFORMER_IN_OBJECTS ident_list A2L_END TRANSFORMER_IN_OBJECTS +#line 1163 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::vector > () = yystack_[2].value.as < std::vector > (); } +#line 5160 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 411: // transformer_out_objects: A2L_BEGIN TRANSFORMER_OUT_OBJECTS ident_list A2L_END TRANSFORMER_OUT_OBJECTS +#line 1164 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::vector > () = yystack_[2].value.as < std::vector > (); } +#line 5166 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 412: // typedef_axis: A2L_BEGIN TYPEDEF_AXIS IDENT STRING IDENT IDENT any_float IDENT any_uint any_float any_float typedef_axis_attributes A2L_END TYPEDEF_AXIS +#line 1167 "D:/projects/a2llib/src/a2lparser.y" + { + auto& pts = scanner.CurrentTypedefAxis(); + pts.Name(yystack_[11].value.as < std::string > ()); + pts.Description(yystack_[10].value.as < std::string > ()); + pts.InputQuantity(yystack_[9].value.as < std::string > ()); + pts.RefRecord(yystack_[8].value.as < std::string > ()); + pts.MaxDiff(yystack_[7].value.as < double > ()); + pts.Conversion(yystack_[6].value.as < std::string > ()); + pts.MaxAxisPoints(yystack_[5].value.as < uint64_t > ()); + pts.LowerLimit(yystack_[4].value.as < double > ()); + pts.UpperLimit(yystack_[3].value.as < double > ()); + } +#line 5183 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 415: // typedef_axis_attribute: byte_order +#line 1181 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentTypedefAxis().ByteOrder(yystack_[0].value.as < A2lByteOrder > ()); } +#line 5189 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 416: // typedef_axis_attribute: deposit +#line 1182 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentTypedefAxis().Deposit(yystack_[0].value.as < A2lDeposit > ()); } +#line 5195 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 417: // typedef_axis_attribute: extended_limits +#line 1183 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentTypedefAxis().ExtendedLimits(yystack_[0].value.as < A2lExtendedLimits > ()); } +#line 5201 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 418: // typedef_axis_attribute: format +#line 1184 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentTypedefAxis().Format(yystack_[0].value.as < std::string > ()); } +#line 5207 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 419: // typedef_axis_attribute: monotony +#line 1185 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentTypedefAxis().Monotony(yystack_[0].value.as < A2lMonotony > ()); } +#line 5213 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 420: // typedef_axis_attribute: phys_unit +#line 1186 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentTypedefAxis().PhysUnit(yystack_[0].value.as < std::string > ()); } +#line 5219 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 421: // typedef_axis_attribute: step_size +#line 1187 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentTypedefAxis().StepSize(yystack_[0].value.as < double > ()); } +#line 5225 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 422: // typedef_blob: A2L_BEGIN TYPEDEF_BLOB IDENT STRING any_uint typedef_blob_attributes A2L_END TYPEDEF_BLOB +#line 1189 "D:/projects/a2llib/src/a2lparser.y" + { + auto& blob = scanner.CurrentTypedefBlob(); + blob.Name(yystack_[5].value.as < std::string > ()); + blob.Description(yystack_[4].value.as < std::string > ()); + blob.Size(yystack_[3].value.as < uint64_t > ()); + } +#line 5236 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 425: // typedef_blob_attribute: address_type +#line 1197 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentTypedefBlob().AddressType(yystack_[0].value.as < A2lAddressType > ()); } +#line 5242 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 426: // typedef_characteristic: A2L_BEGIN TYPEDEF_CHARACTERISTIC IDENT STRING IDENT IDENT any_float IDENT any_float any_float typedef_characteristic_attributes A2L_END TYPEDEF_CHARACTERISTIC +#line 1200 "D:/projects/a2llib/src/a2lparser.y" + { + auto& object = scanner.CurrentTypedefCharacteristic(); + object.Name(yystack_[10].value.as < std::string > ()); + object.Description(yystack_[9].value.as < std::string > ()); + object.Type(StringToCharacteristicType(yystack_[8].value.as < std::string > ())); + object.Deposit(yystack_[7].value.as < std::string > ()); + object.MaxDiff(yystack_[6].value.as < double > ()); + object.Conversion(yystack_[5].value.as < std::string > ()); + object.LowerLimit(yystack_[4].value.as < double > ()); + object.UpperLimit(yystack_[3].value.as < double > ()); + } +#line 5258 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 429: // typedef_characteristic_attribute: axis_descr +#line 1213 "D:/projects/a2llib/src/a2lparser.y" + { + auto& object = scanner.CurrentTypedefCharacteristic(); + object.AddAxisDescr(scanner.ReleaseAxisDescr()); + } +#line 5267 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 430: // typedef_characteristic_attribute: bit_mask +#line 1217 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentTypedefCharacteristic().BitMask(yystack_[0].value.as < uint64_t > ()); } +#line 5273 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 431: // typedef_characteristic_attribute: byte_order +#line 1218 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentTypedefCharacteristic().ByteOrder(yystack_[0].value.as < A2lByteOrder > ()); } +#line 5279 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 432: // typedef_characteristic_attribute: discrete +#line 1219 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentTypedefCharacteristic().Discrete(true); } +#line 5285 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 433: // typedef_characteristic_attribute: encoding +#line 1220 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentTypedefCharacteristic().Encoding(yystack_[0].value.as < A2lEncoding > ()); } +#line 5291 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 434: // typedef_characteristic_attribute: extended_limits +#line 1221 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentTypedefCharacteristic().ExtendedLimits(yystack_[0].value.as < A2lExtendedLimits > ()); } +#line 5297 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 435: // typedef_characteristic_attribute: format +#line 1222 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentTypedefCharacteristic().Format(yystack_[0].value.as < std::string > ()); } +#line 5303 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 436: // typedef_characteristic_attribute: matrix_dim +#line 1223 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentTypedefCharacteristic().MatrixDim(yystack_[0].value.as < std::vector > ()); } +#line 5309 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 437: // typedef_characteristic_attribute: number +#line 1224 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentTypedefCharacteristic().Number(yystack_[0].value.as < uint64_t > ()); } +#line 5315 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 438: // typedef_characteristic_attribute: phys_unit +#line 1225 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentTypedefCharacteristic().PhysUnit(yystack_[0].value.as < std::string > ()); } +#line 5321 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 439: // typedef_characteristic_attribute: step_size +#line 1226 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentTypedefCharacteristic().StepSize(yystack_[0].value.as < double > ()); } +#line 5327 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 440: // typedef_measurement: A2L_BEGIN TYPEDEF_MEASUREMENT IDENT STRING IDENT IDENT UINT any_float any_float any_float typedef_measurement_attributes A2L_END TYPEDEF_MEASUREMENT +#line 1229 "D:/projects/a2llib/src/a2lparser.y" + { + auto& meas = scanner.CurrentTypedefMeasurement(); + meas.Name(yystack_[10].value.as < std::string > ()); + meas.Description(yystack_[9].value.as < std::string > ()); + meas.DataType(StringToDataType(yystack_[8].value.as < std::string > ())); + meas.Conversion(yystack_[7].value.as < std::string > ()); + meas.Resolution(yystack_[6].value.as < uint64_t > ()); + meas.Accuracy(yystack_[5].value.as < double > ()); + meas.LowerLimit(yystack_[4].value.as < double > ()); + meas.UpperLimit(yystack_[3].value.as < double > ()); + } +#line 5343 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 443: // typedef_measurement_attribute: address_type +#line 1242 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentTypedefMeasurement().AddressType(yystack_[0].value.as < A2lAddressType > ()); } +#line 5349 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 444: // typedef_measurement_attribute: bit_mask +#line 1243 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentTypedefMeasurement().BitMask(yystack_[0].value.as < uint64_t > ()); } +#line 5355 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 445: // typedef_measurement_attribute: bit_operation +#line 1244 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentTypedefMeasurement().BitOperation(yystack_[0].value.as < A2lBitOperation > ()); } +#line 5361 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 446: // typedef_measurement_attribute: byte_order +#line 1245 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentTypedefMeasurement().ByteOrder(yystack_[0].value.as < A2lByteOrder > ()); } +#line 5367 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 447: // typedef_measurement_attribute: discrete +#line 1246 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentTypedefMeasurement().Discrete(true); } +#line 5373 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 448: // typedef_measurement_attribute: error_mask +#line 1247 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentTypedefMeasurement().ErrorMask(yystack_[0].value.as < uint64_t > ()); } +#line 5379 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 449: // typedef_measurement_attribute: format +#line 1248 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentTypedefMeasurement().Format(yystack_[0].value.as < std::string > ()); } +#line 5385 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 450: // typedef_measurement_attribute: layout +#line 1249 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentTypedefMeasurement().Layout(yystack_[0].value.as < A2lLayout > ()); } +#line 5391 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 451: // typedef_measurement_attribute: matrix_dim +#line 1250 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentTypedefMeasurement().MatrixDim(yystack_[0].value.as < std::vector > ()); } +#line 5397 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 452: // typedef_measurement_attribute: phys_unit +#line 1251 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentTypedefMeasurement().PhysUnit(yystack_[0].value.as < std::string > ()); } +#line 5403 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 453: // typedef_structure: A2L_BEGIN TYPEDEF_STRUCTURE IDENT STRING UINT typedef_structure_attributes A2L_END TYPEDEF_STRUCTURE +#line 1254 "D:/projects/a2llib/src/a2lparser.y" + { + auto& structure = scanner.CurrentTypedefStructure(); + structure.Name(yystack_[5].value.as < std::string > ()); + structure.Description(yystack_[4].value.as < std::string > ()); + structure.Size(yystack_[3].value.as < uint64_t > ()); + } +#line 5414 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 456: // typedef_structure_attribute: address_type +#line 1262 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentTypedefStructure().AddressType(yystack_[0].value.as < A2lAddressType > ()); } +#line 5420 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 457: // typedef_structure_attribute: consistent_exchange +#line 1263 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentTypedefStructure().ConsistentExchange(true); } +#line 5426 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 458: // typedef_structure_attribute: structure_component +#line 1264 "D:/projects/a2llib/src/a2lparser.y" + { + auto& structure = scanner.CurrentTypedefStructure(); + structure.AddStructureComponent(scanner.ReleaseStructureComponent()); } +#line 5434 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 459: // typedef_structure_attribute: symbol_type_link +#line 1267 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentTypedefStructure().SymbolTypeLink(yystack_[0].value.as < std::string > ()); } +#line 5440 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 460: // unit: A2L_BEGIN UNIT IDENT STRING STRING IDENT unit_attributes A2L_END UNIT +#line 1269 "D:/projects/a2llib/src/a2lparser.y" + { + auto& unit = scanner.CurrentUnit(); + unit.Name(yystack_[6].value.as < std::string > ()); + unit.Description(yystack_[5].value.as < std::string > ()); + unit.DisplayIdentifier(yystack_[4].value.as < std::string > ()); + unit.Type(StringToUnitType(yystack_[3].value.as < std::string > ())); + } +#line 5452 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 463: // unit_attribute: ref_unit +#line 1278 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentUnit().RefUnit(yystack_[0].value.as < std::string > ()); } +#line 5458 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 464: // unit_attribute: si_exponents +#line 1279 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentUnit().SiExponents(yystack_[0].value.as < A2lSiExponents > ()); } +#line 5464 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 465: // unit_attribute: unit_conversion +#line 1280 "D:/projects/a2llib/src/a2lparser.y" + { + scanner.CurrentUnit().Gradient(yystack_[0].value.as < std::pair > ().first); + scanner.CurrentUnit().Offset(yystack_[0].value.as < std::pair > ().second); + } +#line 5473 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 466: // user_rights: A2L_BEGIN USER_RIGHTS IDENT user_rights_attributes A2L_END USER_RIGHTS +#line 1285 "D:/projects/a2llib/src/a2lparser.y" + { + auto& user_right = scanner.CurrentUserRight(); + user_right.UserLevelId = yystack_[3].value.as < std::string > (); + } +#line 5482 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 469: // user_rights_attribute: read_only +#line 1291 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentUserRight().ReadOnly = true; } +#line 5488 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 470: // user_rights_attribute: ref_group +#line 1292 "D:/projects/a2llib/src/a2lparser.y" + { scanner.CurrentUserRight().RefGroupList.emplace_back(yystack_[0].value.as < std::vector > ()); } +#line 5494 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 471: // var_address: A2L_BEGIN VAR_ADDRESS uint_list A2L_END VAR_ADDRESS +#line 1294 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::vector > () = yystack_[2].value.as < std::vector > (); } +#line 5500 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 472: // var_characteristic: A2L_BEGIN VAR_CHARACTERISTIC IDENT ident_list var_characteristic_attribute A2L_END VAR_CHARACTERISTIC +#line 1297 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lVarCharacteristic > ().Name = yystack_[4].value.as < std::string > (); + yylhs.value.as < A2lVarCharacteristic > ().CriterionNameList = yystack_[3].value.as < std::vector > (); + yylhs.value.as < A2lVarCharacteristic > ().AddressList = yystack_[2].value.as < std::vector > (); + } +#line 5510 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 473: // var_characteristic_attribute: %empty +#line 1302 "D:/projects/a2llib/src/a2lparser.y" + {} +#line 5516 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 474: // var_characteristic_attribute: var_address +#line 1303 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::vector > () = yystack_[0].value.as < std::vector > (); } +#line 5522 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 475: // var_criterion: A2L_BEGIN VAR_CRITERION IDENT STRING var_criterion_attributes A2L_END VAR_CRITERION +#line 1305 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lVarCriterion > () = scanner.VarCriterion(); + scanner.VarCriterion() = {}; + yylhs.value.as < A2lVarCriterion > ().Name = yystack_[4].value.as < std::string > (); + yylhs.value.as < A2lVarCriterion > ().Description = yystack_[3].value.as < std::string > (); +} +#line 5533 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 478: // var_criterion_attribute: var_measurement +#line 1314 "D:/projects/a2llib/src/a2lparser.y" + { scanner.VarCriterion().Measurement = yystack_[0].value.as < std::string > (); } +#line 5539 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 479: // var_criterion_attribute: var_selection_characteristic +#line 1315 "D:/projects/a2llib/src/a2lparser.y" + { scanner.VarCriterion().SelectionCharacteristic = yystack_[0].value.as < std::string > (); } +#line 5545 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 480: // var_forbidden_comb: A2L_BEGIN VAR_FORBIDDEN_COMB key_value_list A2L_END VAR_FORBIDDEN_COMB +#line 1317 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::map > ()= yystack_[2].value.as < std::map > (); } +#line 5551 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 484: // variant_coding_attribute: var_characteristic +#line 1322 "D:/projects/a2llib/src/a2lparser.y" + { + auto& coding = scanner.CurrentModule().VariantCoding(); + coding.CharacteristicList.emplace(yystack_[0].value.as < A2lVarCharacteristic > ().Name, yystack_[0].value.as < A2lVarCharacteristic > ()); + } +#line 5560 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 485: // variant_coding_attribute: var_criterion +#line 1326 "D:/projects/a2llib/src/a2lparser.y" + { + auto& coding = scanner.CurrentModule().VariantCoding(); + coding.CriterionList.emplace(yystack_[0].value.as < A2lVarCriterion > ().Name, yystack_[0].value.as < A2lVarCriterion > ()); + } +#line 5569 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 486: // variant_coding_attribute: var_forbidden_comb +#line 1330 "D:/projects/a2llib/src/a2lparser.y" + { + auto& coding = scanner.CurrentModule().VariantCoding(); + coding.ForbiddenCombList.emplace_back(yystack_[0].value.as < std::map > ()); + } +#line 5578 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 487: // variant_coding_attribute: var_naming +#line 1334 "D:/projects/a2llib/src/a2lparser.y" + { + auto& coding = scanner.CurrentModule().VariantCoding(); + coding.Naming = yystack_[0].value.as < std::string > (); + } +#line 5587 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 488: // variant_coding_attribute: var_separator +#line 1338 "D:/projects/a2llib/src/a2lparser.y" + { + auto& coding = scanner.CurrentModule().VariantCoding(); + coding.Separator = yystack_[0].value.as < std::string > (); + } +#line 5596 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 489: // virtual: A2L_BEGIN VIRTUAL ident_list A2L_END VIRTUAL +#line 1343 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::vector > () = yystack_[2].value.as < std::vector > (); } +#line 5602 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 490: // virtual_characteristic: A2L_BEGIN VIRTUAL_CHARACTERISTIC STRING ident_list A2L_END VIRTUAL_CHARACTERISTIC +#line 1345 "D:/projects/a2llib/src/a2lparser.y" + {yylhs.value.as < A2lDependentCharacteristic > () = {yystack_[3].value.as < std::string > (), yystack_[2].value.as < std::vector > ()}; } +#line 5608 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 491: // a2ml: A2ML +#line 1348 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 5614 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 492: // a2ml_version: A2ML_VERSION any_uint any_uint +#line 1349 "D:/projects/a2llib/src/a2lparser.y" + { + file.A2mlVersion().VersionNo = yystack_[1].value.as < uint64_t > (); + file.A2mlVersion().VersionNo = yystack_[0].value.as < uint64_t > (); +} +#line 5623 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 493: // asap2_version: ASAP2_VERSION any_uint any_uint +#line 1354 "D:/projects/a2llib/src/a2lparser.y" + { + file.A2lVersion().VersionNo = yystack_[1].value.as < uint64_t > (); + file.A2lVersion().UpgradeNo = yystack_[0].value.as < uint64_t > (); +} +#line 5632 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 494: // asap2_version: ASAP2_VERSION STRING +#line 1357 "D:/projects/a2llib/src/a2lparser.y" + { + file.A2lVersion().FromString(yystack_[0].value.as < std::string > ()); +} +#line 5640 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 495: // addr_epk: ADDR_EPK any_uint +#line 1361 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < uint64_t > () = yystack_[0].value.as < uint64_t > (); } +#line 5646 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 496: // address_type: ADDRESS_TYPE IDENT +#line 1362 "D:/projects/a2llib/src/a2lparser.y" + {yylhs.value.as < A2lAddressType > () = StringToAddressType(yystack_[0].value.as < std::string > ()); } +#line 5652 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 497: // alignment_byte: ALIGNMENT_BYTE any_uint +#line 1363 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < uint64_t > () = yystack_[0].value.as < uint64_t > (); } +#line 5658 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 498: // alignment_float16_ieee: ALIGNMENT_FLOAT16_IEEE any_uint +#line 1364 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < uint64_t > () = yystack_[0].value.as < uint64_t > (); } +#line 5664 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 499: // alignment_float32_ieee: ALIGNMENT_FLOAT32_IEEE any_uint +#line 1365 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < uint64_t > () = yystack_[0].value.as < uint64_t > (); } +#line 5670 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 500: // alignment_float64_ieee: ALIGNMENT_FLOAT64_IEEE any_uint +#line 1366 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < uint64_t > () = yystack_[0].value.as < uint64_t > (); } +#line 5676 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 501: // alignment_int64: ALIGNMENT_INT64 any_uint +#line 1367 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < uint64_t > () = yystack_[0].value.as < uint64_t > (); } +#line 5682 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 502: // alignment_long: ALIGNMENT_LONG any_uint +#line 1368 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < uint64_t > () = yystack_[0].value.as < uint64_t > (); } +#line 5688 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 503: // alignment_word: ALIGNMENT_WORD any_uint +#line 1369 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < uint64_t > () = yystack_[0].value.as < uint64_t > (); } +#line 5694 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 504: // annotation_label: ANNOTATION_LABEL STRING +#line 1370 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 5700 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 505: // annotation_origin: ANNOTATION_ORIGIN STRING +#line 1371 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 5706 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 506: // array_size: ARRAY_SIZE any_uint +#line 1372 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < uint64_t > () = yystack_[0].value.as < uint64_t > (); } +#line 5712 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 507: // ar_prototype_of: AR_PROTOTYPE_OF IDENT +#line 1373 "D:/projects/a2llib/src/a2lparser.y" + {yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > ();} +#line 5718 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 508: // axis_pts_ref: AXIS_PTS_REF IDENT +#line 1374 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 5724 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 509: // axis_pts_x: AXIS_PTS_X any_uint IDENT IDENT IDENT +#line 1375 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lAxisPts > ().Position = yystack_[3].value.as < uint64_t > (); + yylhs.value.as < A2lAxisPts > ().DataType = StringToDataType(yystack_[2].value.as < std::string > ()); + yylhs.value.as < A2lAxisPts > ().IndexOrder = StringToIndexOrder(yystack_[1].value.as < std::string > ()); + yylhs.value.as < A2lAxisPts > ().AddressType = StringToAddressType(yystack_[0].value.as < std::string > ()); + } +#line 5735 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 510: // axis_pts_y: AXIS_PTS_Y any_uint IDENT IDENT IDENT +#line 1381 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lAxisPts > ().Position = yystack_[3].value.as < uint64_t > (); + yylhs.value.as < A2lAxisPts > ().DataType = StringToDataType(yystack_[2].value.as < std::string > ()); + yylhs.value.as < A2lAxisPts > ().IndexOrder = StringToIndexOrder(yystack_[1].value.as < std::string > ()); + yylhs.value.as < A2lAxisPts > ().AddressType = StringToAddressType(yystack_[0].value.as < std::string > ()); + } +#line 5746 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 511: // axis_pts_z: AXIS_PTS_Z any_uint IDENT IDENT IDENT +#line 1387 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lAxisPts > ().Position = yystack_[3].value.as < uint64_t > (); + yylhs.value.as < A2lAxisPts > ().DataType = StringToDataType(yystack_[2].value.as < std::string > ()); + yylhs.value.as < A2lAxisPts > ().IndexOrder = StringToIndexOrder(yystack_[1].value.as < std::string > ()); + yylhs.value.as < A2lAxisPts > ().AddressType = StringToAddressType(yystack_[0].value.as < std::string > ()); + } +#line 5757 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 512: // axis_pts_4: AXIS_PTS_4 any_uint IDENT IDENT IDENT +#line 1393 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lAxisPts > ().Position = yystack_[3].value.as < uint64_t > (); + yylhs.value.as < A2lAxisPts > ().DataType = StringToDataType(yystack_[2].value.as < std::string > ()); + yylhs.value.as < A2lAxisPts > ().IndexOrder = StringToIndexOrder(yystack_[1].value.as < std::string > ()); + yylhs.value.as < A2lAxisPts > ().AddressType = StringToAddressType(yystack_[0].value.as < std::string > ()); + } +#line 5768 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 513: // axis_pts_5: AXIS_PTS_5 any_uint IDENT IDENT IDENT +#line 1399 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lAxisPts > ().Position = yystack_[3].value.as < uint64_t > (); + yylhs.value.as < A2lAxisPts > ().DataType = StringToDataType(yystack_[2].value.as < std::string > ()); + yylhs.value.as < A2lAxisPts > ().IndexOrder = StringToIndexOrder(yystack_[1].value.as < std::string > ()); + yylhs.value.as < A2lAxisPts > ().AddressType = StringToAddressType(yystack_[0].value.as < std::string > ()); + } +#line 5779 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 514: // axis_rescale_x: AXIS_RESCALE_X any_uint IDENT any_uint IDENT IDENT +#line 1405 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lAxisRescale > ().Position = yystack_[4].value.as < uint64_t > (); + yylhs.value.as < A2lAxisRescale > ().DataType = StringToDataType(yystack_[3].value.as < std::string > ()); + yylhs.value.as < A2lAxisRescale > ().MaxNoRescalePairs = yystack_[2].value.as < uint64_t > (); + yylhs.value.as < A2lAxisRescale > ().IndexOrder = StringToIndexOrder(yystack_[1].value.as < std::string > ()); + yylhs.value.as < A2lAxisRescale > ().AddressType = StringToAddressType(yystack_[0].value.as < std::string > ()); + } +#line 5791 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 515: // bit_mask: BIT_MASK any_uint +#line 1412 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < uint64_t > () = yystack_[0].value.as < uint64_t > (); } +#line 5797 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 516: // byte_order: A2L_BYTE_ORDER IDENT +#line 1413 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < A2lByteOrder > () = StringToByteOrder(yystack_[0].value.as < std::string > ()); } +#line 5803 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 517: // calibration_access: CALIBRATION_ACCESS IDENT +#line 1414 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < A2lCalibrationAccess > () = StringToCalibrationAccess(yystack_[0].value.as < std::string > ()); } +#line 5809 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 518: // calibration_handle_text: CALIBRATION_HANDLE_TEXT STRING +#line 1415 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 5815 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 519: // coeffs: COEFFS any_float any_float any_float any_float any_float any_float +#line 1416 "D:/projects/a2llib/src/a2lparser.y" + { + std::vector list; + list.push_back(yystack_[5].value.as < double > ()); + list.push_back(yystack_[4].value.as < double > ()); + list.push_back(yystack_[3].value.as < double > ()); + list.push_back(yystack_[2].value.as < double > ()); + list.push_back(yystack_[1].value.as < double > ()); + list.push_back(yystack_[0].value.as < double > ()); + yylhs.value.as < std::vector > () = list; +} +#line 5830 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 520: // coeffs_linear: COEFFS_LINEAR any_float any_float +#line 1426 "D:/projects/a2llib/src/a2lparser.y" + { + std::vector list; + list.push_back(yystack_[1].value.as < double > ()); + list.push_back(yystack_[0].value.as < double > ()); + yylhs.value.as < std::vector > () = list; +} +#line 5841 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 521: // comparison_quantity: COMPARISON_QUANTITY IDENT +#line 1432 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 5847 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 522: // compu_tab_ref: COMPU_TAB_REF IDENT +#line 1433 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 5853 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 524: // conversion: CONVERSION IDENT +#line 1435 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 5859 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 525: // cpu_type: CPU_TYPE STRING +#line 1436 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 5865 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 526: // curve_axis_ref: CURVE_AXIS_REF IDENT +#line 1437 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 5871 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 527: // customer: CUSTOMER STRING +#line 1438 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 5877 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 528: // customer_no: CUSTOMER_NO STRING +#line 1439 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 5883 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 529: // data_size: DATA_SIZE any_uint +#line 1440 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < uint64_t > () = yystack_[0].value.as < uint64_t > (); } +#line 5889 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 530: // default_value: DEFAULT_VALUE STRING +#line 1441 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 5895 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 531: // default_value_numeric: DEFAULT_VALUE_NUMERIC any_float +#line 1442 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < double > () = yystack_[0].value.as < double > (); } +#line 5901 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 532: // deposit: DEPOSIT IDENT +#line 1443 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < A2lDeposit > () = StringToDeposit(yystack_[0].value.as < std::string > ()); } +#line 5907 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 534: // display_identifier: DISPLAY_IDENTIFIER IDENT +#line 1445 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 5913 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 535: // display_identifier: A2L_BEGIN DISPLAY_IDENTIFIER IDENT A2L_END DISPLAY_IDENTIFIER +#line 1446 "D:/projects/a2llib/src/a2lparser.y" + {yylhs.value.as < std::string > () = yystack_[2].value.as < std::string > ();} +#line 5919 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 536: // dist_op_x: DIST_OP_X any_uint IDENT +#line 1447 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lDistOp > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lDistOp > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); + } +#line 5928 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 537: // dist_op_y: DIST_OP_Y any_uint IDENT +#line 1451 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lDistOp > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lDistOp > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); + } +#line 5937 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 538: // dist_op_z: DIST_OP_Z any_uint IDENT +#line 1455 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lDistOp > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lDistOp > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); + } +#line 5946 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 539: // dist_op_4: DIST_OP_4 any_uint IDENT +#line 1459 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lDistOp > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lDistOp > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); + } +#line 5955 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 540: // dist_op_5: DIST_OP_5 any_uint IDENT +#line 1463 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lDistOp > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lDistOp > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); + } +#line 5964 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 541: // ecu: ECU STRING +#line 1467 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 5970 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 542: // ecu_address: ECU_ADDRESS any_uint +#line 1468 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < uint64_t > () = yystack_[0].value.as < uint64_t > (); } +#line 5976 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 543: // ecu_address_extension: ECU_ADDRESS_EXTENSION any_int +#line 1469 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < int64_t > () = yystack_[0].value.as < int64_t > (); } +#line 5982 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 544: // ecu_calibration_offset: ECU_CALIBRATION_OFFSET any_int +#line 1470 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < int64_t > () = yystack_[0].value.as < int64_t > (); } +#line 5988 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 545: // encoding: ENCODING IDENT +#line 1471 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < A2lEncoding > () = StringToEncoding(yystack_[0].value.as < std::string > ()); } +#line 5994 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 546: // epk: EPK STRING +#line 1472 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 6000 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 547: // error_mask: ERROR_MASK any_uint +#line 1473 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < uint64_t > () = yystack_[0].value.as < uint64_t > (); } +#line 6006 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 548: // extended_limits: EXTENDED_LIMITS any_float any_float +#line 1474 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < A2lExtendedLimits > () = A2lExtendedLimits(yystack_[1].value.as < double > (),yystack_[0].value.as < double > ()); } +#line 6012 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 549: // fix_axis_par: FIX_AXIS_PAR any_float any_float any_uint +#line 1475 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < A2lFixAxisPar > () = {yystack_[2].value.as < double > (), yystack_[1].value.as < double > (), yystack_[0].value.as < uint64_t > ()}; } +#line 6018 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 550: // fix_axis_par_dist: FIX_AXIS_PAR_DIST any_float any_float any_uint +#line 1476 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < A2lFixAxisParDist > () = {yystack_[2].value.as < double > (), yystack_[1].value.as < double > (), yystack_[0].value.as < uint64_t > ()}; } +#line 6024 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 551: // fix_no_axis_pts_x: FIX_NO_AXIS_PTS_X any_uint +#line 1477 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < uint64_t > () = yystack_[0].value.as < uint64_t > (); } +#line 6030 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 552: // fix_no_axis_pts_y: FIX_NO_AXIS_PTS_Y any_uint +#line 1478 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < uint64_t > () = yystack_[0].value.as < uint64_t > (); } +#line 6036 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 553: // fix_no_axis_pts_z: FIX_NO_AXIS_PTS_Z any_uint +#line 1479 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < uint64_t > () = yystack_[0].value.as < uint64_t > (); } +#line 6042 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 554: // fix_no_axis_pts_4: FIX_NO_AXIS_PTS_4 any_uint +#line 1480 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < uint64_t > () = yystack_[0].value.as < uint64_t > (); } +#line 6048 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 555: // fix_no_axis_pts_5: FIX_NO_AXIS_PTS_5 any_uint +#line 1481 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < uint64_t > () = yystack_[0].value.as < uint64_t > (); } +#line 6054 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 556: // fnc_values: FNC_VALUES any_uint IDENT IDENT IDENT +#line 1482 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lFncValue > ().Position = yystack_[3].value.as < uint64_t > (); + yylhs.value.as < A2lFncValue > ().DataType = StringToDataType(yystack_[2].value.as < std::string > ()); + yylhs.value.as < A2lFncValue > ().IndexMode = StringToIndexMode(yystack_[1].value.as < std::string > ()); + yylhs.value.as < A2lFncValue > ().AddressType = StringToAddressType(yystack_[0].value.as < std::string > ()); +} +#line 6065 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 557: // format: FORMAT STRING +#line 1488 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 6071 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 558: // formula_inv: FORMULA_INV STRING +#line 1489 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 6077 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 559: // frame_measurement: FRAME_MEASUREMENT ident_list +#line 1490 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::vector > () = yystack_[0].value.as < std::vector > (); } +#line 6083 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 560: // function_version: FUNCTION_VERSION STRING +#line 1491 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 6089 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 562: // identification: IDENTIFICATION any_uint IDENT +#line 1493 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lIdentification > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lIdentification > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); +} +#line 6098 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 563: // if_data: IF_DATA +#line 1497 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 6104 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 564: // input_quantity: INPUT_QUANTITY IDENT +#line 1498 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 6110 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 565: // layout: LAYOUT IDENT +#line 1499 "D:/projects/a2llib/src/a2lparser.y" + {yylhs.value.as < A2lLayout > () = StringToLayout(yystack_[0].value.as < std::string > ()); } +#line 6116 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 566: // left_shift: LEFT_SHIFT any_uint +#line 1500 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < uint64_t > () = yystack_[0].value.as < uint64_t > (); } +#line 6122 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 567: // limits: LIMITS any_float any_float +#line 1501 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < A2lLimits > () = {yystack_[1].value.as < double > (),yystack_[0].value.as < double > ()}; } +#line 6128 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 568: // matrix_dim: MATRIX_DIM uint_list +#line 1502 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::vector > () = yystack_[0].value.as < std::vector > (); } +#line 6134 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 569: // max_grad: MAX_GRAD any_float +#line 1503 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < double > () = yystack_[0].value.as < double > (); } +#line 6140 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 570: // max_refresh: MAX_REFRESH any_uint any_uint +#line 1504 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < A2lMaxRefresh > () = {yystack_[1].value.as < uint64_t > (),yystack_[0].value.as < uint64_t > ()}; } +#line 6146 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 571: // model_link: MODEL_LINK STRING +#line 1505 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 6152 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 572: // monotony: MONOTONY IDENT +#line 1506 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < A2lMonotony > () = StringToMonotony(yystack_[0].value.as < std::string > ()); } +#line 6158 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 573: // no_axis_pts_x: NO_AXIS_PTS_X any_uint IDENT +#line 1507 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lDistOp > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lDistOp > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); + } +#line 6167 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 574: // no_axis_pts_y: NO_AXIS_PTS_Y any_uint IDENT +#line 1511 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lDistOp > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lDistOp > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); + } +#line 6176 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 575: // no_axis_pts_z: NO_AXIS_PTS_Z any_uint IDENT +#line 1515 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lDistOp > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lDistOp > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); + } +#line 6185 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 576: // no_axis_pts_4: NO_AXIS_PTS_4 any_uint IDENT +#line 1519 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lDistOp > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lDistOp > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); + } +#line 6194 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 577: // no_axis_pts_5: NO_AXIS_PTS_5 any_uint IDENT +#line 1523 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lDistOp > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lDistOp > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); + } +#line 6203 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 578: // no_of_interfaces: NO_OF_INTERFACES any_uint +#line 1527 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < uint64_t > () = yystack_[0].value.as < uint64_t > (); } +#line 6209 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 579: // no_rescale_x: NO_RESCALE_X any_uint IDENT +#line 1528 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lDistOp > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lDistOp > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); + } +#line 6218 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 580: // number: NUMBER any_uint +#line 1532 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < uint64_t > () = yystack_[0].value.as < uint64_t > (); } +#line 6224 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 581: // offset_x: OFFSET_X any_uint IDENT +#line 1533 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lDistOp > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lDistOp > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); + } +#line 6233 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 582: // offset_y: OFFSET_Y any_uint IDENT +#line 1537 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lDistOp > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lDistOp > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); + } +#line 6242 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 583: // offset_z: OFFSET_Z any_uint IDENT +#line 1541 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lDistOp > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lDistOp > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); + } +#line 6251 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 584: // offset_4: OFFSET_4 any_uint IDENT +#line 1545 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lDistOp > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lDistOp > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); + } +#line 6260 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 585: // offset_5: OFFSET_5 any_uint IDENT +#line 1549 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lDistOp > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lDistOp > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); + } +#line 6269 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 586: // phone_no: PHONE_NO STRING +#line 1553 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 6275 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 587: // phys_unit: PHYS_UNIT STRING +#line 1554 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 6281 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 588: // proj_no: IDENT +#line 1555 "D:/projects/a2llib/src/a2lparser.y" + {yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > ();} +#line 6287 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 589: // proj_no: UINT +#line 1556 "D:/projects/a2llib/src/a2lparser.y" + {yylhs.value.as < std::string > () = std::to_string(yystack_[0].value.as < uint64_t > ());} +#line 6293 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 590: // project_no: PROJECT_NO proj_no +#line 1557 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > ();} +#line 6299 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 593: // ref_memory_segment: REF_MEMORY_SEGMENT IDENT +#line 1561 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 6305 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 594: // ref_unit: REF_UNIT IDENT +#line 1562 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 6311 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 595: // reserved: RESERVED any_uint IDENT +#line 1563 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lDistOp > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lDistOp > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); + } +#line 6320 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 596: // right_shift: RIGHT_SHIFT any_uint +#line 1567 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < uint64_t > () = yystack_[0].value.as < uint64_t > (); } +#line 6326 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 597: // rip_addr_w: RIP_ADDR_W any_uint IDENT +#line 1568 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lDistOp > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lDistOp > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); + } +#line 6335 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 598: // rip_addr_x: RIP_ADDR_X any_uint IDENT +#line 1572 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lDistOp > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lDistOp > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); + } +#line 6344 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 599: // rip_addr_y: RIP_ADDR_Y any_uint IDENT +#line 1576 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lDistOp > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lDistOp > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); + } +#line 6353 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 600: // rip_addr_z: RIP_ADDR_Z any_uint IDENT +#line 1580 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lDistOp > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lDistOp > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); + } +#line 6362 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 601: // rip_addr_4: RIP_ADDR_4 any_uint IDENT +#line 1584 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lDistOp > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lDistOp > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); + } +#line 6371 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 602: // rip_addr_5: RIP_ADDR_5 any_uint IDENT +#line 1588 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lDistOp > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lDistOp > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); + } +#line 6380 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 605: // shift_op_x: SHIFT_OP_X any_uint IDENT +#line 1594 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lDistOp > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lDistOp > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); + } +#line 6389 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 606: // shift_op_y: SHIFT_OP_Y any_uint IDENT +#line 1598 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lDistOp > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lDistOp > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); + } +#line 6398 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 607: // shift_op_z: SHIFT_OP_Z any_uint IDENT +#line 1602 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lDistOp > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lDistOp > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); + } +#line 6407 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 608: // shift_op_4: SHIFT_OP_4 any_uint IDENT +#line 1606 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lDistOp > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lDistOp > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); + } +#line 6416 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 609: // shift_op_5: SHIFT_OP_5 any_uint IDENT +#line 1610 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lDistOp > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lDistOp > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); + } +#line 6425 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 611: // si_exponents: SI_EXPONENTS any_int any_int any_int any_int any_int any_int any_int +#line 1615 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lSiExponents > ().Length = yystack_[6].value.as < int64_t > (); + yylhs.value.as < A2lSiExponents > ().Mass = yystack_[5].value.as < int64_t > (); + yylhs.value.as < A2lSiExponents > ().Time = yystack_[4].value.as < int64_t > (); + yylhs.value.as < A2lSiExponents > ().ElectricCurrent = yystack_[3].value.as < int64_t > (); + yylhs.value.as < A2lSiExponents > ().Temperature = yystack_[2].value.as < int64_t > (); + yylhs.value.as < A2lSiExponents > ().AmountOfSubstance = yystack_[1].value.as < int64_t > (); + yylhs.value.as < A2lSiExponents > ().LuminousIntensity = yystack_[0].value.as < int64_t > (); +} +#line 6439 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 612: // src_addr_x: SRC_ADDR_X any_uint IDENT +#line 1624 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lDistOp > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lDistOp > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); + } +#line 6448 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 613: // src_addr_y: SRC_ADDR_Y any_uint IDENT +#line 1628 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lDistOp > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lDistOp > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); + } +#line 6457 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 614: // src_addr_z: SRC_ADDR_Z any_uint IDENT +#line 1632 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lDistOp > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lDistOp > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); + } +#line 6466 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 615: // src_addr_4: SRC_ADDR_4 any_uint IDENT +#line 1636 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lDistOp > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lDistOp > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); + } +#line 6475 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 616: // src_addr_5: SRC_ADDR_5 any_uint IDENT +#line 1640 "D:/projects/a2llib/src/a2lparser.y" + { + yylhs.value.as < A2lDistOp > ().Position = yystack_[1].value.as < uint64_t > (); + yylhs.value.as < A2lDistOp > ().DataType = StringToDataType(yystack_[0].value.as < std::string > ()); + } +#line 6484 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 619: // status_string_ref: STATUS_STRING_REF IDENT +#line 1646 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > ();} +#line 6490 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 620: // step_size: STEP_SIZE any_float +#line 1647 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < double > () = yystack_[0].value.as < double > (); } +#line 6496 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 621: // supplier: SUPPLIER STRING +#line 1648 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > ();} +#line 6502 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 622: // symbol_link: SYMBOL_LINK STRING any_int +#line 1649 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < A2lSymbolLink > () = {yystack_[1].value.as < std::string > (),yystack_[0].value.as < int64_t > ()}; } +#line 6508 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 623: // symbol_type_link: SYMBOL_TYPE_LINK STRING +#line 1650 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > ();} +#line 6514 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 624: // system_constant: SYSTEM_CONSTANT STRING STRING +#line 1651 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::pair > () = {yystack_[1].value.as < std::string > (),yystack_[0].value.as < std::string > ()};} +#line 6520 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 625: // unit_conversion: UNIT_CONVERSION any_float any_float +#line 1652 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::pair > () = {yystack_[1].value.as < double > (),yystack_[0].value.as < double > ()};} +#line 6526 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 626: // user: USER STRING +#line 1653 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > ();} +#line 6532 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 627: // var_measurement: VAR_MEASUREMENT IDENT +#line 1654 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 6538 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 628: // var_naming: VAR_NAMING IDENT +#line 1655 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 6544 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 629: // var_selection_characteristic: VAR_SELECTION_CHARACTERISTIC IDENT +#line 1656 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 6550 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 630: // var_separator: VAR_SEPARATOR STRING +#line 1657 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 6556 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + case 631: // version: A2L_VERSION STRING +#line 1658 "D:/projects/a2llib/src/a2lparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > ();} +#line 6562 "D:/projects/a2llib/src/a2lparser.cpp" + break; + + +#line 6566 "D:/projects/a2llib/src/a2lparser.cpp" + + default: + break; + } + } +#if YY_EXCEPTIONS + catch (const syntax_error& yyexc) + { + YYCDEBUG << "Caught exception: " << yyexc.what() << '\n'; + error (yyexc); + YYERROR; + } +#endif // YY_EXCEPTIONS + YY_SYMBOL_PRINT ("-> $$ =", yylhs); + yypop_ (yylen); + yylen = 0; + + // Shift the result of the reduction. + yypush_ (YY_NULLPTR, YY_MOVE (yylhs)); + } + goto yynewstate; + + + /*--------------------------------------. + | yyerrlab -- here on detecting error. | + `--------------------------------------*/ + yyerrlab: + // If not already recovering from an error, report this error. + if (!yyerrstatus_) + { + ++yynerrs_; + std::string msg = YY_("syntax error"); + error (YY_MOVE (msg)); + } + + + if (yyerrstatus_ == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + // Return failure if at end of input. + if (yyla.kind () == symbol_kind::S_YYEOF) + YYABORT; + else if (!yyla.empty ()) + { + yy_destroy_ ("Error: discarding", yyla); + yyla.clear (); + } + } + + // Else will try to reuse lookahead token after shifting the error token. + goto yyerrlab1; + + + /*---------------------------------------------------. + | yyerrorlab -- error raised explicitly by YYERROR. | + `---------------------------------------------------*/ + yyerrorlab: + /* Pacify compilers when the user code never invokes YYERROR and + the label yyerrorlab therefore never appears in user code. */ + if (false) + YYERROR; + + /* Do not reclaim the symbols of the rule whose action triggered + this YYERROR. */ + yypop_ (yylen); + yylen = 0; + YY_STACK_PRINT (); + goto yyerrlab1; + + + /*-------------------------------------------------------------. + | yyerrlab1 -- common code for both syntax error and YYERROR. | + `-------------------------------------------------------------*/ + yyerrlab1: + yyerrstatus_ = 3; // Each real token shifted decrements this. + // Pop stack until we find a state that shifts the error token. + for (;;) + { + yyn = yypact_[+yystack_[0].state]; + if (!yy_pact_value_is_default_ (yyn)) + { + yyn += symbol_kind::S_YYerror; + if (0 <= yyn && yyn <= yylast_ + && yycheck_[yyn] == symbol_kind::S_YYerror) + { + yyn = yytable_[yyn]; + if (0 < yyn) + break; + } + } + + // Pop the current state because it cannot handle the error token. + if (yystack_.size () == 1) + YYABORT; + + yy_destroy_ ("Error: popping", yystack_[0]); + yypop_ (); + YY_STACK_PRINT (); + } + { + stack_symbol_type error_token; + + + // Shift the error token. + error_token.state = state_type (yyn); + yypush_ ("Shifting", YY_MOVE (error_token)); + } + goto yynewstate; + + + /*-------------------------------------. + | yyacceptlab -- YYACCEPT comes here. | + `-------------------------------------*/ + yyacceptlab: + yyresult = 0; + goto yyreturn; + + + /*-----------------------------------. + | yyabortlab -- YYABORT comes here. | + `-----------------------------------*/ + yyabortlab: + yyresult = 1; + goto yyreturn; + + + /*-----------------------------------------------------. + | yyreturn -- parsing is finished, return the result. | + `-----------------------------------------------------*/ + yyreturn: + if (!yyla.empty ()) + yy_destroy_ ("Cleanup: discarding lookahead", yyla); + + /* Do not reclaim the symbols of the rule whose action triggered + this YYABORT or YYACCEPT. */ + yypop_ (yylen); + YY_STACK_PRINT (); + while (1 < yystack_.size ()) + { + yy_destroy_ ("Cleanup: popping", yystack_[0]); + yypop_ (); + } + + return yyresult; + } +#if YY_EXCEPTIONS + catch (...) + { + YYCDEBUG << "Exception caught: cleaning lookahead and stack\n"; + // Do not try to display the values of the reclaimed symbols, + // as their printers might throw an exception. + if (!yyla.empty ()) + yy_destroy_ (YY_NULLPTR, yyla); + + while (1 < yystack_.size ()) + { + yy_destroy_ (YY_NULLPTR, yystack_[0]); + yypop_ (); + } + throw; + } +#endif // YY_EXCEPTIONS + } + + void + A2lParser::error (const syntax_error& yyexc) + { + error (yyexc.what ()); + } + +#if A2LDEBUG || 0 + const char * + A2lParser::symbol_name (symbol_kind_type yysymbol) + { + return yytname_[yysymbol]; + } +#endif // #if A2LDEBUG || 0 + + + + + + + + + + const short A2lParser::yypact_ninf_ = -899; + + const signed char A2lParser::yytable_ninf_ = -1; + + const short + A2lParser::yypact_[] = + { + 53, 78, 127, 156, -899, -899, -899, -899, 168, -899, + -31, 168, -899, -899, -899, 125, 168, 133, -899, 164, + -7, -899, -899, 195, -899, 205, 130, 74, -899, -899, + 218, -899, 62, -899, 126, 273, 151, -899, -899, -899, + 79, -899, -899, -899, -899, -899, 920, 179, -899, -899, + -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, -899, -899, -899, -899, -899, 280, 284, + 305, 345, 350, 351, 356, -899, 367, 368, 371, 376, + 377, 311, 379, 385, 389, 397, 401, 408, 420, 423, + 426, 428, -899, -899, 433, 434, 445, 447, 449, 450, + 451, 223, 452, 453, 454, 457, 458, -899, -899, -899, + 461, 463, 464, 468, 476, 477, 478, -899, 22, 168, + 168, 474, 483, 492, 493, 168, 442, 496, -899, 168, + -899, -899, 497, 499, 473, 372, 1101, 501, 500, 168, + 506, 516, 517, 518, 55, 129, 324, 526, 527, -899, + -899, -899, -899, -899, -899, 530, 168, 168, 533, 168, + 168, -899, -899, 168, 168, 108, 187, 168, 531, 410, + 168, 168, 168, 168, 168, 168, 168, 535, 168, 536, + 538, -899, -899, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, 30, 421, 168, 539, 540, 543, 544, + 335, 545, 168, 546, 549, 550, 553, -899, -899, -899, + -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, -899, 414, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, -899, -899, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, -899, -899, -899, -899, -899, -899, 556, + 561, -899, 564, 566, -899, 570, 418, 381, -899, -899, + -899, -899, 571, 577, -899, -899, -899, -899, 579, -899, + 581, 584, -899, -899, 313, 168, -899, 505, 488, 585, + -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, + -899, 266, 490, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, -899, 168, -899, -899, -899, -899, -899, + -899, -899, -899, -899, -899, -899, -899, 592, 594, 595, + -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, -899, 596, -899, -899, 598, 602, 603, + 604, 605, 608, 610, 611, 612, 614, 615, -899, -899, + -899, -899, -899, 616, 617, 619, 620, 621, 622, 624, + 625, 629, 631, 632, 633, 635, 636, 637, 644, 646, + 647, 649, 650, 652, 653, 654, 657, 659, 660, 661, + 663, 664, 667, 168, 313, 99, 313, 593, 39, -899, + -899, -899, -899, 669, 113, 313, 344, 313, -899, 313, + 313, -899, -899, -899, -899, 313, 65, -899, 57, -899, + 670, -899, -899, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, 672, 402, 313, 168, 168, 673, -899, + 679, 681, 683, 685, 686, 168, -899, -899, -899, -899, + -899, 687, -899, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, + -899, 688, 689, 507, 690, -899, -899, 691, 313, 519, + 509, -899, 693, -899, -899, -899, -899, -899, 18, 301, + 203, -899, 502, 700, 701, 61, 666, 705, 707, 335, + 168, 709, 710, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, 708, 142, 313, 58, 711, 80, 712, + 665, 713, -899, -899, 626, -899, -899, -899, -899, 96, + 695, 321, 346, 359, 364, 365, 374, 386, 390, 394, + -899, 48, 618, 721, -899, -899, -899, -899, -899, -899, + -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, + 313, -899, 168, 21, 723, 724, 727, 729, 730, 732, + 733, 734, 168, -899, -899, 313, 313, 736, -899, -899, + 548, 738, 335, 313, -899, -899, -899, -899, 597, 551, + -899, 741, -3, -899, -899, 168, 743, -899, -899, -899, + -899, 168, -899, 335, 313, 655, 699, 313, 313, 747, + 748, -899, -899, -899, -899, -899, -899, -899, -899, 702, + 313, -899, -899, -899, -899, 704, -899, -899, -899, -899, + -899, -899, 672, 735, 737, 750, 754, -899, -899, -899, + 760, 764, -899, 703, 662, 671, 634, 628, 590, 674, + 627, 599, 773, -899, -899, 168, 313, 293, -899, -899, + -899, 774, -899, -899, -899, -899, -899, 777, -899, -899, + 313, 313, 313, 780, -899, -899, 335, 313, -899, -899, + 588, 589, 783, 785, -899, -899, -899, 313, 789, -899, + -899, 313, 787, -899, 313, 313, -899, -899, -899, -899, + -899, -899, -899, -899, -899, -899, 765, -899, -899, -899, + -899, -899, -899, -899, -899, -899, 168, -899, -899, 751, + 752, -899, 335, 792, -899, 329, 313, -899, -899, 168, + 335, -899, 300, -899, -899, -899, -899, 313, 731, -899, + 714, 313, -899, 312, -899, -899, 755, -899, -899, -899, + 87, 168, 149, 623, -899, -899, -899, -899, 405, 921, + -899, 335, 607, -899, -899, 630, 794, 798, -899, 313, + 776, -899, 469, -5, 694, 168, 168, -899, 168, 168, + 800, 801, 806, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, -899, -899, -899, -899, 71, 696, -899, + 168, -899, -899, -899, 302, 788, 638, 809, 313, 168, + 313, -899, -899, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, 775, 639, -899, -899, -899, -899, -899, + -899, -899, -899, -899, -899, -899, 97, 335, -899, 842, + 20, 770, 815, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, 726, 313, -899, 684, 818, 822, 313, + 823, -899, -899, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, -899, -899, -899, -899, -899, -899, 826, + 832, -899, -899, -899, 395, 398, 648, -899, -899, -899, + -899, -899, -899, -899, -899, 831, -899, -899, 313, -899, + -899, -899, 668, -899, -899, -899, -899, -899, 335, 52, + 808, -899, -899, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, + -899, 835, -899, 836, -899, -899, -899, 313, -899, -899, + -899, 313, -899, 50, 406, -899, 803, 335, 656, 658, + -899, 845, -899, -899, 335, -899, -899, 407, -899, -899, + -899, 810, 168, 168, -899, -899, -899, -899, -899, 645, + -899, 89, -899, -899, 848, -899, 416, 740, 417, -899, + -899, -899, -899, 739, -899, 168, 790, -899, 675, -899, + 313, -899, -899, 313, -899, 562, 70, 825, 852, 855, + 313, 313, 313, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, 313, 313, -899, 212, 168, 168, 784, + -899, -899, -899, -899 + }; + + const short + A2lParser::yydefact_[] = + { + 30, 0, 0, 0, 31, 494, 2, 3, 0, 1, + 0, 0, 29, 32, 493, 0, 0, 0, 492, 0, + 0, 333, 334, 0, 331, 0, 0, 0, 332, 199, + 0, 330, 0, 290, 0, 0, 0, 200, 201, 202, + 0, 198, 631, 588, 589, 590, 0, 0, 491, 563, + 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, + 303, 305, 306, 307, 308, 291, 309, 310, 311, 312, + 313, 314, 315, 316, 317, 318, 292, 304, 0, 0, + 0, 0, 0, 0, 0, 159, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 482, 289, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 257, 271, 336, + 0, 0, 0, 0, 0, 0, 0, 467, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 160, 0, + 174, 189, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 484, + 485, 486, 483, 487, 488, 0, 0, 0, 0, 0, + 0, 21, 158, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 258, 259, 260, 261, 262, 263, 264, 265, 266, + 267, 268, 269, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 274, 281, 282, + 272, 273, 275, 276, 277, 278, 279, 280, 283, 284, + 285, 286, 287, 288, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 617, 618, 337, 338, 339, 340, 341, 342, 343, + 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, + 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, + 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, + 374, 375, 376, 377, 378, 379, 380, 386, 387, 388, + 389, 390, 381, 382, 383, 384, 385, 391, 392, 0, + 0, 423, 0, 0, 454, 0, 0, 0, 591, 470, + 468, 469, 0, 0, 27, 481, 628, 630, 0, 89, + 0, 0, 17, 19, 155, 0, 169, 0, 0, 0, + 176, 177, 178, 175, 181, 182, 183, 184, 185, 179, + 180, 0, 0, 25, 603, 191, 192, 190, 194, 195, + 197, 193, 196, 205, 0, 256, 497, 498, 499, 500, + 501, 502, 503, 516, 529, 532, 604, 0, 0, 0, + 270, 495, 525, 527, 528, 541, 4, 5, 6, 544, + 546, 578, 586, 621, 0, 626, 335, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 551, 552, + 553, 554, 555, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 461, + 25, 466, 25, 0, 0, 0, 0, 0, 137, 146, + 151, 8, 9, 10, 7, 0, 0, 161, 0, 34, + 0, 25, 25, 25, 25, 25, 25, 173, 560, 25, + 25, 25, 188, 187, 0, 0, 0, 0, 0, 624, + 0, 0, 0, 0, 0, 0, 536, 537, 538, 539, + 540, 0, 562, 573, 574, 575, 576, 577, 579, 581, + 582, 583, 584, 585, 595, 597, 598, 599, 600, 601, + 602, 605, 606, 607, 608, 609, 612, 613, 614, 615, + 616, 0, 0, 0, 0, 424, 425, 0, 0, 0, + 0, 523, 0, 458, 455, 456, 457, 459, 0, 0, + 473, 476, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 92, 90, 91, 93, 94, 95, 96, + 97, 98, 99, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 156, 157, 0, 25, 170, 171, 172, 0, + 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 26, 0, 0, 0, 13, 592, 208, 206, 217, 207, + 209, 210, 211, 212, 213, 214, 215, 216, 218, 219, + 0, 104, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 422, 496, 0, 0, 0, 453, 623, + 0, 0, 0, 0, 462, 463, 464, 465, 0, 0, + 474, 0, 0, 480, 28, 0, 0, 88, 517, 534, + 543, 0, 571, 0, 0, 0, 0, 0, 0, 0, + 0, 138, 142, 139, 140, 141, 143, 144, 18, 0, + 0, 147, 148, 149, 20, 0, 152, 153, 22, 154, + 530, 168, 559, 0, 0, 0, 0, 37, 35, 36, + 0, 0, 41, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 204, 565, 568, 0, 0, 11, 252, + 251, 0, 509, 510, 511, 512, 513, 0, 556, 406, + 0, 0, 0, 0, 460, 594, 0, 0, 394, 13, + 0, 0, 0, 0, 477, 478, 479, 0, 0, 570, + 622, 0, 0, 136, 0, 0, 522, 619, 145, 531, + 150, 23, 33, 504, 505, 507, 0, 162, 203, 220, + 319, 393, 403, 186, 395, 404, 0, 14, 223, 0, + 0, 105, 249, 0, 514, 0, 0, 427, 441, 0, + 0, 625, 0, 472, 475, 627, 629, 0, 0, 107, + 166, 0, 520, 0, 39, 321, 0, 11, 103, 12, + 0, 0, 0, 0, 407, 408, 409, 413, 0, 0, + 397, 0, 0, 61, 535, 0, 0, 0, 167, 0, + 0, 24, 0, 0, 0, 0, 0, 533, 0, 0, + 0, 0, 0, 226, 229, 237, 224, 247, 225, 227, + 228, 230, 231, 232, 233, 234, 235, 236, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 101, 0, 250, + 0, 25, 25, 405, 0, 0, 0, 0, 0, 0, + 0, 429, 428, 430, 431, 432, 433, 434, 435, 436, + 437, 438, 439, 0, 0, 445, 442, 443, 444, 446, + 447, 448, 449, 450, 451, 452, 0, 0, 471, 0, + 0, 0, 0, 561, 109, 110, 108, 115, 122, 125, + 135, 111, 112, 113, 114, 116, 117, 118, 119, 120, + 121, 123, 124, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 558, 0, 0, 38, 0, 0, 0, 0, + 0, 322, 323, 324, 325, 326, 327, 328, 329, 83, + 25, 222, 506, 515, 542, 547, 557, 587, 593, 0, + 0, 102, 248, 11, 0, 0, 0, 414, 415, 416, + 417, 418, 419, 420, 421, 0, 426, 545, 0, 580, + 620, 440, 0, 398, 399, 400, 401, 402, 0, 0, + 0, 63, 62, 71, 64, 65, 66, 67, 68, 69, + 70, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 0, 25, 0, 106, 521, 165, 0, 320, 524, + 564, 0, 572, 0, 0, 518, 0, 254, 0, 0, + 412, 0, 548, 396, 0, 60, 25, 0, 25, 519, + 567, 0, 0, 0, 610, 84, 85, 86, 87, 0, + 100, 0, 410, 411, 0, 611, 0, 0, 0, 82, + 566, 596, 489, 0, 255, 0, 0, 221, 0, 253, + 0, 163, 490, 0, 43, 0, 0, 0, 0, 0, + 0, 0, 0, 45, 44, 53, 46, 47, 48, 49, + 50, 51, 52, 54, 55, 56, 57, 58, 59, 15, + 42, 508, 526, 0, 0, 569, 0, 0, 0, 0, + 16, 549, 550, 164 + }; + + const short + A2lParser::yypgoto_[] = + { + -899, -1, -205, -187, -808, 94, -899, -899, -899, -899, + -899, -471, -899, -899, -899, -174, -899, -899, -899, -899, + 23, -899, -899, -899, -899, -899, 26, -899, -899, -899, + -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, -899, -899, -765, -899, -899, -899, -899, + -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, + -899, 853, -899, -899, -899, 706, -899, -899, -899, -899, + -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, -899, -899, -470, 742, 744, 745, 746, + 749, 757, 758, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, -899, -694, -800, -496, -899, -899, -899, + -899, -899, -899, -899, -899, -899, -899, -899, -899, -181, + -899, -898, -556, -502, -899, -899, -899, -899, -899, -899, + -899, -501, -899, 24, -899, 28, -834, -899, -899, -899, + -899, -899, -899, -899, -899, -802, -899, -899, -899, -58, + -899, -172, -899, -773, -899, -899, -706, -899, -500, -497, + -830, -899, -899, -899, -899, -899, -899, -899, 34, -899, + -899, -899, -899, -899, -899, -798, -899, -899, -831, 47, + -787, 281, -899, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, -899, -899, -899, -899, -899, -899, -899, + -899, -899, -899, -899, -899, -899, -899, -832, -899, -495, + -43, -899, -899, -899, -899, -899, -899, -899, 756 + }; + + const short + A2lParser::yydefgoto_[] = + { + 0, 807, 839, 495, 812, 745, 1146, 489, 490, 364, + 833, 513, 484, 2, 3, 370, 619, 727, 371, 731, + 911, 1115, 1124, 50, 939, 1032, 874, 1063, 1085, 51, + 486, 594, 811, 1000, 217, 747, 52, 855, 946, 53, + 604, 701, 54, 606, 711, 55, 608, 716, 56, 496, + 612, 57, 111, 138, 372, 947, 1125, 702, 857, 58, + 498, 616, 59, 175, 373, 386, 60, 176, 387, 21, + 32, 37, 374, 61, 514, 637, 375, 949, 62, 836, + 876, 218, 840, 751, 219, 1091, 63, 144, 191, 64, + 145, 220, 22, 40, 65, 376, 638, 862, 981, 12, + 23, 24, 66, 146, 283, 377, 349, 389, 573, 936, + 1023, 378, 390, 67, 815, 844, 845, 846, 68, 904, + 1007, 69, 475, 565, 70, 848, 912, 71, 849, 926, + 72, 478, 574, 73, 578, 674, 74, 154, 350, 680, + 159, 681, 160, 682, 774, 161, 75, 128, 162, 877, + 950, 76, 13, 4, 221, 566, 192, 193, 194, 195, + 196, 197, 198, 728, 729, 879, 732, 1126, 291, 292, + 293, 294, 295, 296, 880, 199, 596, 1001, 703, 704, + 954, 705, 576, 982, 222, 1128, 223, 224, 200, 613, + 713, 201, 882, 597, 297, 298, 299, 300, 301, 225, + 884, 598, 226, 916, 227, 886, 917, 1131, 1132, 302, + 303, 304, 305, 306, 307, 887, 858, 617, 379, 961, + 308, 77, 985, 644, 1086, 986, 645, 1134, 600, 601, + 987, 309, 310, 311, 312, 313, 228, 314, 920, 315, + 316, 317, 318, 319, 229, 893, 45, 38, 351, 648, + 895, 675, 320, 1087, 321, 322, 323, 324, 325, 326, + 392, 202, 327, 328, 329, 330, 331, 1088, 676, 332, + 333, 334, 335, 336, 337, 338, 707, 922, 230, 602, + 577, 231, 677, 232, 775, 163, 776, 164, 39 + }; + + const short + A2lParser::yytable_[] = + { + 8, 771, 385, 380, 391, 419, 1009, 14, 575, 579, + 16, 580, 641, 642, 646, 18, 595, 647, 640, 649, + 499, 959, 670, 970, 968, 155, 156, 749, 983, 897, + 621, 622, 623, 624, 625, 626, 881, 989, 627, 628, + 629, 1036, 569, 570, 639, 499, 918, 932, 914, 929, + 921, 935, 1015, 960, 1081, 952, 564, 967, 346, 347, + 984, 614, 709, 889, 988, 1, 34, 686, 969, 610, + 1010, 875, 1014, 499, 1012, 35, 933, 499, 407, 416, + 417, 418, 46, 47, 715, 5, 499, 6, 7, 1051, + 948, 898, 686, 1103, 48, 499, 509, 571, 25, 723, + 724, 1022, 1011, 563, 1008, 1039, 1013, 1049, 1047, 1045, + 137, 367, 368, 15, 564, 26, 564, 582, 999, 583, + 686, 509, 725, 726, 686, 611, 710, 9, 165, 166, + 890, 17, 611, 686, 171, 1052, 30, 1040, 174, 1034, + 19, 1046, 919, 934, 722, 695, 696, 611, 341, 963, + 408, 409, 1048, 509, 913, 928, 615, 43, 1139, 10, + 44, 951, 1082, 1025, 49, 359, 360, 20, 362, 363, + 11, 671, 365, 366, 1033, 750, 393, 6, 7, 396, + 397, 398, 399, 400, 401, 402, 49, 404, 672, 742, + 381, 382, 697, 698, 49, 1067, 49, 699, 20, 27, + 772, 348, 773, 990, 411, 1083, 679, 36, 633, 630, + 369, 421, 29, 634, 673, 49, 1149, 1129, 31, 1084, + 491, 492, 493, 494, 572, 33, 157, 136, 158, 1053, + 1026, 41, 6, 7, 427, 428, 429, 430, 431, 432, + 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, + 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, + 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, + 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, + 42, 1130, 572, 1138, 1137, 1135, 104, 562, 383, 567, + 105, 499, 915, 930, 49, 671, 809, 810, 584, 955, + 603, 103, 605, 607, 852, 678, 1006, 630, 609, 6, + 7, 106, 593, 1133, 599, 1127, 860, 1136, 117, 861, + 700, 491, 492, 493, 494, 733, 618, 630, 650, 352, + 353, 354, 842, 843, 883, 885, 891, 901, 902, 892, + 636, 896, 643, 416, 417, 418, 187, 585, 586, 384, + 734, 107, 630, 956, 957, 964, 108, 109, 965, 953, + 971, 564, 110, 735, 497, 630, 878, 509, 736, 737, + 630, 630, 189, 112, 113, 203, 204, 114, 738, 927, + 630, 666, 115, 116, 690, 35, 118, 908, 205, 587, + 739, 119, 630, 515, 740, 120, 630, 870, 741, 1068, + 630, 630, 1069, 121, 630, 631, 632, 122, 905, 906, + 1089, 1097, 630, 630, 123, 505, 588, 510, 708, 564, + 1106, 1108, 630, 630, 589, 712, 124, 717, 980, 125, + 1004, 1005, 126, 206, 127, 207, 208, 1037, 1038, 1043, + 129, 130, 1044, 1035, 1050, 871, 866, 587, 511, 187, + 209, 49, 131, 210, 132, 211, 133, 134, 135, 139, + 140, 141, 590, 746, 142, 143, 1024, 766, 147, 591, + 148, 149, 561, 976, 588, 150, 867, 179, 761, 762, + 167, 910, 589, 151, 152, 153, 767, 907, 780, 168, + 908, 180, 181, 182, 183, 184, 185, 186, 169, 170, + 870, 172, 173, 177, 212, 178, 340, 781, 339, 49, + 784, 785, 342, 633, 213, 651, 652, 187, 634, 1064, + 590, 634, 343, 789, 659, 345, 344, 591, 592, 977, + 499, 355, 356, 395, 357, 500, 358, 394, 188, 909, + 361, 403, 405, 189, 406, 410, 412, 413, 871, 635, + 414, 415, 420, 422, 908, 214, 423, 424, 215, 808, + 425, 820, 426, 473, 870, 1116, 1117, 474, 480, 216, + 476, 501, 477, 816, 817, 818, 479, 482, 978, 481, + 821, 1077, 979, 483, 910, 485, 592, 487, 507, 691, + 827, 488, 508, 512, 829, 980, 1118, 831, 832, 516, + 517, 518, 568, 519, 520, 1096, 187, 1098, 521, 522, + 523, 524, 871, 502, 525, 851, 526, 527, 528, 503, + 529, 530, 531, 532, 1119, 533, 534, 535, 536, 847, + 537, 538, 189, 940, 941, 539, 190, 540, 541, 542, + 853, 543, 544, 545, 859, 504, 937, 908, 1120, 1121, + 546, 748, 547, 548, 505, 549, 550, 870, 551, 552, + 553, 760, 873, 554, 888, 555, 556, 557, 899, 558, + 559, 866, 974, 560, 187, 587, 581, 620, 630, 1122, + 653, 944, 942, 962, 777, 654, 506, 655, 980, 656, + 779, 657, 658, 660, 661, 662, 664, 665, 663, 667, + 669, 867, 588, 668, 683, 871, 684, 685, 348, 687, + 589, 688, 907, 689, 694, 908, 692, 693, 714, 718, + 720, 1018, 719, 1020, 721, 870, 730, 744, 743, 752, + 753, 383, 1028, 754, 943, 755, 756, 49, 757, 758, + 759, 910, 763, 764, 765, 770, 634, 768, 590, 778, + 769, 782, 783, 786, 787, 591, 788, 793, 863, 864, + 790, 794, 792, 791, 909, 1031, 795, 1042, 796, 797, + 798, 802, 564, 871, 800, 803, 348, 801, 804, 806, + 813, 805, 872, 814, 865, 799, 819, 1057, 823, 825, + 824, 826, 1061, 828, 830, 834, 866, 837, 841, 187, + 838, 972, 973, 854, 975, 835, 938, 996, 997, 910, + 903, 856, 998, 991, 592, 1017, 1002, 989, 850, 1054, + 1015, 1055, 1056, 1074, 1059, 1058, 867, 588, 1060, 1062, + 1016, 1072, 1021, 1065, 868, 589, 1066, 1071, 1070, 869, + 900, 1075, 1076, 1078, 1092, 1029, 1030, 1093, 1073, 1090, + 870, 1094, 1099, 1102, 1105, 1107, 383, 1140, 1141, 1111, + 1109, 1142, 49, 822, 992, 993, 633, 994, 995, 1095, + 1079, 634, 1153, 590, 1080, 925, 28, 931, 945, 958, + 591, 1041, 388, 894, 1112, 706, 187, 587, 284, 966, + 285, 286, 287, 1027, 0, 288, 0, 0, 871, 1003, + 0, 233, 635, 289, 290, 0, 0, 872, 1019, 0, + 0, 0, 189, 0, 588, 0, 0, 0, 0, 1104, + 0, 0, 589, 1113, 923, 924, 1114, 908, 0, 0, + 0, 0, 0, 1143, 1144, 1145, 0, 870, 564, 592, + 0, 1123, 0, 383, 0, 0, 943, 0, 0, 49, + 0, 0, 0, 78, 0, 0, 1147, 1148, 0, 1150, + 590, 0, 866, 79, 0, 187, 0, 591, 980, 80, + 0, 0, 0, 81, 82, 0, 83, 84, 0, 85, + 0, 0, 0, 0, 0, 871, 0, 0, 348, 0, + 0, 0, 867, 0, 872, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 869, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 870, 0, 86, 0, + 87, 910, 0, 88, 0, 0, 592, 0, 0, 0, + 89, 0, 633, 0, 0, 0, 0, 634, 0, 90, + 0, 0, 0, 91, 92, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 871, 0, 0, 0, 93, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1100, 1101, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1110, 234, 0, 94, 0, 0, + 95, 96, 97, 98, 99, 100, 0, 0, 101, 180, + 181, 182, 183, 184, 185, 186, 0, 102, 0, 0, + 0, 0, 0, 0, 0, 0, 235, 236, 237, 238, + 239, 240, 0, 0, 0, 0, 1151, 1152, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 241, 242, 243, 244, 245, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 246, 247, 248, 249, 250, 251, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 252, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 253, 254, + 255, 256, 257, 0, 258, 0, 259, 260, 261, 262, + 263, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 264, 0, 265, 266, 267, + 268, 269, 270, 0, 0, 271, 272, 273, 274, 275, + 0, 0, 276, 277, 278, 279, 280, 281, 282 + }; + + const short + A2lParser::yycheck_[] = + { + 1, 4, 176, 175, 176, 210, 904, 8, 478, 480, + 11, 482, 514, 514, 514, 16, 486, 514, 514, 514, + 25, 855, 4, 855, 855, 3, 4, 6, 862, 837, + 501, 502, 503, 504, 505, 506, 836, 42, 509, 510, + 511, 939, 3, 4, 514, 25, 848, 849, 848, 849, + 848, 849, 32, 855, 4, 855, 17, 855, 3, 4, + 862, 4, 4, 836, 862, 12, 4, 72, 855, 4, + 904, 836, 904, 25, 904, 13, 849, 25, 48, 8, + 9, 10, 3, 4, 4, 7, 25, 9, 10, 69, + 855, 4, 72, 4, 15, 25, 101, 58, 105, 3, + 4, 4, 904, 4, 904, 939, 904, 939, 939, 939, + 111, 3, 4, 144, 17, 122, 17, 4, 47, 6, + 72, 101, 26, 27, 72, 67, 68, 0, 129, 130, + 836, 6, 67, 72, 135, 115, 6, 939, 139, 939, + 7, 939, 848, 849, 615, 3, 4, 67, 149, 855, + 120, 121, 939, 101, 848, 849, 99, 6, 88, 3, + 9, 855, 112, 936, 107, 166, 167, 3, 169, 170, + 14, 153, 173, 174, 939, 154, 177, 9, 10, 180, + 181, 182, 183, 184, 185, 186, 107, 188, 170, 141, + 3, 4, 50, 51, 107, 1003, 107, 55, 3, 4, + 203, 146, 205, 208, 205, 155, 3, 145, 111, 6, + 102, 212, 7, 116, 196, 107, 4, 1115, 144, 169, + 8, 9, 10, 11, 185, 7, 204, 4, 206, 209, + 936, 105, 9, 10, 235, 236, 237, 238, 239, 240, + 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, + 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, + 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, + 7, 1115, 185, 1115, 1115, 1115, 6, 474, 101, 476, + 6, 25, 848, 849, 107, 153, 3, 4, 485, 855, + 487, 122, 489, 490, 4, 4, 4, 6, 495, 9, + 10, 6, 486, 1115, 486, 1115, 4, 1115, 7, 7, + 178, 8, 9, 10, 11, 4, 498, 6, 515, 200, + 201, 202, 3, 4, 836, 836, 836, 188, 189, 836, + 514, 836, 514, 8, 9, 10, 44, 3, 4, 162, + 4, 6, 6, 855, 855, 855, 6, 6, 855, 855, + 855, 17, 6, 4, 365, 6, 836, 101, 4, 4, + 6, 6, 70, 6, 6, 3, 4, 6, 4, 849, + 6, 568, 6, 6, 589, 13, 7, 85, 16, 45, + 4, 6, 6, 394, 4, 6, 6, 95, 4, 4, + 6, 6, 4, 6, 6, 3, 4, 6, 3, 4, + 4, 4, 6, 6, 6, 149, 72, 151, 605, 17, + 4, 4, 6, 6, 80, 606, 6, 608, 126, 6, + 901, 902, 6, 61, 6, 63, 64, 939, 939, 939, + 7, 7, 939, 939, 939, 143, 41, 45, 182, 44, + 78, 107, 7, 81, 7, 83, 7, 7, 7, 7, + 7, 7, 118, 650, 7, 7, 936, 672, 7, 125, + 7, 7, 473, 4, 72, 7, 71, 4, 665, 666, + 6, 179, 80, 7, 7, 7, 673, 82, 693, 6, + 85, 18, 19, 20, 21, 22, 23, 24, 6, 6, + 95, 59, 6, 6, 132, 6, 6, 694, 7, 107, + 697, 698, 6, 111, 142, 516, 517, 44, 116, 990, + 118, 116, 6, 710, 525, 7, 9, 125, 184, 60, + 25, 207, 6, 123, 7, 30, 6, 6, 65, 134, + 7, 6, 6, 70, 6, 124, 7, 7, 143, 147, + 7, 7, 7, 7, 85, 183, 7, 7, 186, 746, + 7, 766, 148, 7, 95, 3, 4, 6, 150, 197, + 6, 66, 6, 760, 761, 762, 6, 6, 109, 198, + 767, 1052, 113, 6, 179, 6, 184, 6, 100, 590, + 777, 7, 7, 103, 781, 126, 34, 784, 785, 7, + 6, 6, 9, 7, 6, 1076, 44, 1078, 6, 6, + 6, 6, 143, 108, 6, 820, 6, 6, 6, 114, + 6, 6, 6, 6, 62, 6, 6, 6, 6, 816, + 6, 6, 70, 3, 4, 6, 163, 6, 6, 6, + 827, 6, 6, 6, 831, 140, 851, 85, 86, 87, + 6, 652, 6, 6, 149, 6, 6, 95, 6, 6, + 6, 662, 836, 6, 836, 6, 6, 6, 840, 6, + 6, 41, 859, 6, 44, 45, 7, 7, 6, 117, + 7, 855, 52, 855, 685, 6, 181, 6, 126, 6, + 691, 6, 6, 6, 6, 6, 6, 6, 191, 180, + 7, 71, 72, 194, 202, 143, 6, 6, 146, 43, + 80, 6, 82, 6, 6, 85, 7, 7, 7, 7, + 7, 908, 57, 910, 98, 95, 31, 6, 110, 6, + 6, 101, 937, 6, 104, 6, 6, 107, 6, 6, + 6, 179, 6, 195, 6, 4, 116, 150, 118, 6, + 199, 96, 53, 6, 6, 125, 54, 7, 3, 4, + 56, 7, 25, 28, 134, 939, 6, 939, 4, 66, + 108, 181, 17, 143, 140, 101, 146, 149, 151, 6, + 6, 182, 152, 6, 29, 114, 6, 974, 200, 6, + 201, 6, 979, 4, 7, 30, 41, 46, 6, 44, + 48, 7, 4, 72, 28, 806, 199, 7, 7, 179, + 187, 97, 6, 119, 184, 6, 120, 42, 819, 49, + 32, 6, 96, 1028, 6, 141, 71, 72, 6, 6, + 192, 1018, 193, 7, 79, 80, 4, 6, 190, 84, + 841, 33, 7, 7, 188, 3, 4, 189, 180, 46, + 95, 6, 42, 208, 6, 115, 101, 32, 6, 69, + 121, 6, 107, 769, 865, 866, 111, 868, 869, 1074, + 1057, 116, 88, 118, 1061, 849, 23, 849, 855, 855, + 125, 939, 176, 836, 209, 604, 44, 45, 146, 855, + 146, 146, 146, 936, -1, 146, -1, -1, 143, 900, + -1, 145, 147, 146, 146, -1, -1, 152, 909, -1, + -1, -1, 70, -1, 72, -1, -1, -1, -1, 1091, + -1, -1, 80, 1110, 3, 4, 1113, 85, -1, -1, + -1, -1, -1, 1120, 1121, 1122, -1, 95, 17, 184, + -1, 1115, -1, 101, -1, -1, 104, -1, -1, 107, + -1, -1, -1, 33, -1, -1, 1143, 1144, -1, 1146, + 118, -1, 41, 43, -1, 44, -1, 125, 126, 49, + -1, -1, -1, 53, 54, -1, 56, 57, -1, 59, + -1, -1, -1, -1, -1, 143, -1, -1, 146, -1, + -1, -1, 71, -1, 152, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 84, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 95, -1, 98, -1, + 100, 179, -1, 103, -1, -1, 184, -1, -1, -1, + 110, -1, 111, -1, -1, -1, -1, 116, -1, 119, + -1, -1, -1, 123, 124, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 143, -1, -1, -1, 148, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 1082, 1083, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 1105, 4, -1, 187, -1, -1, + 190, 191, 192, 193, 194, 195, -1, -1, 198, 18, + 19, 20, 21, 22, 23, 24, -1, 207, -1, -1, + -1, -1, -1, -1, -1, -1, 35, 36, 37, 38, + 39, 40, -1, -1, -1, -1, 1147, 1148, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 73, 74, 75, 76, 77, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 89, 90, 91, 92, 93, 94, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 106, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 127, 128, + 129, 130, 131, -1, 133, -1, 135, 136, 137, 138, + 139, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 154, -1, 156, 157, 158, + 159, 160, 161, -1, -1, 164, 165, 166, 167, 168, + -1, -1, 171, 172, 173, 174, 175, 176, 177 + }; + + const short + A2lParser::yystos_[] = + { + 0, 12, 223, 224, 363, 7, 9, 10, 211, 0, + 3, 14, 309, 362, 211, 144, 211, 6, 211, 7, + 3, 279, 302, 310, 311, 105, 122, 4, 311, 7, + 6, 144, 280, 7, 4, 13, 145, 281, 457, 498, + 303, 105, 7, 6, 9, 456, 3, 4, 15, 107, + 233, 239, 246, 249, 252, 255, 258, 261, 269, 272, + 276, 283, 288, 296, 299, 304, 312, 323, 328, 331, + 334, 337, 340, 343, 346, 356, 361, 431, 33, 43, + 49, 53, 54, 56, 57, 59, 98, 100, 103, 110, + 119, 123, 124, 148, 187, 190, 191, 192, 193, 194, + 195, 198, 207, 122, 6, 6, 6, 6, 6, 6, + 6, 262, 6, 6, 6, 6, 6, 7, 7, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 357, 7, + 7, 7, 7, 7, 7, 7, 4, 211, 263, 7, + 7, 7, 7, 7, 297, 300, 313, 7, 7, 7, + 7, 7, 7, 7, 347, 3, 4, 204, 206, 350, + 352, 355, 358, 495, 497, 211, 211, 6, 6, 6, + 6, 211, 59, 6, 211, 273, 277, 6, 6, 4, + 18, 19, 20, 21, 22, 23, 24, 44, 65, 70, + 163, 298, 366, 367, 368, 369, 370, 371, 372, 385, + 398, 401, 471, 3, 4, 16, 61, 63, 64, 78, + 81, 83, 132, 142, 183, 186, 197, 244, 291, 294, + 301, 364, 394, 396, 397, 409, 412, 414, 446, 454, + 488, 491, 493, 498, 4, 35, 36, 37, 38, 39, + 40, 73, 74, 75, 76, 77, 89, 90, 91, 92, + 93, 94, 106, 127, 128, 129, 130, 131, 133, 135, + 136, 137, 138, 139, 154, 156, 157, 158, 159, 160, + 161, 164, 165, 166, 167, 168, 171, 172, 173, 174, + 175, 176, 177, 314, 366, 367, 368, 369, 370, 371, + 372, 378, 379, 380, 381, 382, 383, 404, 405, 406, + 407, 408, 419, 420, 421, 422, 423, 424, 430, 441, + 442, 443, 444, 445, 447, 449, 450, 451, 452, 453, + 462, 464, 465, 466, 467, 468, 469, 472, 473, 474, + 475, 476, 479, 480, 481, 482, 483, 484, 485, 7, + 6, 211, 6, 6, 9, 7, 3, 4, 146, 316, + 348, 458, 200, 201, 202, 207, 6, 7, 6, 211, + 211, 7, 211, 211, 219, 211, 211, 3, 4, 102, + 225, 228, 264, 274, 282, 286, 305, 315, 321, 428, + 431, 3, 4, 101, 162, 225, 275, 278, 315, 317, + 322, 431, 470, 211, 6, 123, 211, 211, 211, 211, + 211, 211, 211, 6, 211, 6, 6, 48, 120, 121, + 124, 211, 7, 7, 7, 7, 8, 9, 10, 212, + 7, 211, 7, 7, 7, 7, 148, 211, 211, 211, + 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, + 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, + 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, + 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, + 211, 211, 211, 7, 6, 332, 6, 6, 341, 6, + 150, 198, 6, 6, 222, 6, 240, 6, 7, 217, + 218, 8, 9, 10, 11, 213, 259, 211, 270, 25, + 30, 66, 108, 114, 140, 149, 181, 100, 7, 101, + 151, 182, 103, 221, 284, 211, 7, 6, 6, 7, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 211, 213, 4, 17, 333, 365, 213, 9, 3, + 4, 58, 185, 318, 342, 365, 392, 490, 344, 221, + 221, 7, 4, 6, 213, 3, 4, 45, 72, 80, + 118, 125, 184, 225, 241, 365, 386, 403, 411, 431, + 438, 439, 489, 213, 250, 213, 253, 213, 256, 213, + 4, 67, 260, 399, 4, 99, 271, 427, 431, 226, + 7, 221, 221, 221, 221, 221, 221, 221, 221, 221, + 6, 3, 4, 111, 116, 147, 225, 285, 306, 365, + 386, 403, 411, 431, 433, 436, 438, 439, 459, 489, + 213, 211, 211, 7, 6, 6, 6, 6, 6, 211, + 6, 6, 6, 191, 6, 6, 213, 180, 194, 7, + 4, 153, 170, 196, 345, 461, 478, 492, 4, 3, + 349, 351, 353, 202, 6, 6, 72, 43, 6, 6, + 212, 211, 7, 7, 6, 3, 4, 50, 51, 55, + 178, 251, 267, 388, 389, 391, 461, 486, 213, 4, + 68, 254, 399, 400, 7, 4, 257, 399, 7, 57, + 7, 98, 221, 3, 4, 26, 27, 227, 373, 374, + 31, 229, 376, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 141, 110, 6, 215, 213, 245, 211, 6, + 154, 293, 6, 6, 6, 6, 6, 6, 6, 6, + 211, 213, 213, 6, 195, 6, 212, 213, 150, 199, + 4, 4, 203, 205, 354, 494, 496, 211, 6, 211, + 212, 213, 96, 53, 213, 213, 6, 6, 54, 213, + 56, 28, 25, 7, 7, 6, 4, 66, 108, 114, + 140, 149, 181, 101, 151, 182, 6, 211, 213, 3, + 4, 242, 214, 6, 6, 324, 213, 213, 213, 6, + 212, 213, 215, 200, 201, 6, 6, 213, 4, 213, + 7, 213, 213, 220, 30, 211, 289, 46, 48, 212, + 292, 6, 3, 4, 325, 326, 327, 213, 335, 338, + 211, 212, 4, 213, 72, 247, 97, 268, 426, 213, + 4, 7, 307, 3, 4, 29, 41, 71, 79, 84, + 95, 143, 152, 225, 236, 275, 290, 359, 365, 375, + 384, 385, 402, 403, 410, 411, 415, 425, 431, 433, + 436, 438, 439, 455, 459, 460, 489, 214, 4, 431, + 211, 188, 189, 187, 329, 3, 4, 82, 85, 134, + 179, 230, 336, 384, 385, 402, 413, 416, 425, 436, + 448, 455, 487, 3, 4, 236, 339, 365, 384, 385, + 402, 415, 425, 433, 436, 455, 319, 212, 199, 234, + 3, 4, 52, 104, 225, 230, 248, 265, 275, 287, + 360, 384, 385, 386, 390, 402, 403, 411, 413, 416, + 425, 429, 431, 436, 438, 439, 448, 455, 458, 460, + 487, 489, 7, 4, 213, 28, 4, 60, 109, 113, + 126, 308, 393, 416, 425, 432, 435, 440, 455, 42, + 208, 119, 211, 211, 211, 211, 7, 7, 6, 47, + 243, 387, 120, 211, 221, 221, 4, 330, 385, 401, + 416, 425, 440, 455, 487, 32, 192, 6, 213, 211, + 213, 193, 4, 320, 365, 433, 436, 490, 212, 3, + 4, 225, 235, 275, 385, 386, 401, 403, 411, 416, + 425, 429, 431, 438, 439, 440, 455, 458, 460, 487, + 489, 69, 115, 209, 49, 6, 96, 213, 141, 6, + 6, 213, 6, 237, 221, 7, 4, 214, 4, 4, + 190, 6, 213, 180, 212, 33, 7, 221, 7, 213, + 213, 4, 112, 155, 169, 238, 434, 463, 477, 4, + 46, 295, 188, 189, 6, 212, 221, 4, 221, 42, + 211, 211, 208, 4, 431, 6, 4, 115, 4, 121, + 211, 69, 209, 213, 213, 231, 3, 4, 34, 62, + 86, 87, 117, 225, 232, 266, 377, 385, 395, 401, + 416, 417, 418, 425, 437, 440, 455, 458, 487, 88, + 32, 6, 6, 213, 213, 213, 216, 213, 213, 4, + 213, 211, 211, 88 + }; + + const short + A2lParser::yyr1_[] = + { + 0, 210, 211, 211, 212, 212, 212, 213, 213, 213, + 213, 214, 214, 215, 215, 216, 216, 217, 217, 218, + 218, 219, 219, 220, 220, 221, 221, 222, 222, 223, + 224, 224, 224, 225, 226, 226, 226, 226, 227, 228, + 229, 229, 230, 231, 231, 232, 232, 232, 232, 232, + 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, + 233, 234, 234, 235, 235, 235, 235, 235, 235, 235, + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + 235, 235, 236, 237, 237, 238, 238, 238, 239, 240, + 240, 241, 241, 241, 241, 241, 241, 241, 241, 241, + 242, 243, 243, 244, 245, 245, 246, 247, 247, 248, + 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, + 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, + 248, 248, 248, 248, 248, 248, 249, 250, 250, 251, + 251, 251, 251, 251, 251, 252, 253, 253, 254, 254, + 255, 256, 256, 257, 258, 259, 259, 260, 261, 262, + 262, 263, 264, 265, 266, 267, 268, 268, 269, 270, + 270, 271, 271, 272, 273, 273, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, 275, 275, 276, 277, + 277, 278, 278, 278, 278, 278, 278, 278, 279, 280, + 280, 281, 281, 282, 283, 284, 284, 285, 285, 285, + 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, + 286, 287, 288, 289, 289, 290, 290, 290, 290, 290, + 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, + 290, 290, 290, 290, 290, 290, 290, 290, 291, 292, + 292, 293, 293, 294, 295, 295, 296, 297, 297, 298, + 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, + 299, 300, 300, 301, 301, 301, 301, 301, 301, 301, + 301, 301, 301, 301, 301, 301, 301, 301, 301, 302, + 303, 303, 304, 304, 304, 304, 304, 304, 304, 304, + 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, + 304, 304, 304, 304, 304, 304, 304, 304, 304, 305, + 306, 307, 307, 308, 308, 308, 308, 308, 308, 308, + 309, 310, 310, 311, 311, 312, 313, 313, 314, 314, + 314, 314, 314, 314, 314, 314, 314, 314, 314, 314, + 314, 314, 314, 314, 314, 314, 314, 314, 314, 314, + 314, 314, 314, 314, 314, 314, 314, 314, 314, 314, + 314, 314, 314, 314, 314, 314, 314, 314, 314, 314, + 314, 314, 314, 314, 314, 314, 314, 314, 314, 314, + 314, 314, 314, 315, 316, 317, 318, 319, 319, 320, + 320, 320, 320, 321, 322, 323, 324, 324, 325, 325, + 326, 327, 328, 329, 329, 330, 330, 330, 330, 330, + 330, 330, 331, 332, 332, 333, 334, 335, 335, 336, + 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, + 337, 338, 338, 339, 339, 339, 339, 339, 339, 339, + 339, 339, 339, 340, 341, 341, 342, 342, 342, 342, + 343, 344, 344, 345, 345, 345, 346, 347, 347, 348, + 348, 349, 350, 351, 351, 352, 353, 353, 354, 354, + 355, 356, 357, 357, 358, 358, 358, 358, 358, 359, + 360, 361, 362, 363, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, + 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, + 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, + 399, 400, 401, 402, 403, 403, 404, 405, 406, 407, + 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, + 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, + 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, + 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, + 448, 449, 450, 451, 452, 453, 454, 455, 456, 456, + 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, + 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, + 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, + 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, + 497, 498 + }; + + const signed char + A2lParser::yyr2_[] = + { + 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 0, 2, 0, 2, 0, 2, 0, 3, 0, + 3, 0, 4, 0, 2, 0, 2, 0, 3, 2, + 0, 1, 2, 5, 0, 2, 2, 2, 5, 6, + 0, 1, 11, 0, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 15, 0, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 5, 0, 2, 1, 1, 1, 9, 0, + 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 6, 0, 1, 7, 0, 2, 14, 0, 2, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 10, 0, 2, 1, + 1, 1, 1, 1, 1, 10, 0, 2, 1, 1, + 10, 0, 2, 1, 9, 0, 2, 1, 5, 0, + 2, 4, 5, 6, 5, 6, 0, 1, 9, 0, + 2, 1, 1, 7, 0, 2, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 5, 2, 7, 0, + 2, 1, 1, 1, 1, 1, 1, 1, 6, 0, + 2, 1, 1, 5, 9, 0, 2, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 5, 5, 13, 0, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 9, 0, + 2, 1, 1, 13, 0, 2, 6, 0, 2, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 6, 0, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, + 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, + 7, 0, 2, 1, 1, 1, 1, 1, 1, 1, + 7, 1, 2, 1, 1, 6, 0, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 5, 5, 5, 8, 0, 2, 1, + 1, 1, 1, 5, 5, 12, 0, 2, 1, 1, + 5, 5, 14, 0, 2, 1, 1, 1, 1, 1, + 1, 1, 8, 0, 2, 1, 13, 0, 2, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 13, 0, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 8, 0, 2, 1, 1, 1, 1, + 9, 0, 2, 1, 1, 1, 6, 0, 2, 1, + 1, 5, 7, 0, 1, 7, 0, 2, 1, 1, + 5, 5, 0, 2, 1, 1, 1, 1, 1, 5, + 6, 1, 3, 3, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, + 5, 5, 5, 5, 6, 2, 2, 2, 2, 7, + 3, 2, 2, 1, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 1, 2, 5, 3, 3, 3, 3, + 3, 2, 2, 2, 2, 2, 2, 2, 3, 4, + 4, 2, 2, 2, 2, 2, 5, 2, 2, 2, + 2, 1, 3, 1, 2, 2, 2, 3, 2, 2, + 3, 2, 2, 3, 3, 3, 3, 3, 2, 3, + 2, 3, 3, 3, 3, 3, 2, 2, 1, 1, + 2, 1, 1, 2, 2, 3, 2, 3, 3, 3, + 3, 3, 3, 1, 2, 3, 3, 3, 3, 3, + 1, 8, 3, 3, 3, 3, 3, 1, 1, 2, + 2, 2, 3, 2, 3, 3, 2, 2, 2, 2, + 2, 2 + }; + + +#if A2LDEBUG + // YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + // First, the terminals, then, starting at \a YYNTOKENS, nonterminals. + const char* + const A2lParser::yytname_[] = + { + "EOL", "error", "\"invalid token\"", "A2L_BEGIN", "A2L_END", + "A2L_INCLUDE", "IDENT", "STRING", "INT", "UINT", "HEX", "FLOAT", + "ASAP2_VERSION", "A2L_VERSION", "A2ML_VERSION", "A2ML", "ADDR_EPK", + "ADDRESS_TYPE", "ALIGNMENT_BYTE", "ALIGNMENT_FLOAT16_IEEE", + "ALIGNMENT_FLOAT32_IEEE", "ALIGNMENT_FLOAT64_IEEE", "ALIGNMENT_INT64", + "ALIGNMENT_LONG", "ALIGNMENT_WORD", "ANNOTATION", "ANNOTATION_LABEL", + "ANNOTATION_ORIGIN", "ANNOTATION_TEXT", "ARRAY_SIZE", "AR_COMPONENT", + "AR_PROTOTYPE_OF", "AXIS_DESCR", "AXIS_PTS", "AXIS_PTS_REF", + "AXIS_PTS_X", "AXIS_PTS_Y", "AXIS_PTS_Z", "AXIS_PTS_4", "AXIS_PTS_5", + "AXIS_RESCALE_X", "BIT_MASK", "BIT_OPERATION", "BLOB", "A2L_BYTE_ORDER", + "CALIBRATION_ACCESS", "CALIBRATION_HANDLE", "CALIBRATION_HANDLE_TEXT", + "CALIBRATION_METHOD", "CHARACTERISTIC", "COEFFS", "COEFFS_LINEAR", + "COMPARISON_QUANTITY", "COMPU_METHOD", "COMPU_TAB", "COMPU_TAB_REF", + "COMPU_VTAB", "COMPU_VTAB_RANGE", "CONSISTENT_EXCHANGE", + "CONTROLLER_ADDRESSES", "CONVERSION", "CPU_TYPE", "CURVE_AXIS_REF", + "CUSTOMER", "CUSTOMER_NO", "DATA_SIZE", "DEF_CHARACTERISTIC", + "DEFAULT_VALUE", "DEFAULT_VALUE_NUMERIC", "DEPENDENT_CHARACTERISTIC", + "DEPOSIT", "DISCRETE", "DISPLAY_IDENTIFIER", "DIST_OP_X", "DIST_OP_Y", + "DIST_OP_Z", "DIST_OP_4", "DIST_OP_5", "ECU", "ECU_ADDRESS", + "ECU_ADDRESS_EXTENSION", "ECU_CALIBRATION_OFFSET", "ENCODING", "EPK", + "ERROR_MASK", "EXTENDED_LIMITS", "FIX_AXIS_PAR", "FIX_AXIS_PAR_DIST", + "FIX_AXIS_PAR_LIST", "FIX_NO_AXIS_PTS_X", "FIX_NO_AXIS_PTS_Y", + "FIX_NO_AXIS_PTS_Z", "FIX_NO_AXIS_PTS_4", "FIX_NO_AXIS_PTS_5", + "FNC_VALUES", "FORMAT", "FORMULA", "FORMULA_INV", "FRAME", + "FRAME_MEASUREMENT", "FUNCTION", "FUNCTION_LIST", "FUNCTION_VERSION", + "GROUP", "GUARD_RAILS", "HEADER", "IDENTIFICATION", "IF_DATA", + "IN_MEASUREMENT", "INPUT_QUANTITY", "INSTANCE", "LAYOUT", "LEFT_SHIFT", + "LIMITS", "LOC_MEASUREMENT", "MAP_LIST", "MATRIX_DIM", "MAX_GRAD", + "MAX_REFRESH", "MEASUREMENT", "MEMORY_LAYOUT", "MEMORY_SEGMENT", + "MODULE", "MOD_COMMON", "MOD_PAR", "MODEL_LINK", "MONOTONY", + "NO_AXIS_PTS_X", "NO_AXIS_PTS_Y", "NO_AXIS_PTS_Z", "NO_AXIS_PTS_4", + "NO_AXIS_PTS_5", "NO_OF_INTERFACES", "NO_RESCALE_X", "NUMBER", + "OFFSET_X", "OFFSET_Y", "OFFSET_Z", "OFFSET_4", "OFFSET_5", + "OUT_MEASUREMENT", "OVERWRITE", "PHONE_NO", "PHYS_UNIT", "PROJECT", + "PROJECT_NO", "READ_ONLY", "READ_WRITE", "RECORD_LAYOUT", + "REF_CHARACTERISTIC", "REF_GROUP", "REF_MEASUREMENT", + "REF_MEMORY_SEGMENT", "REF_UNIT", "RESERVED", "RIGHT_SHIFT", + "RIP_ADDR_W", "RIP_ADDR_X", "RIP_ADDR_Y", "RIP_ADDR_Z", "RIP_ADDR_4", + "RIP_ADDR_5", "ROOT", "S_REC_LAYOUT", "SHIFT_OP_X", "SHIFT_OP_Y", + "SHIFT_OP_Z", "SHIFT_OP_4", "SHIFT_OP_5", "SIGN_EXTEND", "SI_EXPONENTS", + "SRC_ADDR_X", "SRC_ADDR_Y", "SRC_ADDR_Z", "SRC_ADDR_4", "SRC_ADDR_5", + "STATIC_ADDRESS_OFFSETS", "STATIC_RECORD_LAYOUT", "STATUS_STRING_REF", + "STEP_SIZE", "STRUCTURE_COMPONENT", "SUB_FUNCTION", "SUB_GROUP", + "SUPPLIER", "SYMBOL_LINK", "SYMBOL_TYPE_LINK", "SYSTEM_CONSTANT", + "TRANSFORMER", "TRANSFORMER_IN_OBJECTS", "TRANSFORMER_OUT_OBJECTS", + "TYPEDEF_AXIS", "TYPEDEF_BLOB", "TYPEDEF_CHARACTERISTIC", + "TYPEDEF_MEASUREMENT", "TYPEDEF_STRUCTURE", "UNIT", "UNIT_CONVERSION", + "USER", "USER_RIGHTS", "VAR_ADDRESS", "VAR_CHARACTERISTIC", + "VAR_CRITERION", "VAR_FORBIDDEN_COMB", "VAR_MEASUREMENT", "VAR_NAMING", + "VAR_SELECTION_CHARACTERISTIC", "VAR_SEPARATOR", "VARIANT_CODING", + "VIRTUAL", "VIRTUAL_CHARACTERISTIC", "$accept", "any_uint", "any_int", + "any_float", "int_list", "uint_list", "float_list", "float_pair_list", + "float_string_list", "float_range_list", "string_list", "ident_list", + "key_value_list", "a2l_file", "file_version", "annotation", + "annotation_attributes", "annotation_text", "ar_component", + "ar_component_attribute", "axis_descr", "axis_descr_attributes", + "axis_descr_attribute", "axis_pts", "axis_pts_attributes", + "axis_pts_attribute", "bit_operation", "bit_operation_attributes", + "bit_operation_attribute", "blob", "blob_attributes", "blob_attribute", + "calibration_handle", "calibration_handle_attribute", + "calibration_method", "calibration_method_attributes", "characteristic", + "characteristic_attributes", "characteristic_attribute", "compu_method", + "compu_method_attributes", "compu_method_attribute", "compu_tab", + "compu_tab_attributes", "compu_tab_attribute", "compu_vtab", + "compu_vtab_attributes", "compu_vtab_attribute", "compu_vtab_range", + "compu_vtab_range_attributes", "compu_vtab_range_attribute", + "controller_addresses", "controller_address_list", "controller_address", + "def_characteristic", "dependent_characteristic", "fix_axis_par_list", + "formula", "formula_attribute", "frame", "frame_attributes", + "frame_attribute", "function", "function_attributes", + "function_attribute", "function_list", "group", "group_attributes", + "group_attribute", "header", "header_attributes", "header_attribute", + "in_measurement", "instance", "instance_attributes", + "instance_attribute", "loc_measurement", "map_list", "measurement", + "measurement_attributes", "measurement_attribute", "memory_layout", + "memory_layout_attributes", "prg_type", "memory_segment", + "memory_segment_attributes", "mod_common", "mod_common_attributes", + "mod_common_attribute", "mod_par", "mod_par_attributes", + "mod_par_attribute", "module", "module_attributes", "module_attribute", + "out_measurement", "overwrite", "overwrite_attributes", + "overwrite_attribute", "project", "project_attributes", + "project_attribute", "record_layout", "record_layout_attributes", + "record_layout_attribute", "ref_characteristic", "ref_group", + "ref_measurement", "structure_component", + "structure_component_attributes", "structure_component_attribute", + "sub_function", "sub_group", "transformer", "transformer_attributes", + "transformer_attribute", "transformer_in_objects", + "transformer_out_objects", "typedef_axis", "typedef_axis_attributes", + "typedef_axis_attribute", "typedef_blob", "typedef_blob_attributes", + "typedef_blob_attribute", "typedef_characteristic", + "typedef_characteristic_attributes", "typedef_characteristic_attribute", + "typedef_measurement", "typedef_measurement_attributes", + "typedef_measurement_attribute", "typedef_structure", + "typedef_structure_attributes", "typedef_structure_attribute", "unit", + "unit_attributes", "unit_attribute", "user_rights", + "user_rights_attributes", "user_rights_attribute", "var_address", + "var_characteristic", "var_characteristic_attribute", "var_criterion", + "var_criterion_attributes", "var_criterion_attribute", + "var_forbidden_comb", "variant_coding", "variant_coding_attributes", + "variant_coding_attribute", "virtual", "virtual_characteristic", "a2ml", + "a2ml_version", "asap2_version", "addr_epk", "address_type", + "alignment_byte", "alignment_float16_ieee", "alignment_float32_ieee", + "alignment_float64_ieee", "alignment_int64", "alignment_long", + "alignment_word", "annotation_label", "annotation_origin", "array_size", + "ar_prototype_of", "axis_pts_ref", "axis_pts_x", "axis_pts_y", + "axis_pts_z", "axis_pts_4", "axis_pts_5", "axis_rescale_x", "bit_mask", + "byte_order", "calibration_access", "calibration_handle_text", "coeffs", + "coeffs_linear", "comparison_quantity", "compu_tab_ref", + "consistent_exchange", "conversion", "cpu_type", "curve_axis_ref", + "customer", "customer_no", "data_size", "default_value", + "default_value_numeric", "deposit", "discrete", "display_identifier", + "dist_op_x", "dist_op_y", "dist_op_z", "dist_op_4", "dist_op_5", "ecu", + "ecu_address", "ecu_address_extension", "ecu_calibration_offset", + "encoding", "epk", "error_mask", "extended_limits", "fix_axis_par", + "fix_axis_par_dist", "fix_no_axis_pts_x", "fix_no_axis_pts_y", + "fix_no_axis_pts_z", "fix_no_axis_pts_4", "fix_no_axis_pts_5", + "fnc_values", "format", "formula_inv", "frame_measurement", + "function_version", "guard_rails", "identification", "if_data", + "input_quantity", "layout", "left_shift", "limits", "matrix_dim", + "max_grad", "max_refresh", "model_link", "monotony", "no_axis_pts_x", + "no_axis_pts_y", "no_axis_pts_z", "no_axis_pts_4", "no_axis_pts_5", + "no_of_interfaces", "no_rescale_x", "number", "offset_x", "offset_y", + "offset_z", "offset_4", "offset_5", "phone_no", "phys_unit", "proj_no", + "project_no", "read_only", "read_write", "ref_memory_segment", + "ref_unit", "reserved", "right_shift", "rip_addr_w", "rip_addr_x", + "rip_addr_y", "rip_addr_z", "rip_addr_4", "rip_addr_5", "root", + "s_rec_layout", "shift_op_x", "shift_op_y", "shift_op_z", "shift_op_4", + "shift_op_5", "sign_extend", "si_exponents", "src_addr_x", "src_addr_y", + "src_addr_z", "src_addr_4", "src_addr_5", "static_address_offsets", + "static_record_layout", "status_string_ref", "step_size", "supplier", + "symbol_link", "symbol_type_link", "system_constant", "unit_conversion", + "user", "var_measurement", "var_naming", "var_selection_characteristic", + "var_separator", "version", YY_NULLPTR + }; +#endif + + +#if A2LDEBUG + const short + A2lParser::yyrline_[] = + { + 0, 433, 433, 434, 436, 437, 438, 440, 441, 442, + 443, 445, 446, 448, 449, 451, 452, 454, 455, 457, + 458, 460, 461, 465, 466, 468, 469, 471, 472, 474, + 476, 477, 478, 480, 481, 482, 483, 484, 486, 488, + 493, 494, 496, 506, 507, 508, 509, 510, 511, 512, + 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, + 524, 538, 539, 540, 541, 542, 543, 544, 545, 546, + 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, + 557, 558, 560, 565, 566, 567, 568, 569, 571, 578, + 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, + 590, 594, 595, 597, 603, 604, 609, 622, 623, 624, + 625, 628, 629, 630, 631, 632, 633, 634, 635, 636, + 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, + 647, 648, 649, 650, 651, 652, 654, 663, 664, 665, + 666, 667, 668, 673, 674, 676, 685, 686, 687, 688, + 690, 699, 700, 701, 703, 711, 712, 713, 715, 717, + 718, 720, 730, 732, 735, 737, 738, 739, 741, 748, + 749, 750, 751, 753, 758, 759, 760, 761, 762, 763, + 764, 765, 766, 767, 768, 769, 771, 772, 774, 780, + 781, 782, 783, 784, 785, 786, 787, 788, 790, 795, + 796, 798, 801, 806, 808, 815, 816, 817, 818, 819, + 820, 821, 822, 823, 824, 825, 826, 827, 829, 830, + 832, 834, 836, 848, 849, 850, 851, 852, 853, 854, + 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, + 865, 866, 867, 868, 869, 870, 871, 872, 874, 881, + 882, 887, 888, 890, 902, 903, 907, 912, 913, 914, + 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, + 926, 930, 931, 932, 933, 934, 935, 936, 937, 938, + 939, 940, 941, 942, 943, 944, 945, 946, 947, 949, + 955, 956, 957, 958, 961, 964, 967, 970, 973, 976, + 979, 980, 983, 986, 989, 992, 995, 998, 999, 1000, + 1003, 1006, 1009, 1012, 1015, 1018, 1021, 1024, 1027, 1029, + 1031, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1046, 1047, + 1049, 1055, 1056, 1058, 1059, 1064, 1068, 1069, 1070, 1071, + 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, + 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, + 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, + 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, + 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, + 1122, 1123, 1124, 1126, 1127, 1128, 1130, 1137, 1138, 1139, + 1140, 1141, 1142, 1144, 1145, 1147, 1158, 1159, 1160, 1161, + 1163, 1164, 1166, 1179, 1180, 1181, 1182, 1183, 1184, 1185, + 1186, 1187, 1189, 1195, 1196, 1197, 1199, 1211, 1212, 1213, + 1217, 1218, 1219, 1220, 1221, 1222, 1223, 1224, 1225, 1226, + 1228, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, + 1249, 1250, 1251, 1253, 1260, 1261, 1262, 1263, 1264, 1267, + 1269, 1276, 1277, 1278, 1279, 1280, 1285, 1289, 1290, 1291, + 1292, 1294, 1296, 1302, 1303, 1305, 1312, 1313, 1314, 1315, + 1317, 1319, 1320, 1321, 1322, 1326, 1330, 1334, 1338, 1343, + 1344, 1348, 1349, 1354, 1357, 1361, 1362, 1363, 1364, 1365, + 1366, 1367, 1368, 1369, 1370, 1371, 1372, 1373, 1374, 1375, + 1381, 1387, 1393, 1399, 1405, 1412, 1413, 1414, 1415, 1416, + 1426, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 1440, + 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1451, 1455, 1459, + 1463, 1467, 1468, 1469, 1470, 1471, 1472, 1473, 1474, 1475, + 1476, 1477, 1478, 1479, 1480, 1481, 1482, 1488, 1489, 1490, + 1491, 1492, 1493, 1497, 1498, 1499, 1500, 1501, 1502, 1503, + 1504, 1505, 1506, 1507, 1511, 1515, 1519, 1523, 1527, 1528, + 1532, 1533, 1537, 1541, 1545, 1549, 1553, 1554, 1555, 1556, + 1557, 1559, 1560, 1561, 1562, 1563, 1567, 1568, 1572, 1576, + 1580, 1584, 1588, 1592, 1593, 1594, 1598, 1602, 1606, 1610, + 1614, 1615, 1624, 1628, 1632, 1636, 1640, 1644, 1645, 1646, + 1647, 1648, 1649, 1650, 1651, 1652, 1653, 1654, 1655, 1656, + 1657, 1658 + }; + + void + A2lParser::yy_stack_print_ () const + { + *yycdebug_ << "Stack now"; + for (stack_type::const_iterator + i = yystack_.begin (), + i_end = yystack_.end (); + i != i_end; ++i) + *yycdebug_ << ' ' << int (i->state); + *yycdebug_ << '\n'; + } + + void + A2lParser::yy_reduce_print_ (int yyrule) const + { + int yylno = yyrline_[yyrule]; + int yynrhs = yyr2_[yyrule]; + // Print the symbols being reduced, and their result. + *yycdebug_ << "Reducing stack by rule " << yyrule - 1 + << " (line " << yylno << "):\n"; + // The symbols being reduced. + for (int yyi = 0; yyi < yynrhs; yyi++) + YY_SYMBOL_PRINT (" $" << yyi + 1 << " =", + yystack_[(yynrhs) - (yyi + 1)]); + } +#endif // A2LDEBUG + + A2lParser::symbol_kind_type + A2lParser::yytranslate_ (int t) YY_NOEXCEPT + { + // YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to + // TOKEN-NUM as returned by yylex. + static + const unsigned char + translate_table[] = + { + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209 + }; + // Last valid token kind. + const int code_max = 464; + + if (t <= 0) + return symbol_kind::S_YYEOF; + else if (t <= code_max) + return static_cast (translate_table[t]); + else + return symbol_kind::S_YYUNDEF; + } + +#line 5 "D:/projects/a2llib/src/a2lparser.y" +} // a2l +#line 7905 "D:/projects/a2llib/src/a2lparser.cpp" + +#line 1660 "D:/projects/a2llib/src/a2lparser.y" + + +void a2l::A2lParser::error(const std::string& err) { + const auto line = scanner.lineno(); + // const auto column = scanner.YYLeng(); + const std::string near = scanner.YYText() != nullptr ? scanner.YYText() : ""; + std::ostringstream error; + error << "Parser error: " << err + << ", Line: " << line + << ", Near: " << near; + scanner.LastError(error.str()); +} diff --git a/a2llib-main/src/a2lparser.hpp b/a2llib-main/src/a2lparser.hpp new file mode 100644 index 0000000..b4419fa --- /dev/null +++ b/a2llib-main/src/a2lparser.hpp @@ -0,0 +1,6331 @@ +// A Bison parser, made by GNU Bison 3.8.2. + +// Skeleton interface for Bison LALR(1) parsers in C++ + +// Copyright (C) 2002-2015, 2018-2021 Free Software Foundation, Inc. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// As a special exception, you may create a larger work that contains +// part or all of the Bison parser skeleton and distribute that work +// under terms of your choice, so long as that work isn't itself a +// parser generator using the skeleton or a modified version thereof +// as a parser skeleton. Alternatively, if you modify or redistribute +// the parser skeleton itself, you may (at your option) remove this +// special exception, which will cause the skeleton and the resulting +// Bison output files to be licensed under the GNU General Public +// License without this special exception. + +// This special exception was added by the Free Software Foundation in +// version 2.2 of Bison. + + +/** + ** \file D:/projects/a2llib/src/a2lparser.hpp + ** Define the a2l::parser class. + */ + +// C++ LALR(1) parser skeleton written by Akim Demaille. + +// DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, +// especially those whose name start with YY_ or yy_. They are +// private implementation details that can be changed or removed. + +#ifndef YY_A2L_D_PROJECTS_A2LLIB_SRC_A2LPARSER_HPP_INCLUDED +# define YY_A2L_D_PROJECTS_A2LLIB_SRC_A2LPARSER_HPP_INCLUDED +// "%code requires" blocks. +#line 9 "D:/projects/a2llib/src/a2lparser.y" + +#include +#include +#include +#include +#include "a2l/a2lenums.h" +#include "a2l/a2lstructs.h" +namespace a2l { +class A2lScanner; +class A2lFile; +} + + +#line 63 "D:/projects/a2llib/src/a2lparser.hpp" + + +# include // std::abort +# include +# include +# include +# include + +#if defined __cplusplus +# define YY_CPLUSPLUS __cplusplus +#else +# define YY_CPLUSPLUS 199711L +#endif + +// Support move semantics when possible. +#if 201103L <= YY_CPLUSPLUS +# define YY_MOVE std::move +# define YY_MOVE_OR_COPY move +# define YY_MOVE_REF(Type) Type&& +# define YY_RVREF(Type) Type&& +# define YY_COPY(Type) Type +#else +# define YY_MOVE +# define YY_MOVE_OR_COPY copy +# define YY_MOVE_REF(Type) Type& +# define YY_RVREF(Type) const Type& +# define YY_COPY(Type) const Type& +#endif + +// Support noexcept when possible. +#if 201103L <= YY_CPLUSPLUS +# define YY_NOEXCEPT noexcept +# define YY_NOTHROW +#else +# define YY_NOEXCEPT +# define YY_NOTHROW throw () +#endif + +// Support constexpr when possible. +#if 201703 <= YY_CPLUSPLUS +# define YY_CONSTEXPR constexpr +#else +# define YY_CONSTEXPR +#endif + + + +#ifndef YY_ATTRIBUTE_PURE +# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define YY_ATTRIBUTE_PURE +# endif +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +# else +# define YY_ATTRIBUTE_UNUSED +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YY_USE(E) ((void) (E)) +#else +# define YY_USE(E) /* empty */ +#endif + +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ +# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") +# else +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# endif +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") +#else +# define YY_INITIAL_VALUE(Value) Value +#endif +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + +#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ +# define YY_IGNORE_USELESS_CAST_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") +# define YY_IGNORE_USELESS_CAST_END \ + _Pragma ("GCC diagnostic pop") +#endif +#ifndef YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_END +#endif + +# ifndef YY_CAST +# ifdef __cplusplus +# define YY_CAST(Type, Val) static_cast (Val) +# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) +# else +# define YY_CAST(Type, Val) ((Type) (Val)) +# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) +# endif +# endif +# ifndef YY_NULLPTR +# if defined __cplusplus +# if 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# else +# define YY_NULLPTR ((void*)0) +# endif +# endif + +/* Debug traces. */ +#ifndef A2LDEBUG +# if defined YYDEBUG +#if YYDEBUG +# define A2LDEBUG 1 +# else +# define A2LDEBUG 0 +# endif +# else /* ! defined YYDEBUG */ +# define A2LDEBUG 0 +# endif /* ! defined YYDEBUG */ +#endif /* ! defined A2LDEBUG */ + +#line 5 "D:/projects/a2llib/src/a2lparser.y" +namespace a2l { +#line 207 "D:/projects/a2llib/src/a2lparser.hpp" + + + + + /// A Bison parser. + class A2lParser + { + public: +#ifdef A2LSTYPE +# ifdef __GNUC__ +# pragma GCC message "bison: do not #define A2LSTYPE in C++, use %define api.value.type" +# endif + typedef A2LSTYPE value_type; +#else + /// A buffer to store and retrieve objects. + /// + /// Sort of a variant, but does not keep track of the nature + /// of the stored data, since that knowledge is available + /// via the current parser state. + class value_type + { + public: + /// Type of *this. + typedef value_type self_type; + + /// Empty construction. + value_type () YY_NOEXCEPT + : yyraw_ () + {} + + /// Construct and fill. + template + value_type (YY_RVREF (T) t) + { + new (yyas_ ()) T (YY_MOVE (t)); + } + +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + value_type (const self_type&) = delete; + /// Non copyable. + self_type& operator= (const self_type&) = delete; +#endif + + /// Destruction, allowed only if empty. + ~value_type () YY_NOEXCEPT + {} + +# if 201103L <= YY_CPLUSPLUS + /// Instantiate a \a T in here from \a t. + template + T& + emplace (U&&... u) + { + return *new (yyas_ ()) T (std::forward (u)...); + } +# else + /// Instantiate an empty \a T in here. + template + T& + emplace () + { + return *new (yyas_ ()) T (); + } + + /// Instantiate a \a T in here from \a t. + template + T& + emplace (const T& t) + { + return *new (yyas_ ()) T (t); + } +# endif + + /// Instantiate an empty \a T in here. + /// Obsolete, use emplace. + template + T& + build () + { + return emplace (); + } + + /// Instantiate a \a T in here from \a t. + /// Obsolete, use emplace. + template + T& + build (const T& t) + { + return emplace (t); + } + + /// Accessor to a built \a T. + template + T& + as () YY_NOEXCEPT + { + return *yyas_ (); + } + + /// Const accessor to a built \a T (for %printer). + template + const T& + as () const YY_NOEXCEPT + { + return *yyas_ (); + } + + /// Swap the content with \a that, of same type. + /// + /// Both variants must be built beforehand, because swapping the actual + /// data requires reading it (with as()), and this is not possible on + /// unconstructed variants: it would require some dynamic testing, which + /// should not be the variant's responsibility. + /// Swapping between built and (possibly) non-built is done with + /// self_type::move (). + template + void + swap (self_type& that) YY_NOEXCEPT + { + std::swap (as (), that.as ()); + } + + /// Move the content of \a that to this. + /// + /// Destroys \a that. + template + void + move (self_type& that) + { +# if 201103L <= YY_CPLUSPLUS + emplace (std::move (that.as ())); +# else + emplace (); + swap (that); +# endif + that.destroy (); + } + +# if 201103L <= YY_CPLUSPLUS + /// Move the content of \a that to this. + template + void + move (self_type&& that) + { + emplace (std::move (that.as ())); + that.destroy (); + } +#endif + + /// Copy the content of \a that to this. + template + void + copy (const self_type& that) + { + emplace (that.as ()); + } + + /// Destroy the stored \a T. + template + void + destroy () + { + as ().~T (); + } + + private: +#if YY_CPLUSPLUS < 201103L + /// Non copyable. + value_type (const self_type&); + /// Non copyable. + self_type& operator= (const self_type&); +#endif + + /// Accessor to raw memory as \a T. + template + T* + yyas_ () YY_NOEXCEPT + { + void *yyp = yyraw_; + return static_cast (yyp); + } + + /// Const accessor to raw memory as \a T. + template + const T* + yyas_ () const YY_NOEXCEPT + { + const void *yyp = yyraw_; + return static_cast (yyp); + } + + /// An auxiliary type to compute the largest semantic type. + union union_type + { + // address_type + char dummy1[sizeof (A2lAddressType)]; + + // annotation + // annotation_attributes + char dummy2[sizeof (A2lAnnotation)]; + + // axis_pts_x + // axis_pts_y + // axis_pts_z + // axis_pts_4 + // axis_pts_5 + char dummy3[sizeof (A2lAxisPts)]; + + // axis_rescale_x + char dummy4[sizeof (A2lAxisRescale)]; + + // bit_operation + char dummy5[sizeof (A2lBitOperation)]; + + // byte_order + char dummy6[sizeof (A2lByteOrder)]; + + // calibration_access + char dummy7[sizeof (A2lCalibrationAccess)]; + + // calibration_handle + char dummy8[sizeof (A2lCalibrationHandle)]; + + // calibration_method + char dummy9[sizeof (A2lCalibrationMethod)]; + + // dependent_characteristic + // virtual_characteristic + char dummy10[sizeof (A2lDependentCharacteristic)]; + + // deposit + char dummy11[sizeof (A2lDeposit)]; + + // dist_op_x + // dist_op_y + // dist_op_z + // dist_op_4 + // dist_op_5 + // no_axis_pts_x + // no_axis_pts_y + // no_axis_pts_z + // no_axis_pts_4 + // no_axis_pts_5 + // no_rescale_x + // offset_x + // offset_y + // offset_z + // offset_4 + // offset_5 + // reserved + // rip_addr_w + // rip_addr_x + // rip_addr_y + // rip_addr_z + // rip_addr_4 + // rip_addr_5 + // shift_op_x + // shift_op_y + // shift_op_z + // shift_op_4 + // shift_op_5 + // src_addr_x + // src_addr_y + // src_addr_z + // src_addr_4 + // src_addr_5 + char dummy12[sizeof (A2lDistOp)]; + + // encoding + char dummy13[sizeof (A2lEncoding)]; + + // extended_limits + char dummy14[sizeof (A2lExtendedLimits)]; + + // fix_axis_par + char dummy15[sizeof (A2lFixAxisPar)]; + + // fix_axis_par_dist + char dummy16[sizeof (A2lFixAxisParDist)]; + + // fnc_values + char dummy17[sizeof (A2lFncValue)]; + + // identification + char dummy18[sizeof (A2lIdentification)]; + + // layout + char dummy19[sizeof (A2lLayout)]; + + // limits + char dummy20[sizeof (A2lLimits)]; + + // max_refresh + char dummy21[sizeof (A2lMaxRefresh)]; + + // memory_layout + char dummy22[sizeof (A2lMemoryLayout)]; + + // memory_segment + char dummy23[sizeof (A2lMemorySegment)]; + + // monotony + char dummy24[sizeof (A2lMonotony)]; + + // prg_type + char dummy25[sizeof (A2lSegmentType)]; + + // si_exponents + char dummy26[sizeof (A2lSiExponents)]; + + // symbol_link + char dummy27[sizeof (A2lSymbolLink)]; + + // var_characteristic + char dummy28[sizeof (A2lVarCharacteristic)]; + + // var_criterion + char dummy29[sizeof (A2lVarCriterion)]; + + // FLOAT + // any_float + // default_value_numeric + // max_grad + // step_size + char dummy30[sizeof (double)]; + + // INT + // any_int + // ecu_address_extension + // ecu_calibration_offset + char dummy31[sizeof (int64_t)]; + + // float_pair_list + char dummy32[sizeof (std::map)]; + + // float_string_list + char dummy33[sizeof (std::map)]; + + // float_range_list + char dummy34[sizeof (std::map, std::string>)]; + + // key_value_list + // memory_layout_attributes + // memory_segment_attributes + // var_forbidden_comb + char dummy35[sizeof (std::map)]; + + // unit_conversion + char dummy36[sizeof (std::pair)]; + + // formula + // system_constant + char dummy37[sizeof (std::pair)]; + + // IDENT + // STRING + // A2ML + // IF_DATA + // ar_component_attribute + // calibration_handle_attribute + // formula_attribute + // a2ml + // annotation_label + // annotation_origin + // ar_prototype_of + // axis_pts_ref + // calibration_handle_text + // comparison_quantity + // compu_tab_ref + // conversion + // cpu_type + // curve_axis_ref + // customer + // customer_no + // default_value + // display_identifier + // ecu + // epk + // format + // formula_inv + // function_version + // if_data + // input_quantity + // model_link + // phone_no + // phys_unit + // proj_no + // project_no + // ref_memory_segment + // ref_unit + // status_string_ref + // supplier + // symbol_type_link + // user + // var_measurement + // var_naming + // var_selection_characteristic + // var_separator + // version + char dummy38[sizeof (std::string)]; + + // calibration_method_attributes + char dummy39[sizeof (std::vector)]; + + // float_list + // fix_axis_par_list + // coeffs + // coeffs_linear + char dummy40[sizeof (std::vector)]; + + // int_list + char dummy41[sizeof (std::vector)]; + + // string_list + // ident_list + // annotation_text + // def_characteristic + // function_list + // in_measurement + // loc_measurement + // map_list + // out_measurement + // ref_characteristic + // ref_group + // ref_measurement + // sub_function + // sub_group + // transformer_in_objects + // transformer_out_objects + // virtual + // frame_measurement + char dummy42[sizeof (std::vector)]; + + // uint_list + // var_address + // var_characteristic_attribute + // matrix_dim + char dummy43[sizeof (std::vector)]; + + // UINT + // HEX + // any_uint + // addr_epk + // alignment_byte + // alignment_float16_ieee + // alignment_float32_ieee + // alignment_float64_ieee + // alignment_int64 + // alignment_long + // alignment_word + // array_size + // bit_mask + // data_size + // ecu_address + // error_mask + // fix_no_axis_pts_x + // fix_no_axis_pts_y + // fix_no_axis_pts_z + // fix_no_axis_pts_4 + // fix_no_axis_pts_5 + // left_shift + // no_of_interfaces + // number + // right_shift + char dummy44[sizeof (uint64_t)]; + }; + + /// The size of the largest semantic type. + enum { size = sizeof (union_type) }; + + /// A buffer to store semantic values. + union + { + /// Strongest alignment constraints. + long double yyalign_me_; + /// A buffer large enough to store any of the semantic values. + char yyraw_[size]; + }; + }; + +#endif + /// Backward compatibility (Bison 3.8). + typedef value_type semantic_type; + + + /// Syntax errors thrown from user actions. + struct syntax_error : std::runtime_error + { + syntax_error (const std::string& m) + : std::runtime_error (m) + {} + + syntax_error (const syntax_error& s) + : std::runtime_error (s.what ()) + {} + + ~syntax_error () YY_NOEXCEPT YY_NOTHROW; + }; + + /// Token kinds. + struct token + { + enum token_kind_type + { + A2LEMPTY = -2, + EOL = 0, // EOL + A2Lerror = 256, // error + A2LUNDEF = 257, // "invalid token" + A2L_BEGIN = 258, // A2L_BEGIN + A2L_END = 259, // A2L_END + A2L_INCLUDE = 260, // A2L_INCLUDE + IDENT = 261, // IDENT + STRING = 262, // STRING + INT = 263, // INT + UINT = 264, // UINT + HEX = 265, // HEX + FLOAT = 266, // FLOAT + ASAP2_VERSION = 267, // ASAP2_VERSION + A2L_VERSION = 268, // A2L_VERSION + A2ML_VERSION = 269, // A2ML_VERSION + A2ML = 270, // A2ML + ADDR_EPK = 271, // ADDR_EPK + ADDRESS_TYPE = 272, // ADDRESS_TYPE + ALIGNMENT_BYTE = 273, // ALIGNMENT_BYTE + ALIGNMENT_FLOAT16_IEEE = 274, // ALIGNMENT_FLOAT16_IEEE + ALIGNMENT_FLOAT32_IEEE = 275, // ALIGNMENT_FLOAT32_IEEE + ALIGNMENT_FLOAT64_IEEE = 276, // ALIGNMENT_FLOAT64_IEEE + ALIGNMENT_INT64 = 277, // ALIGNMENT_INT64 + ALIGNMENT_LONG = 278, // ALIGNMENT_LONG + ALIGNMENT_WORD = 279, // ALIGNMENT_WORD + ANNOTATION = 280, // ANNOTATION + ANNOTATION_LABEL = 281, // ANNOTATION_LABEL + ANNOTATION_ORIGIN = 282, // ANNOTATION_ORIGIN + ANNOTATION_TEXT = 283, // ANNOTATION_TEXT + ARRAY_SIZE = 284, // ARRAY_SIZE + AR_COMPONENT = 285, // AR_COMPONENT + AR_PROTOTYPE_OF = 286, // AR_PROTOTYPE_OF + AXIS_DESCR = 287, // AXIS_DESCR + AXIS_PTS = 288, // AXIS_PTS + AXIS_PTS_REF = 289, // AXIS_PTS_REF + AXIS_PTS_X = 290, // AXIS_PTS_X + AXIS_PTS_Y = 291, // AXIS_PTS_Y + AXIS_PTS_Z = 292, // AXIS_PTS_Z + AXIS_PTS_4 = 293, // AXIS_PTS_4 + AXIS_PTS_5 = 294, // AXIS_PTS_5 + AXIS_RESCALE_X = 295, // AXIS_RESCALE_X + BIT_MASK = 296, // BIT_MASK + BIT_OPERATION = 297, // BIT_OPERATION + BLOB = 298, // BLOB + A2L_BYTE_ORDER = 299, // A2L_BYTE_ORDER + CALIBRATION_ACCESS = 300, // CALIBRATION_ACCESS + CALIBRATION_HANDLE = 301, // CALIBRATION_HANDLE + CALIBRATION_HANDLE_TEXT = 302, // CALIBRATION_HANDLE_TEXT + CALIBRATION_METHOD = 303, // CALIBRATION_METHOD + CHARACTERISTIC = 304, // CHARACTERISTIC + COEFFS = 305, // COEFFS + COEFFS_LINEAR = 306, // COEFFS_LINEAR + COMPARISON_QUANTITY = 307, // COMPARISON_QUANTITY + COMPU_METHOD = 308, // COMPU_METHOD + COMPU_TAB = 309, // COMPU_TAB + COMPU_TAB_REF = 310, // COMPU_TAB_REF + COMPU_VTAB = 311, // COMPU_VTAB + COMPU_VTAB_RANGE = 312, // COMPU_VTAB_RANGE + CONSISTENT_EXCHANGE = 313, // CONSISTENT_EXCHANGE + CONTROLLER_ADDRESSES = 314, // CONTROLLER_ADDRESSES + CONVERSION = 315, // CONVERSION + CPU_TYPE = 316, // CPU_TYPE + CURVE_AXIS_REF = 317, // CURVE_AXIS_REF + CUSTOMER = 318, // CUSTOMER + CUSTOMER_NO = 319, // CUSTOMER_NO + DATA_SIZE = 320, // DATA_SIZE + DEF_CHARACTERISTIC = 321, // DEF_CHARACTERISTIC + DEFAULT_VALUE = 322, // DEFAULT_VALUE + DEFAULT_VALUE_NUMERIC = 323, // DEFAULT_VALUE_NUMERIC + DEPENDENT_CHARACTERISTIC = 324, // DEPENDENT_CHARACTERISTIC + DEPOSIT = 325, // DEPOSIT + DISCRETE = 326, // DISCRETE + DISPLAY_IDENTIFIER = 327, // DISPLAY_IDENTIFIER + DIST_OP_X = 328, // DIST_OP_X + DIST_OP_Y = 329, // DIST_OP_Y + DIST_OP_Z = 330, // DIST_OP_Z + DIST_OP_4 = 331, // DIST_OP_4 + DIST_OP_5 = 332, // DIST_OP_5 + ECU = 333, // ECU + ECU_ADDRESS = 334, // ECU_ADDRESS + ECU_ADDRESS_EXTENSION = 335, // ECU_ADDRESS_EXTENSION + ECU_CALIBRATION_OFFSET = 336, // ECU_CALIBRATION_OFFSET + ENCODING = 337, // ENCODING + EPK = 338, // EPK + ERROR_MASK = 339, // ERROR_MASK + EXTENDED_LIMITS = 340, // EXTENDED_LIMITS + FIX_AXIS_PAR = 341, // FIX_AXIS_PAR + FIX_AXIS_PAR_DIST = 342, // FIX_AXIS_PAR_DIST + FIX_AXIS_PAR_LIST = 343, // FIX_AXIS_PAR_LIST + FIX_NO_AXIS_PTS_X = 344, // FIX_NO_AXIS_PTS_X + FIX_NO_AXIS_PTS_Y = 345, // FIX_NO_AXIS_PTS_Y + FIX_NO_AXIS_PTS_Z = 346, // FIX_NO_AXIS_PTS_Z + FIX_NO_AXIS_PTS_4 = 347, // FIX_NO_AXIS_PTS_4 + FIX_NO_AXIS_PTS_5 = 348, // FIX_NO_AXIS_PTS_5 + FNC_VALUES = 349, // FNC_VALUES + FORMAT = 350, // FORMAT + FORMULA = 351, // FORMULA + FORMULA_INV = 352, // FORMULA_INV + FRAME = 353, // FRAME + FRAME_MEASUREMENT = 354, // FRAME_MEASUREMENT + FUNCTION = 355, // FUNCTION + FUNCTION_LIST = 356, // FUNCTION_LIST + FUNCTION_VERSION = 357, // FUNCTION_VERSION + GROUP = 358, // GROUP + GUARD_RAILS = 359, // GUARD_RAILS + HEADER = 360, // HEADER + IDENTIFICATION = 361, // IDENTIFICATION + IF_DATA = 362, // IF_DATA + IN_MEASUREMENT = 363, // IN_MEASUREMENT + INPUT_QUANTITY = 364, // INPUT_QUANTITY + INSTANCE = 365, // INSTANCE + LAYOUT = 366, // LAYOUT + LEFT_SHIFT = 367, // LEFT_SHIFT + LIMITS = 368, // LIMITS + LOC_MEASUREMENT = 369, // LOC_MEASUREMENT + MAP_LIST = 370, // MAP_LIST + MATRIX_DIM = 371, // MATRIX_DIM + MAX_GRAD = 372, // MAX_GRAD + MAX_REFRESH = 373, // MAX_REFRESH + MEASUREMENT = 374, // MEASUREMENT + MEMORY_LAYOUT = 375, // MEMORY_LAYOUT + MEMORY_SEGMENT = 376, // MEMORY_SEGMENT + MODULE = 377, // MODULE + MOD_COMMON = 378, // MOD_COMMON + MOD_PAR = 379, // MOD_PAR + MODEL_LINK = 380, // MODEL_LINK + MONOTONY = 381, // MONOTONY + NO_AXIS_PTS_X = 382, // NO_AXIS_PTS_X + NO_AXIS_PTS_Y = 383, // NO_AXIS_PTS_Y + NO_AXIS_PTS_Z = 384, // NO_AXIS_PTS_Z + NO_AXIS_PTS_4 = 385, // NO_AXIS_PTS_4 + NO_AXIS_PTS_5 = 386, // NO_AXIS_PTS_5 + NO_OF_INTERFACES = 387, // NO_OF_INTERFACES + NO_RESCALE_X = 388, // NO_RESCALE_X + NUMBER = 389, // NUMBER + OFFSET_X = 390, // OFFSET_X + OFFSET_Y = 391, // OFFSET_Y + OFFSET_Z = 392, // OFFSET_Z + OFFSET_4 = 393, // OFFSET_4 + OFFSET_5 = 394, // OFFSET_5 + OUT_MEASUREMENT = 395, // OUT_MEASUREMENT + OVERWRITE = 396, // OVERWRITE + PHONE_NO = 397, // PHONE_NO + PHYS_UNIT = 398, // PHYS_UNIT + PROJECT = 399, // PROJECT + PROJECT_NO = 400, // PROJECT_NO + READ_ONLY = 401, // READ_ONLY + READ_WRITE = 402, // READ_WRITE + RECORD_LAYOUT = 403, // RECORD_LAYOUT + REF_CHARACTERISTIC = 404, // REF_CHARACTERISTIC + REF_GROUP = 405, // REF_GROUP + REF_MEASUREMENT = 406, // REF_MEASUREMENT + REF_MEMORY_SEGMENT = 407, // REF_MEMORY_SEGMENT + REF_UNIT = 408, // REF_UNIT + RESERVED = 409, // RESERVED + RIGHT_SHIFT = 410, // RIGHT_SHIFT + RIP_ADDR_W = 411, // RIP_ADDR_W + RIP_ADDR_X = 412, // RIP_ADDR_X + RIP_ADDR_Y = 413, // RIP_ADDR_Y + RIP_ADDR_Z = 414, // RIP_ADDR_Z + RIP_ADDR_4 = 415, // RIP_ADDR_4 + RIP_ADDR_5 = 416, // RIP_ADDR_5 + ROOT = 417, // ROOT + S_REC_LAYOUT = 418, // S_REC_LAYOUT + SHIFT_OP_X = 419, // SHIFT_OP_X + SHIFT_OP_Y = 420, // SHIFT_OP_Y + SHIFT_OP_Z = 421, // SHIFT_OP_Z + SHIFT_OP_4 = 422, // SHIFT_OP_4 + SHIFT_OP_5 = 423, // SHIFT_OP_5 + SIGN_EXTEND = 424, // SIGN_EXTEND + SI_EXPONENTS = 425, // SI_EXPONENTS + SRC_ADDR_X = 426, // SRC_ADDR_X + SRC_ADDR_Y = 427, // SRC_ADDR_Y + SRC_ADDR_Z = 428, // SRC_ADDR_Z + SRC_ADDR_4 = 429, // SRC_ADDR_4 + SRC_ADDR_5 = 430, // SRC_ADDR_5 + STATIC_ADDRESS_OFFSETS = 431, // STATIC_ADDRESS_OFFSETS + STATIC_RECORD_LAYOUT = 432, // STATIC_RECORD_LAYOUT + STATUS_STRING_REF = 433, // STATUS_STRING_REF + STEP_SIZE = 434, // STEP_SIZE + STRUCTURE_COMPONENT = 435, // STRUCTURE_COMPONENT + SUB_FUNCTION = 436, // SUB_FUNCTION + SUB_GROUP = 437, // SUB_GROUP + SUPPLIER = 438, // SUPPLIER + SYMBOL_LINK = 439, // SYMBOL_LINK + SYMBOL_TYPE_LINK = 440, // SYMBOL_TYPE_LINK + SYSTEM_CONSTANT = 441, // SYSTEM_CONSTANT + TRANSFORMER = 442, // TRANSFORMER + TRANSFORMER_IN_OBJECTS = 443, // TRANSFORMER_IN_OBJECTS + TRANSFORMER_OUT_OBJECTS = 444, // TRANSFORMER_OUT_OBJECTS + TYPEDEF_AXIS = 445, // TYPEDEF_AXIS + TYPEDEF_BLOB = 446, // TYPEDEF_BLOB + TYPEDEF_CHARACTERISTIC = 447, // TYPEDEF_CHARACTERISTIC + TYPEDEF_MEASUREMENT = 448, // TYPEDEF_MEASUREMENT + TYPEDEF_STRUCTURE = 449, // TYPEDEF_STRUCTURE + UNIT = 450, // UNIT + UNIT_CONVERSION = 451, // UNIT_CONVERSION + USER = 452, // USER + USER_RIGHTS = 453, // USER_RIGHTS + VAR_ADDRESS = 454, // VAR_ADDRESS + VAR_CHARACTERISTIC = 455, // VAR_CHARACTERISTIC + VAR_CRITERION = 456, // VAR_CRITERION + VAR_FORBIDDEN_COMB = 457, // VAR_FORBIDDEN_COMB + VAR_MEASUREMENT = 458, // VAR_MEASUREMENT + VAR_NAMING = 459, // VAR_NAMING + VAR_SELECTION_CHARACTERISTIC = 460, // VAR_SELECTION_CHARACTERISTIC + VAR_SEPARATOR = 461, // VAR_SEPARATOR + VARIANT_CODING = 462, // VARIANT_CODING + VIRTUAL = 463, // VIRTUAL + VIRTUAL_CHARACTERISTIC = 464 // VIRTUAL_CHARACTERISTIC + }; + /// Backward compatibility alias (Bison 3.6). + typedef token_kind_type yytokentype; + }; + + /// Token kind, as returned by yylex. + typedef token::token_kind_type token_kind_type; + + /// Backward compatibility alias (Bison 3.6). + typedef token_kind_type token_type; + + /// Symbol kinds. + struct symbol_kind + { + enum symbol_kind_type + { + YYNTOKENS = 210, ///< Number of tokens. + S_YYEMPTY = -2, + S_YYEOF = 0, // EOL + S_YYerror = 1, // error + S_YYUNDEF = 2, // "invalid token" + S_A2L_BEGIN = 3, // A2L_BEGIN + S_A2L_END = 4, // A2L_END + S_A2L_INCLUDE = 5, // A2L_INCLUDE + S_IDENT = 6, // IDENT + S_STRING = 7, // STRING + S_INT = 8, // INT + S_UINT = 9, // UINT + S_HEX = 10, // HEX + S_FLOAT = 11, // FLOAT + S_ASAP2_VERSION = 12, // ASAP2_VERSION + S_A2L_VERSION = 13, // A2L_VERSION + S_A2ML_VERSION = 14, // A2ML_VERSION + S_A2ML = 15, // A2ML + S_ADDR_EPK = 16, // ADDR_EPK + S_ADDRESS_TYPE = 17, // ADDRESS_TYPE + S_ALIGNMENT_BYTE = 18, // ALIGNMENT_BYTE + S_ALIGNMENT_FLOAT16_IEEE = 19, // ALIGNMENT_FLOAT16_IEEE + S_ALIGNMENT_FLOAT32_IEEE = 20, // ALIGNMENT_FLOAT32_IEEE + S_ALIGNMENT_FLOAT64_IEEE = 21, // ALIGNMENT_FLOAT64_IEEE + S_ALIGNMENT_INT64 = 22, // ALIGNMENT_INT64 + S_ALIGNMENT_LONG = 23, // ALIGNMENT_LONG + S_ALIGNMENT_WORD = 24, // ALIGNMENT_WORD + S_ANNOTATION = 25, // ANNOTATION + S_ANNOTATION_LABEL = 26, // ANNOTATION_LABEL + S_ANNOTATION_ORIGIN = 27, // ANNOTATION_ORIGIN + S_ANNOTATION_TEXT = 28, // ANNOTATION_TEXT + S_ARRAY_SIZE = 29, // ARRAY_SIZE + S_AR_COMPONENT = 30, // AR_COMPONENT + S_AR_PROTOTYPE_OF = 31, // AR_PROTOTYPE_OF + S_AXIS_DESCR = 32, // AXIS_DESCR + S_AXIS_PTS = 33, // AXIS_PTS + S_AXIS_PTS_REF = 34, // AXIS_PTS_REF + S_AXIS_PTS_X = 35, // AXIS_PTS_X + S_AXIS_PTS_Y = 36, // AXIS_PTS_Y + S_AXIS_PTS_Z = 37, // AXIS_PTS_Z + S_AXIS_PTS_4 = 38, // AXIS_PTS_4 + S_AXIS_PTS_5 = 39, // AXIS_PTS_5 + S_AXIS_RESCALE_X = 40, // AXIS_RESCALE_X + S_BIT_MASK = 41, // BIT_MASK + S_BIT_OPERATION = 42, // BIT_OPERATION + S_BLOB = 43, // BLOB + S_A2L_BYTE_ORDER = 44, // A2L_BYTE_ORDER + S_CALIBRATION_ACCESS = 45, // CALIBRATION_ACCESS + S_CALIBRATION_HANDLE = 46, // CALIBRATION_HANDLE + S_CALIBRATION_HANDLE_TEXT = 47, // CALIBRATION_HANDLE_TEXT + S_CALIBRATION_METHOD = 48, // CALIBRATION_METHOD + S_CHARACTERISTIC = 49, // CHARACTERISTIC + S_COEFFS = 50, // COEFFS + S_COEFFS_LINEAR = 51, // COEFFS_LINEAR + S_COMPARISON_QUANTITY = 52, // COMPARISON_QUANTITY + S_COMPU_METHOD = 53, // COMPU_METHOD + S_COMPU_TAB = 54, // COMPU_TAB + S_COMPU_TAB_REF = 55, // COMPU_TAB_REF + S_COMPU_VTAB = 56, // COMPU_VTAB + S_COMPU_VTAB_RANGE = 57, // COMPU_VTAB_RANGE + S_CONSISTENT_EXCHANGE = 58, // CONSISTENT_EXCHANGE + S_CONTROLLER_ADDRESSES = 59, // CONTROLLER_ADDRESSES + S_CONVERSION = 60, // CONVERSION + S_CPU_TYPE = 61, // CPU_TYPE + S_CURVE_AXIS_REF = 62, // CURVE_AXIS_REF + S_CUSTOMER = 63, // CUSTOMER + S_CUSTOMER_NO = 64, // CUSTOMER_NO + S_DATA_SIZE = 65, // DATA_SIZE + S_DEF_CHARACTERISTIC = 66, // DEF_CHARACTERISTIC + S_DEFAULT_VALUE = 67, // DEFAULT_VALUE + S_DEFAULT_VALUE_NUMERIC = 68, // DEFAULT_VALUE_NUMERIC + S_DEPENDENT_CHARACTERISTIC = 69, // DEPENDENT_CHARACTERISTIC + S_DEPOSIT = 70, // DEPOSIT + S_DISCRETE = 71, // DISCRETE + S_DISPLAY_IDENTIFIER = 72, // DISPLAY_IDENTIFIER + S_DIST_OP_X = 73, // DIST_OP_X + S_DIST_OP_Y = 74, // DIST_OP_Y + S_DIST_OP_Z = 75, // DIST_OP_Z + S_DIST_OP_4 = 76, // DIST_OP_4 + S_DIST_OP_5 = 77, // DIST_OP_5 + S_ECU = 78, // ECU + S_ECU_ADDRESS = 79, // ECU_ADDRESS + S_ECU_ADDRESS_EXTENSION = 80, // ECU_ADDRESS_EXTENSION + S_ECU_CALIBRATION_OFFSET = 81, // ECU_CALIBRATION_OFFSET + S_ENCODING = 82, // ENCODING + S_EPK = 83, // EPK + S_ERROR_MASK = 84, // ERROR_MASK + S_EXTENDED_LIMITS = 85, // EXTENDED_LIMITS + S_FIX_AXIS_PAR = 86, // FIX_AXIS_PAR + S_FIX_AXIS_PAR_DIST = 87, // FIX_AXIS_PAR_DIST + S_FIX_AXIS_PAR_LIST = 88, // FIX_AXIS_PAR_LIST + S_FIX_NO_AXIS_PTS_X = 89, // FIX_NO_AXIS_PTS_X + S_FIX_NO_AXIS_PTS_Y = 90, // FIX_NO_AXIS_PTS_Y + S_FIX_NO_AXIS_PTS_Z = 91, // FIX_NO_AXIS_PTS_Z + S_FIX_NO_AXIS_PTS_4 = 92, // FIX_NO_AXIS_PTS_4 + S_FIX_NO_AXIS_PTS_5 = 93, // FIX_NO_AXIS_PTS_5 + S_FNC_VALUES = 94, // FNC_VALUES + S_FORMAT = 95, // FORMAT + S_FORMULA = 96, // FORMULA + S_FORMULA_INV = 97, // FORMULA_INV + S_FRAME = 98, // FRAME + S_FRAME_MEASUREMENT = 99, // FRAME_MEASUREMENT + S_FUNCTION = 100, // FUNCTION + S_FUNCTION_LIST = 101, // FUNCTION_LIST + S_FUNCTION_VERSION = 102, // FUNCTION_VERSION + S_GROUP = 103, // GROUP + S_GUARD_RAILS = 104, // GUARD_RAILS + S_HEADER = 105, // HEADER + S_IDENTIFICATION = 106, // IDENTIFICATION + S_IF_DATA = 107, // IF_DATA + S_IN_MEASUREMENT = 108, // IN_MEASUREMENT + S_INPUT_QUANTITY = 109, // INPUT_QUANTITY + S_INSTANCE = 110, // INSTANCE + S_LAYOUT = 111, // LAYOUT + S_LEFT_SHIFT = 112, // LEFT_SHIFT + S_LIMITS = 113, // LIMITS + S_LOC_MEASUREMENT = 114, // LOC_MEASUREMENT + S_MAP_LIST = 115, // MAP_LIST + S_MATRIX_DIM = 116, // MATRIX_DIM + S_MAX_GRAD = 117, // MAX_GRAD + S_MAX_REFRESH = 118, // MAX_REFRESH + S_MEASUREMENT = 119, // MEASUREMENT + S_MEMORY_LAYOUT = 120, // MEMORY_LAYOUT + S_MEMORY_SEGMENT = 121, // MEMORY_SEGMENT + S_MODULE = 122, // MODULE + S_MOD_COMMON = 123, // MOD_COMMON + S_MOD_PAR = 124, // MOD_PAR + S_MODEL_LINK = 125, // MODEL_LINK + S_MONOTONY = 126, // MONOTONY + S_NO_AXIS_PTS_X = 127, // NO_AXIS_PTS_X + S_NO_AXIS_PTS_Y = 128, // NO_AXIS_PTS_Y + S_NO_AXIS_PTS_Z = 129, // NO_AXIS_PTS_Z + S_NO_AXIS_PTS_4 = 130, // NO_AXIS_PTS_4 + S_NO_AXIS_PTS_5 = 131, // NO_AXIS_PTS_5 + S_NO_OF_INTERFACES = 132, // NO_OF_INTERFACES + S_NO_RESCALE_X = 133, // NO_RESCALE_X + S_NUMBER = 134, // NUMBER + S_OFFSET_X = 135, // OFFSET_X + S_OFFSET_Y = 136, // OFFSET_Y + S_OFFSET_Z = 137, // OFFSET_Z + S_OFFSET_4 = 138, // OFFSET_4 + S_OFFSET_5 = 139, // OFFSET_5 + S_OUT_MEASUREMENT = 140, // OUT_MEASUREMENT + S_OVERWRITE = 141, // OVERWRITE + S_PHONE_NO = 142, // PHONE_NO + S_PHYS_UNIT = 143, // PHYS_UNIT + S_PROJECT = 144, // PROJECT + S_PROJECT_NO = 145, // PROJECT_NO + S_READ_ONLY = 146, // READ_ONLY + S_READ_WRITE = 147, // READ_WRITE + S_RECORD_LAYOUT = 148, // RECORD_LAYOUT + S_REF_CHARACTERISTIC = 149, // REF_CHARACTERISTIC + S_REF_GROUP = 150, // REF_GROUP + S_REF_MEASUREMENT = 151, // REF_MEASUREMENT + S_REF_MEMORY_SEGMENT = 152, // REF_MEMORY_SEGMENT + S_REF_UNIT = 153, // REF_UNIT + S_RESERVED = 154, // RESERVED + S_RIGHT_SHIFT = 155, // RIGHT_SHIFT + S_RIP_ADDR_W = 156, // RIP_ADDR_W + S_RIP_ADDR_X = 157, // RIP_ADDR_X + S_RIP_ADDR_Y = 158, // RIP_ADDR_Y + S_RIP_ADDR_Z = 159, // RIP_ADDR_Z + S_RIP_ADDR_4 = 160, // RIP_ADDR_4 + S_RIP_ADDR_5 = 161, // RIP_ADDR_5 + S_ROOT = 162, // ROOT + S_S_REC_LAYOUT = 163, // S_REC_LAYOUT + S_SHIFT_OP_X = 164, // SHIFT_OP_X + S_SHIFT_OP_Y = 165, // SHIFT_OP_Y + S_SHIFT_OP_Z = 166, // SHIFT_OP_Z + S_SHIFT_OP_4 = 167, // SHIFT_OP_4 + S_SHIFT_OP_5 = 168, // SHIFT_OP_5 + S_SIGN_EXTEND = 169, // SIGN_EXTEND + S_SI_EXPONENTS = 170, // SI_EXPONENTS + S_SRC_ADDR_X = 171, // SRC_ADDR_X + S_SRC_ADDR_Y = 172, // SRC_ADDR_Y + S_SRC_ADDR_Z = 173, // SRC_ADDR_Z + S_SRC_ADDR_4 = 174, // SRC_ADDR_4 + S_SRC_ADDR_5 = 175, // SRC_ADDR_5 + S_STATIC_ADDRESS_OFFSETS = 176, // STATIC_ADDRESS_OFFSETS + S_STATIC_RECORD_LAYOUT = 177, // STATIC_RECORD_LAYOUT + S_STATUS_STRING_REF = 178, // STATUS_STRING_REF + S_STEP_SIZE = 179, // STEP_SIZE + S_STRUCTURE_COMPONENT = 180, // STRUCTURE_COMPONENT + S_SUB_FUNCTION = 181, // SUB_FUNCTION + S_SUB_GROUP = 182, // SUB_GROUP + S_SUPPLIER = 183, // SUPPLIER + S_SYMBOL_LINK = 184, // SYMBOL_LINK + S_SYMBOL_TYPE_LINK = 185, // SYMBOL_TYPE_LINK + S_SYSTEM_CONSTANT = 186, // SYSTEM_CONSTANT + S_TRANSFORMER = 187, // TRANSFORMER + S_TRANSFORMER_IN_OBJECTS = 188, // TRANSFORMER_IN_OBJECTS + S_TRANSFORMER_OUT_OBJECTS = 189, // TRANSFORMER_OUT_OBJECTS + S_TYPEDEF_AXIS = 190, // TYPEDEF_AXIS + S_TYPEDEF_BLOB = 191, // TYPEDEF_BLOB + S_TYPEDEF_CHARACTERISTIC = 192, // TYPEDEF_CHARACTERISTIC + S_TYPEDEF_MEASUREMENT = 193, // TYPEDEF_MEASUREMENT + S_TYPEDEF_STRUCTURE = 194, // TYPEDEF_STRUCTURE + S_UNIT = 195, // UNIT + S_UNIT_CONVERSION = 196, // UNIT_CONVERSION + S_USER = 197, // USER + S_USER_RIGHTS = 198, // USER_RIGHTS + S_VAR_ADDRESS = 199, // VAR_ADDRESS + S_VAR_CHARACTERISTIC = 200, // VAR_CHARACTERISTIC + S_VAR_CRITERION = 201, // VAR_CRITERION + S_VAR_FORBIDDEN_COMB = 202, // VAR_FORBIDDEN_COMB + S_VAR_MEASUREMENT = 203, // VAR_MEASUREMENT + S_VAR_NAMING = 204, // VAR_NAMING + S_VAR_SELECTION_CHARACTERISTIC = 205, // VAR_SELECTION_CHARACTERISTIC + S_VAR_SEPARATOR = 206, // VAR_SEPARATOR + S_VARIANT_CODING = 207, // VARIANT_CODING + S_VIRTUAL = 208, // VIRTUAL + S_VIRTUAL_CHARACTERISTIC = 209, // VIRTUAL_CHARACTERISTIC + S_YYACCEPT = 210, // $accept + S_any_uint = 211, // any_uint + S_any_int = 212, // any_int + S_any_float = 213, // any_float + S_int_list = 214, // int_list + S_uint_list = 215, // uint_list + S_float_list = 216, // float_list + S_float_pair_list = 217, // float_pair_list + S_float_string_list = 218, // float_string_list + S_float_range_list = 219, // float_range_list + S_string_list = 220, // string_list + S_ident_list = 221, // ident_list + S_key_value_list = 222, // key_value_list + S_a2l_file = 223, // a2l_file + S_file_version = 224, // file_version + S_annotation = 225, // annotation + S_annotation_attributes = 226, // annotation_attributes + S_annotation_text = 227, // annotation_text + S_ar_component = 228, // ar_component + S_ar_component_attribute = 229, // ar_component_attribute + S_axis_descr = 230, // axis_descr + S_axis_descr_attributes = 231, // axis_descr_attributes + S_axis_descr_attribute = 232, // axis_descr_attribute + S_axis_pts = 233, // axis_pts + S_axis_pts_attributes = 234, // axis_pts_attributes + S_axis_pts_attribute = 235, // axis_pts_attribute + S_bit_operation = 236, // bit_operation + S_bit_operation_attributes = 237, // bit_operation_attributes + S_bit_operation_attribute = 238, // bit_operation_attribute + S_blob = 239, // blob + S_blob_attributes = 240, // blob_attributes + S_blob_attribute = 241, // blob_attribute + S_calibration_handle = 242, // calibration_handle + S_calibration_handle_attribute = 243, // calibration_handle_attribute + S_calibration_method = 244, // calibration_method + S_calibration_method_attributes = 245, // calibration_method_attributes + S_characteristic = 246, // characteristic + S_characteristic_attributes = 247, // characteristic_attributes + S_characteristic_attribute = 248, // characteristic_attribute + S_compu_method = 249, // compu_method + S_compu_method_attributes = 250, // compu_method_attributes + S_compu_method_attribute = 251, // compu_method_attribute + S_compu_tab = 252, // compu_tab + S_compu_tab_attributes = 253, // compu_tab_attributes + S_compu_tab_attribute = 254, // compu_tab_attribute + S_compu_vtab = 255, // compu_vtab + S_compu_vtab_attributes = 256, // compu_vtab_attributes + S_compu_vtab_attribute = 257, // compu_vtab_attribute + S_compu_vtab_range = 258, // compu_vtab_range + S_compu_vtab_range_attributes = 259, // compu_vtab_range_attributes + S_compu_vtab_range_attribute = 260, // compu_vtab_range_attribute + S_controller_addresses = 261, // controller_addresses + S_controller_address_list = 262, // controller_address_list + S_controller_address = 263, // controller_address + S_def_characteristic = 264, // def_characteristic + S_dependent_characteristic = 265, // dependent_characteristic + S_fix_axis_par_list = 266, // fix_axis_par_list + S_formula = 267, // formula + S_formula_attribute = 268, // formula_attribute + S_frame = 269, // frame + S_frame_attributes = 270, // frame_attributes + S_frame_attribute = 271, // frame_attribute + S_function = 272, // function + S_function_attributes = 273, // function_attributes + S_function_attribute = 274, // function_attribute + S_function_list = 275, // function_list + S_group = 276, // group + S_group_attributes = 277, // group_attributes + S_group_attribute = 278, // group_attribute + S_header = 279, // header + S_header_attributes = 280, // header_attributes + S_header_attribute = 281, // header_attribute + S_in_measurement = 282, // in_measurement + S_instance = 283, // instance + S_instance_attributes = 284, // instance_attributes + S_instance_attribute = 285, // instance_attribute + S_loc_measurement = 286, // loc_measurement + S_map_list = 287, // map_list + S_measurement = 288, // measurement + S_measurement_attributes = 289, // measurement_attributes + S_measurement_attribute = 290, // measurement_attribute + S_memory_layout = 291, // memory_layout + S_memory_layout_attributes = 292, // memory_layout_attributes + S_prg_type = 293, // prg_type + S_memory_segment = 294, // memory_segment + S_memory_segment_attributes = 295, // memory_segment_attributes + S_mod_common = 296, // mod_common + S_mod_common_attributes = 297, // mod_common_attributes + S_mod_common_attribute = 298, // mod_common_attribute + S_mod_par = 299, // mod_par + S_mod_par_attributes = 300, // mod_par_attributes + S_mod_par_attribute = 301, // mod_par_attribute + S_module = 302, // module + S_module_attributes = 303, // module_attributes + S_module_attribute = 304, // module_attribute + S_out_measurement = 305, // out_measurement + S_overwrite = 306, // overwrite + S_overwrite_attributes = 307, // overwrite_attributes + S_overwrite_attribute = 308, // overwrite_attribute + S_project = 309, // project + S_project_attributes = 310, // project_attributes + S_project_attribute = 311, // project_attribute + S_record_layout = 312, // record_layout + S_record_layout_attributes = 313, // record_layout_attributes + S_record_layout_attribute = 314, // record_layout_attribute + S_ref_characteristic = 315, // ref_characteristic + S_ref_group = 316, // ref_group + S_ref_measurement = 317, // ref_measurement + S_structure_component = 318, // structure_component + S_structure_component_attributes = 319, // structure_component_attributes + S_structure_component_attribute = 320, // structure_component_attribute + S_sub_function = 321, // sub_function + S_sub_group = 322, // sub_group + S_transformer = 323, // transformer + S_transformer_attributes = 324, // transformer_attributes + S_transformer_attribute = 325, // transformer_attribute + S_transformer_in_objects = 326, // transformer_in_objects + S_transformer_out_objects = 327, // transformer_out_objects + S_typedef_axis = 328, // typedef_axis + S_typedef_axis_attributes = 329, // typedef_axis_attributes + S_typedef_axis_attribute = 330, // typedef_axis_attribute + S_typedef_blob = 331, // typedef_blob + S_typedef_blob_attributes = 332, // typedef_blob_attributes + S_typedef_blob_attribute = 333, // typedef_blob_attribute + S_typedef_characteristic = 334, // typedef_characteristic + S_typedef_characteristic_attributes = 335, // typedef_characteristic_attributes + S_typedef_characteristic_attribute = 336, // typedef_characteristic_attribute + S_typedef_measurement = 337, // typedef_measurement + S_typedef_measurement_attributes = 338, // typedef_measurement_attributes + S_typedef_measurement_attribute = 339, // typedef_measurement_attribute + S_typedef_structure = 340, // typedef_structure + S_typedef_structure_attributes = 341, // typedef_structure_attributes + S_typedef_structure_attribute = 342, // typedef_structure_attribute + S_unit = 343, // unit + S_unit_attributes = 344, // unit_attributes + S_unit_attribute = 345, // unit_attribute + S_user_rights = 346, // user_rights + S_user_rights_attributes = 347, // user_rights_attributes + S_user_rights_attribute = 348, // user_rights_attribute + S_var_address = 349, // var_address + S_var_characteristic = 350, // var_characteristic + S_var_characteristic_attribute = 351, // var_characteristic_attribute + S_var_criterion = 352, // var_criterion + S_var_criterion_attributes = 353, // var_criterion_attributes + S_var_criterion_attribute = 354, // var_criterion_attribute + S_var_forbidden_comb = 355, // var_forbidden_comb + S_variant_coding = 356, // variant_coding + S_variant_coding_attributes = 357, // variant_coding_attributes + S_variant_coding_attribute = 358, // variant_coding_attribute + S_virtual = 359, // virtual + S_virtual_characteristic = 360, // virtual_characteristic + S_a2ml = 361, // a2ml + S_a2ml_version = 362, // a2ml_version + S_asap2_version = 363, // asap2_version + S_addr_epk = 364, // addr_epk + S_address_type = 365, // address_type + S_alignment_byte = 366, // alignment_byte + S_alignment_float16_ieee = 367, // alignment_float16_ieee + S_alignment_float32_ieee = 368, // alignment_float32_ieee + S_alignment_float64_ieee = 369, // alignment_float64_ieee + S_alignment_int64 = 370, // alignment_int64 + S_alignment_long = 371, // alignment_long + S_alignment_word = 372, // alignment_word + S_annotation_label = 373, // annotation_label + S_annotation_origin = 374, // annotation_origin + S_array_size = 375, // array_size + S_ar_prototype_of = 376, // ar_prototype_of + S_axis_pts_ref = 377, // axis_pts_ref + S_axis_pts_x = 378, // axis_pts_x + S_axis_pts_y = 379, // axis_pts_y + S_axis_pts_z = 380, // axis_pts_z + S_axis_pts_4 = 381, // axis_pts_4 + S_axis_pts_5 = 382, // axis_pts_5 + S_axis_rescale_x = 383, // axis_rescale_x + S_bit_mask = 384, // bit_mask + S_byte_order = 385, // byte_order + S_calibration_access = 386, // calibration_access + S_calibration_handle_text = 387, // calibration_handle_text + S_coeffs = 388, // coeffs + S_coeffs_linear = 389, // coeffs_linear + S_comparison_quantity = 390, // comparison_quantity + S_compu_tab_ref = 391, // compu_tab_ref + S_consistent_exchange = 392, // consistent_exchange + S_conversion = 393, // conversion + S_cpu_type = 394, // cpu_type + S_curve_axis_ref = 395, // curve_axis_ref + S_customer = 396, // customer + S_customer_no = 397, // customer_no + S_data_size = 398, // data_size + S_default_value = 399, // default_value + S_default_value_numeric = 400, // default_value_numeric + S_deposit = 401, // deposit + S_discrete = 402, // discrete + S_display_identifier = 403, // display_identifier + S_dist_op_x = 404, // dist_op_x + S_dist_op_y = 405, // dist_op_y + S_dist_op_z = 406, // dist_op_z + S_dist_op_4 = 407, // dist_op_4 + S_dist_op_5 = 408, // dist_op_5 + S_ecu = 409, // ecu + S_ecu_address = 410, // ecu_address + S_ecu_address_extension = 411, // ecu_address_extension + S_ecu_calibration_offset = 412, // ecu_calibration_offset + S_encoding = 413, // encoding + S_epk = 414, // epk + S_error_mask = 415, // error_mask + S_extended_limits = 416, // extended_limits + S_fix_axis_par = 417, // fix_axis_par + S_fix_axis_par_dist = 418, // fix_axis_par_dist + S_fix_no_axis_pts_x = 419, // fix_no_axis_pts_x + S_fix_no_axis_pts_y = 420, // fix_no_axis_pts_y + S_fix_no_axis_pts_z = 421, // fix_no_axis_pts_z + S_fix_no_axis_pts_4 = 422, // fix_no_axis_pts_4 + S_fix_no_axis_pts_5 = 423, // fix_no_axis_pts_5 + S_fnc_values = 424, // fnc_values + S_format = 425, // format + S_formula_inv = 426, // formula_inv + S_frame_measurement = 427, // frame_measurement + S_function_version = 428, // function_version + S_guard_rails = 429, // guard_rails + S_identification = 430, // identification + S_if_data = 431, // if_data + S_input_quantity = 432, // input_quantity + S_layout = 433, // layout + S_left_shift = 434, // left_shift + S_limits = 435, // limits + S_matrix_dim = 436, // matrix_dim + S_max_grad = 437, // max_grad + S_max_refresh = 438, // max_refresh + S_model_link = 439, // model_link + S_monotony = 440, // monotony + S_no_axis_pts_x = 441, // no_axis_pts_x + S_no_axis_pts_y = 442, // no_axis_pts_y + S_no_axis_pts_z = 443, // no_axis_pts_z + S_no_axis_pts_4 = 444, // no_axis_pts_4 + S_no_axis_pts_5 = 445, // no_axis_pts_5 + S_no_of_interfaces = 446, // no_of_interfaces + S_no_rescale_x = 447, // no_rescale_x + S_number = 448, // number + S_offset_x = 449, // offset_x + S_offset_y = 450, // offset_y + S_offset_z = 451, // offset_z + S_offset_4 = 452, // offset_4 + S_offset_5 = 453, // offset_5 + S_phone_no = 454, // phone_no + S_phys_unit = 455, // phys_unit + S_proj_no = 456, // proj_no + S_project_no = 457, // project_no + S_read_only = 458, // read_only + S_read_write = 459, // read_write + S_ref_memory_segment = 460, // ref_memory_segment + S_ref_unit = 461, // ref_unit + S_reserved = 462, // reserved + S_right_shift = 463, // right_shift + S_rip_addr_w = 464, // rip_addr_w + S_rip_addr_x = 465, // rip_addr_x + S_rip_addr_y = 466, // rip_addr_y + S_rip_addr_z = 467, // rip_addr_z + S_rip_addr_4 = 468, // rip_addr_4 + S_rip_addr_5 = 469, // rip_addr_5 + S_root = 470, // root + S_s_rec_layout = 471, // s_rec_layout + S_shift_op_x = 472, // shift_op_x + S_shift_op_y = 473, // shift_op_y + S_shift_op_z = 474, // shift_op_z + S_shift_op_4 = 475, // shift_op_4 + S_shift_op_5 = 476, // shift_op_5 + S_sign_extend = 477, // sign_extend + S_si_exponents = 478, // si_exponents + S_src_addr_x = 479, // src_addr_x + S_src_addr_y = 480, // src_addr_y + S_src_addr_z = 481, // src_addr_z + S_src_addr_4 = 482, // src_addr_4 + S_src_addr_5 = 483, // src_addr_5 + S_static_address_offsets = 484, // static_address_offsets + S_static_record_layout = 485, // static_record_layout + S_status_string_ref = 486, // status_string_ref + S_step_size = 487, // step_size + S_supplier = 488, // supplier + S_symbol_link = 489, // symbol_link + S_symbol_type_link = 490, // symbol_type_link + S_system_constant = 491, // system_constant + S_unit_conversion = 492, // unit_conversion + S_user = 493, // user + S_var_measurement = 494, // var_measurement + S_var_naming = 495, // var_naming + S_var_selection_characteristic = 496, // var_selection_characteristic + S_var_separator = 497, // var_separator + S_version = 498 // version + }; + }; + + /// (Internal) symbol kind. + typedef symbol_kind::symbol_kind_type symbol_kind_type; + + /// The number of tokens. + static const symbol_kind_type YYNTOKENS = symbol_kind::YYNTOKENS; + + /// A complete symbol. + /// + /// Expects its Base type to provide access to the symbol kind + /// via kind (). + /// + /// Provide access to semantic value. + template + struct basic_symbol : Base + { + /// Alias to Base. + typedef Base super_type; + + /// Default constructor. + basic_symbol () YY_NOEXCEPT + : value () + {} + +#if 201103L <= YY_CPLUSPLUS + /// Move constructor. + basic_symbol (basic_symbol&& that) + : Base (std::move (that)) + , value () + { + switch (this->kind ()) + { + case symbol_kind::S_address_type: // address_type + value.move< A2lAddressType > (std::move (that.value)); + break; + + case symbol_kind::S_annotation: // annotation + case symbol_kind::S_annotation_attributes: // annotation_attributes + value.move< A2lAnnotation > (std::move (that.value)); + break; + + case symbol_kind::S_axis_pts_x: // axis_pts_x + case symbol_kind::S_axis_pts_y: // axis_pts_y + case symbol_kind::S_axis_pts_z: // axis_pts_z + case symbol_kind::S_axis_pts_4: // axis_pts_4 + case symbol_kind::S_axis_pts_5: // axis_pts_5 + value.move< A2lAxisPts > (std::move (that.value)); + break; + + case symbol_kind::S_axis_rescale_x: // axis_rescale_x + value.move< A2lAxisRescale > (std::move (that.value)); + break; + + case symbol_kind::S_bit_operation: // bit_operation + value.move< A2lBitOperation > (std::move (that.value)); + break; + + case symbol_kind::S_byte_order: // byte_order + value.move< A2lByteOrder > (std::move (that.value)); + break; + + case symbol_kind::S_calibration_access: // calibration_access + value.move< A2lCalibrationAccess > (std::move (that.value)); + break; + + case symbol_kind::S_calibration_handle: // calibration_handle + value.move< A2lCalibrationHandle > (std::move (that.value)); + break; + + case symbol_kind::S_calibration_method: // calibration_method + value.move< A2lCalibrationMethod > (std::move (that.value)); + break; + + case symbol_kind::S_dependent_characteristic: // dependent_characteristic + case symbol_kind::S_virtual_characteristic: // virtual_characteristic + value.move< A2lDependentCharacteristic > (std::move (that.value)); + break; + + case symbol_kind::S_deposit: // deposit + value.move< A2lDeposit > (std::move (that.value)); + break; + + case symbol_kind::S_dist_op_x: // dist_op_x + case symbol_kind::S_dist_op_y: // dist_op_y + case symbol_kind::S_dist_op_z: // dist_op_z + case symbol_kind::S_dist_op_4: // dist_op_4 + case symbol_kind::S_dist_op_5: // dist_op_5 + case symbol_kind::S_no_axis_pts_x: // no_axis_pts_x + case symbol_kind::S_no_axis_pts_y: // no_axis_pts_y + case symbol_kind::S_no_axis_pts_z: // no_axis_pts_z + case symbol_kind::S_no_axis_pts_4: // no_axis_pts_4 + case symbol_kind::S_no_axis_pts_5: // no_axis_pts_5 + case symbol_kind::S_no_rescale_x: // no_rescale_x + case symbol_kind::S_offset_x: // offset_x + case symbol_kind::S_offset_y: // offset_y + case symbol_kind::S_offset_z: // offset_z + case symbol_kind::S_offset_4: // offset_4 + case symbol_kind::S_offset_5: // offset_5 + case symbol_kind::S_reserved: // reserved + case symbol_kind::S_rip_addr_w: // rip_addr_w + case symbol_kind::S_rip_addr_x: // rip_addr_x + case symbol_kind::S_rip_addr_y: // rip_addr_y + case symbol_kind::S_rip_addr_z: // rip_addr_z + case symbol_kind::S_rip_addr_4: // rip_addr_4 + case symbol_kind::S_rip_addr_5: // rip_addr_5 + case symbol_kind::S_shift_op_x: // shift_op_x + case symbol_kind::S_shift_op_y: // shift_op_y + case symbol_kind::S_shift_op_z: // shift_op_z + case symbol_kind::S_shift_op_4: // shift_op_4 + case symbol_kind::S_shift_op_5: // shift_op_5 + case symbol_kind::S_src_addr_x: // src_addr_x + case symbol_kind::S_src_addr_y: // src_addr_y + case symbol_kind::S_src_addr_z: // src_addr_z + case symbol_kind::S_src_addr_4: // src_addr_4 + case symbol_kind::S_src_addr_5: // src_addr_5 + value.move< A2lDistOp > (std::move (that.value)); + break; + + case symbol_kind::S_encoding: // encoding + value.move< A2lEncoding > (std::move (that.value)); + break; + + case symbol_kind::S_extended_limits: // extended_limits + value.move< A2lExtendedLimits > (std::move (that.value)); + break; + + case symbol_kind::S_fix_axis_par: // fix_axis_par + value.move< A2lFixAxisPar > (std::move (that.value)); + break; + + case symbol_kind::S_fix_axis_par_dist: // fix_axis_par_dist + value.move< A2lFixAxisParDist > (std::move (that.value)); + break; + + case symbol_kind::S_fnc_values: // fnc_values + value.move< A2lFncValue > (std::move (that.value)); + break; + + case symbol_kind::S_identification: // identification + value.move< A2lIdentification > (std::move (that.value)); + break; + + case symbol_kind::S_layout: // layout + value.move< A2lLayout > (std::move (that.value)); + break; + + case symbol_kind::S_limits: // limits + value.move< A2lLimits > (std::move (that.value)); + break; + + case symbol_kind::S_max_refresh: // max_refresh + value.move< A2lMaxRefresh > (std::move (that.value)); + break; + + case symbol_kind::S_memory_layout: // memory_layout + value.move< A2lMemoryLayout > (std::move (that.value)); + break; + + case symbol_kind::S_memory_segment: // memory_segment + value.move< A2lMemorySegment > (std::move (that.value)); + break; + + case symbol_kind::S_monotony: // monotony + value.move< A2lMonotony > (std::move (that.value)); + break; + + case symbol_kind::S_prg_type: // prg_type + value.move< A2lSegmentType > (std::move (that.value)); + break; + + case symbol_kind::S_si_exponents: // si_exponents + value.move< A2lSiExponents > (std::move (that.value)); + break; + + case symbol_kind::S_symbol_link: // symbol_link + value.move< A2lSymbolLink > (std::move (that.value)); + break; + + case symbol_kind::S_var_characteristic: // var_characteristic + value.move< A2lVarCharacteristic > (std::move (that.value)); + break; + + case symbol_kind::S_var_criterion: // var_criterion + value.move< A2lVarCriterion > (std::move (that.value)); + break; + + case symbol_kind::S_FLOAT: // FLOAT + case symbol_kind::S_any_float: // any_float + case symbol_kind::S_default_value_numeric: // default_value_numeric + case symbol_kind::S_max_grad: // max_grad + case symbol_kind::S_step_size: // step_size + value.move< double > (std::move (that.value)); + break; + + case symbol_kind::S_INT: // INT + case symbol_kind::S_any_int: // any_int + case symbol_kind::S_ecu_address_extension: // ecu_address_extension + case symbol_kind::S_ecu_calibration_offset: // ecu_calibration_offset + value.move< int64_t > (std::move (that.value)); + break; + + case symbol_kind::S_float_pair_list: // float_pair_list + value.move< std::map > (std::move (that.value)); + break; + + case symbol_kind::S_float_string_list: // float_string_list + value.move< std::map > (std::move (that.value)); + break; + + case symbol_kind::S_float_range_list: // float_range_list + value.move< std::map, std::string> > (std::move (that.value)); + break; + + case symbol_kind::S_key_value_list: // key_value_list + case symbol_kind::S_memory_layout_attributes: // memory_layout_attributes + case symbol_kind::S_memory_segment_attributes: // memory_segment_attributes + case symbol_kind::S_var_forbidden_comb: // var_forbidden_comb + value.move< std::map > (std::move (that.value)); + break; + + case symbol_kind::S_unit_conversion: // unit_conversion + value.move< std::pair > (std::move (that.value)); + break; + + case symbol_kind::S_formula: // formula + case symbol_kind::S_system_constant: // system_constant + value.move< std::pair > (std::move (that.value)); + break; + + case symbol_kind::S_IDENT: // IDENT + case symbol_kind::S_STRING: // STRING + case symbol_kind::S_A2ML: // A2ML + case symbol_kind::S_IF_DATA: // IF_DATA + case symbol_kind::S_ar_component_attribute: // ar_component_attribute + case symbol_kind::S_calibration_handle_attribute: // calibration_handle_attribute + case symbol_kind::S_formula_attribute: // formula_attribute + case symbol_kind::S_a2ml: // a2ml + case symbol_kind::S_annotation_label: // annotation_label + case symbol_kind::S_annotation_origin: // annotation_origin + case symbol_kind::S_ar_prototype_of: // ar_prototype_of + case symbol_kind::S_axis_pts_ref: // axis_pts_ref + case symbol_kind::S_calibration_handle_text: // calibration_handle_text + case symbol_kind::S_comparison_quantity: // comparison_quantity + case symbol_kind::S_compu_tab_ref: // compu_tab_ref + case symbol_kind::S_conversion: // conversion + case symbol_kind::S_cpu_type: // cpu_type + case symbol_kind::S_curve_axis_ref: // curve_axis_ref + case symbol_kind::S_customer: // customer + case symbol_kind::S_customer_no: // customer_no + case symbol_kind::S_default_value: // default_value + case symbol_kind::S_display_identifier: // display_identifier + case symbol_kind::S_ecu: // ecu + case symbol_kind::S_epk: // epk + case symbol_kind::S_format: // format + case symbol_kind::S_formula_inv: // formula_inv + case symbol_kind::S_function_version: // function_version + case symbol_kind::S_if_data: // if_data + case symbol_kind::S_input_quantity: // input_quantity + case symbol_kind::S_model_link: // model_link + case symbol_kind::S_phone_no: // phone_no + case symbol_kind::S_phys_unit: // phys_unit + case symbol_kind::S_proj_no: // proj_no + case symbol_kind::S_project_no: // project_no + case symbol_kind::S_ref_memory_segment: // ref_memory_segment + case symbol_kind::S_ref_unit: // ref_unit + case symbol_kind::S_status_string_ref: // status_string_ref + case symbol_kind::S_supplier: // supplier + case symbol_kind::S_symbol_type_link: // symbol_type_link + case symbol_kind::S_user: // user + case symbol_kind::S_var_measurement: // var_measurement + case symbol_kind::S_var_naming: // var_naming + case symbol_kind::S_var_selection_characteristic: // var_selection_characteristic + case symbol_kind::S_var_separator: // var_separator + case symbol_kind::S_version: // version + value.move< std::string > (std::move (that.value)); + break; + + case symbol_kind::S_calibration_method_attributes: // calibration_method_attributes + value.move< std::vector > (std::move (that.value)); + break; + + case symbol_kind::S_float_list: // float_list + case symbol_kind::S_fix_axis_par_list: // fix_axis_par_list + case symbol_kind::S_coeffs: // coeffs + case symbol_kind::S_coeffs_linear: // coeffs_linear + value.move< std::vector > (std::move (that.value)); + break; + + case symbol_kind::S_int_list: // int_list + value.move< std::vector > (std::move (that.value)); + break; + + case symbol_kind::S_string_list: // string_list + case symbol_kind::S_ident_list: // ident_list + case symbol_kind::S_annotation_text: // annotation_text + case symbol_kind::S_def_characteristic: // def_characteristic + case symbol_kind::S_function_list: // function_list + case symbol_kind::S_in_measurement: // in_measurement + case symbol_kind::S_loc_measurement: // loc_measurement + case symbol_kind::S_map_list: // map_list + case symbol_kind::S_out_measurement: // out_measurement + case symbol_kind::S_ref_characteristic: // ref_characteristic + case symbol_kind::S_ref_group: // ref_group + case symbol_kind::S_ref_measurement: // ref_measurement + case symbol_kind::S_sub_function: // sub_function + case symbol_kind::S_sub_group: // sub_group + case symbol_kind::S_transformer_in_objects: // transformer_in_objects + case symbol_kind::S_transformer_out_objects: // transformer_out_objects + case symbol_kind::S_virtual: // virtual + case symbol_kind::S_frame_measurement: // frame_measurement + value.move< std::vector > (std::move (that.value)); + break; + + case symbol_kind::S_uint_list: // uint_list + case symbol_kind::S_var_address: // var_address + case symbol_kind::S_var_characteristic_attribute: // var_characteristic_attribute + case symbol_kind::S_matrix_dim: // matrix_dim + value.move< std::vector > (std::move (that.value)); + break; + + case symbol_kind::S_UINT: // UINT + case symbol_kind::S_HEX: // HEX + case symbol_kind::S_any_uint: // any_uint + case symbol_kind::S_addr_epk: // addr_epk + case symbol_kind::S_alignment_byte: // alignment_byte + case symbol_kind::S_alignment_float16_ieee: // alignment_float16_ieee + case symbol_kind::S_alignment_float32_ieee: // alignment_float32_ieee + case symbol_kind::S_alignment_float64_ieee: // alignment_float64_ieee + case symbol_kind::S_alignment_int64: // alignment_int64 + case symbol_kind::S_alignment_long: // alignment_long + case symbol_kind::S_alignment_word: // alignment_word + case symbol_kind::S_array_size: // array_size + case symbol_kind::S_bit_mask: // bit_mask + case symbol_kind::S_data_size: // data_size + case symbol_kind::S_ecu_address: // ecu_address + case symbol_kind::S_error_mask: // error_mask + case symbol_kind::S_fix_no_axis_pts_x: // fix_no_axis_pts_x + case symbol_kind::S_fix_no_axis_pts_y: // fix_no_axis_pts_y + case symbol_kind::S_fix_no_axis_pts_z: // fix_no_axis_pts_z + case symbol_kind::S_fix_no_axis_pts_4: // fix_no_axis_pts_4 + case symbol_kind::S_fix_no_axis_pts_5: // fix_no_axis_pts_5 + case symbol_kind::S_left_shift: // left_shift + case symbol_kind::S_no_of_interfaces: // no_of_interfaces + case symbol_kind::S_number: // number + case symbol_kind::S_right_shift: // right_shift + value.move< uint64_t > (std::move (that.value)); + break; + + default: + break; + } + + } +#endif + + /// Copy constructor. + basic_symbol (const basic_symbol& that); + + /// Constructors for typed symbols. +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t) + : Base (t) + {} +#else + basic_symbol (typename Base::kind_type t) + : Base (t) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, A2lAddressType&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const A2lAddressType& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, A2lAnnotation&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const A2lAnnotation& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, A2lAxisPts&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const A2lAxisPts& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, A2lAxisRescale&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const A2lAxisRescale& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, A2lBitOperation&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const A2lBitOperation& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, A2lByteOrder&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const A2lByteOrder& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, A2lCalibrationAccess&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const A2lCalibrationAccess& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, A2lCalibrationHandle&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const A2lCalibrationHandle& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, A2lCalibrationMethod&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const A2lCalibrationMethod& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, A2lDependentCharacteristic&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const A2lDependentCharacteristic& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, A2lDeposit&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const A2lDeposit& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, A2lDistOp&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const A2lDistOp& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, A2lEncoding&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const A2lEncoding& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, A2lExtendedLimits&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const A2lExtendedLimits& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, A2lFixAxisPar&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const A2lFixAxisPar& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, A2lFixAxisParDist&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const A2lFixAxisParDist& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, A2lFncValue&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const A2lFncValue& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, A2lIdentification&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const A2lIdentification& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, A2lLayout&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const A2lLayout& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, A2lLimits&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const A2lLimits& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, A2lMaxRefresh&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const A2lMaxRefresh& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, A2lMemoryLayout&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const A2lMemoryLayout& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, A2lMemorySegment&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const A2lMemorySegment& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, A2lMonotony&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const A2lMonotony& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, A2lSegmentType&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const A2lSegmentType& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, A2lSiExponents&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const A2lSiExponents& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, A2lSymbolLink&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const A2lSymbolLink& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, A2lVarCharacteristic&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const A2lVarCharacteristic& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, A2lVarCriterion&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const A2lVarCriterion& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, double&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const double& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, int64_t&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const int64_t& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, std::map&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const std::map& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, std::map&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const std::map& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, std::map, std::string>&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const std::map, std::string>& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, std::map&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const std::map& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, std::pair&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const std::pair& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, std::pair&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const std::pair& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, std::string&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const std::string& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, std::vector&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const std::vector& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, std::vector&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const std::vector& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, std::vector&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const std::vector& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, std::vector&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const std::vector& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, std::vector&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const std::vector& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, uint64_t&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const uint64_t& v) + : Base (t) + , value (v) + {} +#endif + + /// Destroy the symbol. + ~basic_symbol () + { + clear (); + } + + + + /// Destroy contents, and record that is empty. + void clear () YY_NOEXCEPT + { + // User destructor. + symbol_kind_type yykind = this->kind (); + basic_symbol& yysym = *this; + (void) yysym; + switch (yykind) + { + default: + break; + } + + // Value type destructor. +switch (yykind) + { + case symbol_kind::S_address_type: // address_type + value.template destroy< A2lAddressType > (); + break; + + case symbol_kind::S_annotation: // annotation + case symbol_kind::S_annotation_attributes: // annotation_attributes + value.template destroy< A2lAnnotation > (); + break; + + case symbol_kind::S_axis_pts_x: // axis_pts_x + case symbol_kind::S_axis_pts_y: // axis_pts_y + case symbol_kind::S_axis_pts_z: // axis_pts_z + case symbol_kind::S_axis_pts_4: // axis_pts_4 + case symbol_kind::S_axis_pts_5: // axis_pts_5 + value.template destroy< A2lAxisPts > (); + break; + + case symbol_kind::S_axis_rescale_x: // axis_rescale_x + value.template destroy< A2lAxisRescale > (); + break; + + case symbol_kind::S_bit_operation: // bit_operation + value.template destroy< A2lBitOperation > (); + break; + + case symbol_kind::S_byte_order: // byte_order + value.template destroy< A2lByteOrder > (); + break; + + case symbol_kind::S_calibration_access: // calibration_access + value.template destroy< A2lCalibrationAccess > (); + break; + + case symbol_kind::S_calibration_handle: // calibration_handle + value.template destroy< A2lCalibrationHandle > (); + break; + + case symbol_kind::S_calibration_method: // calibration_method + value.template destroy< A2lCalibrationMethod > (); + break; + + case symbol_kind::S_dependent_characteristic: // dependent_characteristic + case symbol_kind::S_virtual_characteristic: // virtual_characteristic + value.template destroy< A2lDependentCharacteristic > (); + break; + + case symbol_kind::S_deposit: // deposit + value.template destroy< A2lDeposit > (); + break; + + case symbol_kind::S_dist_op_x: // dist_op_x + case symbol_kind::S_dist_op_y: // dist_op_y + case symbol_kind::S_dist_op_z: // dist_op_z + case symbol_kind::S_dist_op_4: // dist_op_4 + case symbol_kind::S_dist_op_5: // dist_op_5 + case symbol_kind::S_no_axis_pts_x: // no_axis_pts_x + case symbol_kind::S_no_axis_pts_y: // no_axis_pts_y + case symbol_kind::S_no_axis_pts_z: // no_axis_pts_z + case symbol_kind::S_no_axis_pts_4: // no_axis_pts_4 + case symbol_kind::S_no_axis_pts_5: // no_axis_pts_5 + case symbol_kind::S_no_rescale_x: // no_rescale_x + case symbol_kind::S_offset_x: // offset_x + case symbol_kind::S_offset_y: // offset_y + case symbol_kind::S_offset_z: // offset_z + case symbol_kind::S_offset_4: // offset_4 + case symbol_kind::S_offset_5: // offset_5 + case symbol_kind::S_reserved: // reserved + case symbol_kind::S_rip_addr_w: // rip_addr_w + case symbol_kind::S_rip_addr_x: // rip_addr_x + case symbol_kind::S_rip_addr_y: // rip_addr_y + case symbol_kind::S_rip_addr_z: // rip_addr_z + case symbol_kind::S_rip_addr_4: // rip_addr_4 + case symbol_kind::S_rip_addr_5: // rip_addr_5 + case symbol_kind::S_shift_op_x: // shift_op_x + case symbol_kind::S_shift_op_y: // shift_op_y + case symbol_kind::S_shift_op_z: // shift_op_z + case symbol_kind::S_shift_op_4: // shift_op_4 + case symbol_kind::S_shift_op_5: // shift_op_5 + case symbol_kind::S_src_addr_x: // src_addr_x + case symbol_kind::S_src_addr_y: // src_addr_y + case symbol_kind::S_src_addr_z: // src_addr_z + case symbol_kind::S_src_addr_4: // src_addr_4 + case symbol_kind::S_src_addr_5: // src_addr_5 + value.template destroy< A2lDistOp > (); + break; + + case symbol_kind::S_encoding: // encoding + value.template destroy< A2lEncoding > (); + break; + + case symbol_kind::S_extended_limits: // extended_limits + value.template destroy< A2lExtendedLimits > (); + break; + + case symbol_kind::S_fix_axis_par: // fix_axis_par + value.template destroy< A2lFixAxisPar > (); + break; + + case symbol_kind::S_fix_axis_par_dist: // fix_axis_par_dist + value.template destroy< A2lFixAxisParDist > (); + break; + + case symbol_kind::S_fnc_values: // fnc_values + value.template destroy< A2lFncValue > (); + break; + + case symbol_kind::S_identification: // identification + value.template destroy< A2lIdentification > (); + break; + + case symbol_kind::S_layout: // layout + value.template destroy< A2lLayout > (); + break; + + case symbol_kind::S_limits: // limits + value.template destroy< A2lLimits > (); + break; + + case symbol_kind::S_max_refresh: // max_refresh + value.template destroy< A2lMaxRefresh > (); + break; + + case symbol_kind::S_memory_layout: // memory_layout + value.template destroy< A2lMemoryLayout > (); + break; + + case symbol_kind::S_memory_segment: // memory_segment + value.template destroy< A2lMemorySegment > (); + break; + + case symbol_kind::S_monotony: // monotony + value.template destroy< A2lMonotony > (); + break; + + case symbol_kind::S_prg_type: // prg_type + value.template destroy< A2lSegmentType > (); + break; + + case symbol_kind::S_si_exponents: // si_exponents + value.template destroy< A2lSiExponents > (); + break; + + case symbol_kind::S_symbol_link: // symbol_link + value.template destroy< A2lSymbolLink > (); + break; + + case symbol_kind::S_var_characteristic: // var_characteristic + value.template destroy< A2lVarCharacteristic > (); + break; + + case symbol_kind::S_var_criterion: // var_criterion + value.template destroy< A2lVarCriterion > (); + break; + + case symbol_kind::S_FLOAT: // FLOAT + case symbol_kind::S_any_float: // any_float + case symbol_kind::S_default_value_numeric: // default_value_numeric + case symbol_kind::S_max_grad: // max_grad + case symbol_kind::S_step_size: // step_size + value.template destroy< double > (); + break; + + case symbol_kind::S_INT: // INT + case symbol_kind::S_any_int: // any_int + case symbol_kind::S_ecu_address_extension: // ecu_address_extension + case symbol_kind::S_ecu_calibration_offset: // ecu_calibration_offset + value.template destroy< int64_t > (); + break; + + case symbol_kind::S_float_pair_list: // float_pair_list + value.template destroy< std::map > (); + break; + + case symbol_kind::S_float_string_list: // float_string_list + value.template destroy< std::map > (); + break; + + case symbol_kind::S_float_range_list: // float_range_list + value.template destroy< std::map, std::string> > (); + break; + + case symbol_kind::S_key_value_list: // key_value_list + case symbol_kind::S_memory_layout_attributes: // memory_layout_attributes + case symbol_kind::S_memory_segment_attributes: // memory_segment_attributes + case symbol_kind::S_var_forbidden_comb: // var_forbidden_comb + value.template destroy< std::map > (); + break; + + case symbol_kind::S_unit_conversion: // unit_conversion + value.template destroy< std::pair > (); + break; + + case symbol_kind::S_formula: // formula + case symbol_kind::S_system_constant: // system_constant + value.template destroy< std::pair > (); + break; + + case symbol_kind::S_IDENT: // IDENT + case symbol_kind::S_STRING: // STRING + case symbol_kind::S_A2ML: // A2ML + case symbol_kind::S_IF_DATA: // IF_DATA + case symbol_kind::S_ar_component_attribute: // ar_component_attribute + case symbol_kind::S_calibration_handle_attribute: // calibration_handle_attribute + case symbol_kind::S_formula_attribute: // formula_attribute + case symbol_kind::S_a2ml: // a2ml + case symbol_kind::S_annotation_label: // annotation_label + case symbol_kind::S_annotation_origin: // annotation_origin + case symbol_kind::S_ar_prototype_of: // ar_prototype_of + case symbol_kind::S_axis_pts_ref: // axis_pts_ref + case symbol_kind::S_calibration_handle_text: // calibration_handle_text + case symbol_kind::S_comparison_quantity: // comparison_quantity + case symbol_kind::S_compu_tab_ref: // compu_tab_ref + case symbol_kind::S_conversion: // conversion + case symbol_kind::S_cpu_type: // cpu_type + case symbol_kind::S_curve_axis_ref: // curve_axis_ref + case symbol_kind::S_customer: // customer + case symbol_kind::S_customer_no: // customer_no + case symbol_kind::S_default_value: // default_value + case symbol_kind::S_display_identifier: // display_identifier + case symbol_kind::S_ecu: // ecu + case symbol_kind::S_epk: // epk + case symbol_kind::S_format: // format + case symbol_kind::S_formula_inv: // formula_inv + case symbol_kind::S_function_version: // function_version + case symbol_kind::S_if_data: // if_data + case symbol_kind::S_input_quantity: // input_quantity + case symbol_kind::S_model_link: // model_link + case symbol_kind::S_phone_no: // phone_no + case symbol_kind::S_phys_unit: // phys_unit + case symbol_kind::S_proj_no: // proj_no + case symbol_kind::S_project_no: // project_no + case symbol_kind::S_ref_memory_segment: // ref_memory_segment + case symbol_kind::S_ref_unit: // ref_unit + case symbol_kind::S_status_string_ref: // status_string_ref + case symbol_kind::S_supplier: // supplier + case symbol_kind::S_symbol_type_link: // symbol_type_link + case symbol_kind::S_user: // user + case symbol_kind::S_var_measurement: // var_measurement + case symbol_kind::S_var_naming: // var_naming + case symbol_kind::S_var_selection_characteristic: // var_selection_characteristic + case symbol_kind::S_var_separator: // var_separator + case symbol_kind::S_version: // version + value.template destroy< std::string > (); + break; + + case symbol_kind::S_calibration_method_attributes: // calibration_method_attributes + value.template destroy< std::vector > (); + break; + + case symbol_kind::S_float_list: // float_list + case symbol_kind::S_fix_axis_par_list: // fix_axis_par_list + case symbol_kind::S_coeffs: // coeffs + case symbol_kind::S_coeffs_linear: // coeffs_linear + value.template destroy< std::vector > (); + break; + + case symbol_kind::S_int_list: // int_list + value.template destroy< std::vector > (); + break; + + case symbol_kind::S_string_list: // string_list + case symbol_kind::S_ident_list: // ident_list + case symbol_kind::S_annotation_text: // annotation_text + case symbol_kind::S_def_characteristic: // def_characteristic + case symbol_kind::S_function_list: // function_list + case symbol_kind::S_in_measurement: // in_measurement + case symbol_kind::S_loc_measurement: // loc_measurement + case symbol_kind::S_map_list: // map_list + case symbol_kind::S_out_measurement: // out_measurement + case symbol_kind::S_ref_characteristic: // ref_characteristic + case symbol_kind::S_ref_group: // ref_group + case symbol_kind::S_ref_measurement: // ref_measurement + case symbol_kind::S_sub_function: // sub_function + case symbol_kind::S_sub_group: // sub_group + case symbol_kind::S_transformer_in_objects: // transformer_in_objects + case symbol_kind::S_transformer_out_objects: // transformer_out_objects + case symbol_kind::S_virtual: // virtual + case symbol_kind::S_frame_measurement: // frame_measurement + value.template destroy< std::vector > (); + break; + + case symbol_kind::S_uint_list: // uint_list + case symbol_kind::S_var_address: // var_address + case symbol_kind::S_var_characteristic_attribute: // var_characteristic_attribute + case symbol_kind::S_matrix_dim: // matrix_dim + value.template destroy< std::vector > (); + break; + + case symbol_kind::S_UINT: // UINT + case symbol_kind::S_HEX: // HEX + case symbol_kind::S_any_uint: // any_uint + case symbol_kind::S_addr_epk: // addr_epk + case symbol_kind::S_alignment_byte: // alignment_byte + case symbol_kind::S_alignment_float16_ieee: // alignment_float16_ieee + case symbol_kind::S_alignment_float32_ieee: // alignment_float32_ieee + case symbol_kind::S_alignment_float64_ieee: // alignment_float64_ieee + case symbol_kind::S_alignment_int64: // alignment_int64 + case symbol_kind::S_alignment_long: // alignment_long + case symbol_kind::S_alignment_word: // alignment_word + case symbol_kind::S_array_size: // array_size + case symbol_kind::S_bit_mask: // bit_mask + case symbol_kind::S_data_size: // data_size + case symbol_kind::S_ecu_address: // ecu_address + case symbol_kind::S_error_mask: // error_mask + case symbol_kind::S_fix_no_axis_pts_x: // fix_no_axis_pts_x + case symbol_kind::S_fix_no_axis_pts_y: // fix_no_axis_pts_y + case symbol_kind::S_fix_no_axis_pts_z: // fix_no_axis_pts_z + case symbol_kind::S_fix_no_axis_pts_4: // fix_no_axis_pts_4 + case symbol_kind::S_fix_no_axis_pts_5: // fix_no_axis_pts_5 + case symbol_kind::S_left_shift: // left_shift + case symbol_kind::S_no_of_interfaces: // no_of_interfaces + case symbol_kind::S_number: // number + case symbol_kind::S_right_shift: // right_shift + value.template destroy< uint64_t > (); + break; + + default: + break; + } + + Base::clear (); + } + +#if A2LDEBUG || 0 + /// The user-facing name of this symbol. + const char *name () const YY_NOEXCEPT + { + return A2lParser::symbol_name (this->kind ()); + } +#endif // #if A2LDEBUG || 0 + + + /// Backward compatibility (Bison 3.6). + symbol_kind_type type_get () const YY_NOEXCEPT; + + /// Whether empty. + bool empty () const YY_NOEXCEPT; + + /// Destructive move, \a s is emptied into this. + void move (basic_symbol& s); + + /// The semantic value. + value_type value; + + private: +#if YY_CPLUSPLUS < 201103L + /// Assignment operator. + basic_symbol& operator= (const basic_symbol& that); +#endif + }; + + /// Type access provider for token (enum) based symbols. + struct by_kind + { + /// The symbol kind as needed by the constructor. + typedef token_kind_type kind_type; + + /// Default constructor. + by_kind () YY_NOEXCEPT; + +#if 201103L <= YY_CPLUSPLUS + /// Move constructor. + by_kind (by_kind&& that) YY_NOEXCEPT; +#endif + + /// Copy constructor. + by_kind (const by_kind& that) YY_NOEXCEPT; + + /// Constructor from (external) token numbers. + by_kind (kind_type t) YY_NOEXCEPT; + + + + /// Record that this symbol is empty. + void clear () YY_NOEXCEPT; + + /// Steal the symbol kind from \a that. + void move (by_kind& that); + + /// The (internal) type number (corresponding to \a type). + /// \a empty when empty. + symbol_kind_type kind () const YY_NOEXCEPT; + + /// Backward compatibility (Bison 3.6). + symbol_kind_type type_get () const YY_NOEXCEPT; + + /// The symbol kind. + /// \a S_YYEMPTY when empty. + symbol_kind_type kind_; + }; + + /// Backward compatibility for a private implementation detail (Bison 3.6). + typedef by_kind by_type; + + /// "External" symbols: returned by the scanner. + struct symbol_type : basic_symbol + { + /// Superclass. + typedef basic_symbol super_type; + + /// Empty symbol. + symbol_type () YY_NOEXCEPT {} + + /// Constructor for valueless symbols, and symbols from each type. +#if 201103L <= YY_CPLUSPLUS + symbol_type (int tok) + : super_type (token_kind_type (tok)) +#else + symbol_type (int tok) + : super_type (token_kind_type (tok)) +#endif + {} +#if 201103L <= YY_CPLUSPLUS + symbol_type (int tok, double v) + : super_type (token_kind_type (tok), std::move (v)) +#else + symbol_type (int tok, const double& v) + : super_type (token_kind_type (tok), v) +#endif + {} +#if 201103L <= YY_CPLUSPLUS + symbol_type (int tok, int64_t v) + : super_type (token_kind_type (tok), std::move (v)) +#else + symbol_type (int tok, const int64_t& v) + : super_type (token_kind_type (tok), v) +#endif + {} +#if 201103L <= YY_CPLUSPLUS + symbol_type (int tok, std::string v) + : super_type (token_kind_type (tok), std::move (v)) +#else + symbol_type (int tok, const std::string& v) + : super_type (token_kind_type (tok), v) +#endif + {} +#if 201103L <= YY_CPLUSPLUS + symbol_type (int tok, uint64_t v) + : super_type (token_kind_type (tok), std::move (v)) +#else + symbol_type (int tok, const uint64_t& v) + : super_type (token_kind_type (tok), v) +#endif + {} + }; + + /// Build a parser object. + A2lParser (a2l::A2lScanner &scanner_yyarg, a2l::A2lFile &file_yyarg); + virtual ~A2lParser (); + +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + A2lParser (const A2lParser&) = delete; + /// Non copyable. + A2lParser& operator= (const A2lParser&) = delete; +#endif + + /// Parse. An alias for parse (). + /// \returns 0 iff parsing succeeded. + int operator() (); + + /// Parse. + /// \returns 0 iff parsing succeeded. + virtual int parse (); + +#if A2LDEBUG + /// The current debugging stream. + std::ostream& debug_stream () const YY_ATTRIBUTE_PURE; + /// Set the current debugging stream. + void set_debug_stream (std::ostream &); + + /// Type for debugging levels. + typedef int debug_level_type; + /// The current debugging level. + debug_level_type debug_level () const YY_ATTRIBUTE_PURE; + /// Set the current debugging level. + void set_debug_level (debug_level_type l); +#endif + + /// Report a syntax error. + /// \param msg a description of the syntax error. + virtual void error (const std::string& msg); + + /// Report a syntax error. + void error (const syntax_error& err); + +#if A2LDEBUG || 0 + /// The user-facing name of the symbol whose (internal) number is + /// YYSYMBOL. No bounds checking. + static const char *symbol_name (symbol_kind_type yysymbol); +#endif // #if A2LDEBUG || 0 + + + // Implementation of make_symbol for each token kind. +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_EOL () + { + return symbol_type (token::EOL); + } +#else + static + symbol_type + make_EOL () + { + return symbol_type (token::EOL); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_A2Lerror () + { + return symbol_type (token::A2Lerror); + } +#else + static + symbol_type + make_A2Lerror () + { + return symbol_type (token::A2Lerror); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_A2LUNDEF () + { + return symbol_type (token::A2LUNDEF); + } +#else + static + symbol_type + make_A2LUNDEF () + { + return symbol_type (token::A2LUNDEF); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_A2L_BEGIN () + { + return symbol_type (token::A2L_BEGIN); + } +#else + static + symbol_type + make_A2L_BEGIN () + { + return symbol_type (token::A2L_BEGIN); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_A2L_END () + { + return symbol_type (token::A2L_END); + } +#else + static + symbol_type + make_A2L_END () + { + return symbol_type (token::A2L_END); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_A2L_INCLUDE () + { + return symbol_type (token::A2L_INCLUDE); + } +#else + static + symbol_type + make_A2L_INCLUDE () + { + return symbol_type (token::A2L_INCLUDE); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_IDENT (std::string v) + { + return symbol_type (token::IDENT, std::move (v)); + } +#else + static + symbol_type + make_IDENT (const std::string& v) + { + return symbol_type (token::IDENT, v); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_STRING (std::string v) + { + return symbol_type (token::STRING, std::move (v)); + } +#else + static + symbol_type + make_STRING (const std::string& v) + { + return symbol_type (token::STRING, v); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_INT (int64_t v) + { + return symbol_type (token::INT, std::move (v)); + } +#else + static + symbol_type + make_INT (const int64_t& v) + { + return symbol_type (token::INT, v); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_UINT (uint64_t v) + { + return symbol_type (token::UINT, std::move (v)); + } +#else + static + symbol_type + make_UINT (const uint64_t& v) + { + return symbol_type (token::UINT, v); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HEX (uint64_t v) + { + return symbol_type (token::HEX, std::move (v)); + } +#else + static + symbol_type + make_HEX (const uint64_t& v) + { + return symbol_type (token::HEX, v); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_FLOAT (double v) + { + return symbol_type (token::FLOAT, std::move (v)); + } +#else + static + symbol_type + make_FLOAT (const double& v) + { + return symbol_type (token::FLOAT, v); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ASAP2_VERSION () + { + return symbol_type (token::ASAP2_VERSION); + } +#else + static + symbol_type + make_ASAP2_VERSION () + { + return symbol_type (token::ASAP2_VERSION); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_A2L_VERSION () + { + return symbol_type (token::A2L_VERSION); + } +#else + static + symbol_type + make_A2L_VERSION () + { + return symbol_type (token::A2L_VERSION); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_A2ML_VERSION () + { + return symbol_type (token::A2ML_VERSION); + } +#else + static + symbol_type + make_A2ML_VERSION () + { + return symbol_type (token::A2ML_VERSION); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_A2ML (std::string v) + { + return symbol_type (token::A2ML, std::move (v)); + } +#else + static + symbol_type + make_A2ML (const std::string& v) + { + return symbol_type (token::A2ML, v); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ADDR_EPK () + { + return symbol_type (token::ADDR_EPK); + } +#else + static + symbol_type + make_ADDR_EPK () + { + return symbol_type (token::ADDR_EPK); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ADDRESS_TYPE () + { + return symbol_type (token::ADDRESS_TYPE); + } +#else + static + symbol_type + make_ADDRESS_TYPE () + { + return symbol_type (token::ADDRESS_TYPE); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ALIGNMENT_BYTE () + { + return symbol_type (token::ALIGNMENT_BYTE); + } +#else + static + symbol_type + make_ALIGNMENT_BYTE () + { + return symbol_type (token::ALIGNMENT_BYTE); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ALIGNMENT_FLOAT16_IEEE () + { + return symbol_type (token::ALIGNMENT_FLOAT16_IEEE); + } +#else + static + symbol_type + make_ALIGNMENT_FLOAT16_IEEE () + { + return symbol_type (token::ALIGNMENT_FLOAT16_IEEE); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ALIGNMENT_FLOAT32_IEEE () + { + return symbol_type (token::ALIGNMENT_FLOAT32_IEEE); + } +#else + static + symbol_type + make_ALIGNMENT_FLOAT32_IEEE () + { + return symbol_type (token::ALIGNMENT_FLOAT32_IEEE); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ALIGNMENT_FLOAT64_IEEE () + { + return symbol_type (token::ALIGNMENT_FLOAT64_IEEE); + } +#else + static + symbol_type + make_ALIGNMENT_FLOAT64_IEEE () + { + return symbol_type (token::ALIGNMENT_FLOAT64_IEEE); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ALIGNMENT_INT64 () + { + return symbol_type (token::ALIGNMENT_INT64); + } +#else + static + symbol_type + make_ALIGNMENT_INT64 () + { + return symbol_type (token::ALIGNMENT_INT64); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ALIGNMENT_LONG () + { + return symbol_type (token::ALIGNMENT_LONG); + } +#else + static + symbol_type + make_ALIGNMENT_LONG () + { + return symbol_type (token::ALIGNMENT_LONG); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ALIGNMENT_WORD () + { + return symbol_type (token::ALIGNMENT_WORD); + } +#else + static + symbol_type + make_ALIGNMENT_WORD () + { + return symbol_type (token::ALIGNMENT_WORD); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ANNOTATION () + { + return symbol_type (token::ANNOTATION); + } +#else + static + symbol_type + make_ANNOTATION () + { + return symbol_type (token::ANNOTATION); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ANNOTATION_LABEL () + { + return symbol_type (token::ANNOTATION_LABEL); + } +#else + static + symbol_type + make_ANNOTATION_LABEL () + { + return symbol_type (token::ANNOTATION_LABEL); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ANNOTATION_ORIGIN () + { + return symbol_type (token::ANNOTATION_ORIGIN); + } +#else + static + symbol_type + make_ANNOTATION_ORIGIN () + { + return symbol_type (token::ANNOTATION_ORIGIN); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ANNOTATION_TEXT () + { + return symbol_type (token::ANNOTATION_TEXT); + } +#else + static + symbol_type + make_ANNOTATION_TEXT () + { + return symbol_type (token::ANNOTATION_TEXT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ARRAY_SIZE () + { + return symbol_type (token::ARRAY_SIZE); + } +#else + static + symbol_type + make_ARRAY_SIZE () + { + return symbol_type (token::ARRAY_SIZE); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_AR_COMPONENT () + { + return symbol_type (token::AR_COMPONENT); + } +#else + static + symbol_type + make_AR_COMPONENT () + { + return symbol_type (token::AR_COMPONENT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_AR_PROTOTYPE_OF () + { + return symbol_type (token::AR_PROTOTYPE_OF); + } +#else + static + symbol_type + make_AR_PROTOTYPE_OF () + { + return symbol_type (token::AR_PROTOTYPE_OF); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_AXIS_DESCR () + { + return symbol_type (token::AXIS_DESCR); + } +#else + static + symbol_type + make_AXIS_DESCR () + { + return symbol_type (token::AXIS_DESCR); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_AXIS_PTS () + { + return symbol_type (token::AXIS_PTS); + } +#else + static + symbol_type + make_AXIS_PTS () + { + return symbol_type (token::AXIS_PTS); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_AXIS_PTS_REF () + { + return symbol_type (token::AXIS_PTS_REF); + } +#else + static + symbol_type + make_AXIS_PTS_REF () + { + return symbol_type (token::AXIS_PTS_REF); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_AXIS_PTS_X () + { + return symbol_type (token::AXIS_PTS_X); + } +#else + static + symbol_type + make_AXIS_PTS_X () + { + return symbol_type (token::AXIS_PTS_X); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_AXIS_PTS_Y () + { + return symbol_type (token::AXIS_PTS_Y); + } +#else + static + symbol_type + make_AXIS_PTS_Y () + { + return symbol_type (token::AXIS_PTS_Y); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_AXIS_PTS_Z () + { + return symbol_type (token::AXIS_PTS_Z); + } +#else + static + symbol_type + make_AXIS_PTS_Z () + { + return symbol_type (token::AXIS_PTS_Z); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_AXIS_PTS_4 () + { + return symbol_type (token::AXIS_PTS_4); + } +#else + static + symbol_type + make_AXIS_PTS_4 () + { + return symbol_type (token::AXIS_PTS_4); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_AXIS_PTS_5 () + { + return symbol_type (token::AXIS_PTS_5); + } +#else + static + symbol_type + make_AXIS_PTS_5 () + { + return symbol_type (token::AXIS_PTS_5); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_AXIS_RESCALE_X () + { + return symbol_type (token::AXIS_RESCALE_X); + } +#else + static + symbol_type + make_AXIS_RESCALE_X () + { + return symbol_type (token::AXIS_RESCALE_X); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_BIT_MASK () + { + return symbol_type (token::BIT_MASK); + } +#else + static + symbol_type + make_BIT_MASK () + { + return symbol_type (token::BIT_MASK); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_BIT_OPERATION () + { + return symbol_type (token::BIT_OPERATION); + } +#else + static + symbol_type + make_BIT_OPERATION () + { + return symbol_type (token::BIT_OPERATION); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_BLOB () + { + return symbol_type (token::BLOB); + } +#else + static + symbol_type + make_BLOB () + { + return symbol_type (token::BLOB); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_A2L_BYTE_ORDER () + { + return symbol_type (token::A2L_BYTE_ORDER); + } +#else + static + symbol_type + make_A2L_BYTE_ORDER () + { + return symbol_type (token::A2L_BYTE_ORDER); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CALIBRATION_ACCESS () + { + return symbol_type (token::CALIBRATION_ACCESS); + } +#else + static + symbol_type + make_CALIBRATION_ACCESS () + { + return symbol_type (token::CALIBRATION_ACCESS); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CALIBRATION_HANDLE () + { + return symbol_type (token::CALIBRATION_HANDLE); + } +#else + static + symbol_type + make_CALIBRATION_HANDLE () + { + return symbol_type (token::CALIBRATION_HANDLE); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CALIBRATION_HANDLE_TEXT () + { + return symbol_type (token::CALIBRATION_HANDLE_TEXT); + } +#else + static + symbol_type + make_CALIBRATION_HANDLE_TEXT () + { + return symbol_type (token::CALIBRATION_HANDLE_TEXT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CALIBRATION_METHOD () + { + return symbol_type (token::CALIBRATION_METHOD); + } +#else + static + symbol_type + make_CALIBRATION_METHOD () + { + return symbol_type (token::CALIBRATION_METHOD); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CHARACTERISTIC () + { + return symbol_type (token::CHARACTERISTIC); + } +#else + static + symbol_type + make_CHARACTERISTIC () + { + return symbol_type (token::CHARACTERISTIC); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_COEFFS () + { + return symbol_type (token::COEFFS); + } +#else + static + symbol_type + make_COEFFS () + { + return symbol_type (token::COEFFS); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_COEFFS_LINEAR () + { + return symbol_type (token::COEFFS_LINEAR); + } +#else + static + symbol_type + make_COEFFS_LINEAR () + { + return symbol_type (token::COEFFS_LINEAR); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_COMPARISON_QUANTITY () + { + return symbol_type (token::COMPARISON_QUANTITY); + } +#else + static + symbol_type + make_COMPARISON_QUANTITY () + { + return symbol_type (token::COMPARISON_QUANTITY); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_COMPU_METHOD () + { + return symbol_type (token::COMPU_METHOD); + } +#else + static + symbol_type + make_COMPU_METHOD () + { + return symbol_type (token::COMPU_METHOD); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_COMPU_TAB () + { + return symbol_type (token::COMPU_TAB); + } +#else + static + symbol_type + make_COMPU_TAB () + { + return symbol_type (token::COMPU_TAB); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_COMPU_TAB_REF () + { + return symbol_type (token::COMPU_TAB_REF); + } +#else + static + symbol_type + make_COMPU_TAB_REF () + { + return symbol_type (token::COMPU_TAB_REF); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_COMPU_VTAB () + { + return symbol_type (token::COMPU_VTAB); + } +#else + static + symbol_type + make_COMPU_VTAB () + { + return symbol_type (token::COMPU_VTAB); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_COMPU_VTAB_RANGE () + { + return symbol_type (token::COMPU_VTAB_RANGE); + } +#else + static + symbol_type + make_COMPU_VTAB_RANGE () + { + return symbol_type (token::COMPU_VTAB_RANGE); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CONSISTENT_EXCHANGE () + { + return symbol_type (token::CONSISTENT_EXCHANGE); + } +#else + static + symbol_type + make_CONSISTENT_EXCHANGE () + { + return symbol_type (token::CONSISTENT_EXCHANGE); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CONTROLLER_ADDRESSES () + { + return symbol_type (token::CONTROLLER_ADDRESSES); + } +#else + static + symbol_type + make_CONTROLLER_ADDRESSES () + { + return symbol_type (token::CONTROLLER_ADDRESSES); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CONVERSION () + { + return symbol_type (token::CONVERSION); + } +#else + static + symbol_type + make_CONVERSION () + { + return symbol_type (token::CONVERSION); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CPU_TYPE () + { + return symbol_type (token::CPU_TYPE); + } +#else + static + symbol_type + make_CPU_TYPE () + { + return symbol_type (token::CPU_TYPE); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CURVE_AXIS_REF () + { + return symbol_type (token::CURVE_AXIS_REF); + } +#else + static + symbol_type + make_CURVE_AXIS_REF () + { + return symbol_type (token::CURVE_AXIS_REF); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CUSTOMER () + { + return symbol_type (token::CUSTOMER); + } +#else + static + symbol_type + make_CUSTOMER () + { + return symbol_type (token::CUSTOMER); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CUSTOMER_NO () + { + return symbol_type (token::CUSTOMER_NO); + } +#else + static + symbol_type + make_CUSTOMER_NO () + { + return symbol_type (token::CUSTOMER_NO); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DATA_SIZE () + { + return symbol_type (token::DATA_SIZE); + } +#else + static + symbol_type + make_DATA_SIZE () + { + return symbol_type (token::DATA_SIZE); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DEF_CHARACTERISTIC () + { + return symbol_type (token::DEF_CHARACTERISTIC); + } +#else + static + symbol_type + make_DEF_CHARACTERISTIC () + { + return symbol_type (token::DEF_CHARACTERISTIC); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DEFAULT_VALUE () + { + return symbol_type (token::DEFAULT_VALUE); + } +#else + static + symbol_type + make_DEFAULT_VALUE () + { + return symbol_type (token::DEFAULT_VALUE); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DEFAULT_VALUE_NUMERIC () + { + return symbol_type (token::DEFAULT_VALUE_NUMERIC); + } +#else + static + symbol_type + make_DEFAULT_VALUE_NUMERIC () + { + return symbol_type (token::DEFAULT_VALUE_NUMERIC); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DEPENDENT_CHARACTERISTIC () + { + return symbol_type (token::DEPENDENT_CHARACTERISTIC); + } +#else + static + symbol_type + make_DEPENDENT_CHARACTERISTIC () + { + return symbol_type (token::DEPENDENT_CHARACTERISTIC); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DEPOSIT () + { + return symbol_type (token::DEPOSIT); + } +#else + static + symbol_type + make_DEPOSIT () + { + return symbol_type (token::DEPOSIT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DISCRETE () + { + return symbol_type (token::DISCRETE); + } +#else + static + symbol_type + make_DISCRETE () + { + return symbol_type (token::DISCRETE); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DISPLAY_IDENTIFIER () + { + return symbol_type (token::DISPLAY_IDENTIFIER); + } +#else + static + symbol_type + make_DISPLAY_IDENTIFIER () + { + return symbol_type (token::DISPLAY_IDENTIFIER); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DIST_OP_X () + { + return symbol_type (token::DIST_OP_X); + } +#else + static + symbol_type + make_DIST_OP_X () + { + return symbol_type (token::DIST_OP_X); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DIST_OP_Y () + { + return symbol_type (token::DIST_OP_Y); + } +#else + static + symbol_type + make_DIST_OP_Y () + { + return symbol_type (token::DIST_OP_Y); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DIST_OP_Z () + { + return symbol_type (token::DIST_OP_Z); + } +#else + static + symbol_type + make_DIST_OP_Z () + { + return symbol_type (token::DIST_OP_Z); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DIST_OP_4 () + { + return symbol_type (token::DIST_OP_4); + } +#else + static + symbol_type + make_DIST_OP_4 () + { + return symbol_type (token::DIST_OP_4); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DIST_OP_5 () + { + return symbol_type (token::DIST_OP_5); + } +#else + static + symbol_type + make_DIST_OP_5 () + { + return symbol_type (token::DIST_OP_5); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ECU () + { + return symbol_type (token::ECU); + } +#else + static + symbol_type + make_ECU () + { + return symbol_type (token::ECU); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ECU_ADDRESS () + { + return symbol_type (token::ECU_ADDRESS); + } +#else + static + symbol_type + make_ECU_ADDRESS () + { + return symbol_type (token::ECU_ADDRESS); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ECU_ADDRESS_EXTENSION () + { + return symbol_type (token::ECU_ADDRESS_EXTENSION); + } +#else + static + symbol_type + make_ECU_ADDRESS_EXTENSION () + { + return symbol_type (token::ECU_ADDRESS_EXTENSION); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ECU_CALIBRATION_OFFSET () + { + return symbol_type (token::ECU_CALIBRATION_OFFSET); + } +#else + static + symbol_type + make_ECU_CALIBRATION_OFFSET () + { + return symbol_type (token::ECU_CALIBRATION_OFFSET); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ENCODING () + { + return symbol_type (token::ENCODING); + } +#else + static + symbol_type + make_ENCODING () + { + return symbol_type (token::ENCODING); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_EPK () + { + return symbol_type (token::EPK); + } +#else + static + symbol_type + make_EPK () + { + return symbol_type (token::EPK); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ERROR_MASK () + { + return symbol_type (token::ERROR_MASK); + } +#else + static + symbol_type + make_ERROR_MASK () + { + return symbol_type (token::ERROR_MASK); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_EXTENDED_LIMITS () + { + return symbol_type (token::EXTENDED_LIMITS); + } +#else + static + symbol_type + make_EXTENDED_LIMITS () + { + return symbol_type (token::EXTENDED_LIMITS); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_FIX_AXIS_PAR () + { + return symbol_type (token::FIX_AXIS_PAR); + } +#else + static + symbol_type + make_FIX_AXIS_PAR () + { + return symbol_type (token::FIX_AXIS_PAR); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_FIX_AXIS_PAR_DIST () + { + return symbol_type (token::FIX_AXIS_PAR_DIST); + } +#else + static + symbol_type + make_FIX_AXIS_PAR_DIST () + { + return symbol_type (token::FIX_AXIS_PAR_DIST); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_FIX_AXIS_PAR_LIST () + { + return symbol_type (token::FIX_AXIS_PAR_LIST); + } +#else + static + symbol_type + make_FIX_AXIS_PAR_LIST () + { + return symbol_type (token::FIX_AXIS_PAR_LIST); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_FIX_NO_AXIS_PTS_X () + { + return symbol_type (token::FIX_NO_AXIS_PTS_X); + } +#else + static + symbol_type + make_FIX_NO_AXIS_PTS_X () + { + return symbol_type (token::FIX_NO_AXIS_PTS_X); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_FIX_NO_AXIS_PTS_Y () + { + return symbol_type (token::FIX_NO_AXIS_PTS_Y); + } +#else + static + symbol_type + make_FIX_NO_AXIS_PTS_Y () + { + return symbol_type (token::FIX_NO_AXIS_PTS_Y); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_FIX_NO_AXIS_PTS_Z () + { + return symbol_type (token::FIX_NO_AXIS_PTS_Z); + } +#else + static + symbol_type + make_FIX_NO_AXIS_PTS_Z () + { + return symbol_type (token::FIX_NO_AXIS_PTS_Z); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_FIX_NO_AXIS_PTS_4 () + { + return symbol_type (token::FIX_NO_AXIS_PTS_4); + } +#else + static + symbol_type + make_FIX_NO_AXIS_PTS_4 () + { + return symbol_type (token::FIX_NO_AXIS_PTS_4); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_FIX_NO_AXIS_PTS_5 () + { + return symbol_type (token::FIX_NO_AXIS_PTS_5); + } +#else + static + symbol_type + make_FIX_NO_AXIS_PTS_5 () + { + return symbol_type (token::FIX_NO_AXIS_PTS_5); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_FNC_VALUES () + { + return symbol_type (token::FNC_VALUES); + } +#else + static + symbol_type + make_FNC_VALUES () + { + return symbol_type (token::FNC_VALUES); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_FORMAT () + { + return symbol_type (token::FORMAT); + } +#else + static + symbol_type + make_FORMAT () + { + return symbol_type (token::FORMAT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_FORMULA () + { + return symbol_type (token::FORMULA); + } +#else + static + symbol_type + make_FORMULA () + { + return symbol_type (token::FORMULA); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_FORMULA_INV () + { + return symbol_type (token::FORMULA_INV); + } +#else + static + symbol_type + make_FORMULA_INV () + { + return symbol_type (token::FORMULA_INV); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_FRAME () + { + return symbol_type (token::FRAME); + } +#else + static + symbol_type + make_FRAME () + { + return symbol_type (token::FRAME); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_FRAME_MEASUREMENT () + { + return symbol_type (token::FRAME_MEASUREMENT); + } +#else + static + symbol_type + make_FRAME_MEASUREMENT () + { + return symbol_type (token::FRAME_MEASUREMENT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_FUNCTION () + { + return symbol_type (token::FUNCTION); + } +#else + static + symbol_type + make_FUNCTION () + { + return symbol_type (token::FUNCTION); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_FUNCTION_LIST () + { + return symbol_type (token::FUNCTION_LIST); + } +#else + static + symbol_type + make_FUNCTION_LIST () + { + return symbol_type (token::FUNCTION_LIST); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_FUNCTION_VERSION () + { + return symbol_type (token::FUNCTION_VERSION); + } +#else + static + symbol_type + make_FUNCTION_VERSION () + { + return symbol_type (token::FUNCTION_VERSION); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_GROUP () + { + return symbol_type (token::GROUP); + } +#else + static + symbol_type + make_GROUP () + { + return symbol_type (token::GROUP); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_GUARD_RAILS () + { + return symbol_type (token::GUARD_RAILS); + } +#else + static + symbol_type + make_GUARD_RAILS () + { + return symbol_type (token::GUARD_RAILS); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HEADER () + { + return symbol_type (token::HEADER); + } +#else + static + symbol_type + make_HEADER () + { + return symbol_type (token::HEADER); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_IDENTIFICATION () + { + return symbol_type (token::IDENTIFICATION); + } +#else + static + symbol_type + make_IDENTIFICATION () + { + return symbol_type (token::IDENTIFICATION); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_IF_DATA (std::string v) + { + return symbol_type (token::IF_DATA, std::move (v)); + } +#else + static + symbol_type + make_IF_DATA (const std::string& v) + { + return symbol_type (token::IF_DATA, v); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_IN_MEASUREMENT () + { + return symbol_type (token::IN_MEASUREMENT); + } +#else + static + symbol_type + make_IN_MEASUREMENT () + { + return symbol_type (token::IN_MEASUREMENT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_INPUT_QUANTITY () + { + return symbol_type (token::INPUT_QUANTITY); + } +#else + static + symbol_type + make_INPUT_QUANTITY () + { + return symbol_type (token::INPUT_QUANTITY); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_INSTANCE () + { + return symbol_type (token::INSTANCE); + } +#else + static + symbol_type + make_INSTANCE () + { + return symbol_type (token::INSTANCE); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LAYOUT () + { + return symbol_type (token::LAYOUT); + } +#else + static + symbol_type + make_LAYOUT () + { + return symbol_type (token::LAYOUT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LEFT_SHIFT () + { + return symbol_type (token::LEFT_SHIFT); + } +#else + static + symbol_type + make_LEFT_SHIFT () + { + return symbol_type (token::LEFT_SHIFT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LIMITS () + { + return symbol_type (token::LIMITS); + } +#else + static + symbol_type + make_LIMITS () + { + return symbol_type (token::LIMITS); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LOC_MEASUREMENT () + { + return symbol_type (token::LOC_MEASUREMENT); + } +#else + static + symbol_type + make_LOC_MEASUREMENT () + { + return symbol_type (token::LOC_MEASUREMENT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MAP_LIST () + { + return symbol_type (token::MAP_LIST); + } +#else + static + symbol_type + make_MAP_LIST () + { + return symbol_type (token::MAP_LIST); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MATRIX_DIM () + { + return symbol_type (token::MATRIX_DIM); + } +#else + static + symbol_type + make_MATRIX_DIM () + { + return symbol_type (token::MATRIX_DIM); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MAX_GRAD () + { + return symbol_type (token::MAX_GRAD); + } +#else + static + symbol_type + make_MAX_GRAD () + { + return symbol_type (token::MAX_GRAD); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MAX_REFRESH () + { + return symbol_type (token::MAX_REFRESH); + } +#else + static + symbol_type + make_MAX_REFRESH () + { + return symbol_type (token::MAX_REFRESH); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MEASUREMENT () + { + return symbol_type (token::MEASUREMENT); + } +#else + static + symbol_type + make_MEASUREMENT () + { + return symbol_type (token::MEASUREMENT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MEMORY_LAYOUT () + { + return symbol_type (token::MEMORY_LAYOUT); + } +#else + static + symbol_type + make_MEMORY_LAYOUT () + { + return symbol_type (token::MEMORY_LAYOUT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MEMORY_SEGMENT () + { + return symbol_type (token::MEMORY_SEGMENT); + } +#else + static + symbol_type + make_MEMORY_SEGMENT () + { + return symbol_type (token::MEMORY_SEGMENT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MODULE () + { + return symbol_type (token::MODULE); + } +#else + static + symbol_type + make_MODULE () + { + return symbol_type (token::MODULE); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MOD_COMMON () + { + return symbol_type (token::MOD_COMMON); + } +#else + static + symbol_type + make_MOD_COMMON () + { + return symbol_type (token::MOD_COMMON); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MOD_PAR () + { + return symbol_type (token::MOD_PAR); + } +#else + static + symbol_type + make_MOD_PAR () + { + return symbol_type (token::MOD_PAR); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MODEL_LINK () + { + return symbol_type (token::MODEL_LINK); + } +#else + static + symbol_type + make_MODEL_LINK () + { + return symbol_type (token::MODEL_LINK); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MONOTONY () + { + return symbol_type (token::MONOTONY); + } +#else + static + symbol_type + make_MONOTONY () + { + return symbol_type (token::MONOTONY); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NO_AXIS_PTS_X () + { + return symbol_type (token::NO_AXIS_PTS_X); + } +#else + static + symbol_type + make_NO_AXIS_PTS_X () + { + return symbol_type (token::NO_AXIS_PTS_X); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NO_AXIS_PTS_Y () + { + return symbol_type (token::NO_AXIS_PTS_Y); + } +#else + static + symbol_type + make_NO_AXIS_PTS_Y () + { + return symbol_type (token::NO_AXIS_PTS_Y); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NO_AXIS_PTS_Z () + { + return symbol_type (token::NO_AXIS_PTS_Z); + } +#else + static + symbol_type + make_NO_AXIS_PTS_Z () + { + return symbol_type (token::NO_AXIS_PTS_Z); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NO_AXIS_PTS_4 () + { + return symbol_type (token::NO_AXIS_PTS_4); + } +#else + static + symbol_type + make_NO_AXIS_PTS_4 () + { + return symbol_type (token::NO_AXIS_PTS_4); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NO_AXIS_PTS_5 () + { + return symbol_type (token::NO_AXIS_PTS_5); + } +#else + static + symbol_type + make_NO_AXIS_PTS_5 () + { + return symbol_type (token::NO_AXIS_PTS_5); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NO_OF_INTERFACES () + { + return symbol_type (token::NO_OF_INTERFACES); + } +#else + static + symbol_type + make_NO_OF_INTERFACES () + { + return symbol_type (token::NO_OF_INTERFACES); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NO_RESCALE_X () + { + return symbol_type (token::NO_RESCALE_X); + } +#else + static + symbol_type + make_NO_RESCALE_X () + { + return symbol_type (token::NO_RESCALE_X); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NUMBER () + { + return symbol_type (token::NUMBER); + } +#else + static + symbol_type + make_NUMBER () + { + return symbol_type (token::NUMBER); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OFFSET_X () + { + return symbol_type (token::OFFSET_X); + } +#else + static + symbol_type + make_OFFSET_X () + { + return symbol_type (token::OFFSET_X); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OFFSET_Y () + { + return symbol_type (token::OFFSET_Y); + } +#else + static + symbol_type + make_OFFSET_Y () + { + return symbol_type (token::OFFSET_Y); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OFFSET_Z () + { + return symbol_type (token::OFFSET_Z); + } +#else + static + symbol_type + make_OFFSET_Z () + { + return symbol_type (token::OFFSET_Z); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OFFSET_4 () + { + return symbol_type (token::OFFSET_4); + } +#else + static + symbol_type + make_OFFSET_4 () + { + return symbol_type (token::OFFSET_4); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OFFSET_5 () + { + return symbol_type (token::OFFSET_5); + } +#else + static + symbol_type + make_OFFSET_5 () + { + return symbol_type (token::OFFSET_5); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OUT_MEASUREMENT () + { + return symbol_type (token::OUT_MEASUREMENT); + } +#else + static + symbol_type + make_OUT_MEASUREMENT () + { + return symbol_type (token::OUT_MEASUREMENT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OVERWRITE () + { + return symbol_type (token::OVERWRITE); + } +#else + static + symbol_type + make_OVERWRITE () + { + return symbol_type (token::OVERWRITE); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PHONE_NO () + { + return symbol_type (token::PHONE_NO); + } +#else + static + symbol_type + make_PHONE_NO () + { + return symbol_type (token::PHONE_NO); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PHYS_UNIT () + { + return symbol_type (token::PHYS_UNIT); + } +#else + static + symbol_type + make_PHYS_UNIT () + { + return symbol_type (token::PHYS_UNIT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PROJECT () + { + return symbol_type (token::PROJECT); + } +#else + static + symbol_type + make_PROJECT () + { + return symbol_type (token::PROJECT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PROJECT_NO () + { + return symbol_type (token::PROJECT_NO); + } +#else + static + symbol_type + make_PROJECT_NO () + { + return symbol_type (token::PROJECT_NO); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_READ_ONLY () + { + return symbol_type (token::READ_ONLY); + } +#else + static + symbol_type + make_READ_ONLY () + { + return symbol_type (token::READ_ONLY); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_READ_WRITE () + { + return symbol_type (token::READ_WRITE); + } +#else + static + symbol_type + make_READ_WRITE () + { + return symbol_type (token::READ_WRITE); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RECORD_LAYOUT () + { + return symbol_type (token::RECORD_LAYOUT); + } +#else + static + symbol_type + make_RECORD_LAYOUT () + { + return symbol_type (token::RECORD_LAYOUT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_REF_CHARACTERISTIC () + { + return symbol_type (token::REF_CHARACTERISTIC); + } +#else + static + symbol_type + make_REF_CHARACTERISTIC () + { + return symbol_type (token::REF_CHARACTERISTIC); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_REF_GROUP () + { + return symbol_type (token::REF_GROUP); + } +#else + static + symbol_type + make_REF_GROUP () + { + return symbol_type (token::REF_GROUP); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_REF_MEASUREMENT () + { + return symbol_type (token::REF_MEASUREMENT); + } +#else + static + symbol_type + make_REF_MEASUREMENT () + { + return symbol_type (token::REF_MEASUREMENT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_REF_MEMORY_SEGMENT () + { + return symbol_type (token::REF_MEMORY_SEGMENT); + } +#else + static + symbol_type + make_REF_MEMORY_SEGMENT () + { + return symbol_type (token::REF_MEMORY_SEGMENT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_REF_UNIT () + { + return symbol_type (token::REF_UNIT); + } +#else + static + symbol_type + make_REF_UNIT () + { + return symbol_type (token::REF_UNIT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RESERVED () + { + return symbol_type (token::RESERVED); + } +#else + static + symbol_type + make_RESERVED () + { + return symbol_type (token::RESERVED); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RIGHT_SHIFT () + { + return symbol_type (token::RIGHT_SHIFT); + } +#else + static + symbol_type + make_RIGHT_SHIFT () + { + return symbol_type (token::RIGHT_SHIFT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RIP_ADDR_W () + { + return symbol_type (token::RIP_ADDR_W); + } +#else + static + symbol_type + make_RIP_ADDR_W () + { + return symbol_type (token::RIP_ADDR_W); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RIP_ADDR_X () + { + return symbol_type (token::RIP_ADDR_X); + } +#else + static + symbol_type + make_RIP_ADDR_X () + { + return symbol_type (token::RIP_ADDR_X); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RIP_ADDR_Y () + { + return symbol_type (token::RIP_ADDR_Y); + } +#else + static + symbol_type + make_RIP_ADDR_Y () + { + return symbol_type (token::RIP_ADDR_Y); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RIP_ADDR_Z () + { + return symbol_type (token::RIP_ADDR_Z); + } +#else + static + symbol_type + make_RIP_ADDR_Z () + { + return symbol_type (token::RIP_ADDR_Z); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RIP_ADDR_4 () + { + return symbol_type (token::RIP_ADDR_4); + } +#else + static + symbol_type + make_RIP_ADDR_4 () + { + return symbol_type (token::RIP_ADDR_4); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RIP_ADDR_5 () + { + return symbol_type (token::RIP_ADDR_5); + } +#else + static + symbol_type + make_RIP_ADDR_5 () + { + return symbol_type (token::RIP_ADDR_5); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ROOT () + { + return symbol_type (token::ROOT); + } +#else + static + symbol_type + make_ROOT () + { + return symbol_type (token::ROOT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_S_REC_LAYOUT () + { + return symbol_type (token::S_REC_LAYOUT); + } +#else + static + symbol_type + make_S_REC_LAYOUT () + { + return symbol_type (token::S_REC_LAYOUT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SHIFT_OP_X () + { + return symbol_type (token::SHIFT_OP_X); + } +#else + static + symbol_type + make_SHIFT_OP_X () + { + return symbol_type (token::SHIFT_OP_X); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SHIFT_OP_Y () + { + return symbol_type (token::SHIFT_OP_Y); + } +#else + static + symbol_type + make_SHIFT_OP_Y () + { + return symbol_type (token::SHIFT_OP_Y); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SHIFT_OP_Z () + { + return symbol_type (token::SHIFT_OP_Z); + } +#else + static + symbol_type + make_SHIFT_OP_Z () + { + return symbol_type (token::SHIFT_OP_Z); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SHIFT_OP_4 () + { + return symbol_type (token::SHIFT_OP_4); + } +#else + static + symbol_type + make_SHIFT_OP_4 () + { + return symbol_type (token::SHIFT_OP_4); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SHIFT_OP_5 () + { + return symbol_type (token::SHIFT_OP_5); + } +#else + static + symbol_type + make_SHIFT_OP_5 () + { + return symbol_type (token::SHIFT_OP_5); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SIGN_EXTEND () + { + return symbol_type (token::SIGN_EXTEND); + } +#else + static + symbol_type + make_SIGN_EXTEND () + { + return symbol_type (token::SIGN_EXTEND); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SI_EXPONENTS () + { + return symbol_type (token::SI_EXPONENTS); + } +#else + static + symbol_type + make_SI_EXPONENTS () + { + return symbol_type (token::SI_EXPONENTS); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SRC_ADDR_X () + { + return symbol_type (token::SRC_ADDR_X); + } +#else + static + symbol_type + make_SRC_ADDR_X () + { + return symbol_type (token::SRC_ADDR_X); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SRC_ADDR_Y () + { + return symbol_type (token::SRC_ADDR_Y); + } +#else + static + symbol_type + make_SRC_ADDR_Y () + { + return symbol_type (token::SRC_ADDR_Y); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SRC_ADDR_Z () + { + return symbol_type (token::SRC_ADDR_Z); + } +#else + static + symbol_type + make_SRC_ADDR_Z () + { + return symbol_type (token::SRC_ADDR_Z); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SRC_ADDR_4 () + { + return symbol_type (token::SRC_ADDR_4); + } +#else + static + symbol_type + make_SRC_ADDR_4 () + { + return symbol_type (token::SRC_ADDR_4); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SRC_ADDR_5 () + { + return symbol_type (token::SRC_ADDR_5); + } +#else + static + symbol_type + make_SRC_ADDR_5 () + { + return symbol_type (token::SRC_ADDR_5); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_STATIC_ADDRESS_OFFSETS () + { + return symbol_type (token::STATIC_ADDRESS_OFFSETS); + } +#else + static + symbol_type + make_STATIC_ADDRESS_OFFSETS () + { + return symbol_type (token::STATIC_ADDRESS_OFFSETS); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_STATIC_RECORD_LAYOUT () + { + return symbol_type (token::STATIC_RECORD_LAYOUT); + } +#else + static + symbol_type + make_STATIC_RECORD_LAYOUT () + { + return symbol_type (token::STATIC_RECORD_LAYOUT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_STATUS_STRING_REF () + { + return symbol_type (token::STATUS_STRING_REF); + } +#else + static + symbol_type + make_STATUS_STRING_REF () + { + return symbol_type (token::STATUS_STRING_REF); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_STEP_SIZE () + { + return symbol_type (token::STEP_SIZE); + } +#else + static + symbol_type + make_STEP_SIZE () + { + return symbol_type (token::STEP_SIZE); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_STRUCTURE_COMPONENT () + { + return symbol_type (token::STRUCTURE_COMPONENT); + } +#else + static + symbol_type + make_STRUCTURE_COMPONENT () + { + return symbol_type (token::STRUCTURE_COMPONENT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUB_FUNCTION () + { + return symbol_type (token::SUB_FUNCTION); + } +#else + static + symbol_type + make_SUB_FUNCTION () + { + return symbol_type (token::SUB_FUNCTION); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUB_GROUP () + { + return symbol_type (token::SUB_GROUP); + } +#else + static + symbol_type + make_SUB_GROUP () + { + return symbol_type (token::SUB_GROUP); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SUPPLIER () + { + return symbol_type (token::SUPPLIER); + } +#else + static + symbol_type + make_SUPPLIER () + { + return symbol_type (token::SUPPLIER); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SYMBOL_LINK () + { + return symbol_type (token::SYMBOL_LINK); + } +#else + static + symbol_type + make_SYMBOL_LINK () + { + return symbol_type (token::SYMBOL_LINK); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SYMBOL_TYPE_LINK () + { + return symbol_type (token::SYMBOL_TYPE_LINK); + } +#else + static + symbol_type + make_SYMBOL_TYPE_LINK () + { + return symbol_type (token::SYMBOL_TYPE_LINK); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SYSTEM_CONSTANT () + { + return symbol_type (token::SYSTEM_CONSTANT); + } +#else + static + symbol_type + make_SYSTEM_CONSTANT () + { + return symbol_type (token::SYSTEM_CONSTANT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TRANSFORMER () + { + return symbol_type (token::TRANSFORMER); + } +#else + static + symbol_type + make_TRANSFORMER () + { + return symbol_type (token::TRANSFORMER); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TRANSFORMER_IN_OBJECTS () + { + return symbol_type (token::TRANSFORMER_IN_OBJECTS); + } +#else + static + symbol_type + make_TRANSFORMER_IN_OBJECTS () + { + return symbol_type (token::TRANSFORMER_IN_OBJECTS); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TRANSFORMER_OUT_OBJECTS () + { + return symbol_type (token::TRANSFORMER_OUT_OBJECTS); + } +#else + static + symbol_type + make_TRANSFORMER_OUT_OBJECTS () + { + return symbol_type (token::TRANSFORMER_OUT_OBJECTS); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TYPEDEF_AXIS () + { + return symbol_type (token::TYPEDEF_AXIS); + } +#else + static + symbol_type + make_TYPEDEF_AXIS () + { + return symbol_type (token::TYPEDEF_AXIS); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TYPEDEF_BLOB () + { + return symbol_type (token::TYPEDEF_BLOB); + } +#else + static + symbol_type + make_TYPEDEF_BLOB () + { + return symbol_type (token::TYPEDEF_BLOB); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TYPEDEF_CHARACTERISTIC () + { + return symbol_type (token::TYPEDEF_CHARACTERISTIC); + } +#else + static + symbol_type + make_TYPEDEF_CHARACTERISTIC () + { + return symbol_type (token::TYPEDEF_CHARACTERISTIC); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TYPEDEF_MEASUREMENT () + { + return symbol_type (token::TYPEDEF_MEASUREMENT); + } +#else + static + symbol_type + make_TYPEDEF_MEASUREMENT () + { + return symbol_type (token::TYPEDEF_MEASUREMENT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TYPEDEF_STRUCTURE () + { + return symbol_type (token::TYPEDEF_STRUCTURE); + } +#else + static + symbol_type + make_TYPEDEF_STRUCTURE () + { + return symbol_type (token::TYPEDEF_STRUCTURE); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_UNIT () + { + return symbol_type (token::UNIT); + } +#else + static + symbol_type + make_UNIT () + { + return symbol_type (token::UNIT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_UNIT_CONVERSION () + { + return symbol_type (token::UNIT_CONVERSION); + } +#else + static + symbol_type + make_UNIT_CONVERSION () + { + return symbol_type (token::UNIT_CONVERSION); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_USER () + { + return symbol_type (token::USER); + } +#else + static + symbol_type + make_USER () + { + return symbol_type (token::USER); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_USER_RIGHTS () + { + return symbol_type (token::USER_RIGHTS); + } +#else + static + symbol_type + make_USER_RIGHTS () + { + return symbol_type (token::USER_RIGHTS); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_VAR_ADDRESS () + { + return symbol_type (token::VAR_ADDRESS); + } +#else + static + symbol_type + make_VAR_ADDRESS () + { + return symbol_type (token::VAR_ADDRESS); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_VAR_CHARACTERISTIC () + { + return symbol_type (token::VAR_CHARACTERISTIC); + } +#else + static + symbol_type + make_VAR_CHARACTERISTIC () + { + return symbol_type (token::VAR_CHARACTERISTIC); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_VAR_CRITERION () + { + return symbol_type (token::VAR_CRITERION); + } +#else + static + symbol_type + make_VAR_CRITERION () + { + return symbol_type (token::VAR_CRITERION); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_VAR_FORBIDDEN_COMB () + { + return symbol_type (token::VAR_FORBIDDEN_COMB); + } +#else + static + symbol_type + make_VAR_FORBIDDEN_COMB () + { + return symbol_type (token::VAR_FORBIDDEN_COMB); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_VAR_MEASUREMENT () + { + return symbol_type (token::VAR_MEASUREMENT); + } +#else + static + symbol_type + make_VAR_MEASUREMENT () + { + return symbol_type (token::VAR_MEASUREMENT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_VAR_NAMING () + { + return symbol_type (token::VAR_NAMING); + } +#else + static + symbol_type + make_VAR_NAMING () + { + return symbol_type (token::VAR_NAMING); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_VAR_SELECTION_CHARACTERISTIC () + { + return symbol_type (token::VAR_SELECTION_CHARACTERISTIC); + } +#else + static + symbol_type + make_VAR_SELECTION_CHARACTERISTIC () + { + return symbol_type (token::VAR_SELECTION_CHARACTERISTIC); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_VAR_SEPARATOR () + { + return symbol_type (token::VAR_SEPARATOR); + } +#else + static + symbol_type + make_VAR_SEPARATOR () + { + return symbol_type (token::VAR_SEPARATOR); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_VARIANT_CODING () + { + return symbol_type (token::VARIANT_CODING); + } +#else + static + symbol_type + make_VARIANT_CODING () + { + return symbol_type (token::VARIANT_CODING); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_VIRTUAL () + { + return symbol_type (token::VIRTUAL); + } +#else + static + symbol_type + make_VIRTUAL () + { + return symbol_type (token::VIRTUAL); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_VIRTUAL_CHARACTERISTIC () + { + return symbol_type (token::VIRTUAL_CHARACTERISTIC); + } +#else + static + symbol_type + make_VIRTUAL_CHARACTERISTIC () + { + return symbol_type (token::VIRTUAL_CHARACTERISTIC); + } +#endif + + + private: +#if YY_CPLUSPLUS < 201103L + /// Non copyable. + A2lParser (const A2lParser&); + /// Non copyable. + A2lParser& operator= (const A2lParser&); +#endif + + + /// Stored state numbers (used for stacks). + typedef short state_type; + + /// Compute post-reduction state. + /// \param yystate the current state + /// \param yysym the nonterminal to push on the stack + static state_type yy_lr_goto_state_ (state_type yystate, int yysym); + + /// Whether the given \c yypact_ value indicates a defaulted state. + /// \param yyvalue the value to check + static bool yy_pact_value_is_default_ (int yyvalue) YY_NOEXCEPT; + + /// Whether the given \c yytable_ value indicates a syntax error. + /// \param yyvalue the value to check + static bool yy_table_value_is_error_ (int yyvalue) YY_NOEXCEPT; + + static const short yypact_ninf_; + static const signed char yytable_ninf_; + + /// Convert a scanner token kind \a t to a symbol kind. + /// In theory \a t should be a token_kind_type, but character literals + /// are valid, yet not members of the token_kind_type enum. + static symbol_kind_type yytranslate_ (int t) YY_NOEXCEPT; + +#if A2LDEBUG || 0 + /// For a symbol, its name in clear. + static const char* const yytname_[]; +#endif // #if A2LDEBUG || 0 + + + // Tables. + // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + // STATE-NUM. + static const short yypact_[]; + + // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + // Performed when YYTABLE does not specify something else to do. Zero + // means the default is an error. + static const short yydefact_[]; + + // YYPGOTO[NTERM-NUM]. + static const short yypgoto_[]; + + // YYDEFGOTO[NTERM-NUM]. + static const short yydefgoto_[]; + + // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + // positive, shift that token. If negative, reduce the rule whose + // number is the opposite. If YYTABLE_NINF, syntax error. + static const short yytable_[]; + + static const short yycheck_[]; + + // YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of + // state STATE-NUM. + static const short yystos_[]; + + // YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. + static const short yyr1_[]; + + // YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. + static const signed char yyr2_[]; + + +#if A2LDEBUG + // YYRLINE[YYN] -- Source line where rule number YYN was defined. + static const short yyrline_[]; + /// Report on the debug stream that the rule \a r is going to be reduced. + virtual void yy_reduce_print_ (int r) const; + /// Print the state stack on the debug stream. + virtual void yy_stack_print_ () const; + + /// Debugging level. + int yydebug_; + /// Debug stream. + std::ostream* yycdebug_; + + /// \brief Display a symbol kind, value and location. + /// \param yyo The output stream. + /// \param yysym The symbol. + template + void yy_print_ (std::ostream& yyo, const basic_symbol& yysym) const; +#endif + + /// \brief Reclaim the memory associated to a symbol. + /// \param yymsg Why this token is reclaimed. + /// If null, print nothing. + /// \param yysym The symbol. + template + void yy_destroy_ (const char* yymsg, basic_symbol& yysym) const; + + private: + /// Type access provider for state based symbols. + struct by_state + { + /// Default constructor. + by_state () YY_NOEXCEPT; + + /// The symbol kind as needed by the constructor. + typedef state_type kind_type; + + /// Constructor. + by_state (kind_type s) YY_NOEXCEPT; + + /// Copy constructor. + by_state (const by_state& that) YY_NOEXCEPT; + + /// Record that this symbol is empty. + void clear () YY_NOEXCEPT; + + /// Steal the symbol kind from \a that. + void move (by_state& that); + + /// The symbol kind (corresponding to \a state). + /// \a symbol_kind::S_YYEMPTY when empty. + symbol_kind_type kind () const YY_NOEXCEPT; + + /// The state number used to denote an empty symbol. + /// We use the initial state, as it does not have a value. + enum { empty_state = 0 }; + + /// The state. + /// \a empty when empty. + state_type state; + }; + + /// "Internal" symbol: element of the stack. + struct stack_symbol_type : basic_symbol + { + /// Superclass. + typedef basic_symbol super_type; + /// Construct an empty symbol. + stack_symbol_type (); + /// Move or copy construction. + stack_symbol_type (YY_RVREF (stack_symbol_type) that); + /// Steal the contents from \a sym to build this. + stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym); +#if YY_CPLUSPLUS < 201103L + /// Assignment, needed by push_back by some old implementations. + /// Moves the contents of that. + stack_symbol_type& operator= (stack_symbol_type& that); + + /// Assignment, needed by push_back by other implementations. + /// Needed by some other old implementations. + stack_symbol_type& operator= (const stack_symbol_type& that); +#endif + }; + + /// A stack with random access from its top. + template > + class stack + { + public: + // Hide our reversed order. + typedef typename S::iterator iterator; + typedef typename S::const_iterator const_iterator; + typedef typename S::size_type size_type; + typedef typename std::ptrdiff_t index_type; + + stack (size_type n = 200) YY_NOEXCEPT + : seq_ (n) + {} + +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + stack (const stack&) = delete; + /// Non copyable. + stack& operator= (const stack&) = delete; +#endif + + /// Random access. + /// + /// Index 0 returns the topmost element. + const T& + operator[] (index_type i) const + { + return seq_[size_type (size () - 1 - i)]; + } + + /// Random access. + /// + /// Index 0 returns the topmost element. + T& + operator[] (index_type i) + { + return seq_[size_type (size () - 1 - i)]; + } + + /// Steal the contents of \a t. + /// + /// Close to move-semantics. + void + push (YY_MOVE_REF (T) t) + { + seq_.push_back (T ()); + operator[] (0).move (t); + } + + /// Pop elements from the stack. + void + pop (std::ptrdiff_t n = 1) YY_NOEXCEPT + { + for (; 0 < n; --n) + seq_.pop_back (); + } + + /// Pop all elements from the stack. + void + clear () YY_NOEXCEPT + { + seq_.clear (); + } + + /// Number of elements on the stack. + index_type + size () const YY_NOEXCEPT + { + return index_type (seq_.size ()); + } + + /// Iterator on top of the stack (going downwards). + const_iterator + begin () const YY_NOEXCEPT + { + return seq_.begin (); + } + + /// Bottom of the stack. + const_iterator + end () const YY_NOEXCEPT + { + return seq_.end (); + } + + /// Present a slice of the top of a stack. + class slice + { + public: + slice (const stack& stack, index_type range) YY_NOEXCEPT + : stack_ (stack) + , range_ (range) + {} + + const T& + operator[] (index_type i) const + { + return stack_[range_ - i]; + } + + private: + const stack& stack_; + index_type range_; + }; + + private: +#if YY_CPLUSPLUS < 201103L + /// Non copyable. + stack (const stack&); + /// Non copyable. + stack& operator= (const stack&); +#endif + /// The wrapped container. + S seq_; + }; + + + /// Stack type. + typedef stack stack_type; + + /// The stack. + stack_type yystack_; + + /// Push a new state on the stack. + /// \param m a debug message to display + /// if null, no trace is output. + /// \param sym the symbol + /// \warning the contents of \a s.value is stolen. + void yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym); + + /// Push a new look ahead token on the state on the stack. + /// \param m a debug message to display + /// if null, no trace is output. + /// \param s the state + /// \param sym the symbol (for its value and location). + /// \warning the contents of \a sym.value is stolen. + void yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym); + + /// Pop \a n symbols from the stack. + void yypop_ (int n = 1) YY_NOEXCEPT; + + /// Constants. + enum + { + yylast_ = 1278, ///< Last index in yytable_. + yynnts_ = 289, ///< Number of nonterminal symbols. + yyfinal_ = 9 ///< Termination state number. + }; + + + // User arguments. + a2l::A2lScanner &scanner; + a2l::A2lFile &file; + + }; + + +#line 5 "D:/projects/a2llib/src/a2lparser.y" +} // a2l +#line 6327 "D:/projects/a2llib/src/a2lparser.hpp" + + + + +#endif // !YY_A2L_D_PROJECTS_A2LLIB_SRC_A2LPARSER_HPP_INCLUDED diff --git a/a2llib-main/src/a2lparser.y b/a2llib-main/src/a2lparser.y new file mode 100644 index 0000000..2df4ec9 --- /dev/null +++ b/a2llib-main/src/a2lparser.y @@ -0,0 +1,1671 @@ +%require "3.2" +%language "c++" + +%define api.prefix {a2l} +%define api.namespace {a2l} +%define api.parser.class {A2lParser} + + +%code requires { +#include +#include +#include +#include +#include "a2l/a2lenums.h" +#include "a2l/a2lstructs.h" +namespace a2l { +class A2lScanner; +class A2lFile; +} + +} + +%parse-param { a2l::A2lScanner &scanner } +%parse-param { a2l::A2lFile &file } + +%code { #include "a2l/a2lstructs.h" + #include + #include "a2lscanner.h" + #include "a2l/a2lfile.h" + #include "a2lhelper.h" + #include + + + #undef yylex + #define yylex scanner.a2llex +} + +%define api.value.type variant + +%token A2L_BEGIN +%token A2L_END +%token A2L_INCLUDE + +%token IDENT +%token STRING +%token INT +%token UINT +%token HEX +%token FLOAT + + +%token ASAP2_VERSION +%token A2L_VERSION +%token A2ML_VERSION +%token A2ML +%token ADDR_EPK +%token ADDRESS_TYPE +%token ALIGNMENT_BYTE +%token ALIGNMENT_FLOAT16_IEEE +%token ALIGNMENT_FLOAT32_IEEE +%token ALIGNMENT_FLOAT64_IEEE +%token ALIGNMENT_INT64 +%token ALIGNMENT_LONG +%token ALIGNMENT_WORD +%token ANNOTATION +%token ANNOTATION_LABEL +%token ANNOTATION_ORIGIN +%token ANNOTATION_TEXT +%token ARRAY_SIZE +%token AR_COMPONENT +%token AR_PROTOTYPE_OF +%token AXIS_DESCR +%token AXIS_PTS +%token AXIS_PTS_REF +%token AXIS_PTS_X +%token AXIS_PTS_Y +%token AXIS_PTS_Z +%token AXIS_PTS_4 +%token AXIS_PTS_5 +%token AXIS_RESCALE_X +%token BIT_MASK +%token BIT_OPERATION +%token BLOB +%token A2L_BYTE_ORDER +%token CALIBRATION_ACCESS +%token CALIBRATION_HANDLE +%token CALIBRATION_HANDLE_TEXT +%token CALIBRATION_METHOD +%token CHARACTERISTIC +%token COEFFS +%token COEFFS_LINEAR +%token COMPARISON_QUANTITY +%token COMPU_METHOD +%token COMPU_TAB +%token COMPU_TAB_REF +%token COMPU_VTAB +%token COMPU_VTAB_RANGE +%token CONSISTENT_EXCHANGE +%token CONTROLLER_ADDRESSES +%token CONVERSION +%token CPU_TYPE +%token CURVE_AXIS_REF +%token CUSTOMER +%token CUSTOMER_NO +%token DATA_SIZE +%token DEF_CHARACTERISTIC +%token DEFAULT_VALUE +%token DEFAULT_VALUE_NUMERIC +%token DEPENDENT_CHARACTERISTIC +%token DEPOSIT +%token DISCRETE +%token DISPLAY_IDENTIFIER +%token DIST_OP_X +%token DIST_OP_Y +%token DIST_OP_Z +%token DIST_OP_4 +%token DIST_OP_5 +%token ECU +%token ECU_ADDRESS +%token ECU_ADDRESS_EXTENSION +%token ECU_CALIBRATION_OFFSET +%token ENCODING +%token EPK +%token ERROR_MASK +%token EXTENDED_LIMITS +%token FIX_AXIS_PAR +%token FIX_AXIS_PAR_DIST +%token FIX_AXIS_PAR_LIST +%token FIX_NO_AXIS_PTS_X +%token FIX_NO_AXIS_PTS_Y +%token FIX_NO_AXIS_PTS_Z +%token FIX_NO_AXIS_PTS_4 +%token FIX_NO_AXIS_PTS_5 +%token FNC_VALUES +%token FORMAT +%token FORMULA +%token FORMULA_INV +%token FRAME +%token FRAME_MEASUREMENT +%token FUNCTION +%token FUNCTION_LIST +%token FUNCTION_VERSION +%token GROUP +%token GUARD_RAILS +%token HEADER +%token IDENTIFICATION +%token IF_DATA +%token IN_MEASUREMENT +%token INPUT_QUANTITY +%token INSTANCE +%token LAYOUT +%token LEFT_SHIFT +%token LIMITS +%token LOC_MEASUREMENT +%token MAP_LIST +%token MATRIX_DIM +%token MAX_GRAD +%token MAX_REFRESH +%token MEASUREMENT +%token MEMORY_LAYOUT +%token MEMORY_SEGMENT +%token MODULE +%token MOD_COMMON +%token MOD_PAR +%token MODEL_LINK +%token MONOTONY +%token NO_AXIS_PTS_X +%token NO_AXIS_PTS_Y +%token NO_AXIS_PTS_Z +%token NO_AXIS_PTS_4 +%token NO_AXIS_PTS_5 +%token NO_OF_INTERFACES +%token NO_RESCALE_X +%token NUMBER +%token OFFSET_X +%token OFFSET_Y +%token OFFSET_Z +%token OFFSET_4 +%token OFFSET_5 +%token OUT_MEASUREMENT +%token OVERWRITE +%token PHONE_NO +%token PHYS_UNIT +%token PROJECT +%token PROJECT_NO +%token READ_ONLY +%token READ_WRITE +%token RECORD_LAYOUT +%token REF_CHARACTERISTIC +%token REF_GROUP +%token REF_MEASUREMENT +%token REF_MEMORY_SEGMENT +%token REF_UNIT +%token RESERVED +%token RIGHT_SHIFT +%token RIP_ADDR_W +%token RIP_ADDR_X +%token RIP_ADDR_Y +%token RIP_ADDR_Z +%token RIP_ADDR_4 +%token RIP_ADDR_5 +%token ROOT +%token S_REC_LAYOUT +%token SHIFT_OP_X +%token SHIFT_OP_Y +%token SHIFT_OP_Z +%token SHIFT_OP_4 +%token SHIFT_OP_5 +%token SIGN_EXTEND +%token SI_EXPONENTS +%token SRC_ADDR_X +%token SRC_ADDR_Y +%token SRC_ADDR_Z +%token SRC_ADDR_4 +%token SRC_ADDR_5 +%token STATIC_ADDRESS_OFFSETS +%token STATIC_RECORD_LAYOUT +%token STATUS_STRING_REF +%token STEP_SIZE +%token STRUCTURE_COMPONENT +%token SUB_FUNCTION +%token SUB_GROUP +%token SUPPLIER +%token SYMBOL_LINK +%token SYMBOL_TYPE_LINK +%token SYSTEM_CONSTANT +%token TRANSFORMER +%token TRANSFORMER_IN_OBJECTS +%token TRANSFORMER_OUT_OBJECTS +%token TYPEDEF_AXIS +%token TYPEDEF_BLOB +%token TYPEDEF_CHARACTERISTIC +%token TYPEDEF_MEASUREMENT +%token TYPEDEF_STRUCTURE +%token UNIT +%token UNIT_CONVERSION +%token USER +%token USER_RIGHTS +%token VAR_ADDRESS +%token VAR_CHARACTERISTIC +%token VAR_CRITERION +%token VAR_FORBIDDEN_COMB +%token VAR_MEASUREMENT +%token VAR_NAMING +%token VAR_SELECTION_CHARACTERISTIC +%token VAR_SEPARATOR +%token VARIANT_CODING +%token VIRTUAL +%token VIRTUAL_CHARACTERISTIC +%token EOL 0 + +%nterm any_uint +%nterm any_int +%nterm any_float +%nterm > int_list +%nterm > uint_list +%nterm > float_list +%nterm > float_pair_list +%nterm > float_string_list +%nterm , std::string>> float_range_list +%nterm > string_list +%nterm > ident_list +%nterm > key_value_list + +%nterm a2ml +%nterm addr_epk +%nterm address_type +%nterm alignment_byte +%nterm alignment_float16_ieee +%nterm alignment_float32_ieee +%nterm alignment_float64_ieee +%nterm alignment_int64 +%nterm alignment_long +%nterm alignment_word +%nterm annotation +%nterm annotation_attributes +%nterm annotation_label +%nterm annotation_origin +%nterm > annotation_text +%nterm array_size +%nterm ar_component_attribute +%nterm ar_prototype_of +%nterm axis_pts_ref +%nterm axis_pts_x +%nterm axis_pts_y +%nterm axis_pts_z +%nterm axis_pts_4 +%nterm axis_pts_5 +%nterm axis_rescale_x +%nterm byte_order +%nterm bit_mask +%nterm bit_operation +%nterm calibration_access +%nterm calibration_handle +%nterm calibration_handle_attribute +%nterm calibration_handle_text +%nterm calibration_method +%nterm > calibration_method_attributes +%nterm > coeffs +%nterm > coeffs_linear +%nterm comparison_quantity +%nterm compu_tab_ref +%nterm conversion +%nterm cpu_type +%nterm curve_axis_ref +%nterm customer +%nterm customer_no +%nterm data_size +%nterm > def_characteristic +%nterm default_value +%nterm default_value_numeric +%nterm deposit +%nterm dependent_characteristic +%nterm display_identifier +%nterm dist_op_x +%nterm dist_op_y +%nterm dist_op_z +%nterm dist_op_4 +%nterm dist_op_5 +%nterm ecu +%nterm ecu_address +%nterm ecu_address_extension +%nterm ecu_calibration_offset +%nterm encoding +%nterm epk +%nterm error_mask +%nterm extended_limits +%nterm fix_axis_par +%nterm fix_axis_par_dist +%nterm > fix_axis_par_list +%nterm fix_no_axis_pts_x +%nterm fix_no_axis_pts_y +%nterm fix_no_axis_pts_z +%nterm fix_no_axis_pts_4 +%nterm fix_no_axis_pts_5 +%nterm fnc_values +%nterm format +%nterm > formula +%nterm formula_attribute +%nterm formula_inv +%nterm > frame_measurement +%nterm > function_list +%nterm function_version +%nterm identification +%nterm if_data +%nterm input_quantity +%nterm > in_measurement +%nterm layout +%nterm left_shift +%nterm limits +%nterm > map_list +%nterm > matrix_dim +%nterm max_grad +%nterm max_refresh +%nterm memory_layout +%nterm > memory_layout_attributes +%nterm memory_segment +%nterm > memory_segment_attributes +%nterm model_link +%nterm monotony +%nterm no_axis_pts_x +%nterm no_axis_pts_y +%nterm no_axis_pts_z +%nterm no_axis_pts_4 +%nterm no_axis_pts_5 +%nterm no_rescale_x +%nterm no_of_interfaces +%nterm number +%nterm offset_x +%nterm offset_y +%nterm offset_z +%nterm offset_4 +%nterm offset_5 +%nterm > out_measurement +%nterm > loc_measurement +%nterm phone_no +%nterm phys_unit +%nterm prg_type +%nterm proj_no +%nterm project_no +%nterm > ref_characteristic +%nterm > ref_group +%nterm > ref_measurement +%nterm ref_memory_segment +%nterm ref_unit +%nterm reserved +%nterm right_shift +%nterm rip_addr_w +%nterm rip_addr_x +%nterm rip_addr_y +%nterm rip_addr_z +%nterm rip_addr_4 +%nterm rip_addr_5 +%nterm shift_op_x +%nterm shift_op_y +%nterm shift_op_z +%nterm shift_op_4 +%nterm shift_op_5 +%nterm si_exponents +%nterm src_addr_x +%nterm src_addr_y +%nterm src_addr_z +%nterm src_addr_4 +%nterm src_addr_5 +%nterm step_size +%nterm status_string_ref +%nterm > sub_function +%nterm > sub_group +%nterm supplier +%nterm symbol_link +%nterm symbol_type_link +%nterm > system_constant +%nterm > transformer_in_objects +%nterm > transformer_out_objects +%nterm > unit_conversion +%nterm user +%nterm > var_address +%nterm var_characteristic +%nterm > var_characteristic_attribute +%nterm var_criterion +%nterm > var_forbidden_comb +%nterm var_measurement +%nterm var_naming +%nterm var_selection_characteristic +%nterm var_separator +%nterm version +%nterm > virtual +%nterm virtual_characteristic + +// %right TAG_NS_DESC TAG_CM +%start a2l_file +%% +any_uint: UINT { $$ = $1; } + | HEX { $$ = $1; }; + +any_int: INT { $$ = $1; } + | UINT { $$ = static_cast($1); } + | HEX { $$ = static_cast($1); }; + +any_float: FLOAT { $$ = $1; } + | INT { $$ = static_cast($1); } + | UINT { $$ = static_cast($1); } + | HEX { $$ = static_cast($1); }; + +int_list: %empty {} + | int_list any_int {$$ = $1; $$.emplace_back($2); }; + +uint_list: %empty {} + | uint_list any_uint {$$ = $1; $$.emplace_back($2); }; + +float_list: %empty {} + | float_list any_float {$$ = $1; $$.emplace_back($2); }; + +float_pair_list: %empty {} + | float_pair_list any_float any_float {$$ = $1; $$.emplace($2,$3); }; + +float_string_list: %empty {} + | float_string_list any_float STRING {$$ = $1; $$.emplace($2,$3); }; + +float_range_list: %empty {} + | float_range_list any_float any_float STRING { + $$ = $1; + $$.emplace(std::pair($2,$3),$4); }; + +string_list: %empty {} + | string_list STRING ; + +ident_list: %empty {} + | ident_list IDENT {$$ = $1; $$.emplace_back($2); }; + +key_value_list: %empty {} + | key_value_list IDENT IDENT {$$ = $1; $$.emplace($2,$3); }; + +a2l_file: file_version project; + +file_version: %empty + | asap2_version + | file_version a2ml_version; + +annotation: A2L_BEGIN ANNOTATION annotation_attributes A2L_END ANNOTATION { $$ = $3;}; +annotation_attributes: %empty {} + | annotation_attributes annotation_label { $$ = $1; $$.Label = $2;} + | annotation_attributes annotation_origin { $$ = $1; $$.Origin = $2;} + | annotation_attributes annotation_text { $$ = $1; $$.Text = $2;}; + +annotation_text: A2L_BEGIN ANNOTATION_TEXT string_list A2L_END ANNOTATION_TEXT {$$ = $3;}; + +ar_component: A2L_BEGIN AR_COMPONENT STRING ar_component_attribute A2L_END AR_COMPONENT { + auto& func = scanner.CurrentFunction(); + func.ComponentType($3); + func.PrototypeOf($4); + }; +ar_component_attribute: %empty { $$ = std::string(); } + | ar_prototype_of { $$ = $1; }; + +axis_descr: A2L_BEGIN AXIS_DESCR IDENT IDENT IDENT any_uint any_float any_float + axis_descr_attributes A2L_END AXIS_DESCR { + auto& descr = scanner.CurrentAxisDescr(); + descr.AxisType(StringToAxisType($3)); + descr.InputQuantity($4); + descr.Conversion($5); + descr.MaxAxisPoints($6); + descr.LowerLimit($7); + descr.UpperLimit($8); + }; +axis_descr_attributes: %empty + | axis_descr_attributes axis_descr_attribute; +axis_descr_attribute: annotation { scanner.CurrentAxisDescr().AddAnnotation($1); } + | axis_pts_ref { scanner.CurrentAxisDescr().AxisPtsRef($1); } + | byte_order { scanner.CurrentAxisDescr().ByteOrder($1); } + | curve_axis_ref { scanner.CurrentAxisDescr().CurveAxisRef($1); } + | deposit { scanner.CurrentAxisDescr().Deposit($1); } + | extended_limits { scanner.CurrentAxisDescr().ExtendedLimits($1); } + | fix_axis_par { scanner.CurrentAxisDescr().FixAxisPar($1); } + | fix_axis_par_dist { scanner.CurrentAxisDescr().FixAxisParDist($1); } + | fix_axis_par_list { scanner.CurrentAxisDescr().FixAxisParList($1); } + | format { scanner.CurrentAxisDescr().Format($1); } + | max_grad { scanner.CurrentAxisDescr().MaxGradient($1); } + | monotony { scanner.CurrentAxisDescr().Monotony($1); } + | phys_unit { scanner.CurrentAxisDescr().PhysUnit($1); } + | read_only { scanner.CurrentAxisDescr().ReadOnly(true); } + | step_size { scanner.CurrentAxisDescr().StepSize($1); }; + +axis_pts: A2L_BEGIN AXIS_PTS IDENT STRING any_uint IDENT IDENT any_float IDENT any_uint any_float any_float + axis_pts_attributes A2L_END AXIS_PTS { + auto& pts = scanner.CurrentAxisPts(); + pts.Name($3); + pts.Description($4); + pts.Address($5); + pts.InputQuantity($6); + pts.RefRecord($7); + pts.MaxDiff($8); + pts.Conversion($9); + pts.MaxAxisPoints($10); + pts.LowerLimit($11); + pts.UpperLimit($12); + }; +axis_pts_attributes: %empty + | axis_pts_attributes axis_pts_attribute; +axis_pts_attribute: annotation { scanner.CurrentAxisPts().AddAnnotation($1); } + | byte_order { scanner.CurrentAxisPts().ByteOrder($1); } + | calibration_access { scanner.CurrentAxisPts().CalibrationAccess($1); } + | deposit { scanner.CurrentAxisPts().Deposit($1); } + | display_identifier { scanner.CurrentAxisPts().DisplayIdentifier($1); } + | ecu_address_extension { scanner.CurrentAxisPts().EcuAddressExtension($1); } + | extended_limits { scanner.CurrentAxisPts().ExtendedLimits($1); } + | format { scanner.CurrentAxisPts().Format($1); } + | function_list { scanner.CurrentAxisPts().FunctionList($1); } + | guard_rails { scanner.CurrentAxisPts().GuardRails(true); } + | if_data { scanner.CurrentAxisPts().AddIfData($1); } + | max_refresh { scanner.CurrentAxisPts().MaxRefresh($1); } + | model_link { scanner.CurrentAxisPts().ModelLink($1); } + | monotony { scanner.CurrentAxisPts().Monotony($1); } + | phys_unit { scanner.CurrentAxisPts().PhysUnit($1); } + | read_only { scanner.CurrentAxisPts().ReadOnly(true); } + | ref_memory_segment { scanner.CurrentAxisPts().RefMemorySegment($1); } + | step_size { scanner.CurrentAxisPts().StepSize($1); } + | symbol_link{ scanner.CurrentAxisPts().SymbolLink($1); }; + +bit_operation: A2L_BEGIN BIT_OPERATION bit_operation_attributes A2L_END BIT_OPERATION { + auto& operation = scanner.CurrentBitOperation(); + $$ = operation; + operation = {}; +}; +bit_operation_attributes: %empty + | bit_operation_attributes bit_operation_attribute; +bit_operation_attribute: left_shift { scanner.CurrentBitOperation().LeftShift = $1; } + | right_shift { scanner.CurrentBitOperation().RightShift = $1; } + | sign_extend { scanner.CurrentBitOperation().SignExtended = true; }; + +blob: A2L_BEGIN BLOB IDENT STRING any_uint any_uint blob_attributes A2L_END BLOB { + auto& blob = scanner.CurrentBlob(); + blob.Name($3); + blob.Description($4); + blob.Address($5); + blob.Size($6); +}; +blob_attributes: %empty + | blob_attributes blob_attribute; +blob_attribute: address_type { scanner.CurrentBlob().AddressType($1); } + | annotation { scanner.CurrentBlob().AddAnnotation($1); } + | calibration_access { scanner.CurrentBlob().CalibrationAccess($1); } + | display_identifier { scanner.CurrentBlob().DisplayIdentifier($1); } + | ecu_address_extension { scanner.CurrentBlob().EcuAddressExtension($1); } + | if_data { scanner.CurrentBlob().AddIfData($1); } + | max_refresh { scanner.CurrentBlob().MaxRefresh($1); } + | model_link { scanner.CurrentBlob().ModelLink($1); } + | symbol_link { scanner.CurrentBlob().SymbolLink($1); }; + +calibration_handle: A2L_BEGIN CALIBRATION_HANDLE int_list calibration_handle_attribute A2L_END CALIBRATION_HANDLE { + $$.HandleList = $3; + $$.Comment = $4; +}; +calibration_handle_attribute: %empty {} + | calibration_handle_text { $$ = $1; }; + +calibration_method: A2L_BEGIN CALIBRATION_METHOD STRING any_uint + calibration_method_attributes A2L_END CALIBRATION_METHOD { + $$.Method = $3; + $$.Version = $4; + $$.CalibrationHandleList = $5; + }; +calibration_method_attributes: %empty {} + | calibration_method_attributes calibration_handle { + $$ = $1; + $$.emplace_back($2); + }; + +characteristic: A2L_BEGIN CHARACTERISTIC IDENT STRING IDENT any_uint IDENT any_float IDENT any_float any_float + characteristic_attributes A2L_END CHARACTERISTIC { + auto& object = scanner.CurrentCharacteristic(); + object.Name($3); + object.Description($4); + object.Type(StringToCharacteristicType($5)); + object.Address($6); + object.Deposit($7); + object.MaxDiff($8); + object.Conversion($9); + object.LowerLimit($10); + object.UpperLimit($11); + }; +characteristic_attributes: %empty + | characteristic_attributes characteristic_attribute; +characteristic_attribute: annotation { scanner.CurrentCharacteristic().AddAnnotation($1); } + | axis_descr { auto& object = scanner.CurrentCharacteristic(); + object.AddAxisDescr(scanner.ReleaseAxisDescr()); + } + | bit_mask { scanner.CurrentCharacteristic().BitMask($1); } + | byte_order { scanner.CurrentCharacteristic().ByteOrder($1); } + | calibration_access { scanner.CurrentCharacteristic().CalibrationAccess($1); } + | comparison_quantity { scanner.CurrentCharacteristic().ComparisonQuantity($1); } + | dependent_characteristic { scanner.CurrentCharacteristic().DependentCharacteristic($1); } + | discrete { scanner.CurrentCharacteristic().Discrete(true); } + | display_identifier { scanner.CurrentCharacteristic().DisplayIdentifier($1); } + | ecu_address_extension { scanner.CurrentCharacteristic().EcuAddressExtension($1); } + | encoding { scanner.CurrentCharacteristic().Encoding($1); } + | extended_limits { scanner.CurrentCharacteristic().ExtendedLimits($1); } + | format { scanner.CurrentCharacteristic().Format($1); } + | function_list { scanner.CurrentCharacteristic().FunctionList($1); } + | guard_rails { scanner.CurrentCharacteristic().GuardRails(true); } + | if_data { scanner.CurrentCharacteristic().AddIfData($1); } + | map_list { scanner.CurrentCharacteristic().MapList($1); } + | matrix_dim { scanner.CurrentCharacteristic().MatrixDim($1); } + | max_refresh { scanner.CurrentCharacteristic().MaxRefresh($1); } + | model_link { scanner.CurrentCharacteristic().ModelLink($1); } + | number { scanner.CurrentCharacteristic().Number($1); } + | phys_unit { scanner.CurrentCharacteristic().PhysUnit($1); } + | read_only { scanner.CurrentCharacteristic().ReadOnly(true); } + | ref_memory_segment { scanner.CurrentCharacteristic().RefMemorySegment($1); } + | step_size { scanner.CurrentCharacteristic().StepSize($1); } + | symbol_link { scanner.CurrentCharacteristic().SymbolLink($1); } + | virtual_characteristic { scanner.CurrentCharacteristic().VirtualCharacteristic($1); }; + +compu_method: A2L_BEGIN COMPU_METHOD IDENT STRING IDENT STRING STRING compu_method_attributes A2L_END COMPU_METHOD { + auto& method = scanner.CurrentCompuMethod(); + method.Name($3); + method.Description($4); + method.Type(StringToConversionType($5)); + method.Format($6); + method.PhysUnit($7); +}; + +compu_method_attributes: %empty + | compu_method_attributes compu_method_attribute; +compu_method_attribute: coeffs { scanner.CurrentCompuMethod().Coeffs($1); } + | coeffs_linear { scanner.CurrentCompuMethod().CoeffsLinear($1); } + | compu_tab_ref { scanner.CurrentCompuMethod().CompuTabRef($1); } + | formula { + auto& method = scanner.CurrentCompuMethod(); + method.Formula($1.first); + method.Formula($1.second); + } + | ref_unit { scanner.CurrentCompuMethod().RefUnit($1); } + | status_string_ref { scanner.CurrentCompuMethod().StatusStringRef($1); }; + +compu_tab: A2L_BEGIN COMPU_TAB IDENT STRING IDENT any_uint float_pair_list +compu_tab_attributes A2L_END COMPU_TAB { + auto& tab = scanner.CurrentCompuTab(); + tab.Name($3); + tab.Description($4); + tab.Type(StringToConversionType($5)); + tab.Rows($6); + tab.KeyValueList($7); + }; +compu_tab_attributes: %empty + | compu_tab_attributes compu_tab_attribute; +compu_tab_attribute: default_value { scanner.CurrentCompuTab().DefaultValue($1); } + | default_value_numeric { scanner.CurrentCompuTab().DefaultValueNumeric($1); }; + +compu_vtab: A2L_BEGIN COMPU_VTAB IDENT STRING IDENT any_uint float_string_list + compu_vtab_attributes A2L_END COMPU_VTAB { + auto& tab = scanner.CurrentCompuVtab(); + tab.Name($3); + tab.Description($4); + tab.Type(StringToConversionType($5)); + tab.Rows($6); + tab.KeyValueList($7); + }; +compu_vtab_attributes: %empty + | compu_vtab_attributes compu_vtab_attribute; +compu_vtab_attribute: default_value { scanner.CurrentCompuVtab().DefaultValue($1); }; + +compu_vtab_range: A2L_BEGIN COMPU_VTAB_RANGE IDENT STRING any_uint float_range_list + compu_vtab_range_attributes A2L_END COMPU_VTAB_RANGE { + auto& tab = scanner.CurrentCompuVtabRange(); + tab.Name($3); + tab.Description($4); + tab.Rows($5); + tab.KeyValueList($6); + }; +compu_vtab_range_attributes: %empty + | compu_vtab_range_attributes compu_vtab_range_attribute; +compu_vtab_range_attribute: default_value { scanner.CurrentCompuVtabRange().DefaultValue($1); }; + +controller_addresses : A2L_BEGIN CONTROLLER_ADDRESSES controller_address_list A2L_END CONTROLLER_ADDRESSES; + +controller_address_list: %empty + | controller_address_list controller_address; + +controller_address: any_uint IDENT any_uint any_uint { + A2lControllerAddress address; + address.Index = $1; + address.ByteOrder = StringToByteOrder($2); + address.StartAddress = $3; + address.Length = $4; + auto& module = scanner.CurrentModule(); + module.AddControllerAddress(address); + }; + +def_characteristic: A2L_BEGIN DEF_CHARACTERISTIC ident_list A2L_END DEF_CHARACTERISTIC { $$ = $3; }; + +dependent_characteristic: A2L_BEGIN DEPENDENT_CHARACTERISTIC STRING + ident_list A2L_END DEPENDENT_CHARACTERISTIC {$$ = {$3, $4}; }; + +fix_axis_par_list: A2L_BEGIN FIX_AXIS_PAR_LIST float_list A2L_END FIX_AXIS_PAR_LIST { $$ = $3; }; + +formula: A2L_BEGIN FORMULA STRING formula_attribute A2L_END FORMULA { $$ = {$3,$4}; }; +formula_attribute: %empty {} + | formula_inv {$$ = $1;}; + +frame: A2L_BEGIN FRAME IDENT STRING any_uint any_uint frame_attributes A2L_END FRAME { + auto& frame = scanner.CurrentFrame(); + frame.Name($3); + frame.Description($4); + frame.ScalingUnit($5); + frame.Rate($6); +}; +frame_attributes: %empty + | frame_attributes frame_attribute; +frame_attribute: frame_measurement { scanner.CurrentFrame().FrameMeasurement($1); } + | if_data { scanner.CurrentFrame().AddIfData($1); }; + +function: A2L_BEGIN FUNCTION IDENT STRING function_attributes A2L_END FUNCTION { + auto& func = scanner.CurrentFunction(); + func.Name($3); + func.Description($4); +}; +function_attributes: %empty + | function_attributes function_attribute; +function_attribute: annotation { scanner.CurrentFunction().AddAnnotation($1);} + | ar_component + | def_characteristic { scanner.CurrentFunction().DefaultCharacteristics($1);} + | function_version { scanner.CurrentFunction().Version($1);} + | if_data { scanner.CurrentFunction().AddIfData($1);} + | in_measurement { scanner.CurrentFunction().InMeasurements($1);} + | loc_measurement { scanner.CurrentFunction().LocMeasurements($1);} + | out_measurement { scanner.CurrentFunction().OutMeasurements($1);} + | ref_characteristic { scanner.CurrentFunction().RefCharacteristics($1);} + | sub_function { scanner.CurrentFunction().SubFunctions($1);}; + +function_list: A2L_BEGIN FUNCTION_LIST ident_list A2L_END FUNCTION_LIST { $$ = $3;} + | FUNCTION_LIST ident_list { $$ = $2; }; + +group: A2L_BEGIN GROUP IDENT STRING group_attributes A2L_END GROUP { + auto& group = scanner.CurrentGroup(); + group.Name($3); + group.Description($4); +}; + +group_attributes: %empty + | group_attributes group_attribute; +group_attribute: annotation { scanner.CurrentGroup().AddAnnotation($1); } + | function_list { scanner.CurrentGroup().FunctionList($1); } + | if_data { scanner.CurrentGroup().AddIfData($1); } + | ref_characteristic { scanner.CurrentGroup().RefCharacteristics($1); } + | ref_measurement { scanner.CurrentGroup().RefMeasurements($1); } + | root { scanner.CurrentGroup().Root(true); } + | sub_group { scanner.CurrentGroup().SubGroups($1); }; + +header: A2L_BEGIN HEADER STRING header_attributes A2L_END HEADER { + auto& header = file.Project().Header(); + header.Comment = $3; +}; + +header_attributes: %empty + | header_attributes header_attribute; + +header_attribute: project_no { + auto& header = file.Project().Header(); + header.ProjectNo = $1; +} | version { + auto& header = file.Project().Header(); + header.VersionNo = $1; +}; + +in_measurement: A2L_BEGIN IN_MEASUREMENT ident_list A2L_END IN_MEASUREMENT { $$ = $3; }; + +instance: A2L_BEGIN INSTANCE IDENT STRING IDENT any_uint instance_attributes A2L_END INSTANCE { + auto& instance = scanner.CurrentInstance(); + instance.Name($3); + instance.Description($4); + instance.RefTypeDef($5); + instance.Address($6); +}; +instance_attributes: %empty + | instance_attributes instance_attribute; +instance_attribute: address_type { scanner.CurrentInstance().AddressType($1); } + | annotation { scanner.CurrentInstance().AddAnnotation($1); } + | calibration_access { scanner.CurrentInstance().CalibrationAccess($1); } + | display_identifier { scanner.CurrentInstance().DisplayIdentifier($1); } + | ecu_address_extension { scanner.CurrentInstance().EcuAddressExtension($1); } + | if_data { scanner.CurrentInstance().AddIfData($1); } + | layout { scanner.CurrentInstance().Layout($1); } + | matrix_dim { scanner.CurrentInstance().MatrixDim($1); } + | max_refresh { scanner.CurrentInstance().MaxRefresh($1); } + | model_link { scanner.CurrentInstance().ModelLink($1); } + | overwrite { auto& instance = scanner.CurrentInstance(); + instance.AddOverwrite(scanner.ReleaseOverwrite()); } + | read_write { scanner.CurrentInstance().ReadWrite(true); } + | symbol_link { scanner.CurrentInstance().SymbolLink($1); }; + +loc_measurement: A2L_BEGIN LOC_MEASUREMENT ident_list A2L_END LOC_MEASUREMENT { $$ = $3;}; + +map_list: A2L_BEGIN MAP_LIST ident_list A2L_END MAP_LIST { $$ = $3;}; + +measurement: A2L_BEGIN MEASUREMENT IDENT STRING IDENT IDENT any_uint any_float any_float any_float + measurement_attributes A2L_END MEASUREMENT { + auto& meas = scanner.CurrentMeasurement(); + meas.Name($3); + meas.Description($4); + meas.DataType(StringToDataType($5)); + meas.Conversion($6); + meas.Resolution($7); + meas.Accuracy($8); + meas.LowerLimit($9); + meas.UpperLimit($10); + }; +measurement_attributes: %empty + | measurement_attributes measurement_attribute; +measurement_attribute: address_type { scanner.CurrentMeasurement().AddressType($1); } + | annotation { scanner.CurrentMeasurement().AddAnnotation($1); } + | array_size { scanner.CurrentMeasurement().ArraySize($1); } + | bit_mask { scanner.CurrentMeasurement().BitMask($1); } + | bit_operation { scanner.CurrentMeasurement().BitOperation($1); } + | byte_order { scanner.CurrentMeasurement().ByteOrder($1); } + | discrete { scanner.CurrentMeasurement().Discrete(true); } + | display_identifier { scanner.CurrentMeasurement().DisplayIdentifier($1); } + | ecu_address { scanner.CurrentMeasurement().EcuAddress($1); } + | ecu_address_extension { scanner.CurrentMeasurement().EcuAddressExtension($1); } + | error_mask { scanner.CurrentMeasurement().ErrorMask($1); } + | format { scanner.CurrentMeasurement().Format($1); } + | function_list { scanner.CurrentMeasurement().FunctionList($1); } + | if_data { scanner.CurrentMeasurement().AddIfData($1); } + | layout { scanner.CurrentMeasurement().Layout($1); } + | matrix_dim { scanner.CurrentMeasurement().MatrixDim($1); } + | max_refresh { scanner.CurrentMeasurement().MaxRefresh($1); } + | model_link { scanner.CurrentMeasurement().ModelLink($1); } + | phys_unit { scanner.CurrentMeasurement().PhysUnit($1); } + | read_write { scanner.CurrentMeasurement().ReadWrite(true); } + | ref_memory_segment { scanner.CurrentMeasurement().RefMemorySegment($1); } + | symbol_link { scanner.CurrentMeasurement().SymbolLink($1); } + | virtual { scanner.CurrentMeasurement().Virtuals($1); }; + +memory_layout: A2L_BEGIN MEMORY_LAYOUT IDENT any_uint any_uint int_list + memory_layout_attributes A2L_END MEMORY_LAYOUT { + $$.Type = StringToPrgType($3); + $$.Address = $4; + $$.Size = $5; + $$.OffsetList = $6; + }; +memory_layout_attributes: %empty {} + | memory_layout_attributes if_data { + $$ = $1; + $$.emplace(A2lHelper::ParseIfDataProtocol($2), $2); + }; + +prg_type: RESERVED {$$ = A2lSegmentType::RESERVED; } + | IDENT {$$ = StringToSegmentType($1); }; + +memory_segment: A2L_BEGIN MEMORY_SEGMENT IDENT STRING prg_type IDENT IDENT any_uint any_uint int_list + memory_segment_attributes A2L_END MEMORY_SEGMENT { + $$.Name = $3; + $$.Description = $4; + $$.SegmentType = $5; + $$.MemoryType = StringToMemoryType($6); + $$.Attribute = StringToMemoryAttribute($7); + $$.Address = $8; + $$.Size = $9; + $$.OffsetList = $10; + $$.IfDataList = $11; + }; +memory_segment_attributes: %empty {} + | memory_segment_attributes if_data { + $$ = $1; + $$.emplace(A2lHelper::ParseIfDataProtocol($2), $2); + }; +mod_common : A2L_BEGIN MOD_COMMON STRING mod_common_attributes A2L_END MOD_COMMON { + auto& common = scanner.CurrentModule().ModCommon(); + common.Comment = $3; +}; + +mod_common_attributes: %empty + | mod_common_attributes mod_common_attribute; +mod_common_attribute: alignment_byte { scanner.CurrentModule().ModCommon().AlignmentByte = $1; } + | alignment_float16_ieee { scanner.CurrentModule().ModCommon().AlignmentFloat16 = $1; } + | alignment_float32_ieee { scanner.CurrentModule().ModCommon().AlignmentFloat32 = $1; } + | alignment_float64_ieee { scanner.CurrentModule().ModCommon().AlignmentFloat64 = $1; } + | alignment_int64 { scanner.CurrentModule().ModCommon().AlignmentInt64 = $1; } + | alignment_long { scanner.CurrentModule().ModCommon().AlignmentLong = $1; } + | alignment_word { scanner.CurrentModule().ModCommon().AlignmentWord = $1; } + | byte_order { scanner.CurrentModule().ModCommon().ByteOrder = $1; } + | data_size { scanner.CurrentModule().ModCommon().DataSize = $1; } + | deposit { scanner.CurrentModule().ModCommon().Deposit = $1; } + | s_rec_layout; // Not in use anymore + +mod_par : A2L_BEGIN MOD_PAR STRING mod_par_attributes A2L_END MOD_PAR { + auto& par = scanner.CurrentModule().ModPar(); + par.Comment = $3; +}; +mod_par_attributes: %empty + | mod_par_attributes mod_par_attribute; +mod_par_attribute: addr_epk { scanner.CurrentModule().ModPar().AddressEpkList.emplace_back($1); } + | calibration_method { scanner.CurrentModule().ModPar().CalibrationMethodList.emplace_back($1); } + | cpu_type { scanner.CurrentModule().ModPar().CpuType = $1; } + | customer { scanner.CurrentModule().ModPar().Customer = $1; } + | customer_no { scanner.CurrentModule().ModPar().CustomerNo = $1; } + | ecu { scanner.CurrentModule().ModPar().Ecu = $1; } + | ecu_calibration_offset { scanner.CurrentModule().ModPar().EcuCalibrationOffset = $1; } + | epk { scanner.CurrentModule().ModPar().Epk = $1; } + | memory_layout { scanner.CurrentModule().ModPar().MemoryLayoutList.emplace_back($1); } + | memory_segment { scanner.CurrentModule().ModPar().MemorySegmentList.emplace_back($1); } + | no_of_interfaces { scanner.CurrentModule().ModPar().NoOfInterfaces = $1; } + | phone_no { scanner.CurrentModule().ModPar().PhoneNo = $1; } + | supplier { scanner.CurrentModule().ModPar().Supplier = $1; } + | system_constant { scanner.CurrentModule().ModPar().SystemConstantList.emplace($1.first, $1.second); } + | user { scanner.CurrentModule().ModPar().User = $1; } + | version { scanner.CurrentModule().ModPar().Version = $1; }; + +module: A2L_BEGIN MODULE IDENT STRING module_attributes A2L_END MODULE { + auto& module = scanner.CurrentModule(); + module.Name($3); + module.Description($4); +}; + +module_attributes: %empty + | module_attributes module_attribute; +module_attribute : a2ml { scanner.CurrentModule().A2ml($1); } + | axis_pts { + auto& module = scanner.CurrentModule(); + module.AddAxisPts(scanner.ReleaseAxisPts()); } + | blob { + auto& module = scanner.CurrentModule(); + module.AddBlob(scanner.ReleaseBlob()); } + | characteristic { + auto& module = scanner.CurrentModule(); + module.AddCharacteristic(scanner.ReleaseCharacteristic()); } + | compu_method { + auto& module = scanner.CurrentModule(); + module.AddCompuMethod(scanner.ReleaseCompuMethod()); } + | compu_tab { + auto& module = scanner.CurrentModule(); + module.AddCompuTab(scanner.ReleaseCompuTab()); } + | compu_vtab { + auto& module = scanner.CurrentModule(); + module.AddCompuVtab(scanner.ReleaseCompuVtab()); } + | compu_vtab_range { + auto& module = scanner.CurrentModule(); + module.AddCompuVtabRange(scanner.ReleaseCompuVtabRange()); } + | controller_addresses {} + | frame { + auto& module = scanner.CurrentModule(); + module.AddFrame(scanner.ReleaseFrame()); } + | function { + auto& module = scanner.CurrentModule(); + module.AddFunction(scanner.ReleaseFunction()); } + | group { + auto& module = scanner.CurrentModule(); + module.AddGroup(scanner.ReleaseGroup()); } + | if_data { + auto& module = scanner.CurrentModule(); + module.AddIfData($1); } + | instance { + auto& module = scanner.CurrentModule(); + module.AddInstance(scanner.ReleaseInstance()); } + | measurement { + auto& module = scanner.CurrentModule(); + module.AddMeasurement(scanner.ReleaseMeasurement()); } + | mod_common + | mod_par + | record_layout { + auto& module = scanner.CurrentModule(); + module.AddRecordLayout(scanner.ReleaseRecordLayout()); } + | transformer { + auto& module = scanner.CurrentModule(); + module.AddTransformer(scanner.ReleaseTransformer()); } + | typedef_axis { + auto& module = scanner.CurrentModule(); + module.AddTypedefAxis(scanner.ReleaseTypedefAxis()); } + | typedef_blob { + auto& module = scanner.CurrentModule(); + module.AddTypedefBlob(scanner.ReleaseTypedefBlob()); } + | typedef_characteristic { + auto& module = scanner.CurrentModule(); + module.AddTypedefCharacteristic(scanner.ReleaseTypedefCharacteristic()); } + | typedef_measurement { + auto& module = scanner.CurrentModule(); + module.AddTypedefMeasurement(scanner.ReleaseTypedefMeasurement()); } + | typedef_structure { + auto& module = scanner.CurrentModule(); + module.AddTypedefStructure(scanner.ReleaseTypedefStructure()); } + | unit { + auto& module = scanner.CurrentModule(); + module.AddUnit(scanner.ReleaseUnit()); } + | user_rights { + auto& module = scanner.CurrentModule(); + module.AddUserRight(scanner.ReleaseUserRight()); } + | variant_coding; + +out_measurement: A2L_BEGIN OUT_MEASUREMENT ident_list A2L_END OUT_MEASUREMENT { $$ = $3; }; + +overwrite: A2L_BEGIN OVERWRITE IDENT any_uint overwrite_attributes A2L_END OVERWRITE { + auto& overwrite = scanner.CurrentOverwrite(); + overwrite.Name($3); + overwrite.AxisNo($4); +}; +overwrite_attributes: %empty + | overwrite_attributes overwrite_attribute; +overwrite_attribute: conversion { scanner.CurrentOverwrite().Conversion($1); } + | extended_limits { scanner.CurrentOverwrite().ExtendedLimits($1); } + | format { scanner.CurrentOverwrite().Format($1); } + | input_quantity { scanner.CurrentOverwrite().InputQuantity($1); } + | limits { + scanner.CurrentOverwrite().LowerLimit($1.LowerLimit); + scanner.CurrentOverwrite().UpperLimit($1.UpperLimit); + } + | monotony { scanner.CurrentOverwrite().Monotony($1); } + | phys_unit { scanner.CurrentOverwrite().PhysUnit($1); }; + +project: A2L_BEGIN PROJECT IDENT STRING project_attributes A2L_END PROJECT { + auto& project = file.Project(); + project.Name($3); + project.Description($4); +}; + +project_attributes : project_attribute + | project_attributes project_attribute; + +project_attribute: header + | module { + auto& project = file.Project(); + project.AddModule(scanner.ReleaseModule()); + }; + +record_layout: A2L_BEGIN RECORD_LAYOUT IDENT record_layout_attributes A2L_END RECORD_LAYOUT { + auto& rec = scanner.CurrentRecordLayout(); + rec.Name($3); +}; +record_layout_attributes: %empty + | record_layout_attributes record_layout_attribute; +record_layout_attribute: alignment_byte { scanner.CurrentRecordLayout().AlignmentByte($1); } + | alignment_float16_ieee { scanner.CurrentRecordLayout().AlignmentFloat16($1); } + | alignment_float32_ieee { scanner.CurrentRecordLayout().AlignmentFloat32($1); } + | alignment_float64_ieee { scanner.CurrentRecordLayout().AlignmentFloat64($1); } + | alignment_int64 { scanner.CurrentRecordLayout().AlignmentInt64($1); } + | alignment_long { scanner.CurrentRecordLayout().AlignmentLong($1); } + | alignment_word { scanner.CurrentRecordLayout().AlignmentWord($1); } + | axis_pts_x { scanner.CurrentRecordLayout().AxisPtsX($1); } + | axis_pts_y { scanner.CurrentRecordLayout().AxisPtsY($1); } + | axis_pts_z { scanner.CurrentRecordLayout().AxisPtsZ($1); } + | axis_pts_4 { scanner.CurrentRecordLayout().AxisPts4($1); } + | axis_pts_5 { scanner.CurrentRecordLayout().AxisPts5($1); } + | axis_rescale_x { scanner.CurrentRecordLayout().AxisRescaleX($1); } + | dist_op_x { scanner.CurrentRecordLayout().DistOpX($1); } + | dist_op_y { scanner.CurrentRecordLayout().DistOpY($1); } + | dist_op_z { scanner.CurrentRecordLayout().DistOpZ($1); } + | dist_op_4 { scanner.CurrentRecordLayout().DistOp4($1); } + | dist_op_5 { scanner.CurrentRecordLayout().DistOp5($1); } + | fix_no_axis_pts_x { scanner.CurrentRecordLayout().FixNoAxisPtsX($1); } + | fix_no_axis_pts_y { scanner.CurrentRecordLayout().FixNoAxisPtsY($1); } + | fix_no_axis_pts_z { scanner.CurrentRecordLayout().FixNoAxisPtsZ($1); } + | fix_no_axis_pts_4 { scanner.CurrentRecordLayout().FixNoAxisPts4($1); } + | fix_no_axis_pts_5 { scanner.CurrentRecordLayout().FixNoAxisPts5($1); } + | fnc_values { scanner.CurrentRecordLayout().FncValues($1); } + | identification { scanner.CurrentRecordLayout().Identification($1); } + | no_axis_pts_x { scanner.CurrentRecordLayout().NoAxisPtsX($1); } + | no_axis_pts_y { scanner.CurrentRecordLayout().NoAxisPtsY($1); } + | no_axis_pts_z { scanner.CurrentRecordLayout().NoAxisPtsZ($1); } + | no_axis_pts_4 { scanner.CurrentRecordLayout().NoAxisPts4($1); } + | no_axis_pts_5 { scanner.CurrentRecordLayout().NoAxisPts5($1); } + | no_rescale_x { scanner.CurrentRecordLayout().NoRescaleX($1); } + | offset_x { scanner.CurrentRecordLayout().OffsetX($1); } + | offset_y { scanner.CurrentRecordLayout().OffsetY($1); } + | offset_z { scanner.CurrentRecordLayout().OffsetZ($1); } + | offset_4 { scanner.CurrentRecordLayout().Offset4($1); } + | offset_5 { scanner.CurrentRecordLayout().Offset5($1); } + | reserved { scanner.CurrentRecordLayout().AddReserved($1); } + | rip_addr_w { scanner.CurrentRecordLayout().RipAddrW($1); } + | rip_addr_x { scanner.CurrentRecordLayout().RipAddrX($1); } + | rip_addr_y { scanner.CurrentRecordLayout().RipAddrY($1); } + | rip_addr_z { scanner.CurrentRecordLayout().RipAddrZ($1); } + | rip_addr_4 { scanner.CurrentRecordLayout().RipAddr4($1); } + | rip_addr_5 { scanner.CurrentRecordLayout().RipAddr5($1); } + | src_addr_x { scanner.CurrentRecordLayout().SrcAddrX($1); } + | src_addr_y { scanner.CurrentRecordLayout().SrcAddrY($1); } + | src_addr_z { scanner.CurrentRecordLayout().SrcAddrZ($1); } + | src_addr_4 { scanner.CurrentRecordLayout().SrcAddr4($1); } + | src_addr_5 { scanner.CurrentRecordLayout().SrcAddr5($1); } + | shift_op_x { scanner.CurrentRecordLayout().ShiftOpX($1); } + | shift_op_y { scanner.CurrentRecordLayout().ShiftOpY($1); } + | shift_op_z { scanner.CurrentRecordLayout().ShiftOpZ($1); } + | shift_op_4 { scanner.CurrentRecordLayout().ShiftOp4($1); } + | shift_op_5 { scanner.CurrentRecordLayout().ShiftOp5($1); } + | static_address_offsets { scanner.CurrentRecordLayout().StaticAddressOffsets(true); } + | static_record_layout { scanner.CurrentRecordLayout().StaticRecordLayout(true); }; + +ref_characteristic: A2L_BEGIN REF_CHARACTERISTIC ident_list A2L_END REF_CHARACTERISTIC { $$ = $3; }; +ref_group: A2L_BEGIN REF_GROUP ident_list A2L_END REF_GROUP { $$ = $3; }; +ref_measurement: A2L_BEGIN REF_MEASUREMENT ident_list A2L_END REF_MEASUREMENT { $$ = $3; }; + +structure_component: A2L_BEGIN STRUCTURE_COMPONENT IDENT IDENT any_uint + structure_component_attributes A2L_END STRUCTURE_COMPONENT { + auto& structure = scanner.CurrentStructureComponent(); + structure.Name = $3; + structure.Typedef = $4; + structure.AddressOffset = $5; + }; +structure_component_attributes: %empty + | structure_component_attributes structure_component_attribute; +structure_component_attribute: address_type { scanner.CurrentStructureComponent().AddressType = $1; } + | layout { scanner.CurrentStructureComponent().Layout = $1; } + | matrix_dim { scanner.CurrentStructureComponent().MatrixDim = $1; } + | symbol_type_link { scanner.CurrentStructureComponent().SymbolTypeLink = $1; }; + +sub_function: A2L_BEGIN SUB_FUNCTION ident_list A2L_END SUB_FUNCTION { $$ = $3; }; +sub_group: A2L_BEGIN SUB_GROUP ident_list A2L_END SUB_GROUP { $$ = $3; }; + +transformer: A2L_BEGIN TRANSFORMER IDENT STRING STRING STRING any_uint IDENT IDENT + transformer_attributes A2L_END TRANSFORMER { + auto& transformer = scanner.CurrentTransformer(); + transformer.Name($3); + transformer.Version($4); + transformer.Executable32($5); + transformer.Executable64($6); + transformer.Timeout($7); + transformer.Trigger(StringToTrigger($8)); + transformer.InverseTransformer($9); + }; +transformer_attributes: %empty + | transformer_attributes transformer_attribute; +transformer_attribute: transformer_in_objects { scanner.CurrentTransformer().TransformerInObjects($1); } + | transformer_out_objects { scanner.CurrentTransformer().TransformerOutObjects($1); } ; + +transformer_in_objects: A2L_BEGIN TRANSFORMER_IN_OBJECTS ident_list A2L_END TRANSFORMER_IN_OBJECTS { $$ = $3; }; +transformer_out_objects: A2L_BEGIN TRANSFORMER_OUT_OBJECTS ident_list A2L_END TRANSFORMER_OUT_OBJECTS { $$ = $3; }; + +typedef_axis: A2L_BEGIN TYPEDEF_AXIS IDENT STRING IDENT IDENT any_float IDENT any_uint any_float any_float + typedef_axis_attributes A2L_END TYPEDEF_AXIS { + auto& pts = scanner.CurrentTypedefAxis(); + pts.Name($3); + pts.Description($4); + pts.InputQuantity($5); + pts.RefRecord($6); + pts.MaxDiff($7); + pts.Conversion($8); + pts.MaxAxisPoints($9); + pts.LowerLimit($10); + pts.UpperLimit($11); + }; +typedef_axis_attributes: %empty + | typedef_axis_attributes typedef_axis_attribute; +typedef_axis_attribute: byte_order { scanner.CurrentTypedefAxis().ByteOrder($1); } + | deposit { scanner.CurrentTypedefAxis().Deposit($1); } + | extended_limits { scanner.CurrentTypedefAxis().ExtendedLimits($1); } + | format { scanner.CurrentTypedefAxis().Format($1); } + | monotony { scanner.CurrentTypedefAxis().Monotony($1); } + | phys_unit { scanner.CurrentTypedefAxis().PhysUnit($1); } + | step_size { scanner.CurrentTypedefAxis().StepSize($1); }; + +typedef_blob: A2L_BEGIN TYPEDEF_BLOB IDENT STRING any_uint typedef_blob_attributes A2L_END TYPEDEF_BLOB { + auto& blob = scanner.CurrentTypedefBlob(); + blob.Name($3); + blob.Description($4); + blob.Size($5); + }; +typedef_blob_attributes: %empty + | typedef_blob_attributes typedef_blob_attribute; +typedef_blob_attribute: address_type { scanner.CurrentTypedefBlob().AddressType($1); }; + +typedef_characteristic: A2L_BEGIN TYPEDEF_CHARACTERISTIC IDENT STRING IDENT IDENT any_float IDENT any_float any_float + typedef_characteristic_attributes A2L_END TYPEDEF_CHARACTERISTIC { + auto& object = scanner.CurrentTypedefCharacteristic(); + object.Name($3); + object.Description($4); + object.Type(StringToCharacteristicType($5)); + object.Deposit($6); + object.MaxDiff($7); + object.Conversion($8); + object.LowerLimit($9); + object.UpperLimit($10); + }; +typedef_characteristic_attributes: %empty + | typedef_characteristic_attributes typedef_characteristic_attribute; +typedef_characteristic_attribute: axis_descr { + auto& object = scanner.CurrentTypedefCharacteristic(); + object.AddAxisDescr(scanner.ReleaseAxisDescr()); + } + | bit_mask { scanner.CurrentTypedefCharacteristic().BitMask($1); } + | byte_order { scanner.CurrentTypedefCharacteristic().ByteOrder($1); } + | discrete { scanner.CurrentTypedefCharacteristic().Discrete(true); } + | encoding { scanner.CurrentTypedefCharacteristic().Encoding($1); } + | extended_limits { scanner.CurrentTypedefCharacteristic().ExtendedLimits($1); } + | format { scanner.CurrentTypedefCharacteristic().Format($1); } + | matrix_dim { scanner.CurrentTypedefCharacteristic().MatrixDim($1); } + | number { scanner.CurrentTypedefCharacteristic().Number($1); } + | phys_unit { scanner.CurrentTypedefCharacteristic().PhysUnit($1); } + | step_size { scanner.CurrentTypedefCharacteristic().StepSize($1); }; + +typedef_measurement: A2L_BEGIN TYPEDEF_MEASUREMENT IDENT STRING IDENT IDENT UINT any_float any_float any_float + typedef_measurement_attributes A2L_END TYPEDEF_MEASUREMENT { + auto& meas = scanner.CurrentTypedefMeasurement(); + meas.Name($3); + meas.Description($4); + meas.DataType(StringToDataType($5)); + meas.Conversion($6); + meas.Resolution($7); + meas.Accuracy($8); + meas.LowerLimit($9); + meas.UpperLimit($10); + }; +typedef_measurement_attributes: %empty + | typedef_measurement_attributes typedef_measurement_attribute; +typedef_measurement_attribute: address_type { scanner.CurrentTypedefMeasurement().AddressType($1); } + | bit_mask { scanner.CurrentTypedefMeasurement().BitMask($1); } + | bit_operation { scanner.CurrentTypedefMeasurement().BitOperation($1); } + | byte_order { scanner.CurrentTypedefMeasurement().ByteOrder($1); } + | discrete { scanner.CurrentTypedefMeasurement().Discrete(true); } + | error_mask { scanner.CurrentTypedefMeasurement().ErrorMask($1); } + | format { scanner.CurrentTypedefMeasurement().Format($1); } + | layout { scanner.CurrentTypedefMeasurement().Layout($1); } + | matrix_dim { scanner.CurrentTypedefMeasurement().MatrixDim($1); } + | phys_unit { scanner.CurrentTypedefMeasurement().PhysUnit($1); }; + +typedef_structure: A2L_BEGIN TYPEDEF_STRUCTURE IDENT STRING UINT + typedef_structure_attributes A2L_END TYPEDEF_STRUCTURE { + auto& structure = scanner.CurrentTypedefStructure(); + structure.Name($3); + structure.Description($4); + structure.Size($5); + }; +typedef_structure_attributes: %empty + | typedef_structure_attributes typedef_structure_attribute; +typedef_structure_attribute: address_type { scanner.CurrentTypedefStructure().AddressType($1); } + | consistent_exchange{ scanner.CurrentTypedefStructure().ConsistentExchange(true); } + | structure_component{ + auto& structure = scanner.CurrentTypedefStructure(); + structure.AddStructureComponent(scanner.ReleaseStructureComponent()); } + | symbol_type_link{ scanner.CurrentTypedefStructure().SymbolTypeLink($1); }; + +unit: A2L_BEGIN UNIT IDENT STRING STRING IDENT unit_attributes A2L_END UNIT { + auto& unit = scanner.CurrentUnit(); + unit.Name($3); + unit.Description($4); + unit.DisplayIdentifier($5); + unit.Type(StringToUnitType($6)); + }; +unit_attributes: %empty + | unit_attributes unit_attribute; +unit_attribute: ref_unit { scanner.CurrentUnit().RefUnit($1); } + | si_exponents { scanner.CurrentUnit().SiExponents($1); } + | unit_conversion { + scanner.CurrentUnit().Gradient($1.first); + scanner.CurrentUnit().Offset($1.second); + }; + +user_rights: A2L_BEGIN USER_RIGHTS IDENT user_rights_attributes A2L_END USER_RIGHTS { + auto& user_right = scanner.CurrentUserRight(); + user_right.UserLevelId = $3; + }; +user_rights_attributes: %empty + | user_rights_attributes user_rights_attribute; +user_rights_attribute: read_only { scanner.CurrentUserRight().ReadOnly = true; } + | ref_group { scanner.CurrentUserRight().RefGroupList.emplace_back($1); } ; + +var_address: A2L_BEGIN VAR_ADDRESS uint_list A2L_END VAR_ADDRESS { $$ = $3; }; + +var_characteristic: A2L_BEGIN VAR_CHARACTERISTIC IDENT ident_list + var_characteristic_attribute A2L_END VAR_CHARACTERISTIC { + $$.Name = $3; + $$.CriterionNameList = $4; + $$.AddressList = $5; + }; +var_characteristic_attribute: %empty {} + | var_address { $$ = $1; }; + +var_criterion: A2L_BEGIN VAR_CRITERION IDENT STRING var_criterion_attributes A2L_END VAR_CRITERION { + $$ = scanner.VarCriterion(); + scanner.VarCriterion() = {}; + $$.Name = $3; + $$.Description = $4; +}; + +var_criterion_attributes: %empty + | var_criterion_attributes var_criterion_attribute; +var_criterion_attribute: var_measurement { scanner.VarCriterion().Measurement = $1; } + | var_selection_characteristic { scanner.VarCriterion().SelectionCharacteristic = $1; }; + +var_forbidden_comb: A2L_BEGIN VAR_FORBIDDEN_COMB key_value_list A2L_END VAR_FORBIDDEN_COMB { $$= $3; }; + +variant_coding: A2L_BEGIN VARIANT_CODING variant_coding_attributes A2L_END VARIANT_CODING; +variant_coding_attributes: %empty + | variant_coding_attributes variant_coding_attribute; +variant_coding_attribute: var_characteristic { + auto& coding = scanner.CurrentModule().VariantCoding(); + coding.CharacteristicList.emplace($1.Name, $1); + } + | var_criterion{ + auto& coding = scanner.CurrentModule().VariantCoding(); + coding.CriterionList.emplace($1.Name, $1); + } + | var_forbidden_comb{ + auto& coding = scanner.CurrentModule().VariantCoding(); + coding.ForbiddenCombList.emplace_back($1); + } + | var_naming{ + auto& coding = scanner.CurrentModule().VariantCoding(); + coding.Naming = $1; + } + | var_separator{ + auto& coding = scanner.CurrentModule().VariantCoding(); + coding.Separator = $1; + }; + +virtual: A2L_BEGIN VIRTUAL ident_list A2L_END VIRTUAL { $$ = $3; }; +virtual_characteristic: A2L_BEGIN VIRTUAL_CHARACTERISTIC STRING + ident_list A2L_END VIRTUAL_CHARACTERISTIC {$$ = {$3, $4}; }; + + +a2ml : A2ML { $$ = $1; }; +a2ml_version: A2ML_VERSION any_uint any_uint { + file.A2mlVersion().VersionNo = $2; + file.A2mlVersion().VersionNo = $3; +}; + +asap2_version : ASAP2_VERSION any_uint any_uint { + file.A2lVersion().VersionNo = $2; + file.A2lVersion().UpgradeNo = $3; +} | ASAP2_VERSION STRING { + file.A2lVersion().FromString($2); +}; + +addr_epk: ADDR_EPK any_uint { $$ = $2; }; +address_type: ADDRESS_TYPE IDENT {$$ = StringToAddressType($2); }; +alignment_byte: ALIGNMENT_BYTE any_uint { $$ = $2; }; +alignment_float16_ieee: ALIGNMENT_FLOAT16_IEEE any_uint { $$ = $2; }; +alignment_float32_ieee: ALIGNMENT_FLOAT32_IEEE any_uint { $$ = $2; }; +alignment_float64_ieee: ALIGNMENT_FLOAT64_IEEE any_uint { $$ = $2; }; +alignment_int64: ALIGNMENT_INT64 any_uint { $$ = $2; }; +alignment_long: ALIGNMENT_LONG any_uint { $$ = $2; }; +alignment_word: ALIGNMENT_WORD any_uint { $$ = $2; }; +annotation_label: ANNOTATION_LABEL STRING { $$ = $2; }; +annotation_origin: ANNOTATION_ORIGIN STRING { $$ = $2; }; +array_size: ARRAY_SIZE any_uint { $$ = $2; }; +ar_prototype_of: AR_PROTOTYPE_OF IDENT {$$ = $2;}; +axis_pts_ref: AXIS_PTS_REF IDENT { $$ = $2; }; +axis_pts_x: AXIS_PTS_X any_uint IDENT IDENT IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + $$.IndexOrder = StringToIndexOrder($4); + $$.AddressType = StringToAddressType($5); + }; +axis_pts_y: AXIS_PTS_Y any_uint IDENT IDENT IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + $$.IndexOrder = StringToIndexOrder($4); + $$.AddressType = StringToAddressType($5); + }; +axis_pts_z: AXIS_PTS_Z any_uint IDENT IDENT IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + $$.IndexOrder = StringToIndexOrder($4); + $$.AddressType = StringToAddressType($5); + }; +axis_pts_4: AXIS_PTS_4 any_uint IDENT IDENT IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + $$.IndexOrder = StringToIndexOrder($4); + $$.AddressType = StringToAddressType($5); + }; +axis_pts_5: AXIS_PTS_5 any_uint IDENT IDENT IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + $$.IndexOrder = StringToIndexOrder($4); + $$.AddressType = StringToAddressType($5); + }; +axis_rescale_x: AXIS_RESCALE_X any_uint IDENT any_uint IDENT IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + $$.MaxNoRescalePairs = $4; + $$.IndexOrder = StringToIndexOrder($5); + $$.AddressType = StringToAddressType($6); + }; +bit_mask: BIT_MASK any_uint { $$ = $2; }; +byte_order: A2L_BYTE_ORDER IDENT { $$ = StringToByteOrder($2); }; +calibration_access: CALIBRATION_ACCESS IDENT { $$ = StringToCalibrationAccess($2); }; +calibration_handle_text: CALIBRATION_HANDLE_TEXT STRING { $$ = $2; }; +coeffs: COEFFS any_float any_float any_float any_float any_float any_float { + std::vector list; + list.push_back($2); + list.push_back($3); + list.push_back($4); + list.push_back($5); + list.push_back($6); + list.push_back($7); + $$ = list; +}; +coeffs_linear: COEFFS_LINEAR any_float any_float { + std::vector list; + list.push_back($2); + list.push_back($3); + $$ = list; +}; +comparison_quantity: COMPARISON_QUANTITY IDENT { $$ = $2; }; +compu_tab_ref: COMPU_TAB_REF IDENT { $$ = $2; }; +consistent_exchange: CONSISTENT_EXCHANGE; +conversion: CONVERSION IDENT { $$ = $2; }; +cpu_type: CPU_TYPE STRING { $$ = $2; }; +curve_axis_ref: CURVE_AXIS_REF IDENT { $$ = $2; }; +customer: CUSTOMER STRING { $$ = $2; }; +customer_no: CUSTOMER_NO STRING { $$ = $2; }; +data_size: DATA_SIZE any_uint { $$ = $2; }; +default_value: DEFAULT_VALUE STRING { $$ = $2; }; +default_value_numeric: DEFAULT_VALUE_NUMERIC any_float { $$ = $2; }; +deposit: DEPOSIT IDENT { $$ = StringToDeposit($2); }; +discrete: DISCRETE; +display_identifier: DISPLAY_IDENTIFIER IDENT { $$ = $2; } + | A2L_BEGIN DISPLAY_IDENTIFIER IDENT A2L_END DISPLAY_IDENTIFIER {$$ = $3;}; +dist_op_x: DIST_OP_X any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + }; +dist_op_y: DIST_OP_Y any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + }; +dist_op_z: DIST_OP_Z any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + }; +dist_op_4: DIST_OP_4 any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + }; +dist_op_5: DIST_OP_5 any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + }; +ecu: ECU STRING { $$ = $2; }; +ecu_address: ECU_ADDRESS any_uint { $$ = $2; }; +ecu_address_extension: ECU_ADDRESS_EXTENSION any_int { $$ = $2; }; +ecu_calibration_offset: ECU_CALIBRATION_OFFSET any_int { $$ = $2; }; +encoding: ENCODING IDENT { $$ = StringToEncoding($2); }; +epk: EPK STRING { $$ = $2; }; +error_mask: ERROR_MASK any_uint { $$ = $2; }; +extended_limits: EXTENDED_LIMITS any_float any_float { $$ = A2lExtendedLimits($2,$3); }; +fix_axis_par: FIX_AXIS_PAR any_float any_float any_uint { $$ = {$2, $3, $4}; }; +fix_axis_par_dist: FIX_AXIS_PAR_DIST any_float any_float any_uint { $$ = {$2, $3, $4}; }; +fix_no_axis_pts_x: FIX_NO_AXIS_PTS_X any_uint { $$ = $2; }; +fix_no_axis_pts_y: FIX_NO_AXIS_PTS_Y any_uint { $$ = $2; }; +fix_no_axis_pts_z: FIX_NO_AXIS_PTS_Z any_uint { $$ = $2; }; +fix_no_axis_pts_4: FIX_NO_AXIS_PTS_4 any_uint { $$ = $2; }; +fix_no_axis_pts_5: FIX_NO_AXIS_PTS_5 any_uint { $$ = $2; }; +fnc_values: FNC_VALUES any_uint IDENT IDENT IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + $$.IndexMode = StringToIndexMode($4); + $$.AddressType = StringToAddressType($5); +}; +format: FORMAT STRING { $$ = $2; }; +formula_inv: FORMULA_INV STRING { $$ = $2; }; +frame_measurement: FRAME_MEASUREMENT ident_list { $$ = $2; }; +function_version: FUNCTION_VERSION STRING { $$ = $2; }; +guard_rails: GUARD_RAILS; +identification: IDENTIFICATION any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); +}; +if_data : IF_DATA; +input_quantity: INPUT_QUANTITY IDENT { $$ = $2; }; +layout: LAYOUT IDENT {$$ = StringToLayout($2); }; +left_shift: LEFT_SHIFT any_uint { $$ = $2; }; +limits: LIMITS any_float any_float { $$ = {$2,$3}; }; +matrix_dim: MATRIX_DIM uint_list { $$ = $2; } +max_grad: MAX_GRAD any_float { $$ = $2; } +max_refresh: MAX_REFRESH any_uint any_uint { $$ = {$2,$3}; }; +model_link: MODEL_LINK STRING { $$ = $2; }; +monotony: MONOTONY IDENT { $$ = StringToMonotony($2); }; +no_axis_pts_x: NO_AXIS_PTS_X any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + }; +no_axis_pts_y: NO_AXIS_PTS_Y any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + }; +no_axis_pts_z: NO_AXIS_PTS_Z any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + }; +no_axis_pts_4: NO_AXIS_PTS_4 any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + }; +no_axis_pts_5: NO_AXIS_PTS_5 any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + }; +no_of_interfaces: NO_OF_INTERFACES any_uint { $$ = $2; }; +no_rescale_x: NO_RESCALE_X any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + }; +number: NUMBER any_uint { $$ = $2; }; +offset_x: OFFSET_X any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + }; +offset_y: OFFSET_Y any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + }; +offset_z: OFFSET_Z any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + }; +offset_4: OFFSET_4 any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + }; +offset_5: OFFSET_5 any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + }; +phone_no: PHONE_NO STRING { $$ = $2; }; +phys_unit: PHYS_UNIT STRING { $$ = $2; }; +proj_no: IDENT {$$ = $1;} + | UINT {$$ = std::to_string($1);}; /* Fix so the number may be a number as well */ +project_no: PROJECT_NO proj_no { $$ = $2;}; + +read_only: READ_ONLY; +read_write: READ_WRITE; +ref_memory_segment: REF_MEMORY_SEGMENT IDENT { $$ = $2; }; +ref_unit: REF_UNIT IDENT { $$ = $2; }; +reserved: RESERVED any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + }; +right_shift: RIGHT_SHIFT any_uint { $$ = $2; }; +rip_addr_w: RIP_ADDR_W any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + }; +rip_addr_x: RIP_ADDR_X any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + }; +rip_addr_y: RIP_ADDR_Y any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + }; +rip_addr_z: RIP_ADDR_Z any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + }; +rip_addr_4: RIP_ADDR_4 any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + }; +rip_addr_5: RIP_ADDR_5 any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + }; +root: ROOT; +s_rec_layout: S_REC_LAYOUT IDENT; +shift_op_x: SHIFT_OP_X any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + }; +shift_op_y: SHIFT_OP_Y any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + }; +shift_op_z: SHIFT_OP_Z any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + }; +shift_op_4: SHIFT_OP_4 any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + }; +shift_op_5: SHIFT_OP_5 any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + }; +sign_extend: SIGN_EXTEND; +si_exponents: SI_EXPONENTS any_int any_int any_int any_int any_int any_int any_int { + $$.Length = $2; + $$.Mass = $3; + $$.Time = $4; + $$.ElectricCurrent = $5; + $$.Temperature = $6; + $$.AmountOfSubstance = $7; + $$.LuminousIntensity = $8; +}; +src_addr_x: SRC_ADDR_X any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + }; +src_addr_y: SRC_ADDR_Y any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + }; +src_addr_z: SRC_ADDR_Z any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + }; +src_addr_4: SRC_ADDR_4 any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + }; +src_addr_5: SRC_ADDR_5 any_uint IDENT { + $$.Position = $2; + $$.DataType = StringToDataType($3); + }; +static_address_offsets: STATIC_ADDRESS_OFFSETS; +static_record_layout: STATIC_RECORD_LAYOUT; +status_string_ref: STATUS_STRING_REF IDENT { $$ = $2;}; +step_size: STEP_SIZE any_float { $$ = $2; }; +supplier: SUPPLIER STRING { $$ = $2;}; +symbol_link: SYMBOL_LINK STRING any_int { $$ = {$2,$3}; }; +symbol_type_link: SYMBOL_TYPE_LINK STRING { $$ = $2;}; +system_constant: SYSTEM_CONSTANT STRING STRING { $$ = {$2,$3};}; +unit_conversion: UNIT_CONVERSION any_float any_float { $$ = {$2,$3};}; +user: USER STRING { $$ = $2;}; +var_measurement: VAR_MEASUREMENT IDENT { $$ = $2; }; +var_naming: VAR_NAMING IDENT { $$ = $2; }; +var_selection_characteristic: VAR_SELECTION_CHARACTERISTIC IDENT { $$ = $2; }; +var_separator: VAR_SEPARATOR STRING { $$ = $2; }; +version: A2L_VERSION STRING { $$ = $2;}; + +%% + +void a2l::A2lParser::error(const std::string& err) { + const auto line = scanner.lineno(); + // const auto column = scanner.YYLeng(); + const std::string near = scanner.YYText() != nullptr ? scanner.YYText() : ""; + std::ostringstream error; + error << "Parser error: " << err + << ", Line: " << line + << ", Near: " << near; + scanner.LastError(error.str()); +} diff --git a/a2llib-main/src/a2lproject.cpp b/a2llib-main/src/a2lproject.cpp new file mode 100644 index 0000000..d2fa1a5 --- /dev/null +++ b/a2llib-main/src/a2lproject.cpp @@ -0,0 +1,14 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#include "a2l/a2lproject.h" + +namespace a2l { + +void A2lProject::AddModule(std::unique_ptr& module) { + module_list_.emplace(module->Name(), std::move(module)); +} + +} // namespace a2l \ No newline at end of file diff --git a/a2llib-main/src/a2lscanner.cpp b/a2llib-main/src/a2lscanner.cpp new file mode 100644 index 0000000..fa96fa3 --- /dev/null +++ b/a2llib-main/src/a2lscanner.cpp @@ -0,0 +1,523 @@ +/* + * Copyright 2023 Ingemar Hedvall + * SPDX-License-Identifier: MIT + */ + +#include "a2lscanner.h" +#include +#include +#include +#include +#include +#include +#include "a2l/a2lfile.h" +#include "a2lhelper.h" + +using namespace std::filesystem; +using namespace boost::locale; +using namespace boost::endian; + +namespace { + +constexpr std::array BomList = { + std::string_view("\x00\x00\xFE\xFF",4), + std::string_view("\xFF\xFE\x00\x00",4), + std::string_view("\xFE\xFF",2), + std::string_view("\xFF\xFE",2), + std::string_view("\xEF\xBB\xBF", 3) +}; + +enum class FileEncoding : int { + UTF32_BE = 0, + UTF32_LE, + UTF16_BE, + UTF16_LE, + UTF8, + ASCII +}; + +} + +namespace a2l { + +A2lScanner::A2lScanner(std::istringstream& message) + : a2lFlexLexer(&message), yylval(nullptr) { + // I add a dummy file item onto the stack. This item is used to store + // the current stack state pointer in case of an include file. + file_stack_.emplace_back(""); +} + +void A2lScanner::ReadAndConvertFile(const std::string& filename, std::istringstream& utf8_stream) { + const std::u8string file_utf8 = + reinterpret_cast(filename.c_str()); + const path file_path(file_utf8); + + // Check if the file exist + if (!exists(file_path)) { + std::ostringstream error; + error << "The file doesn't exist. File: " << filename; + throw std::runtime_error(error.str()); + } + + // Check file size + const auto size = file_size(file_path); + if (size <= 4) { + std::ostringstream error; + error << "The file is empty. File: " << filename; + throw std::runtime_error(error.str()); + } + + std::string temp_buffer; + std::ifstream file(file_path, std::ios::binary | std::ios::in); + auto itr = std::istreambuf_iterator(file); + auto end = std::istreambuf_iterator(); + temp_buffer.append(itr, end); + file.close(); + + auto encoding = FileEncoding::ASCII; + int enc = 0; + for (const auto& bom : BomList) { + if (temp_buffer.compare(0,bom.length(), bom) == 0) { + encoding = static_cast(enc); + temp_buffer = temp_buffer.substr(bom.length()); + break; + } + ++enc; + } + + switch (encoding) { + case FileEncoding::UTF32_BE:{ + const auto size32 = temp_buffer.length() / 4; + std::u32string temp32(size32, 0); + for (size_t index = 0; index < size32; ++index) { + const auto input = + static_cast(static_cast(temp_buffer[index * 4])); + temp32[index] = big_to_native(input); + } + utf8_stream.str( conv::to_utf(temp_buffer,"UTF-32")); + break; + } + + case FileEncoding::UTF32_LE:{ + const auto size32 = temp_buffer.length() / 4; + std::u32string temp32(size32, 0); + for (size_t index = 0; index < size32; ++index) { + const auto input = + static_cast(static_cast(temp_buffer[index * 4])); + temp32[index] = little_to_native(input); + } + utf8_stream.str( conv::to_utf(temp_buffer,"UTF-32")); + break; + } + + case FileEncoding::UTF16_BE:{ + const auto size16 = temp_buffer.length() / 2; + std::u16string temp16(size16, 0); + for (size_t index = 0; index < size16; ++index) { + const auto input = + static_cast(static_cast(temp_buffer[index * 2])); + temp16[index] = big_to_native(input); + } + utf8_stream.str( conv::to_utf(temp_buffer,"UTF-16") ); + break; + } + + case FileEncoding::UTF16_LE:{ + const auto size16 = temp_buffer.length() / 2; + std::u16string temp16(size16, 0); + for (size_t index = 0; index < size16; ++index) { + const auto input = + static_cast(static_cast(temp_buffer[index * 2])); + temp16[index] = little_to_native(input); + } + utf8_stream.str(conv::to_utf(temp_buffer,"UTF-16")); + break; + } + + case FileEncoding::ASCII: + utf8_stream.str(conv::to_utf(temp_buffer,"ISO-8859-1")); + break; + + case FileEncoding::UTF8: + default: + utf8_stream.str(temp_buffer); + break; + } + +} + +std::string A2lScanner::ReadA2ML() { + std::ostringstream a2ml_text; + a2ml_text << yytext; + + std::string match; + constexpr std::string_view end_a2ml = "/endA2ML"; + for (auto data = yyinput(); data != '\0'; data = yyinput()) { + a2ml_text << static_cast(data); + if (std::isspace(data)) { + continue; + } + match.push_back(static_cast(data)); + if (match == end_a2ml) { + break; + } + while (match.size() >= end_a2ml.size()) { + match.erase(0,1); + } + } + return a2ml_text.str(); +} + +std::string A2lScanner::ReadIfData() { + std::ostringstream if_data_text; + if_data_text << yytext; + + std::string match; + constexpr std::string_view end_if_data = "/endIF_DATA"; + for (auto data = yyinput(); data != '\0'; data = yyinput()) { + if_data_text << static_cast(data); + if (std::isspace(data)) { + continue; + } + match.push_back(static_cast(data)); + if (match == end_if_data) { + break; + } + while (match.size() >= end_if_data.size()) { + match.erase(0,1); + } + } + return if_data_text.str(); +} + +std::string A2lScanner::ReadIfDataSingleLine() { + std::ostringstream if_data_text; + if_data_text << "/begin " << yytext; + + constexpr std::string_view end_if_data = "/endIF_DATA"; + for (auto data = yyinput(); + data != '\0' && data != '\n' && data != '\r'; + data = yyinput()) { + if_data_text << static_cast(data); + } + if_data_text << " " << end_if_data; + return if_data_text.str(); +} + +std::string A2lScanner::ReadIfDataMultiLine() { + std::ostringstream if_data_text; + if_data_text << "/begin IF_DATA"; + + constexpr std::string_view end_if_data = "/endIF_DATA"; + int state = 0; // The state becomes -1 at end of string + for (auto data = yyinput(); data != '\0'; data = yyinput()) { + switch (data) { + case '{': + ++state; + break; + case '}': + --state; + break; + default: + break; + } + if (state < 0) { + break; + } + if_data_text << static_cast(data); + } + if_data_text << " " << end_if_data; + return if_data_text.str(); +} + +void A2lScanner::SkipUntil(char end_char) { + for (auto data = yyinput(); + data != '\0' && data != end_char; + data = yyinput()) { + } +} + +Module& A2lScanner::CurrentModule() { + if (!module_) { + module_ = std::make_unique(); + } + return *module_; +} + +AxisDescr& A2lScanner::CurrentAxisDescr() { + if (!axis_descr_) { + axis_descr_ = std::make_unique(); + } + return *axis_descr_; +} + +AxisPts& A2lScanner::CurrentAxisPts() { + if (!axis_pts_) { + axis_pts_ = std::make_unique(); + } + return *axis_pts_; +} + +Blob& A2lScanner::CurrentBlob() { + if (!blob_) { + blob_ = std::make_unique(); + } + return *blob_; +} + +Characteristic& A2lScanner::CurrentCharacteristic() { + if (!characteristic_) { + characteristic_ = std::make_unique(); + } + return *characteristic_; +} + +CompuMethod& A2lScanner::CurrentCompuMethod() { + if (!compu_method_) { + compu_method_ = std::make_unique(); + } + return *compu_method_; +} + +CompuTab& A2lScanner::CurrentCompuTab() { + if (!compu_tab_) { + compu_tab_ = std::make_unique(); + } + return *compu_tab_; +} + +CompuVtab& A2lScanner::CurrentCompuVtab() { + if (!compu_vtab_) { + compu_vtab_ = std::make_unique(); + } + return *compu_vtab_; +} + +CompuVtabRange& A2lScanner::CurrentCompuVtabRange() { + if (!compu_vtab_range_) { + compu_vtab_range_ = std::make_unique(); + } + return *compu_vtab_range_; +} + +Frame& A2lScanner::CurrentFrame() { + if (!frame_) { + frame_ = std::make_unique(); + } + return *frame_; +} + +Function& A2lScanner::CurrentFunction() { + if (!function_) { + function_ = std::make_unique(); + } + return *function_; +} + +Group& A2lScanner::CurrentGroup() { + if (!group_) { + group_ = std::make_unique(); + } + return *group_; +} + +Instance& A2lScanner::CurrentInstance() { + if (!instance_) { + instance_ = std::make_unique(); + } + return *instance_; +} + +Overwrite& A2lScanner::CurrentOverwrite() { + if (!overwrite_) { + overwrite_ = std::make_unique(); + } + return *overwrite_; +} + +Measurement& A2lScanner::CurrentMeasurement() { + if (!measurement_) { + measurement_ = std::make_unique(); + } + return *measurement_; +} + +RecordLayout& A2lScanner::CurrentRecordLayout() { + if (!record_layout_) { + record_layout_ = std::make_unique(); + } + return *record_layout_; +} + +Transformer& A2lScanner::CurrentTransformer() { + if (!transformer_) { + transformer_ = std::make_unique(); + } + return *transformer_; +} + +AxisPts& A2lScanner::CurrentTypedefAxis() { + if (!typedef_axis_) { + typedef_axis_ = std::make_unique(); + } + return *typedef_axis_; +} + +Blob& A2lScanner::CurrentTypedefBlob() { + if (!typedef_blob_) { + typedef_blob_ = std::make_unique(); + typedef_blob_->AddressType(A2lAddressType::DIRECT); + } + return *typedef_blob_; +} + +Characteristic& A2lScanner::CurrentTypedefCharacteristic() { + if (!typedef_characteristic_) { + typedef_characteristic_ = std::make_unique(); + } + return *typedef_characteristic_; +} + +Measurement& A2lScanner::CurrentTypedefMeasurement() { + if (!typedef_measurement_) { + typedef_measurement_ = std::make_unique(); + } + return *typedef_measurement_; +} + +Structure& A2lScanner::CurrentTypedefStructure() { + if (!typedef_structure_) { + typedef_structure_ = std::make_unique(); + } + return *typedef_structure_; +} + +A2lStructureComponent& A2lScanner::CurrentStructureComponent() { + if (!structure_component_) { + structure_component_ = std::make_unique(); + } + return *structure_component_; +} + +Unit& A2lScanner::CurrentUnit() { + if (!unit_) { + unit_ = std::make_unique(); + } + return *unit_; +} + +A2lUserRight& A2lScanner::CurrentUserRight() { + if (!user_right_) { + user_right_ = std::make_unique(); + } + return *user_right_; +} + +void A2lScanner::FixIncludeFile() { + // I shall read in "" but also should work + // Skip white space and '"' characters + + std::ostringstream file_path; + for (auto data = yyinput(); data != '\0' ; data = yyinput()) { + if (std::isspace(data)) { + continue; + } + if (data == '"') { + continue; + } + file_path << static_cast(data); + break; + } + + for (auto input = yyinput(); input != '\0' ; input = yyinput()) { + if (std::isspace(input)) { + break; + } + if (input == '"') { + break; + } + file_path << static_cast(input); + } + + std::string include_file; + std::string file_extension; + try { + const path fullname(file_path.str()); + if (fullname.is_absolute() ) { + if (exists(fullname)) { + include_file = fullname.string(); + file_extension = fullname.extension().string(); + } else { + // File doesn't exists + std::ostringstream err; + err << "File doesn't exist. File: " << fullname; + throw std::runtime_error(err.str()); + } + } else { + // Relative path assume the file should be relative the input_file + path input_file(InputFile()); // Current filename with path + input_file.replace_filename(fullname); + if (exists(input_file)) { + include_file = input_file.string(); + file_extension = input_file.extension().string(); + } else { + // File doesn't exists + std::ostringstream err; + err << "File doesn't exist. File: " << InputFile(); + throw std::runtime_error(err.str()); + } + } + } + catch (const std::exception& error) { + std::ostringstream err; + err << "Include file path error. Error: " << error.what() << ", File: " << file_path.str(); + throw std::runtime_error(err.str()); + } + + // The included file exist but if the extension is A2L then + // it could be an existing A2L but the current parser already defined a + // PROJECT tag. To solve this try to parse the A2L file and if it succeeds, + // merge in that MODULE into the module list of the other project. + if (A2lHelper::stricmp(file_extension.c_str(), ".a2l") == 0) { + A2lFile temp_file; + temp_file.Filename(include_file); + const bool parse = temp_file.ParseFile(); + if (parse && parent_ != nullptr) { + // Move the project to the original project + parent_->Merge(temp_file); + return; + } + + // Continue with plan B that includes the file according to the standard. + } + // The include file exist. Store the current state and switch to the new file. + // Note that the <> function in the lexer file will restore the state to + // the old one. + FileItem& current_item = file_stack_.back(); + current_item.buffer_state = yy_buffer_stack[yy_buffer_stack_top]; + + // Switch to the include file + file_stack_.emplace_back(include_file); + auto& new_stack = file_stack_.back(); + ReadAndConvertFile(new_stack.file, new_stack.utf8_stream); + new_stack.buffer_state = yy_create_buffer(new_stack.utf8_stream, 16384); + + a2lFlexLexer::yy_switch_to_buffer(new_stack.buffer_state); + +} + +void A2lScanner::InputFile(std::string filename) { + if (!file_stack_.empty()) { + file_stack_.back().file = std::move(filename); + } +} + +std::string A2lScanner::InputFile() const { + return file_stack_.empty() ? "" : file_stack_.back().file; +} + +void A2lScanner::Parent(A2lFile *parent) { + parent_ = parent; +} + +} // namespace a2l \ No newline at end of file diff --git a/a2llib-main/src/a2lscanner.h b/a2llib-main/src/a2lscanner.h new file mode 100644 index 0000000..37988f0 --- /dev/null +++ b/a2llib-main/src/a2lscanner.h @@ -0,0 +1,231 @@ +/* + * Copyright 2023 Ingemar Hedvall + * SPDX-License-Identifier: MIT + */ +#pragma once + +#include +#include +#include +#include +#include +#include + +#ifndef yyFlexLexerOnce + +#undef yyFlexLexer +#define yyFlexLexer a2lFlexLexer +#include + +#endif + +#include +#include +#include +#include + +#include "a2l/axisdescr.h" +#include "a2l/axispts.h" +#include "a2l/module.h" +#include "a2lparser.hpp" +#include "a2l/a2lfile.h" + +namespace a2l { + +class A2lFile; + +class A2lScanner : public a2lFlexLexer { + public: + + struct FileItem{ + std::istringstream utf8_stream; ///< The file input converted to UTF8 + yy_buffer_state *buffer_state = nullptr; ///< Needed when switching state + std::string file; ///< Filename including path. + + explicit FileItem(std::string filename) : + file(std::move(filename)) { + } + }; + + explicit A2lScanner(std::istringstream& in); + + int a2llex(A2lParser::value_type* yylval); + + void InputFile( std::string filename); + [[nodiscard]] std::string InputFile() const; + + void Parent(A2lFile* parent); + + static void ReadAndConvertFile(const std::string& filename, std::istringstream& utf8_stream ); + + void LastError(const std::string& error) { last_error_ = error; } + [[nodiscard]] const std::string& LastError() const { return last_error_; } + + Module& CurrentModule(); + std::unique_ptr& ReleaseModule() { return module_; }; + + AxisDescr& CurrentAxisDescr(); + std::unique_ptr& ReleaseAxisDescr() { return axis_descr_; }; + + AxisPts& CurrentAxisPts(); + std::unique_ptr& ReleaseAxisPts() { return axis_pts_; }; + + Blob& CurrentBlob(); + std::unique_ptr& ReleaseBlob() { return blob_; }; + + Characteristic& CurrentCharacteristic(); + std::unique_ptr& ReleaseCharacteristic() { + return characteristic_; + }; + + CompuMethod& CurrentCompuMethod(); + std::unique_ptr& ReleaseCompuMethod() { + return compu_method_; + }; + + CompuTab& CurrentCompuTab(); + std::unique_ptr& ReleaseCompuTab() { + return compu_tab_; + }; + + CompuVtab& CurrentCompuVtab(); + std::unique_ptr& ReleaseCompuVtab() { + return compu_vtab_; + }; + + CompuVtabRange& CurrentCompuVtabRange(); + std::unique_ptr& ReleaseCompuVtabRange() { + return compu_vtab_range_; + }; + + Frame& CurrentFrame(); + std::unique_ptr& ReleaseFrame() { + return frame_; + }; + + Function& CurrentFunction(); + std::unique_ptr& ReleaseFunction() { + return function_; + }; + + Group& CurrentGroup(); + std::unique_ptr& ReleaseGroup() { + return group_; + }; + + Instance& CurrentInstance(); + std::unique_ptr& ReleaseInstance() { + return instance_; + }; + + Overwrite& CurrentOverwrite(); + std::unique_ptr& ReleaseOverwrite() { + return overwrite_; + }; + + Measurement& CurrentMeasurement(); + std::unique_ptr& ReleaseMeasurement() { + return measurement_; + }; + + A2lBitOperation& CurrentBitOperation() { return bit_operation_; }; + + RecordLayout& CurrentRecordLayout(); + std::unique_ptr& ReleaseRecordLayout() { + return record_layout_; + }; + + Transformer& CurrentTransformer(); + std::unique_ptr& ReleaseTransformer() { + return transformer_; + }; + + AxisPts& CurrentTypedefAxis(); + std::unique_ptr& ReleaseTypedefAxis() { + return typedef_axis_; + }; + + Blob& CurrentTypedefBlob(); + std::unique_ptr& ReleaseTypedefBlob() { + return typedef_blob_; + }; + + Characteristic& CurrentTypedefCharacteristic(); + std::unique_ptr& ReleaseTypedefCharacteristic() { + return typedef_characteristic_; + }; + + Measurement& CurrentTypedefMeasurement(); + std::unique_ptr& ReleaseTypedefMeasurement() { + return typedef_measurement_; + }; + + Structure& CurrentTypedefStructure(); + std::unique_ptr& ReleaseTypedefStructure() { + return typedef_structure_; + }; + + A2lStructureComponent& CurrentStructureComponent(); + std::unique_ptr& ReleaseStructureComponent() { + return structure_component_; + }; + + Unit& CurrentUnit(); + std::unique_ptr& ReleaseUnit() { + return unit_; + }; + + A2lUserRight& CurrentUserRight(); + std::unique_ptr& ReleaseUserRight() { + return user_right_; + }; + + A2lVarCriterion& VarCriterion() { return var_criterion_; }; + + [[nodiscard]] bool IsA2lFile() const { return found_; } + + private: + + std::vector file_stack_; ///< The file stack is main purpose is for include files handling + A2lParser::semantic_type* yylval = nullptr; + A2lFile* parent_ = nullptr; ///< Parent is needed if I must merge an A2L file. + std::string last_error_; + bool found_ = false; ///< Indicate that the PROJECT tag has been found in the file. + + std::string ReadA2ML(); + std::string ReadIfData(); + std::string ReadIfDataSingleLine(); + std::string ReadIfDataMultiLine(); + + std::unique_ptr module_; ///< Current module + std::unique_ptr axis_descr_; ///< Current axis descr + std::unique_ptr axis_pts_; ///< Current axis pts + std::unique_ptr blob_; ///< Current blob + std::unique_ptr characteristic_; ///< Current characteristic + std::unique_ptr compu_method_; ///< Current Compu Method + std::unique_ptr compu_tab_; ///< Current COMPU TAB + std::unique_ptr compu_vtab_; ///< Current COMPU VTAB + std::unique_ptr compu_vtab_range_; ///< Current VTAB Range + std::unique_ptr frame_; ///< Current Frame + std::unique_ptr function_; ///< Current Function + std::unique_ptr group_; + std::unique_ptr instance_; + std::unique_ptr overwrite_; + std::unique_ptr measurement_; + A2lBitOperation bit_operation_ = {}; + std::unique_ptr record_layout_; + std::unique_ptr transformer_; + std::unique_ptr typedef_axis_; + std::unique_ptr typedef_blob_; + std::unique_ptr typedef_characteristic_; + std::unique_ptr typedef_measurement_; + std::unique_ptr typedef_structure_; + std::unique_ptr structure_component_; + std::unique_ptr unit_; + std::unique_ptr user_right_; + A2lVarCriterion var_criterion_ = {}; + void SkipUntil(char end_char); + void FixIncludeFile(); +}; + +} // namespace a2l diff --git a/a2llib-main/src/a2mlblock.cpp b/a2llib-main/src/a2mlblock.cpp new file mode 100644 index 0000000..be580db --- /dev/null +++ b/a2llib-main/src/a2mlblock.cpp @@ -0,0 +1,30 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#include "a2l/a2mlblock.h" +#include +#include "a2mlscanner.h" +#include "a2mlparser.hpp" + +namespace a2l { + +A2mlBlock::A2mlBlock(const std::string& a2ml) { + try { + if (a2ml.empty()) { + throw std::runtime_error("Nothing to parse"); + } + std::istringstream temp(a2ml); + A2mlScanner scanner(temp); + A2mlParser parser(scanner); + parse_ = parser.parse() == 0; + last_error_ = scanner.LastError(); + block_list_ = scanner.BlockList(); + } catch (const std::exception& err) { + last_error_ = err.what(); + parse_ = false; + } +} + +} // namespace a2l \ No newline at end of file diff --git a/a2llib-main/src/a2mlflexer.cpp b/a2llib-main/src/a2mlflexer.cpp new file mode 100644 index 0000000..d728327 --- /dev/null +++ b/a2llib-main/src/a2mlflexer.cpp @@ -0,0 +1,2311 @@ +#line 1 "D:/projects/a2llib/src/a2mlflexer.cpp" + #include + #include + +#line 5 "D:/projects/a2llib/src/a2mlflexer.cpp" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +/* %not-for-header */ +/* %if-c-only */ +/* %if-not-reentrant */ +/* %endif */ +/* %endif */ +/* %ok-for-header */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 4 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* %if-c++-only */ + /* The c++ scanner is a mess. The FlexLexer.h header file relies on the + * following macro. This is required in order to pass the c++-multiple-scanners + * test in the regression suite. We get reports that it breaks inheritance. + * We will address this in a future release of flex, or omit the C++ scanner + * altogether. + */ + #define yyFlexLexer a2mlFlexLexer +/* %endif */ + +/* %if-c-only */ +/* %endif */ + +#ifdef yyalloc +#define a2mlalloc_ALREADY_DEFINED +#else +#define yyalloc a2mlalloc +#endif + +#ifdef yyrealloc +#define a2mlrealloc_ALREADY_DEFINED +#else +#define yyrealloc a2mlrealloc +#endif + +#ifdef yyfree +#define a2mlfree_ALREADY_DEFINED +#else +#define yyfree a2mlfree +#endif + +/* %if-c-only */ +/* %endif */ + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +/* %if-c-only */ +/* %endif */ + +/* %if-tables-serialization */ +/* %endif */ +/* end standard C headers. */ + +/* %if-c-or-c++ */ +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#ifndef SIZE_MAX +#define SIZE_MAX (~(size_t)0) +#endif + +#endif /* ! C99 */ + +#endif /* ! FLEXINT_H */ + +/* %endif */ + +/* begin standard C++ headers. */ +/* %if-c++-only */ +#include +#include +#include +#include +#include +/* end standard C++ headers. */ +/* %endif */ + +/* TODO: this is always defined, so inline it */ +#define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) +#else +#define yynoreturn +#endif + +/* %not-for-header */ +/* Returned upon end-of-file. */ +#define YY_NULL 0 +/* %ok-for-header */ + +/* %not-for-header */ +/* Promotes a possibly negative, possibly signed char to an + * integer in range [0..255] for use as an array index. + */ +#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) +/* %ok-for-header */ + +/* %if-reentrant */ +/* %endif */ + +/* %if-not-reentrant */ + +/* %endif */ + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN (yy_start) = 1 + 2 * +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START (((yy_start) - 1) / 2) +#define YYSTATE YY_START +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart( yyin ) +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else +#define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +/* %if-not-reentrant */ +extern int yyleng; +/* %endif */ + +/* %if-c-only */ +/* %if-not-reentrant */ +/* %endif */ +/* %endif */ + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires + * access to the local variable yy_act. Since yyless() is a macro, it would break + * existing scanners that call yyless() from OUTSIDE yylex. + * One obvious solution it to make yy_act a global. I tried that, and saw + * a 5% performance hit in a non-yylineno scanner, because yy_act is + * normally declared as a register variable-- so it is not worth it. + */ + #define YY_LESS_LINENO(n) \ + do { \ + int yyl;\ + for ( yyl = n; yyl < yyleng; ++yyl )\ + if ( yytext[yyl] == '\n' )\ + --yylineno;\ + }while(0) + #define YY_LINENO_REWIND_TO(dst) \ + do {\ + const char *p;\ + for ( p = yy_cp-1; p >= (dst); --p)\ + if ( *p == '\n' )\ + --yylineno;\ + }while(0) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) +#define unput(c) yyunput( c, (yytext_ptr) ) + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { +/* %if-c-only */ +/* %endif */ + +/* %if-c++-only */ + std::streambuf* yy_input_file; +/* %endif */ + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* %if-c-only Standard (non-C++) definition */ +/* %not-for-header */ +/* %if-not-reentrant */ +/* %endif */ +/* %ok-for-header */ + +/* %endif */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] + +/* %if-c-only Standard (non-C++) definition */ +/* %if-not-reentrant */ +/* %not-for-header */ +/* %ok-for-header */ + +/* %endif */ +/* %endif */ + +void *yyalloc ( yy_size_t ); +void *yyrealloc ( void *, yy_size_t ); +void yyfree ( void * ); + +#define yy_new_buffer yy_create_buffer +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */ +/* Begin user sect3 */ +#define YY_SKIP_YYWRAP + +#define FLEX_DEBUG +typedef flex_uint8_t YY_CHAR; + +#define yytext_ptr yytext + +#include + +inline int yyFlexLexer::yywrap() { return 1; } +int yyFlexLexer::yylex() + { + LexerError( "yyFlexLexer::yylex invoked but %option yyclass used" ); + return 0; + } + +#define YY_DECL int a2l:A2mlScanner::yylex() + +/* %% [1.5] DFA */ + +/* %if-c-only Standard (non-C++) definition */ +/* %endif */ + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + (yytext_ptr) = yy_bp; \ +/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\ + yyleng = (int) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ +/* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\ + (yy_c_buf_p) = yy_cp; +/* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */ +#define YY_NUM_RULES 37 +#define YY_END_OF_BUFFER 38 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static const flex_int16_t yy_accept[128] = + { 0, + 30, 30, 38, 36, 35, 35, 36, 5, 36, 36, + 36, 31, 31, 15, 16, 29, 29, 13, 14, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 11, + 12, 35, 0, 30, 0, 0, 6, 31, 0, 34, + 0, 0, 0, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 0, 7, 0, + 0, 34, 0, 0, 32, 29, 29, 29, 29, 29, + 29, 19, 29, 29, 29, 29, 29, 29, 0, 33, + 0, 3, 1, 29, 18, 29, 28, 29, 29, 20, + 29, 29, 29, 23, 29, 0, 0, 0, 8, 0, + + 29, 27, 21, 29, 29, 22, 29, 25, 2, 0, + 26, 17, 29, 24, 4, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 9, 10, 0 + } ; + +static const YY_CHAR yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 4, 1, 5, 1, 1, 1, 1, 1, 6, + 7, 8, 9, 1, 10, 11, 12, 13, 14, 15, + 14, 16, 14, 17, 14, 14, 14, 1, 18, 1, + 19, 1, 1, 1, 20, 21, 21, 21, 21, 21, + 22, 22, 22, 22, 22, 23, 24, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 25, 26, 27, 1, 22, 1, 28, 29, 30, 31, + + 32, 33, 34, 35, 36, 22, 37, 38, 39, 40, + 41, 22, 22, 42, 43, 44, 45, 22, 22, 46, + 22, 22, 47, 1, 48, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static const YY_CHAR yy_meta[49] = + { 0, + 1, 1, 2, 1, 1, 1, 1, 1, 1, 3, + 3, 1, 4, 4, 4, 4, 4, 1, 1, 4, + 4, 3, 3, 3, 1, 1, 1, 4, 4, 4, + 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 1, 1 + } ; + +static const flex_int16_t yy_base[135] = + { 0, + 0, 0, 205, 206, 47, 50, 50, 206, 52, 48, + 58, 58, 64, 206, 206, 189, 0, 206, 206, 165, + 167, 160, 160, 161, 158, 156, 152, 167, 53, 206, + 206, 55, 62, 189, 190, 184, 206, 79, 183, 0, + 158, 149, 0, 0, 164, 146, 158, 140, 139, 142, + 138, 141, 138, 145, 143, 137, 135, 77, 206, 167, + 89, 0, 140, 142, 0, 149, 141, 128, 140, 129, + 139, 149, 131, 119, 129, 134, 117, 120, 151, 206, + 122, 206, 0, 120, 131, 117, 0, 110, 137, 0, + 122, 119, 108, 132, 114, 139, 90, 96, 0, 92, + + 91, 0, 0, 78, 90, 0, 104, 0, 206, 97, + 0, 0, 41, 0, 206, 75, 78, 75, 80, 70, + 59, 69, 45, 25, 0, 0, 206, 124, 126, 130, + 134, 64, 138, 142 + } ; + +static const flex_int16_t yy_def[135] = + { 0, + 127, 1, 127, 127, 127, 127, 128, 127, 127, 127, + 127, 127, 127, 127, 127, 129, 129, 127, 127, 129, + 129, 129, 129, 129, 129, 129, 129, 129, 129, 127, + 127, 127, 128, 127, 128, 127, 127, 127, 130, 131, + 127, 127, 132, 129, 129, 129, 129, 129, 129, 129, + 129, 129, 129, 129, 129, 129, 129, 128, 127, 130, + 133, 131, 127, 127, 132, 129, 129, 129, 129, 129, + 129, 129, 129, 129, 129, 129, 129, 129, 134, 127, + 127, 127, 129, 129, 129, 129, 129, 129, 129, 129, + 129, 129, 129, 129, 129, 134, 133, 127, 129, 127, + + 129, 129, 129, 129, 129, 129, 129, 129, 127, 127, + 129, 129, 129, 129, 127, 129, 129, 129, 129, 129, + 129, 129, 129, 129, 129, 129, 0, 127, 127, 127, + 127, 127, 127, 127 + } ; + +static const flex_int16_t yy_nxt[255] = + { 0, + 4, 5, 6, 5, 7, 8, 9, 4, 10, 10, + 4, 11, 12, 13, 13, 13, 13, 14, 15, 16, + 17, 17, 17, 17, 18, 4, 19, 17, 20, 21, + 22, 23, 24, 17, 17, 25, 17, 26, 17, 17, + 17, 17, 27, 28, 29, 17, 30, 31, 32, 32, + 32, 32, 32, 32, 34, 36, 32, 32, 32, 37, + 38, 38, 38, 38, 38, 39, 34, 65, 126, 40, + 38, 38, 38, 38, 38, 35, 38, 38, 38, 38, + 38, 34, 55, 116, 125, 117, 41, 35, 56, 42, + 57, 38, 38, 38, 38, 38, 61, 97, 124, 123, + + 80, 80, 35, 43, 110, 110, 110, 110, 110, 110, + 110, 110, 110, 110, 122, 121, 120, 119, 118, 114, + 113, 112, 111, 115, 33, 33, 33, 33, 44, 44, + 60, 60, 60, 60, 62, 109, 62, 62, 79, 79, + 79, 79, 96, 96, 96, 96, 97, 108, 107, 106, + 105, 104, 103, 102, 101, 100, 99, 98, 97, 95, + 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, + 84, 83, 82, 81, 61, 78, 77, 76, 75, 74, + 73, 72, 71, 70, 69, 68, 67, 66, 64, 63, + 61, 59, 127, 58, 54, 53, 52, 51, 50, 49, + + 48, 47, 46, 45, 127, 3, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127 + } ; + +static const flex_int16_t yy_chk[255] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, + 5, 6, 6, 6, 7, 9, 32, 32, 32, 9, + 10, 10, 10, 10, 10, 11, 33, 132, 124, 11, + 12, 12, 12, 12, 12, 7, 13, 13, 13, 13, + 13, 58, 29, 113, 123, 113, 11, 33, 29, 11, + 29, 38, 38, 38, 38, 38, 61, 97, 122, 121, + + 61, 97, 58, 12, 100, 100, 100, 100, 100, 110, + 110, 110, 110, 110, 120, 119, 118, 117, 116, 107, + 105, 104, 101, 110, 128, 128, 128, 128, 129, 129, + 130, 130, 130, 130, 131, 98, 131, 131, 133, 133, + 133, 133, 134, 134, 134, 134, 96, 95, 94, 93, + 92, 91, 89, 88, 86, 85, 84, 81, 79, 78, + 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, + 67, 66, 64, 63, 60, 57, 56, 55, 54, 53, + 52, 51, 50, 49, 48, 47, 46, 45, 42, 41, + 39, 36, 35, 34, 28, 27, 26, 25, 24, 23, + + 22, 21, 20, 16, 3, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127 + } ; + +/* Table of booleans, true if rule could match eol. */ +static const flex_int32_t yy_rule_can_match_eol[38] = + { 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, }; + +static const flex_int16_t yy_rule_linenum[37] = + { 0, + 45, 47, 48, 49, 51, 52, 53, 55, 56, 57, + 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 80, 88, + 99, 109, 158, 159, 160, 161 + } ; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +#line 1 "D:/projects/a2llib/src/a2mlflexer.l" + +#line 7 "D:/projects/a2llib/src/a2mlflexer.l" + #include "a2mlscanner.h" + #undef YY_DECL + #define YY_DECL int a2l::A2mlScanner::a2mllex(a2l::A2mlParser::value_type* yy_value) + using token = a2l::A2mlParser::token; +#line 633 "D:/projects/a2llib/src/a2mlflexer.cpp" +#define YY_NO_UNISTD_H 1 +#define YY_NO_INPUT 1 +#line 34 "D:/projects/a2llib/src/a2mlflexer.l" + /* \"([^\"\\]|(\\.))*\" */ +#line 638 "D:/projects/a2llib/src/a2mlflexer.cpp" + +#define INITIAL 0 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +#include +/* %endif */ +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +/* %if-c-only Reentrant structure and macros (non-C++). */ +/* %if-reentrant */ +/* %if-c-only */ +/* %endif */ +/* %if-reentrant */ +/* %endif */ +/* %endif End reentrant structures and macros. */ +/* %if-bison-bridge */ +/* %endif */ +/* %not-for-header */ +/* %ok-for-header */ + +/* %endif */ + +#ifndef yytext_ptr +static void yy_flex_strncpy ( char *, const char *, int ); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen ( const char * ); +#endif + +#ifndef YY_NO_INPUT +/* %if-c-only Standard (non-C++) definition */ +/* %not-for-header */ +/* %ok-for-header */ + +/* %endif */ +#endif + +/* %if-c-only */ +/* %endif */ + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else +#define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* %if-c-only Standard (non-C++) definition */ +/* %endif */ +/* %if-c++-only C++ definition */ +#define ECHO LexerOutput( yytext, yyleng ) +/* %endif */ +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ +/* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\ +\ +/* %if-c++-only C++ definition \ */\ + if ( (int)(result = LexerInput( (char *) buf, max_size )) < 0 ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); +/* %endif */ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +#define YY_FATAL_ERROR(msg) LexerError( msg ) +/* %endif */ +#endif + +/* %if-tables-serialization structures and prototypes */ +/* %not-for-header */ +/* %ok-for-header */ + +/* %not-for-header */ +/* %tables-yydmap generated elements */ +/* %endif */ +/* end tables serialization structures and prototypes */ + +/* %ok-for-header */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 +/* %if-c-only Standard (non-C++) definition */ +/* %endif */ +/* %if-c++-only C++ definition */ +#define YY_DECL int yyFlexLexer::yylex() +/* %endif */ +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK /*LINTED*/break; +#endif + +/* %% [6.0] YY_RULE_SETUP definition goes here */ +#define YY_RULE_SETUP \ + YY_USER_ACTION + +/* %not-for-header */ +/** The main scanner function which does all the work. + */ +YY_DECL +{ + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + + if ( !(yy_init) ) + { + (yy_init) = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ + + if ( ! yyin ) +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + yyin.rdbuf(std::cin.rdbuf()); +/* %endif */ + + if ( ! yyout ) +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + yyout.rdbuf(std::cout.rdbuf()); +/* %endif */ + + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE ); + } + + yy_load_buffer_state( ); + } + + { +/* %% [7.0] user's declarations go here */ +#line 39 "D:/projects/a2llib/src/a2mlflexer.l" + + + yylval = yy_value; + + + +#line 837 "D:/projects/a2llib/src/a2mlflexer.cpp" + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + { +/* %% [8.0] yymore()-related code goes here */ + yy_cp = (yy_c_buf_p); + + /* Support of yytext. */ + *yy_cp = (yy_hold_char); + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + +/* %% [9.0] code to set up and find next match goes here */ + yy_current_state = (yy_start); +yy_match: + do + { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 128 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + ++yy_cp; + } + while ( yy_current_state != 127 ); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + +yy_find_action: +/* %% [10.0] code to find the action number goes here */ + yy_act = yy_accept[yy_current_state]; + + YY_DO_BEFORE_ACTION; + +/* %% [11.0] code for yylineno update goes here */ + + if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) + { + int yyl; + for ( yyl = 0; yyl < yyleng; ++yyl ) + if ( yytext[yyl] == '\n' ) + + yylineno++; +; + } + +do_action: /* This label is used only to access EOF actions. */ + +/* %% [12.0] debug code goes here */ + if ( yy_flex_debug ) + { + if ( yy_act == 0 ) + std::cerr << "--scanner backing up\n"; + else if ( yy_act < 37 ) + std::cerr << "--accepting rule at line " << yy_rule_linenum[yy_act] << + "(\"" << yytext << "\")\n"; + else if ( yy_act == 37 ) + std::cerr << "--accepting default rule (\"" << yytext << "\")\n"; + else if ( yy_act == 38 ) + std::cerr << "--(end of buffer or a NUL)\n"; + else + std::cerr << "--EOF (start condition " << YY_START << ")\n"; + } + + switch ( yy_act ) + { /* beginning of action switch */ +/* %% [13.0] actions go here */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + +case 1: +YY_RULE_SETUP +#line 45 "D:/projects/a2llib/src/a2mlflexer.l" +{ return token::A2ML; } + YY_BREAK +case 2: +YY_RULE_SETUP +#line 47 "D:/projects/a2llib/src/a2mlflexer.l" +{ return token::A2ML_BEGIN; } + YY_BREAK +case 3: +YY_RULE_SETUP +#line 48 "D:/projects/a2llib/src/a2mlflexer.l" +{ return token::A2ML_END; } + YY_BREAK +case 4: +YY_RULE_SETUP +#line 49 "D:/projects/a2llib/src/a2mlflexer.l" +{ return token::TEXT_ARRAY; } + YY_BREAK +case 5: +YY_RULE_SETUP +#line 51 "D:/projects/a2llib/src/a2mlflexer.l" +{ return token::MEM_BEGIN; } + YY_BREAK +case 6: +YY_RULE_SETUP +#line 52 "D:/projects/a2llib/src/a2mlflexer.l" +{ return token::MEM_END; } + YY_BREAK +case 7: +YY_RULE_SETUP +#line 53 "D:/projects/a2llib/src/a2mlflexer.l" +{ return token::MEM_END; } + YY_BREAK +case 8: +YY_RULE_SETUP +#line 55 "D:/projects/a2llib/src/a2mlflexer.l" +{ return token::BLOCK; } + YY_BREAK +case 9: +YY_RULE_SETUP +#line 56 "D:/projects/a2llib/src/a2mlflexer.l" +{ return token::TAGGED_UNION; } + YY_BREAK +case 10: +YY_RULE_SETUP +#line 57 "D:/projects/a2llib/src/a2mlflexer.l" +{ return token::TAGGED_STRUCT; } + YY_BREAK +case 11: +YY_RULE_SETUP +#line 58 "D:/projects/a2llib/src/a2mlflexer.l" +{ return token::BLOCK_BEGIN; } + YY_BREAK +case 12: +YY_RULE_SETUP +#line 59 "D:/projects/a2llib/src/a2mlflexer.l" +{ return token::BLOCK_END; } + YY_BREAK +case 13: +YY_RULE_SETUP +#line 61 "D:/projects/a2llib/src/a2mlflexer.l" +{ return token::ARRAY_BEGIN; } + YY_BREAK +case 14: +YY_RULE_SETUP +#line 62 "D:/projects/a2llib/src/a2mlflexer.l" +{ return token::ARRAY_END; } + YY_BREAK +case 15: +YY_RULE_SETUP +#line 63 "D:/projects/a2llib/src/a2mlflexer.l" +{ return token::DEF_END; } + YY_BREAK +case 16: +YY_RULE_SETUP +#line 64 "D:/projects/a2llib/src/a2mlflexer.l" +{ return token::EQUAL; } + YY_BREAK +case 17: +YY_RULE_SETUP +#line 65 "D:/projects/a2llib/src/a2mlflexer.l" +{ return token::STRUCT; } + YY_BREAK +case 18: +YY_RULE_SETUP +#line 66 "D:/projects/a2llib/src/a2mlflexer.l" +{ return token::CHAR; } + YY_BREAK +case 19: +YY_RULE_SETUP +#line 67 "D:/projects/a2llib/src/a2mlflexer.l" +{ return token::INT; } + YY_BREAK +case 20: +YY_RULE_SETUP +#line 68 "D:/projects/a2llib/src/a2mlflexer.l" +{ return token::LONG; } + YY_BREAK +case 21: +YY_RULE_SETUP +#line 69 "D:/projects/a2llib/src/a2mlflexer.l" +{ return token::INT64; } + YY_BREAK +case 22: +YY_RULE_SETUP +#line 70 "D:/projects/a2llib/src/a2mlflexer.l" +{ return token::UCHAR; } + YY_BREAK +case 23: +YY_RULE_SETUP +#line 71 "D:/projects/a2llib/src/a2mlflexer.l" +{ return token::UINT; } + YY_BREAK +case 24: +YY_RULE_SETUP +#line 72 "D:/projects/a2llib/src/a2mlflexer.l" +{ return token::UINT64; } + YY_BREAK +case 25: +YY_RULE_SETUP +#line 73 "D:/projects/a2llib/src/a2mlflexer.l" +{ return token::ULONG; } + YY_BREAK +case 26: +YY_RULE_SETUP +#line 74 "D:/projects/a2llib/src/a2mlflexer.l" +{ return token::DOUBLE; } + YY_BREAK +case 27: +YY_RULE_SETUP +#line 75 "D:/projects/a2llib/src/a2mlflexer.l" +{ return token::FLOAT; } + YY_BREAK +case 28: +YY_RULE_SETUP +#line 76 "D:/projects/a2llib/src/a2mlflexer.l" +{ return token::ENUM; } + YY_BREAK +case 29: +YY_RULE_SETUP +#line 80 "D:/projects/a2llib/src/a2mlflexer.l" +{ + std::string temp(yytext); + if (yylval != nullptr) { + yylval->emplace(temp); + } + return token::IDENT; + } + YY_BREAK +case 30: +/* rule 30 can match eol */ +YY_RULE_SETUP +#line 88 "D:/projects/a2llib/src/a2mlflexer.l" +{ + const size_t len = strlen(yytext); + std::string temp; + if (len > 2) { + temp = yytext + 1; + temp.pop_back(); + } + yylval->emplace(temp); + return token::STRING; + } + YY_BREAK +case 31: +YY_RULE_SETUP +#line 99 "D:/projects/a2llib/src/a2mlflexer.l" +{ + int64_t temp = 0; + try { + temp = std::stoll(yytext); + } catch (const std::exception& ) { + + } + yylval->emplace(temp); + return token::CONSTANT; + } + YY_BREAK +case 32: +YY_RULE_SETUP +#line 109 "D:/projects/a2llib/src/a2mlflexer.l" +{ + uint64_t address = 0; + for ( size_t index = 0; yytext[ index ] != '\0'; ++index ) { + if ( index < 2 ) continue; + const char token = yytext[index]; + switch ( token ) { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + address *= 16; + address += token - '0'; + break; + + case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + address *= 16; + address += token - 'A' + 10; + break; + + case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + address *= 16; + address += token - 'a' + 10; + break; + + default: + break; + } + } + + yylval->emplace(static_cast(address)); + return token::CONSTANT; + } + YY_BREAK +case 33: +/* rule 33 can match eol */ +YY_RULE_SETUP +#line 158 "D:/projects/a2llib/src/a2mlflexer.l" +{ } /* Multi line comments */ + YY_BREAK +case 34: +YY_RULE_SETUP +#line 159 "D:/projects/a2llib/src/a2mlflexer.l" +{ /* Single line comment */ } + YY_BREAK +case 35: +/* rule 35 can match eol */ +YY_RULE_SETUP +#line 160 "D:/projects/a2llib/src/a2mlflexer.l" +{} + YY_BREAK +case 36: +YY_RULE_SETUP +#line 161 "D:/projects/a2llib/src/a2mlflexer.l" +{} + YY_BREAK +case 37: +YY_RULE_SETUP +#line 162 "D:/projects/a2llib/src/a2mlflexer.l" +ECHO; + YY_BREAK +#line 1181 "D:/projects/a2llib/src/a2mlflexer.cpp" +case YY_STATE_EOF(INITIAL): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin.rdbuf(); +/* %endif */ + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { +/* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */ + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( yywrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ +} /* end of yylex */ +/* %ok-for-header */ + +/* %if-c++-only */ +/* %not-for-header */ +/* The contents of this function are C++ specific, so the () macro is not used. + * This constructor simply maintains backward compatibility. + * DEPRECATED + */ +yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout ): + yyin(arg_yyin ? arg_yyin->rdbuf() : std::cin.rdbuf()), + yyout(arg_yyout ? arg_yyout->rdbuf() : std::cout.rdbuf()) +{ + ctor_common(); +} + +/* The contents of this function are C++ specific, so the () macro is not used. + */ +yyFlexLexer::yyFlexLexer( std::istream& arg_yyin, std::ostream& arg_yyout ): + yyin(arg_yyin.rdbuf()), + yyout(arg_yyout.rdbuf()) +{ + ctor_common(); +} + +/* The contents of this function are C++ specific, so the () macro is not used. + */ +void yyFlexLexer::ctor_common() +{ + yy_c_buf_p = 0; + yy_init = 0; + yy_start = 0; + yy_flex_debug = 0; + yylineno = 1; // this will only get updated if %option yylineno + + yy_did_buffer_switch_on_eof = 0; + + yy_looking_for_trail_begin = 0; + yy_more_flag = 0; + yy_more_len = 0; + yy_more_offset = yy_prev_more_offset = 0; + + yy_start_stack_ptr = yy_start_stack_depth = 0; + yy_start_stack = NULL; + + yy_buffer_stack = NULL; + yy_buffer_stack_top = 0; + yy_buffer_stack_max = 0; + + yy_state_buf = 0; + +} + +/* The contents of this function are C++ specific, so the () macro is not used. + */ +yyFlexLexer::~yyFlexLexer() +{ + delete [] yy_state_buf; + yyfree( yy_start_stack ); + yy_delete_buffer( YY_CURRENT_BUFFER ); + yyfree( yy_buffer_stack ); +} + +/* The contents of this function are C++ specific, so the () macro is not used. + */ +void yyFlexLexer::switch_streams( std::istream& new_in, std::ostream& new_out ) +{ + // was if( new_in ) + yy_delete_buffer( YY_CURRENT_BUFFER ); + yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE ) ); + + // was if( new_out ) + yyout.rdbuf(new_out.rdbuf()); +} + +/* The contents of this function are C++ specific, so the () macro is not used. + */ +void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out ) +{ + if( ! new_in ) { + new_in = &yyin; + } + + if ( ! new_out ) { + new_out = &yyout; + } + + switch_streams(*new_in, *new_out); +} + +#ifdef YY_INTERACTIVE +int yyFlexLexer::LexerInput( char* buf, int /* max_size */ ) +#else +int yyFlexLexer::LexerInput( char* buf, int max_size ) +#endif +{ + if ( yyin.eof() || yyin.fail() ) + return 0; + +#ifdef YY_INTERACTIVE + yyin.get( buf[0] ); + + if ( yyin.eof() ) + return 0; + + if ( yyin.bad() ) + return -1; + + return 1; + +#else + (void) yyin.read( buf, max_size ); + + if ( yyin.bad() ) + return -1; + else + return yyin.gcount(); +#endif +} + +void yyFlexLexer::LexerOutput( const char* buf, int size ) +{ + (void) yyout.write( buf, size ); +} +/* %ok-for-header */ + +/* %endif */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +int yyFlexLexer::yy_get_next_buffer() +/* %endif */ +{ + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = (yytext_ptr); + int number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1); + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); + } + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + +/* %if-c-only */ +/* %not-for-header */ +/* %endif */ +/* %if-c++-only */ + yy_state_type yyFlexLexer::yy_get_previous_state() +/* %endif */ +{ + yy_state_type yy_current_state; + char *yy_cp; + +/* %% [15.0] code to get the start state into yy_current_state goes here */ + yy_current_state = (yy_start); + + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) + { +/* %% [16.0] code to find the next state goes here */ + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 128 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state ) +/* %endif */ +{ + int yy_is_jam; + /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */ + char *yy_cp = (yy_c_buf_p); + + YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 128 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 127); + + return yy_is_jam ? 0 : yy_current_state; +} + +#ifndef YY_NO_UNPUT +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yyunput( int c, char* yy_bp) +/* %endif */ +{ + char *yy_cp; + + yy_cp = (yy_c_buf_p); + + /* undo effects of setting up yytext */ + *yy_cp = (yy_hold_char); + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + int number_to_move = (yy_n_chars) + 2; + char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; + char *source = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; + + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = + (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + +/* %% [18.0] update yylineno here */ + + if ( c == '\n' ){ + --yylineno; + } + + (yytext_ptr) = yy_bp; + (yy_hold_char) = *yy_cp; + (yy_c_buf_p) = yy_cp; +} +/* %if-c-only */ +/* %endif */ +#endif + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + int yyFlexLexer::yyinput() +/* %endif */ +{ + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + int offset = (int) ((yy_c_buf_p) - (yytext_ptr)); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( ) ) + return 0; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } + + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve yytext */ + (yy_hold_char) = *++(yy_c_buf_p); + +/* %% [19.0] update BOL and yylineno */ + if ( c == '\n' ) + + yylineno++; +; + + return c; +} +/* %if-c-only */ +/* %endif */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yyrestart( std::istream& input_file ) +/* %endif */ +{ + + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE ); + } + + yy_init_buffer( YY_CURRENT_BUFFER, input_file ); + yy_load_buffer_state( ); +} + +/* %if-c++-only */ +/** Delegate to the new version that takes an istream reference. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ +void yyFlexLexer::yyrestart( std::istream* input_file ) +{ + if( ! input_file ) { + input_file = &yyin; + } + yyrestart( *input_file ); +} +/* %endif */ + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) +/* %endif */ +{ + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( ); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + (yy_did_buffer_switch_on_eof) = 1; +} + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_load_buffer_state() +/* %endif */ +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + yyin.rdbuf(YY_CURRENT_BUFFER_LVALUE->yy_input_file); +/* %endif */ + (yy_hold_char) = *(yy_c_buf_p); +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream& file, int size ) +/* %endif */ +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + yy_init_buffer( b, file ); + + return b; +} + +/* %if-c++-only */ +/** Delegate creation of buffers to the new version that takes an istream reference. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ + YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size ) +{ + return yy_create_buffer( *file, size ); +} +/* %endif */ + +/** Destroy the buffer. + * @param b a buffer created with yy_create_buffer() + * + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b ) +/* %endif */ +{ + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + yyfree( (void *) b->yy_ch_buf ); + + yyfree( (void *) b ); +} + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a yyrestart() or at EOF. + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream& file ) +/* %endif */ + +{ + int oerrno = errno; + + yy_flush_buffer( b ); + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + b->yy_input_file = file.rdbuf(); +/* %endif */ + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + b->yy_is_interactive = 0; +/* %endif */ + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b ) +/* %endif */ +{ + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( ); +} + +/* %if-c-or-c++ */ +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +void yyFlexLexer::yypush_buffer_state (YY_BUFFER_STATE new_buffer) +/* %endif */ +{ + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; +} +/* %endif */ + +/* %if-c-or-c++ */ +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +void yyFlexLexer::yypop_buffer_state (void) +/* %endif */ +{ + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } +} +/* %endif */ + +/* %if-c-or-c++ */ +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +void yyFlexLexer::yyensure_buffer_stack(void) +/* %endif */ +{ + yy_size_t num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } +} +/* %endif */ + +/* %if-c-only */ +/* %endif */ + +/* %if-c-only */ +/* %endif */ + +/* %if-c-only */ +/* %endif */ + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_push_state( int _new_state ) +/* %endif */ +{ + if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) ) + { + yy_size_t new_size; + + (yy_start_stack_depth) += YY_START_STACK_INCR; + new_size = (yy_size_t) (yy_start_stack_depth) * sizeof( int ); + + if ( ! (yy_start_stack) ) + (yy_start_stack) = (int *) yyalloc( new_size ); + + else + (yy_start_stack) = (int *) yyrealloc( + (void *) (yy_start_stack), new_size ); + + if ( ! (yy_start_stack) ) + YY_FATAL_ERROR( "out of memory expanding start-condition stack" ); + } + + (yy_start_stack)[(yy_start_stack_ptr)++] = YY_START; + + BEGIN(_new_state); +} + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_pop_state() +/* %endif */ +{ + if ( --(yy_start_stack_ptr) < 0 ) + YY_FATAL_ERROR( "start-condition stack underflow" ); + + BEGIN((yy_start_stack)[(yy_start_stack_ptr)]); +} + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + int yyFlexLexer::yy_top_state() +/* %endif */ +{ + return (yy_start_stack)[(yy_start_stack_ptr) - 1]; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +void yyFlexLexer::LexerError( const char* msg ) +{ + std::cerr << msg << std::endl; + exit( YY_EXIT_FAILURE ); +} +/* %endif */ + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = (yy_hold_char); \ + (yy_c_buf_p) = yytext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/* %if-c-only */ +/* %if-reentrant */ +/* %endif */ +/* %if-reentrant */ +/* %endif */ +/* %endif */ + +/* %if-reentrant */ +/* %if-bison-bridge */ +/* %endif */ +/* %endif if-c-only */ + +/* %if-c-only */ +/* %endif */ + +/* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */ +/* %if-reentrant */ +/* %endif */ +/* %endif */ + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, const char * s2, int n ) +{ + + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (const char * s ) +{ + int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *yyalloc (yy_size_t size ) +{ + return malloc(size); +} + +void *yyrealloc (void * ptr, yy_size_t size ) +{ + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); +} + +void yyfree (void * ptr ) +{ + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ +} + +/* %if-tables-serialization definitions */ +/* %define-yytables The name for this specific scanner's tables. */ +#define YYTABLES_NAME "yytables" +/* %endif */ + +/* %ok-for-header */ + +#line 162 "D:/projects/a2llib/src/a2mlflexer.l" + + + diff --git a/a2llib-main/src/a2mlflexer.l b/a2llib-main/src/a2mlflexer.l new file mode 100644 index 0000000..3bb2e45 --- /dev/null +++ b/a2llib-main/src/a2mlflexer.l @@ -0,0 +1,162 @@ +%top { + #include + #include + +} +%{ + #include "a2mlscanner.h" + #undef YY_DECL + #define YY_DECL int a2l::A2mlScanner::a2mllex(a2l::A2mlParser::value_type* yy_value) + using token = a2l::A2mlParser::token; +%} + +%option prefix="a2ml" +%option 8bit +%option nounistd +%option noyywrap +%option debug +%option never-interactive +%option c++ +%option yyclass="a2l:A2mlScanner" +%option yylineno +%option noinput +%option nounput + + +ws [ \t\n\v\f\r]+ +signed_number [-+]?[0-9]+ +unsigned_number [0-9]+ +hexnumber 0x[0-9a-fA-F]+ +float_val [-+]?[0-9]+(\.[0-9]*)?([eE][-+]?[0-9]+)? +ident [a-zA-Z_]([_a-zA-Z0-9.-]*)? +string (\"(\\.|[^\\"])*\")* + /* \"([^\"\\]|(\\.))*\" */ +nl [\n\r] +keyword [A-Z_0-9]+ +text_array ("char[")[0-9]+("]") + +%% +%{ + yylval = yy_value; +%} + + +"A2ML" { return token::A2ML; } + +"/begin" { return token::A2ML_BEGIN; } +"/end" { return token::A2ML_END; } +{text_array} { return token::TEXT_ARRAY; } + +"(" { return token::MEM_BEGIN; } +")*" { return token::MEM_END; } +") *" { return token::MEM_END; } + +"block" { return token::BLOCK; } +"taggedunion" { return token::TAGGED_UNION; } +"taggedstruct" { return token::TAGGED_STRUCT; } +"{" { return token::BLOCK_BEGIN; } +"}" { return token::BLOCK_END; } + +"[" { return token::ARRAY_BEGIN; } +"]" { return token::ARRAY_END; } +";" { return token::DEF_END; } +"=" { return token::EQUAL; } +"struct" { return token::STRUCT; } +"char" { return token::CHAR; } +"int" { return token::INT; } +"long" { return token::LONG; } +"int64" { return token::INT64; } +"uchar" { return token::UCHAR; } +"uint" { return token::UINT; } +"uint64" { return token::UINT64; } +"ulong" { return token::ULONG; } +"double" { return token::DOUBLE; } +"float" { return token::FLOAT; } +"enum" { return token::ENUM; } + + + +{ident} { + std::string temp(yytext); + if (yylval != nullptr) { + yylval->emplace(temp); + } + return token::IDENT; + } + +{string} { + const size_t len = strlen(yytext); + std::string temp; + if (len > 2) { + temp = yytext + 1; + temp.pop_back(); + } + yylval->emplace(temp); + return token::STRING; + } + +{signed_number} { + int64_t temp = 0; + try { + temp = std::stoll(yytext); + } catch (const std::exception& ) { + + } + yylval->emplace(temp); + return token::CONSTANT; + } +{hexnumber} { + uint64_t address = 0; + for ( size_t index = 0; yytext[ index ] != '\0'; ++index ) { + if ( index < 2 ) continue; + const char token = yytext[index]; + switch ( token ) { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + address *= 16; + address += token - '0'; + break; + + case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + address *= 16; + address += token - 'A' + 10; + break; + + case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + address *= 16; + address += token - 'a' + 10; + break; + + default: + break; + } + } + + yylval->emplace(static_cast(address)); + return token::CONSTANT; + } + +[/][*][^*]*[*]+([^*/][^*]*[*]+)*[/] { } /* Multi line comments */ +"//".* { /* Single line comment */ } +{ws} {} +. {} +%% + diff --git a/a2llib-main/src/a2mlobject.cpp b/a2llib-main/src/a2mlobject.cpp new file mode 100644 index 0000000..36e176b --- /dev/null +++ b/a2llib-main/src/a2mlobject.cpp @@ -0,0 +1,102 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT +*/ + +#include "a2l/a2mlobject.h" +#include +#include + +namespace a2l { + +A2mlObject::A2mlObject(A2mlTypeName type) +: type_(type) { + +} +std::string_view A2mlObject::TypeAsString() const { + switch (type_) { + case A2mlTypeName::PREDEFINED: return "PREDEFINED"; + case A2mlTypeName::STRUCT: return "STRUCT"; + case A2mlTypeName::TAGGED_STRUCT: return "TAGGED STRUCT"; + case A2mlTypeName::TAGGED_UNION: return "TAGGED UNION"; + case A2mlTypeName::ENUMERATE: return "ENUMERATE"; + case A2mlTypeName::BLOCK: return "BLOCK"; + default: + break; + } + return ""; +} + +std::string_view A2mlObject::DataTypeAsString() const { + switch (data_type_) { + case A2mlDataType::CHAR: return "char"; + case A2mlDataType::INT: return "int"; + case A2mlDataType::LONG: return "long"; + case A2mlDataType::INT64: return "int64"; + case A2mlDataType::UCHAR: return "uchar"; + case A2mlDataType::UINT: return "uint"; + case A2mlDataType::ULONG: return "ulong"; + case A2mlDataType::UINT64: return "uint64"; + case A2mlDataType::DOUBLE: return "double"; + case A2mlDataType::FLOAT: return "float"; + case A2mlDataType::TEXT_ARRAY: return "string"; + default: + break; + + } + return {}; +} + +std::string A2mlObject::AsString() const { + std::ostringstream temp; + switch (type_) { + case A2mlTypeName::PREDEFINED: + if (!tag_.empty()) { + temp << "\"" << tag_ << "\"" << " "; + } + if (!ident_.empty()) { + temp << ident_ << " "; + } + temp << DataTypeAsString(); + break; + + case A2mlTypeName::ENUMERATE: + temp << TypeAsString() << " "; + if (!tag_.empty()) { + temp << "\"" << tag_ << "\"" << " "; + } + if (!ident_.empty()) { + temp << ident_ << " "; + } + if (!enumerate_list_.empty()) { + temp << DataTypeAsString() << " {" << std::endl; + for (const auto& [key, value] : enumerate_list_) { + temp << value << " = " << key << std::endl; + } + temp << "}"; + } + break; + + default: + temp << TypeAsString() << " "; + if (!tag_.empty()) { + temp << "\"" << tag_ << "\"" << " "; + } + if (!ident_.empty()) { + temp << ident_ << " "; + } + if (!member_list_.empty()) { + temp << "{" << std::endl; + for (const auto& object : member_list_) { + temp << object.AsString(); + } + temp << "}"; + } + break; + } + + temp << std::endl; + return temp.str(); +} + +} // namespace a2l \ No newline at end of file diff --git a/a2llib-main/src/a2mlparser.cpp b/a2llib-main/src/a2mlparser.cpp new file mode 100644 index 0000000..11efebd --- /dev/null +++ b/a2llib-main/src/a2mlparser.cpp @@ -0,0 +1,1905 @@ +// A Bison parser, made by GNU Bison 3.8.2. + +// Skeleton implementation for Bison LALR(1) parsers in C++ + +// Copyright (C) 2002-2015, 2018-2021 Free Software Foundation, Inc. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// As a special exception, you may create a larger work that contains +// part or all of the Bison parser skeleton and distribute that work +// under terms of your choice, so long as that work isn't itself a +// parser generator using the skeleton or a modified version thereof +// as a parser skeleton. Alternatively, if you modify or redistribute +// the parser skeleton itself, you may (at your option) remove this +// special exception, which will cause the skeleton and the resulting +// Bison output files to be licensed under the GNU General Public +// License without this special exception. + +// This special exception was added by the Free Software Foundation in +// version 2.2 of Bison. + +// DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, +// especially those whose name start with YY_ or yy_. They are +// private implementation details that can be changed or removed. + + +// Take the name prefix into account. +#define yylex a2mllex + + + +#include "a2mlparser.hpp" + + +// Unqualified %code blocks. +#line 26 "D:/projects/a2llib/src/a2mlparser.y" + + #include + #include "a2mlscanner.h" + + + #include "a2lhelper.h" + #include + + #undef yylex + #define yylex scanner.a2mllex + +#line 60 "D:/projects/a2llib/src/a2mlparser.cpp" + + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include // FIXME: INFRINGES ON USER NAME SPACE. +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif +#endif + + +// Whether we are compiled with exception support. +#ifndef YY_EXCEPTIONS +# if defined __GNUC__ && !defined __EXCEPTIONS +# define YY_EXCEPTIONS 0 +# else +# define YY_EXCEPTIONS 1 +# endif +#endif + + + +// Enable debugging if requested. +#if A2MLDEBUG + +// A pseudo ostream that takes yydebug_ into account. +# define YYCDEBUG if (yydebug_) (*yycdebug_) + +# define YY_SYMBOL_PRINT(Title, Symbol) \ + do { \ + if (yydebug_) \ + { \ + *yycdebug_ << Title << ' '; \ + yy_print_ (*yycdebug_, Symbol); \ + *yycdebug_ << '\n'; \ + } \ + } while (false) + +# define YY_REDUCE_PRINT(Rule) \ + do { \ + if (yydebug_) \ + yy_reduce_print_ (Rule); \ + } while (false) + +# define YY_STACK_PRINT() \ + do { \ + if (yydebug_) \ + yy_stack_print_ (); \ + } while (false) + +#else // !A2MLDEBUG + +# define YYCDEBUG if (false) std::cerr +# define YY_SYMBOL_PRINT(Title, Symbol) YY_USE (Symbol) +# define YY_REDUCE_PRINT(Rule) static_cast (0) +# define YY_STACK_PRINT() static_cast (0) + +#endif // !A2MLDEBUG + +#define yyerrok (yyerrstatus_ = 0) +#define yyclearin (yyla.clear ()) + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab +#define YYRECOVERING() (!!yyerrstatus_) + +#line 6 "D:/projects/a2llib/src/a2mlparser.y" +namespace a2l { +#line 134 "D:/projects/a2llib/src/a2mlparser.cpp" + + /// Build a parser object. + A2mlParser::A2mlParser (a2l::A2mlScanner &scanner_yyarg) +#if A2MLDEBUG + : yydebug_ (false), + yycdebug_ (&std::cerr), +#else + : +#endif + scanner (scanner_yyarg) + {} + + A2mlParser::~A2mlParser () + {} + + A2mlParser::syntax_error::~syntax_error () YY_NOEXCEPT YY_NOTHROW + {} + + /*---------. + | symbol. | + `---------*/ + + // basic_symbol. + template + A2mlParser::basic_symbol::basic_symbol (const basic_symbol& that) + : Base (that) + , value () + { + switch (this->kind ()) + { + case symbol_kind::S_predefined_type_name: // predefined_type_name + value.copy< a2l::A2mlDataType > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_enumerator_list: // enumerator_list + value.copy< a2l::A2mlEnumerateList > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_declaration_list: // declaration_list + case symbol_kind::S_struct_member_list: // struct_member_list + case symbol_kind::S_taggedstruct_member_list: // taggedstruct_member_list + case symbol_kind::S_taggedunion_member_list: // taggedunion_member_list + value.copy< a2l::A2mlMemberList > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_declaration: // declaration + case symbol_kind::S_type_definition: // type_definition + case symbol_kind::S_type_name: // type_name + case symbol_kind::S_block_definition: // block_definition + case symbol_kind::S_enum_type_name: // enum_type_name + case symbol_kind::S_struct_type_name: // struct_type_name + case symbol_kind::S_struct_member: // struct_member + case symbol_kind::S_member: // member + case symbol_kind::S_taggedstruct_type_name: // taggedstruct_type_name + case symbol_kind::S_taggedstruct_member: // taggedstruct_member + case symbol_kind::S_taggedstruct_definition: // taggedstruct_definition + case symbol_kind::S_taggedunion_type_name: // taggedunion_type_name + case symbol_kind::S_taggedunion_member: // taggedunion_member + value.copy< a2l::A2mlObject > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_FLOAT: // FLOAT + value.copy< double > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_CONSTANT: // CONSTANT + value.copy< int64_t > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_enumerator: // enumerator + value.copy< std::pair > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_IDENT: // IDENT + case symbol_kind::S_STRING: // STRING + case symbol_kind::S_keyword: // keyword + case symbol_kind::S_identifier: // identifier + case symbol_kind::S_tag: // tag + value.copy< std::string > (YY_MOVE (that.value)); + break; + + default: + break; + } + + } + + + + + template + A2mlParser::symbol_kind_type + A2mlParser::basic_symbol::type_get () const YY_NOEXCEPT + { + return this->kind (); + } + + + template + bool + A2mlParser::basic_symbol::empty () const YY_NOEXCEPT + { + return this->kind () == symbol_kind::S_YYEMPTY; + } + + template + void + A2mlParser::basic_symbol::move (basic_symbol& s) + { + super_type::move (s); + switch (this->kind ()) + { + case symbol_kind::S_predefined_type_name: // predefined_type_name + value.move< a2l::A2mlDataType > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_enumerator_list: // enumerator_list + value.move< a2l::A2mlEnumerateList > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_declaration_list: // declaration_list + case symbol_kind::S_struct_member_list: // struct_member_list + case symbol_kind::S_taggedstruct_member_list: // taggedstruct_member_list + case symbol_kind::S_taggedunion_member_list: // taggedunion_member_list + value.move< a2l::A2mlMemberList > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_declaration: // declaration + case symbol_kind::S_type_definition: // type_definition + case symbol_kind::S_type_name: // type_name + case symbol_kind::S_block_definition: // block_definition + case symbol_kind::S_enum_type_name: // enum_type_name + case symbol_kind::S_struct_type_name: // struct_type_name + case symbol_kind::S_struct_member: // struct_member + case symbol_kind::S_member: // member + case symbol_kind::S_taggedstruct_type_name: // taggedstruct_type_name + case symbol_kind::S_taggedstruct_member: // taggedstruct_member + case symbol_kind::S_taggedstruct_definition: // taggedstruct_definition + case symbol_kind::S_taggedunion_type_name: // taggedunion_type_name + case symbol_kind::S_taggedunion_member: // taggedunion_member + value.move< a2l::A2mlObject > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_FLOAT: // FLOAT + value.move< double > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_CONSTANT: // CONSTANT + value.move< int64_t > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_enumerator: // enumerator + value.move< std::pair > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_IDENT: // IDENT + case symbol_kind::S_STRING: // STRING + case symbol_kind::S_keyword: // keyword + case symbol_kind::S_identifier: // identifier + case symbol_kind::S_tag: // tag + value.move< std::string > (YY_MOVE (s.value)); + break; + + default: + break; + } + + } + + // by_kind. + A2mlParser::by_kind::by_kind () YY_NOEXCEPT + : kind_ (symbol_kind::S_YYEMPTY) + {} + +#if 201103L <= YY_CPLUSPLUS + A2mlParser::by_kind::by_kind (by_kind&& that) YY_NOEXCEPT + : kind_ (that.kind_) + { + that.clear (); + } +#endif + + A2mlParser::by_kind::by_kind (const by_kind& that) YY_NOEXCEPT + : kind_ (that.kind_) + {} + + A2mlParser::by_kind::by_kind (token_kind_type t) YY_NOEXCEPT + : kind_ (yytranslate_ (t)) + {} + + + + void + A2mlParser::by_kind::clear () YY_NOEXCEPT + { + kind_ = symbol_kind::S_YYEMPTY; + } + + void + A2mlParser::by_kind::move (by_kind& that) + { + kind_ = that.kind_; + that.clear (); + } + + A2mlParser::symbol_kind_type + A2mlParser::by_kind::kind () const YY_NOEXCEPT + { + return kind_; + } + + + A2mlParser::symbol_kind_type + A2mlParser::by_kind::type_get () const YY_NOEXCEPT + { + return this->kind (); + } + + + + // by_state. + A2mlParser::by_state::by_state () YY_NOEXCEPT + : state (empty_state) + {} + + A2mlParser::by_state::by_state (const by_state& that) YY_NOEXCEPT + : state (that.state) + {} + + void + A2mlParser::by_state::clear () YY_NOEXCEPT + { + state = empty_state; + } + + void + A2mlParser::by_state::move (by_state& that) + { + state = that.state; + that.clear (); + } + + A2mlParser::by_state::by_state (state_type s) YY_NOEXCEPT + : state (s) + {} + + A2mlParser::symbol_kind_type + A2mlParser::by_state::kind () const YY_NOEXCEPT + { + if (state == empty_state) + return symbol_kind::S_YYEMPTY; + else + return YY_CAST (symbol_kind_type, yystos_[+state]); + } + + A2mlParser::stack_symbol_type::stack_symbol_type () + {} + + A2mlParser::stack_symbol_type::stack_symbol_type (YY_RVREF (stack_symbol_type) that) + : super_type (YY_MOVE (that.state)) + { + switch (that.kind ()) + { + case symbol_kind::S_predefined_type_name: // predefined_type_name + value.YY_MOVE_OR_COPY< a2l::A2mlDataType > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_enumerator_list: // enumerator_list + value.YY_MOVE_OR_COPY< a2l::A2mlEnumerateList > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_declaration_list: // declaration_list + case symbol_kind::S_struct_member_list: // struct_member_list + case symbol_kind::S_taggedstruct_member_list: // taggedstruct_member_list + case symbol_kind::S_taggedunion_member_list: // taggedunion_member_list + value.YY_MOVE_OR_COPY< a2l::A2mlMemberList > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_declaration: // declaration + case symbol_kind::S_type_definition: // type_definition + case symbol_kind::S_type_name: // type_name + case symbol_kind::S_block_definition: // block_definition + case symbol_kind::S_enum_type_name: // enum_type_name + case symbol_kind::S_struct_type_name: // struct_type_name + case symbol_kind::S_struct_member: // struct_member + case symbol_kind::S_member: // member + case symbol_kind::S_taggedstruct_type_name: // taggedstruct_type_name + case symbol_kind::S_taggedstruct_member: // taggedstruct_member + case symbol_kind::S_taggedstruct_definition: // taggedstruct_definition + case symbol_kind::S_taggedunion_type_name: // taggedunion_type_name + case symbol_kind::S_taggedunion_member: // taggedunion_member + value.YY_MOVE_OR_COPY< a2l::A2mlObject > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_FLOAT: // FLOAT + value.YY_MOVE_OR_COPY< double > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_CONSTANT: // CONSTANT + value.YY_MOVE_OR_COPY< int64_t > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_enumerator: // enumerator + value.YY_MOVE_OR_COPY< std::pair > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_IDENT: // IDENT + case symbol_kind::S_STRING: // STRING + case symbol_kind::S_keyword: // keyword + case symbol_kind::S_identifier: // identifier + case symbol_kind::S_tag: // tag + value.YY_MOVE_OR_COPY< std::string > (YY_MOVE (that.value)); + break; + + default: + break; + } + +#if 201103L <= YY_CPLUSPLUS + // that is emptied. + that.state = empty_state; +#endif + } + + A2mlParser::stack_symbol_type::stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) that) + : super_type (s) + { + switch (that.kind ()) + { + case symbol_kind::S_predefined_type_name: // predefined_type_name + value.move< a2l::A2mlDataType > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_enumerator_list: // enumerator_list + value.move< a2l::A2mlEnumerateList > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_declaration_list: // declaration_list + case symbol_kind::S_struct_member_list: // struct_member_list + case symbol_kind::S_taggedstruct_member_list: // taggedstruct_member_list + case symbol_kind::S_taggedunion_member_list: // taggedunion_member_list + value.move< a2l::A2mlMemberList > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_declaration: // declaration + case symbol_kind::S_type_definition: // type_definition + case symbol_kind::S_type_name: // type_name + case symbol_kind::S_block_definition: // block_definition + case symbol_kind::S_enum_type_name: // enum_type_name + case symbol_kind::S_struct_type_name: // struct_type_name + case symbol_kind::S_struct_member: // struct_member + case symbol_kind::S_member: // member + case symbol_kind::S_taggedstruct_type_name: // taggedstruct_type_name + case symbol_kind::S_taggedstruct_member: // taggedstruct_member + case symbol_kind::S_taggedstruct_definition: // taggedstruct_definition + case symbol_kind::S_taggedunion_type_name: // taggedunion_type_name + case symbol_kind::S_taggedunion_member: // taggedunion_member + value.move< a2l::A2mlObject > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_FLOAT: // FLOAT + value.move< double > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_CONSTANT: // CONSTANT + value.move< int64_t > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_enumerator: // enumerator + value.move< std::pair > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_IDENT: // IDENT + case symbol_kind::S_STRING: // STRING + case symbol_kind::S_keyword: // keyword + case symbol_kind::S_identifier: // identifier + case symbol_kind::S_tag: // tag + value.move< std::string > (YY_MOVE (that.value)); + break; + + default: + break; + } + + // that is emptied. + that.kind_ = symbol_kind::S_YYEMPTY; + } + +#if YY_CPLUSPLUS < 201103L + A2mlParser::stack_symbol_type& + A2mlParser::stack_symbol_type::operator= (const stack_symbol_type& that) + { + state = that.state; + switch (that.kind ()) + { + case symbol_kind::S_predefined_type_name: // predefined_type_name + value.copy< a2l::A2mlDataType > (that.value); + break; + + case symbol_kind::S_enumerator_list: // enumerator_list + value.copy< a2l::A2mlEnumerateList > (that.value); + break; + + case symbol_kind::S_declaration_list: // declaration_list + case symbol_kind::S_struct_member_list: // struct_member_list + case symbol_kind::S_taggedstruct_member_list: // taggedstruct_member_list + case symbol_kind::S_taggedunion_member_list: // taggedunion_member_list + value.copy< a2l::A2mlMemberList > (that.value); + break; + + case symbol_kind::S_declaration: // declaration + case symbol_kind::S_type_definition: // type_definition + case symbol_kind::S_type_name: // type_name + case symbol_kind::S_block_definition: // block_definition + case symbol_kind::S_enum_type_name: // enum_type_name + case symbol_kind::S_struct_type_name: // struct_type_name + case symbol_kind::S_struct_member: // struct_member + case symbol_kind::S_member: // member + case symbol_kind::S_taggedstruct_type_name: // taggedstruct_type_name + case symbol_kind::S_taggedstruct_member: // taggedstruct_member + case symbol_kind::S_taggedstruct_definition: // taggedstruct_definition + case symbol_kind::S_taggedunion_type_name: // taggedunion_type_name + case symbol_kind::S_taggedunion_member: // taggedunion_member + value.copy< a2l::A2mlObject > (that.value); + break; + + case symbol_kind::S_FLOAT: // FLOAT + value.copy< double > (that.value); + break; + + case symbol_kind::S_CONSTANT: // CONSTANT + value.copy< int64_t > (that.value); + break; + + case symbol_kind::S_enumerator: // enumerator + value.copy< std::pair > (that.value); + break; + + case symbol_kind::S_IDENT: // IDENT + case symbol_kind::S_STRING: // STRING + case symbol_kind::S_keyword: // keyword + case symbol_kind::S_identifier: // identifier + case symbol_kind::S_tag: // tag + value.copy< std::string > (that.value); + break; + + default: + break; + } + + return *this; + } + + A2mlParser::stack_symbol_type& + A2mlParser::stack_symbol_type::operator= (stack_symbol_type& that) + { + state = that.state; + switch (that.kind ()) + { + case symbol_kind::S_predefined_type_name: // predefined_type_name + value.move< a2l::A2mlDataType > (that.value); + break; + + case symbol_kind::S_enumerator_list: // enumerator_list + value.move< a2l::A2mlEnumerateList > (that.value); + break; + + case symbol_kind::S_declaration_list: // declaration_list + case symbol_kind::S_struct_member_list: // struct_member_list + case symbol_kind::S_taggedstruct_member_list: // taggedstruct_member_list + case symbol_kind::S_taggedunion_member_list: // taggedunion_member_list + value.move< a2l::A2mlMemberList > (that.value); + break; + + case symbol_kind::S_declaration: // declaration + case symbol_kind::S_type_definition: // type_definition + case symbol_kind::S_type_name: // type_name + case symbol_kind::S_block_definition: // block_definition + case symbol_kind::S_enum_type_name: // enum_type_name + case symbol_kind::S_struct_type_name: // struct_type_name + case symbol_kind::S_struct_member: // struct_member + case symbol_kind::S_member: // member + case symbol_kind::S_taggedstruct_type_name: // taggedstruct_type_name + case symbol_kind::S_taggedstruct_member: // taggedstruct_member + case symbol_kind::S_taggedstruct_definition: // taggedstruct_definition + case symbol_kind::S_taggedunion_type_name: // taggedunion_type_name + case symbol_kind::S_taggedunion_member: // taggedunion_member + value.move< a2l::A2mlObject > (that.value); + break; + + case symbol_kind::S_FLOAT: // FLOAT + value.move< double > (that.value); + break; + + case symbol_kind::S_CONSTANT: // CONSTANT + value.move< int64_t > (that.value); + break; + + case symbol_kind::S_enumerator: // enumerator + value.move< std::pair > (that.value); + break; + + case symbol_kind::S_IDENT: // IDENT + case symbol_kind::S_STRING: // STRING + case symbol_kind::S_keyword: // keyword + case symbol_kind::S_identifier: // identifier + case symbol_kind::S_tag: // tag + value.move< std::string > (that.value); + break; + + default: + break; + } + + // that is emptied. + that.state = empty_state; + return *this; + } +#endif + + template + void + A2mlParser::yy_destroy_ (const char* yymsg, basic_symbol& yysym) const + { + if (yymsg) + YY_SYMBOL_PRINT (yymsg, yysym); + } + +#if A2MLDEBUG + template + void + A2mlParser::yy_print_ (std::ostream& yyo, const basic_symbol& yysym) const + { + std::ostream& yyoutput = yyo; + YY_USE (yyoutput); + if (yysym.empty ()) + yyo << "empty symbol"; + else + { + symbol_kind_type yykind = yysym.kind (); + yyo << (yykind < YYNTOKENS ? "token" : "nterm") + << ' ' << yysym.name () << " ("; + YY_USE (yykind); + yyo << ')'; + } + } +#endif + + void + A2mlParser::yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym) + { + if (m) + YY_SYMBOL_PRINT (m, sym); + yystack_.push (YY_MOVE (sym)); + } + + void + A2mlParser::yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym) + { +#if 201103L <= YY_CPLUSPLUS + yypush_ (m, stack_symbol_type (s, std::move (sym))); +#else + stack_symbol_type ss (s, sym); + yypush_ (m, ss); +#endif + } + + void + A2mlParser::yypop_ (int n) YY_NOEXCEPT + { + yystack_.pop (n); + } + +#if A2MLDEBUG + std::ostream& + A2mlParser::debug_stream () const + { + return *yycdebug_; + } + + void + A2mlParser::set_debug_stream (std::ostream& o) + { + yycdebug_ = &o; + } + + + A2mlParser::debug_level_type + A2mlParser::debug_level () const + { + return yydebug_; + } + + void + A2mlParser::set_debug_level (debug_level_type l) + { + yydebug_ = l; + } +#endif // A2MLDEBUG + + A2mlParser::state_type + A2mlParser::yy_lr_goto_state_ (state_type yystate, int yysym) + { + int yyr = yypgoto_[yysym - YYNTOKENS] + yystate; + if (0 <= yyr && yyr <= yylast_ && yycheck_[yyr] == yystate) + return yytable_[yyr]; + else + return yydefgoto_[yysym - YYNTOKENS]; + } + + bool + A2mlParser::yy_pact_value_is_default_ (int yyvalue) YY_NOEXCEPT + { + return yyvalue == yypact_ninf_; + } + + bool + A2mlParser::yy_table_value_is_error_ (int yyvalue) YY_NOEXCEPT + { + return yyvalue == yytable_ninf_; + } + + int + A2mlParser::operator() () + { + return parse (); + } + + int + A2mlParser::parse () + { + int yyn; + /// Length of the RHS of the rule being reduced. + int yylen = 0; + + // Error handling. + int yynerrs_ = 0; + int yyerrstatus_ = 0; + + /// The lookahead symbol. + symbol_type yyla; + + /// The return value of parse (). + int yyresult; + +#if YY_EXCEPTIONS + try +#endif // YY_EXCEPTIONS + { + YYCDEBUG << "Starting parse\n"; + + + /* Initialize the stack. The initial state will be set in + yynewstate, since the latter expects the semantical and the + location values to have been already stored, initialize these + stacks with a primary value. */ + yystack_.clear (); + yypush_ (YY_NULLPTR, 0, YY_MOVE (yyla)); + + /*-----------------------------------------------. + | yynewstate -- push a new symbol on the stack. | + `-----------------------------------------------*/ + yynewstate: + YYCDEBUG << "Entering state " << int (yystack_[0].state) << '\n'; + YY_STACK_PRINT (); + + // Accept? + if (yystack_[0].state == yyfinal_) + YYACCEPT; + + goto yybackup; + + + /*-----------. + | yybackup. | + `-----------*/ + yybackup: + // Try to take a decision without lookahead. + yyn = yypact_[+yystack_[0].state]; + if (yy_pact_value_is_default_ (yyn)) + goto yydefault; + + // Read a lookahead token. + if (yyla.empty ()) + { + YYCDEBUG << "Reading a token\n"; +#if YY_EXCEPTIONS + try +#endif // YY_EXCEPTIONS + { + yyla.kind_ = yytranslate_ (yylex (&yyla.value)); + } +#if YY_EXCEPTIONS + catch (const syntax_error& yyexc) + { + YYCDEBUG << "Caught exception: " << yyexc.what() << '\n'; + error (yyexc); + goto yyerrlab1; + } +#endif // YY_EXCEPTIONS + } + YY_SYMBOL_PRINT ("Next token is", yyla); + + if (yyla.kind () == symbol_kind::S_YYerror) + { + // The scanner already issued an error message, process directly + // to error recovery. But do not keep the error token as + // lookahead, it is too special and may lead us to an endless + // loop in error recovery. */ + yyla.kind_ = symbol_kind::S_YYUNDEF; + goto yyerrlab1; + } + + /* If the proper action on seeing token YYLA.TYPE is to reduce or + to detect an error, take that action. */ + yyn += yyla.kind (); + if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.kind ()) + { + goto yydefault; + } + + // Reduce or error. + yyn = yytable_[yyn]; + if (yyn <= 0) + { + if (yy_table_value_is_error_ (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + // Count tokens shifted since error; after three, turn off error status. + if (yyerrstatus_) + --yyerrstatus_; + + // Shift the lookahead token. + yypush_ ("Shifting", state_type (yyn), YY_MOVE (yyla)); + goto yynewstate; + + + /*-----------------------------------------------------------. + | yydefault -- do the default action for the current state. | + `-----------------------------------------------------------*/ + yydefault: + yyn = yydefact_[+yystack_[0].state]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + + /*-----------------------------. + | yyreduce -- do a reduction. | + `-----------------------------*/ + yyreduce: + yylen = yyr2_[yyn]; + { + stack_symbol_type yylhs; + yylhs.state = yy_lr_goto_state_ (yystack_[yylen].state, yyr1_[yyn]); + /* Variants are always initialized to an empty instance of the + correct type. The default '$$ = $1' action is NOT applied + when using variants. */ + switch (yyr1_[yyn]) + { + case symbol_kind::S_predefined_type_name: // predefined_type_name + yylhs.value.emplace< a2l::A2mlDataType > (); + break; + + case symbol_kind::S_enumerator_list: // enumerator_list + yylhs.value.emplace< a2l::A2mlEnumerateList > (); + break; + + case symbol_kind::S_declaration_list: // declaration_list + case symbol_kind::S_struct_member_list: // struct_member_list + case symbol_kind::S_taggedstruct_member_list: // taggedstruct_member_list + case symbol_kind::S_taggedunion_member_list: // taggedunion_member_list + yylhs.value.emplace< a2l::A2mlMemberList > (); + break; + + case symbol_kind::S_declaration: // declaration + case symbol_kind::S_type_definition: // type_definition + case symbol_kind::S_type_name: // type_name + case symbol_kind::S_block_definition: // block_definition + case symbol_kind::S_enum_type_name: // enum_type_name + case symbol_kind::S_struct_type_name: // struct_type_name + case symbol_kind::S_struct_member: // struct_member + case symbol_kind::S_member: // member + case symbol_kind::S_taggedstruct_type_name: // taggedstruct_type_name + case symbol_kind::S_taggedstruct_member: // taggedstruct_member + case symbol_kind::S_taggedstruct_definition: // taggedstruct_definition + case symbol_kind::S_taggedunion_type_name: // taggedunion_type_name + case symbol_kind::S_taggedunion_member: // taggedunion_member + yylhs.value.emplace< a2l::A2mlObject > (); + break; + + case symbol_kind::S_FLOAT: // FLOAT + yylhs.value.emplace< double > (); + break; + + case symbol_kind::S_CONSTANT: // CONSTANT + yylhs.value.emplace< int64_t > (); + break; + + case symbol_kind::S_enumerator: // enumerator + yylhs.value.emplace< std::pair > (); + break; + + case symbol_kind::S_IDENT: // IDENT + case symbol_kind::S_STRING: // STRING + case symbol_kind::S_keyword: // keyword + case symbol_kind::S_identifier: // identifier + case symbol_kind::S_tag: // tag + yylhs.value.emplace< std::string > (); + break; + + default: + break; + } + + + + // Perform the reduction. + YY_REDUCE_PRINT (yyn); +#if YY_EXCEPTIONS + try +#endif // YY_EXCEPTIONS + { + switch (yyn) + { + case 3: // a2ml_block: A2ML_BEGIN A2ML declaration_list A2ML_END A2ML +#line 101 "D:/projects/a2llib/src/a2mlparser.y" + { + scanner.BlockList(yystack_[2].value.as < a2l::A2mlMemberList > ()); + } +#line 968 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 4: // declaration_list: declaration +#line 105 "D:/projects/a2llib/src/a2mlparser.y" + { + yylhs.value.as < a2l::A2mlMemberList > () = A2mlMemberList(); + yylhs.value.as < a2l::A2mlMemberList > ().emplace_back(yystack_[0].value.as < a2l::A2mlObject > ()); + } +#line 977 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 5: // declaration_list: declaration_list declaration +#line 109 "D:/projects/a2llib/src/a2mlparser.y" + { + yylhs.value.as < a2l::A2mlMemberList > () = yystack_[1].value.as < a2l::A2mlMemberList > (); + yylhs.value.as < a2l::A2mlMemberList > ().emplace_back(yystack_[0].value.as < a2l::A2mlObject > ()); + } +#line 986 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 6: // declaration: type_definition DEF_END +#line 114 "D:/projects/a2llib/src/a2mlparser.y" + { yylhs.value.as < a2l::A2mlObject > () = yystack_[1].value.as < a2l::A2mlObject > (); } +#line 992 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 7: // declaration: block_definition DEF_END +#line 115 "D:/projects/a2llib/src/a2mlparser.y" + { yylhs.value.as < a2l::A2mlObject > () = yystack_[1].value.as < a2l::A2mlObject > (); } +#line 998 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 8: // type_definition: type_name +#line 117 "D:/projects/a2llib/src/a2mlparser.y" + { yylhs.value.as < a2l::A2mlObject > () = yystack_[0].value.as < a2l::A2mlObject > ();} +#line 1004 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 9: // type_name: predefined_type_name +#line 119 "D:/projects/a2llib/src/a2mlparser.y" + { + yylhs.value.as < a2l::A2mlObject > () = A2mlObject(A2mlTypeName::PREDEFINED); + yylhs.value.as < a2l::A2mlObject > ().DataType(yystack_[0].value.as < a2l::A2mlDataType > ()); + } +#line 1013 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 10: // type_name: struct_type_name +#line 123 "D:/projects/a2llib/src/a2mlparser.y" + { + yylhs.value.as < a2l::A2mlObject > () = yystack_[0].value.as < a2l::A2mlObject > (); + } +#line 1021 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 11: // type_name: taggedstruct_type_name +#line 126 "D:/projects/a2llib/src/a2mlparser.y" + { + yylhs.value.as < a2l::A2mlObject > () = yystack_[0].value.as < a2l::A2mlObject > (); + } +#line 1029 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 12: // type_name: taggedunion_type_name +#line 129 "D:/projects/a2llib/src/a2mlparser.y" + { + yylhs.value.as < a2l::A2mlObject > () = yystack_[0].value.as < a2l::A2mlObject > (); + } +#line 1037 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 13: // type_name: enum_type_name +#line 132 "D:/projects/a2llib/src/a2mlparser.y" + { + yylhs.value.as < a2l::A2mlObject > () = yystack_[0].value.as < a2l::A2mlObject > (); + } +#line 1045 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 14: // predefined_type_name: CHAR +#line 136 "D:/projects/a2llib/src/a2mlparser.y" + { yylhs.value.as < a2l::A2mlDataType > () = A2mlDataType::CHAR;} +#line 1051 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 15: // predefined_type_name: INT +#line 137 "D:/projects/a2llib/src/a2mlparser.y" + { yylhs.value.as < a2l::A2mlDataType > () = A2mlDataType::INT;} +#line 1057 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 16: // predefined_type_name: LONG +#line 138 "D:/projects/a2llib/src/a2mlparser.y" + { yylhs.value.as < a2l::A2mlDataType > () = A2mlDataType::LONG;} +#line 1063 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 17: // predefined_type_name: INT64 +#line 139 "D:/projects/a2llib/src/a2mlparser.y" + { yylhs.value.as < a2l::A2mlDataType > () = A2mlDataType::INT64;} +#line 1069 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 18: // predefined_type_name: UCHAR +#line 140 "D:/projects/a2llib/src/a2mlparser.y" + { yylhs.value.as < a2l::A2mlDataType > () = A2mlDataType::UCHAR;} +#line 1075 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 19: // predefined_type_name: UINT +#line 141 "D:/projects/a2llib/src/a2mlparser.y" + { yylhs.value.as < a2l::A2mlDataType > () = A2mlDataType::UINT;} +#line 1081 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 20: // predefined_type_name: UINT64 +#line 142 "D:/projects/a2llib/src/a2mlparser.y" + { yylhs.value.as < a2l::A2mlDataType > () = A2mlDataType::UINT64;} +#line 1087 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 21: // predefined_type_name: ULONG +#line 143 "D:/projects/a2llib/src/a2mlparser.y" + { yylhs.value.as < a2l::A2mlDataType > () = A2mlDataType::ULONG;} +#line 1093 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 22: // predefined_type_name: DOUBLE +#line 144 "D:/projects/a2llib/src/a2mlparser.y" + { yylhs.value.as < a2l::A2mlDataType > () = A2mlDataType::DOUBLE;} +#line 1099 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 23: // predefined_type_name: FLOAT +#line 145 "D:/projects/a2llib/src/a2mlparser.y" + { yylhs.value.as < a2l::A2mlDataType > () = A2mlDataType::FLOAT;} +#line 1105 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 24: // predefined_type_name: TEXT_ARRAY +#line 146 "D:/projects/a2llib/src/a2mlparser.y" + { yylhs.value.as < a2l::A2mlDataType > () = A2mlDataType::TEXT_ARRAY;} +#line 1111 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 25: // block_definition: BLOCK tag member +#line 149 "D:/projects/a2llib/src/a2mlparser.y" + { + yylhs.value.as < a2l::A2mlObject > () = A2mlObject(A2mlTypeName::BLOCK); + yylhs.value.as < a2l::A2mlObject > ().Tag(yystack_[1].value.as < std::string > ()); + yylhs.value.as < a2l::A2mlObject > ().MemberList().emplace_back(yystack_[0].value.as < a2l::A2mlObject > ()); + } +#line 1121 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 26: // block_definition: BLOCK tag MEM_BEGIN member MEM_END +#line 154 "D:/projects/a2llib/src/a2mlparser.y" + { + yylhs.value.as < a2l::A2mlObject > () = A2mlObject(A2mlTypeName::BLOCK); + yylhs.value.as < a2l::A2mlObject > ().Tag(yystack_[3].value.as < std::string > ()); + yylhs.value.as < a2l::A2mlObject > ().MemberList().emplace_back(yystack_[1].value.as < a2l::A2mlObject > ()); + } +#line 1131 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 27: // enum_type_name: ENUM identifier BLOCK_BEGIN enumerator_list BLOCK_END +#line 161 "D:/projects/a2llib/src/a2mlparser.y" + { + yylhs.value.as < a2l::A2mlObject > () = A2mlObject(A2mlTypeName::ENUMERATE); + yylhs.value.as < a2l::A2mlObject > ().Ident(yystack_[3].value.as < std::string > ()); + yylhs.value.as < a2l::A2mlObject > ().EnumerateList(yystack_[1].value.as < a2l::A2mlEnumerateList > ()); + } +#line 1141 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 28: // enum_type_name: ENUM IDENT +#line 166 "D:/projects/a2llib/src/a2mlparser.y" + { + yylhs.value.as < a2l::A2mlObject > () = A2mlObject(A2mlTypeName::ENUMERATE); + yylhs.value.as < a2l::A2mlObject > ().Ident(yystack_[0].value.as < std::string > ()); + } +#line 1150 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 29: // enumerator_list: enumerator +#line 171 "D:/projects/a2llib/src/a2mlparser.y" + { + A2mlEnumerateList list; + auto& enumerator = yystack_[0].value.as < std::pair > (); + const auto itr = list.find(enumerator.first); + if (itr == list.cend() ) { + list.emplace(enumerator.first, enumerator.second); + } else { + // Change key + auto key = list.rbegin()->first; + ++key; + list.emplace(key, enumerator.second); + } + yylhs.value.as < a2l::A2mlEnumerateList > () = list; + } +#line 1169 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 30: // enumerator_list: enumerator_list enumerator +#line 185 "D:/projects/a2llib/src/a2mlparser.y" + { + auto& list = yystack_[1].value.as < a2l::A2mlEnumerateList > (); + auto& enumerator = yystack_[0].value.as < std::pair > (); + const auto itr = list.find(enumerator.first); + if (itr == list.cend() ) { + list.emplace(enumerator.first, enumerator.second); + } else { + // Change key + auto key = list.rbegin()->first; + ++key; + list.emplace(key, enumerator.second); + } + yylhs.value.as < a2l::A2mlEnumerateList > () = list; + } +#line 1188 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 31: // enumerator: keyword +#line 200 "D:/projects/a2llib/src/a2mlparser.y" + { + yylhs.value.as < std::pair > ().first = 0; + yylhs.value.as < std::pair > ().second = yystack_[0].value.as < std::string > (); + } +#line 1197 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 32: // enumerator: keyword EQUAL CONSTANT +#line 204 "D:/projects/a2llib/src/a2mlparser.y" + { + yylhs.value.as < std::pair > ().first = yystack_[0].value.as < int64_t > (); + yylhs.value.as < std::pair > ().second = yystack_[2].value.as < std::string > (); + } +#line 1206 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 33: // struct_type_name: STRUCT identifier BLOCK_BEGIN struct_member_list BLOCK_END +#line 209 "D:/projects/a2llib/src/a2mlparser.y" + { + yylhs.value.as < a2l::A2mlObject > () = A2mlObject(A2mlTypeName::STRUCT); + yylhs.value.as < a2l::A2mlObject > ().Ident(yystack_[3].value.as < std::string > ()); + yylhs.value.as < a2l::A2mlObject > ().MemberList(yystack_[1].value.as < a2l::A2mlMemberList > ()); + } +#line 1216 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 34: // struct_type_name: STRUCT IDENT +#line 214 "D:/projects/a2llib/src/a2mlparser.y" + { + yylhs.value.as < a2l::A2mlObject > () = A2mlObject(A2mlTypeName::STRUCT); + yylhs.value.as < a2l::A2mlObject > ().Ident(yystack_[0].value.as < std::string > ()); + } +#line 1225 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 35: // struct_member_list: %empty +#line 219 "D:/projects/a2llib/src/a2mlparser.y" + {} +#line 1231 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 36: // struct_member_list: struct_member_list struct_member +#line 220 "D:/projects/a2llib/src/a2mlparser.y" + { + yylhs.value.as < a2l::A2mlMemberList > () = yystack_[1].value.as < a2l::A2mlMemberList > (); + yylhs.value.as < a2l::A2mlMemberList > ().emplace_back(yystack_[0].value.as < a2l::A2mlObject > ()); + } +#line 1240 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 37: // struct_member: member DEF_END +#line 225 "D:/projects/a2llib/src/a2mlparser.y" + { + yylhs.value.as < a2l::A2mlObject > () = yystack_[1].value.as < a2l::A2mlObject > (); + } +#line 1248 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 38: // struct_member: MEM_BEGIN member MEM_END DEF_END +#line 228 "D:/projects/a2llib/src/a2mlparser.y" + { + yylhs.value.as < a2l::A2mlObject > () = yystack_[2].value.as < a2l::A2mlObject > (); + } +#line 1256 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 39: // member: type_name array_specifier +#line 232 "D:/projects/a2llib/src/a2mlparser.y" + { + yylhs.value.as < a2l::A2mlObject > () = yystack_[1].value.as < a2l::A2mlObject > (); + // Todo Array specifier +} +#line 1265 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 42: // taggedstruct_type_name: TAGGED_STRUCT identifier BLOCK_BEGIN taggedstruct_member_list BLOCK_END +#line 240 "D:/projects/a2llib/src/a2mlparser.y" + { + yylhs.value.as < a2l::A2mlObject > () = A2mlObject(A2mlTypeName::TAGGED_STRUCT); + yylhs.value.as < a2l::A2mlObject > ().Ident(yystack_[3].value.as < std::string > ()); + yylhs.value.as < a2l::A2mlObject > ().MemberList(yystack_[1].value.as < a2l::A2mlMemberList > ()); + } +#line 1275 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 43: // taggedstruct_type_name: TAGGED_STRUCT IDENT +#line 245 "D:/projects/a2llib/src/a2mlparser.y" + { + yylhs.value.as < a2l::A2mlObject > () = A2mlObject(A2mlTypeName::TAGGED_STRUCT); + yylhs.value.as < a2l::A2mlObject > ().Ident(yystack_[0].value.as < std::string > ()); + } +#line 1284 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 44: // taggedstruct_member_list: taggedstruct_member +#line 250 "D:/projects/a2llib/src/a2mlparser.y" + { + yylhs.value.as < a2l::A2mlMemberList > () = A2mlMemberList(); + yylhs.value.as < a2l::A2mlMemberList > ().emplace_back(yystack_[0].value.as < a2l::A2mlObject > ()); + } +#line 1293 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 45: // taggedstruct_member_list: taggedstruct_member_list taggedstruct_member +#line 254 "D:/projects/a2llib/src/a2mlparser.y" + { + yylhs.value.as < a2l::A2mlMemberList > () = yystack_[1].value.as < a2l::A2mlMemberList > (); + yylhs.value.as < a2l::A2mlMemberList > ().emplace_back(yystack_[0].value.as < a2l::A2mlObject > ()); + } +#line 1302 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 46: // taggedstruct_member: taggedstruct_definition DEF_END +#line 259 "D:/projects/a2llib/src/a2mlparser.y" + { yylhs.value.as < a2l::A2mlObject > () = yystack_[1].value.as < a2l::A2mlObject > (); } +#line 1308 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 47: // taggedstruct_member: MEM_BEGIN taggedstruct_definition MEM_END DEF_END +#line 260 "D:/projects/a2llib/src/a2mlparser.y" + { yylhs.value.as < a2l::A2mlObject > () = yystack_[2].value.as < a2l::A2mlObject > (); } +#line 1314 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 48: // taggedstruct_member: block_definition DEF_END +#line 261 "D:/projects/a2llib/src/a2mlparser.y" + {yylhs.value.as < a2l::A2mlObject > () = yystack_[1].value.as < a2l::A2mlObject > ();} +#line 1320 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 49: // taggedstruct_member: MEM_BEGIN block_definition MEM_END DEF_END +#line 262 "D:/projects/a2llib/src/a2mlparser.y" + { yylhs.value.as < a2l::A2mlObject > () = yystack_[2].value.as < a2l::A2mlObject > ();} +#line 1326 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 50: // taggedstruct_definition: tag +#line 264 "D:/projects/a2llib/src/a2mlparser.y" + { + yylhs.value.as < a2l::A2mlObject > () = A2mlObject(A2mlTypeName::UNKNOWN); + yylhs.value.as < a2l::A2mlObject > ().Tag(yystack_[0].value.as < std::string > ()); + } +#line 1335 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 51: // taggedstruct_definition: tag member +#line 268 "D:/projects/a2llib/src/a2mlparser.y" + { + yylhs.value.as < a2l::A2mlObject > () = yystack_[0].value.as < a2l::A2mlObject > (); + yylhs.value.as < a2l::A2mlObject > ().Tag(yystack_[1].value.as < std::string > ()); + } +#line 1344 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 52: // taggedstruct_definition: tag MEM_BEGIN member MEM_END +#line 272 "D:/projects/a2llib/src/a2mlparser.y" + { + yylhs.value.as < a2l::A2mlObject > () = yystack_[1].value.as < a2l::A2mlObject > (); + yylhs.value.as < a2l::A2mlObject > ().Tag(yystack_[3].value.as < std::string > ()); + } +#line 1353 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 53: // taggedunion_type_name: TAGGED_UNION identifier BLOCK_BEGIN taggedunion_member_list BLOCK_END +#line 277 "D:/projects/a2llib/src/a2mlparser.y" + { + yylhs.value.as < a2l::A2mlObject > () = A2mlObject(A2mlTypeName::TAGGED_UNION); + yylhs.value.as < a2l::A2mlObject > ().Ident(yystack_[3].value.as < std::string > ()); + yylhs.value.as < a2l::A2mlObject > ().MemberList( yystack_[1].value.as < a2l::A2mlMemberList > ()); + } +#line 1363 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 54: // taggedunion_type_name: TAGGED_UNION IDENT +#line 282 "D:/projects/a2llib/src/a2mlparser.y" + { + yylhs.value.as < a2l::A2mlObject > () = A2mlObject(A2mlTypeName::TAGGED_UNION); + yylhs.value.as < a2l::A2mlObject > ().Ident(yystack_[0].value.as < std::string > ()); + } +#line 1372 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 55: // taggedunion_member_list: taggedunion_member +#line 287 "D:/projects/a2llib/src/a2mlparser.y" + { + yylhs.value.as < a2l::A2mlMemberList > () = A2mlMemberList(); + yylhs.value.as < a2l::A2mlMemberList > ().emplace_back(yystack_[0].value.as < a2l::A2mlObject > ()); + } +#line 1381 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 56: // taggedunion_member_list: taggedunion_member_list taggedunion_member +#line 291 "D:/projects/a2llib/src/a2mlparser.y" + { + yylhs.value.as < a2l::A2mlMemberList > () = yystack_[1].value.as < a2l::A2mlMemberList > (); + yylhs.value.as < a2l::A2mlMemberList > ().emplace_back(yystack_[0].value.as < a2l::A2mlObject > ()); + } +#line 1390 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 57: // taggedunion_member: tag DEF_END +#line 296 "D:/projects/a2llib/src/a2mlparser.y" + { + yylhs.value.as < a2l::A2mlObject > () = A2mlObject(A2mlTypeName::UNKNOWN); + yylhs.value.as < a2l::A2mlObject > ().Tag(yystack_[1].value.as < std::string > ()); + } +#line 1399 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 58: // taggedunion_member: tag member DEF_END +#line 300 "D:/projects/a2llib/src/a2mlparser.y" + { + yylhs.value.as < a2l::A2mlObject > () = yystack_[1].value.as < a2l::A2mlObject > (); + yylhs.value.as < a2l::A2mlObject > ().Tag(yystack_[2].value.as < std::string > ()); + } +#line 1408 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 59: // taggedunion_member: block_definition DEF_END +#line 304 "D:/projects/a2llib/src/a2mlparser.y" + { + yylhs.value.as < a2l::A2mlObject > () = yystack_[1].value.as < a2l::A2mlObject > (); + } +#line 1416 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 60: // keyword: STRING +#line 308 "D:/projects/a2llib/src/a2mlparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 1422 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 61: // identifier: %empty +#line 310 "D:/projects/a2llib/src/a2mlparser.y" + {} +#line 1428 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 62: // identifier: IDENT +#line 311 "D:/projects/a2llib/src/a2mlparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 1434 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + case 63: // tag: STRING +#line 313 "D:/projects/a2llib/src/a2mlparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 1440 "D:/projects/a2llib/src/a2mlparser.cpp" + break; + + +#line 1444 "D:/projects/a2llib/src/a2mlparser.cpp" + + default: + break; + } + } +#if YY_EXCEPTIONS + catch (const syntax_error& yyexc) + { + YYCDEBUG << "Caught exception: " << yyexc.what() << '\n'; + error (yyexc); + YYERROR; + } +#endif // YY_EXCEPTIONS + YY_SYMBOL_PRINT ("-> $$ =", yylhs); + yypop_ (yylen); + yylen = 0; + + // Shift the result of the reduction. + yypush_ (YY_NULLPTR, YY_MOVE (yylhs)); + } + goto yynewstate; + + + /*--------------------------------------. + | yyerrlab -- here on detecting error. | + `--------------------------------------*/ + yyerrlab: + // If not already recovering from an error, report this error. + if (!yyerrstatus_) + { + ++yynerrs_; + std::string msg = YY_("syntax error"); + error (YY_MOVE (msg)); + } + + + if (yyerrstatus_ == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + // Return failure if at end of input. + if (yyla.kind () == symbol_kind::S_YYEOF) + YYABORT; + else if (!yyla.empty ()) + { + yy_destroy_ ("Error: discarding", yyla); + yyla.clear (); + } + } + + // Else will try to reuse lookahead token after shifting the error token. + goto yyerrlab1; + + + /*---------------------------------------------------. + | yyerrorlab -- error raised explicitly by YYERROR. | + `---------------------------------------------------*/ + yyerrorlab: + /* Pacify compilers when the user code never invokes YYERROR and + the label yyerrorlab therefore never appears in user code. */ + if (false) + YYERROR; + + /* Do not reclaim the symbols of the rule whose action triggered + this YYERROR. */ + yypop_ (yylen); + yylen = 0; + YY_STACK_PRINT (); + goto yyerrlab1; + + + /*-------------------------------------------------------------. + | yyerrlab1 -- common code for both syntax error and YYERROR. | + `-------------------------------------------------------------*/ + yyerrlab1: + yyerrstatus_ = 3; // Each real token shifted decrements this. + // Pop stack until we find a state that shifts the error token. + for (;;) + { + yyn = yypact_[+yystack_[0].state]; + if (!yy_pact_value_is_default_ (yyn)) + { + yyn += symbol_kind::S_YYerror; + if (0 <= yyn && yyn <= yylast_ + && yycheck_[yyn] == symbol_kind::S_YYerror) + { + yyn = yytable_[yyn]; + if (0 < yyn) + break; + } + } + + // Pop the current state because it cannot handle the error token. + if (yystack_.size () == 1) + YYABORT; + + yy_destroy_ ("Error: popping", yystack_[0]); + yypop_ (); + YY_STACK_PRINT (); + } + { + stack_symbol_type error_token; + + + // Shift the error token. + error_token.state = state_type (yyn); + yypush_ ("Shifting", YY_MOVE (error_token)); + } + goto yynewstate; + + + /*-------------------------------------. + | yyacceptlab -- YYACCEPT comes here. | + `-------------------------------------*/ + yyacceptlab: + yyresult = 0; + goto yyreturn; + + + /*-----------------------------------. + | yyabortlab -- YYABORT comes here. | + `-----------------------------------*/ + yyabortlab: + yyresult = 1; + goto yyreturn; + + + /*-----------------------------------------------------. + | yyreturn -- parsing is finished, return the result. | + `-----------------------------------------------------*/ + yyreturn: + if (!yyla.empty ()) + yy_destroy_ ("Cleanup: discarding lookahead", yyla); + + /* Do not reclaim the symbols of the rule whose action triggered + this YYABORT or YYACCEPT. */ + yypop_ (yylen); + YY_STACK_PRINT (); + while (1 < yystack_.size ()) + { + yy_destroy_ ("Cleanup: popping", yystack_[0]); + yypop_ (); + } + + return yyresult; + } +#if YY_EXCEPTIONS + catch (...) + { + YYCDEBUG << "Exception caught: cleaning lookahead and stack\n"; + // Do not try to display the values of the reclaimed symbols, + // as their printers might throw an exception. + if (!yyla.empty ()) + yy_destroy_ (YY_NULLPTR, yyla); + + while (1 < yystack_.size ()) + { + yy_destroy_ (YY_NULLPTR, yystack_[0]); + yypop_ (); + } + throw; + } +#endif // YY_EXCEPTIONS + } + + void + A2mlParser::error (const syntax_error& yyexc) + { + error (yyexc.what ()); + } + +#if A2MLDEBUG || 0 + const char * + A2mlParser::symbol_name (symbol_kind_type yysymbol) + { + return yytname_[yysymbol]; + } +#endif // #if A2MLDEBUG || 0 + + + + + + + + + + const signed char A2mlParser::yypact_ninf_ = -45; + + const signed char A2mlParser::yytable_ninf_ = -63; + + const short + A2mlParser::yypact_[] = + { + 1, 5, 6, 49, -45, -16, -45, -45, -2, -45, + -45, -45, -45, 13, 16, 17, -45, -45, -45, -45, + -45, 22, -45, 32, -45, -45, 34, -45, -45, -45, + -45, -45, 96, 47, 50, 47, 52, 47, 56, 47, + 58, 53, -45, -45, -45, 165, -45, -45, 43, -45, + 15, -3, -45, 61, 80, -45, -7, -45, 75, 73, + -3, 76, 4, -45, 79, 119, 84, 3, -45, 142, + -45, 86, -45, -45, 97, -45, 165, -45, 95, 88, + 90, -45, -45, -45, -45, 165, -45, -45, -45, -45, + -45, 102, 113, -45, 107, -45, 108, 122, 114, -45, + -45, 124, -45, -45, -45, -45 + }; + + const signed char + A2mlParser::yydefact_[] = + { + 2, 0, 0, 0, 1, 0, 14, 22, 61, 23, + 15, 17, 16, 61, 61, 61, 24, 18, 19, 20, + 21, 0, 4, 0, 8, 9, 0, 13, 10, 11, + 12, 63, 0, 28, 0, 34, 0, 43, 0, 54, + 0, 0, 5, 6, 7, 0, 40, 25, 0, 35, + 0, 0, 3, 0, 39, 60, 0, 29, 31, 0, + 0, 0, 0, 44, 0, 50, 0, 0, 55, 0, + 26, 0, 27, 30, 0, 33, 0, 36, 0, 0, + 0, 48, 42, 45, 46, 0, 51, 59, 53, 56, + 57, 0, 0, 32, 0, 37, 0, 0, 0, 58, + 41, 0, 49, 47, 52, 38 + }; + + const signed char + A2mlParser::yypgoto_[] = + { + -45, -45, -45, 111, -45, -1, -45, -43, -45, -45, + 87, -45, -45, -45, -44, -45, -45, -45, 82, 94, + -45, -45, 91, -45, 59, -5 + }; + + const signed char + A2mlParser::yydefgoto_[] = + { + 0, 2, 21, 22, 23, 46, 25, 26, 27, 56, + 57, 28, 59, 77, 47, 54, 29, 62, 63, 64, + 30, 67, 68, 58, 34, 65 + }; + + const signed char + A2mlParser::yytable_[] = + { + 32, 53, 24, 72, 1, 5, 4, 61, 66, 31, + 3, 5, 5, 88, 82, 78, 33, 79, 55, 61, + 24, 86, 31, 5, 66, 91, 41, 60, 31, 31, + 5, 35, 94, 6, 37, 39, 7, 8, 60, 9, + 31, 98, 10, 11, 12, 43, 69, 44, 13, 14, + 15, 16, 17, 18, 19, 20, -62, 5, 52, 48, + 6, 49, 69, 7, 8, 50, 9, 51, 55, 10, + 11, 12, 36, 38, 40, 13, 14, 15, 16, 17, + 18, 19, 20, 75, 6, 70, 71, 7, 8, 81, + 9, 74, 84, 10, 11, 12, 76, 87, 92, 13, + 14, 15, 16, 17, 18, 19, 20, 6, 95, 93, + 7, 8, 96, 9, 97, 99, 10, 11, 12, 45, + 100, 102, 13, 14, 15, 16, 17, 18, 19, 20, + 6, 101, 42, 7, 8, 103, 9, 105, 104, 10, + 11, 12, 85, 73, 83, 13, 14, 15, 16, 17, + 18, 19, 20, 6, 80, 90, 7, 8, 89, 9, + 0, 0, 10, 11, 12, 0, 0, 0, 13, 14, + 15, 16, 17, 18, 19, 20, 6, 0, 0, 7, + 8, 0, 9, 0, 0, 10, 11, 12, 0, 0, + 0, 13, 14, 15, 16, 17, 18, 19, 20 + }; + + const signed char + A2mlParser::yycheck_[] = + { + 5, 45, 3, 10, 3, 8, 0, 50, 51, 25, + 5, 8, 8, 10, 10, 59, 18, 60, 25, 62, + 21, 65, 25, 8, 67, 69, 4, 23, 25, 25, + 8, 18, 76, 11, 18, 18, 14, 15, 23, 17, + 25, 85, 20, 21, 22, 13, 51, 13, 26, 27, + 28, 29, 30, 31, 32, 33, 9, 8, 5, 9, + 11, 9, 67, 14, 15, 9, 17, 9, 25, 20, + 21, 22, 13, 14, 15, 26, 27, 28, 29, 30, + 31, 32, 33, 10, 11, 24, 6, 14, 15, 13, + 17, 16, 13, 20, 21, 22, 23, 13, 12, 26, + 27, 28, 29, 30, 31, 32, 33, 11, 13, 12, + 14, 15, 24, 17, 24, 13, 20, 21, 22, 23, + 7, 13, 26, 27, 28, 29, 30, 31, 32, 33, + 11, 24, 21, 14, 15, 13, 17, 13, 24, 20, + 21, 22, 23, 56, 62, 26, 27, 28, 29, 30, + 31, 32, 33, 11, 60, 13, 14, 15, 67, 17, + -1, -1, 20, 21, 22, -1, -1, -1, 26, 27, + 28, 29, 30, 31, 32, 33, 11, -1, -1, 14, + 15, -1, 17, -1, -1, 20, 21, 22, -1, -1, + -1, 26, 27, 28, 29, 30, 31, 32, 33 + }; + + const signed char + A2mlParser::yystos_[] = + { + 0, 3, 35, 5, 0, 8, 11, 14, 15, 17, + 20, 21, 22, 26, 27, 28, 29, 30, 31, 32, + 33, 36, 37, 38, 39, 40, 41, 42, 45, 50, + 54, 25, 59, 18, 58, 18, 58, 18, 58, 18, + 58, 4, 37, 13, 13, 23, 39, 48, 9, 9, + 9, 9, 5, 48, 49, 25, 43, 44, 57, 46, + 23, 41, 51, 52, 53, 59, 41, 55, 56, 59, + 24, 6, 10, 44, 16, 10, 23, 47, 48, 41, + 53, 13, 10, 52, 13, 23, 48, 13, 10, 56, + 13, 48, 12, 12, 48, 13, 24, 24, 48, 13, + 7, 24, 13, 13, 24, 13 + }; + + const signed char + A2mlParser::yyr1_[] = + { + 0, 34, 35, 35, 36, 36, 37, 37, 38, 39, + 39, 39, 39, 39, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 41, 41, 42, 42, 43, + 43, 44, 44, 45, 45, 46, 46, 47, 47, 48, + 49, 49, 50, 50, 51, 51, 52, 52, 52, 52, + 53, 53, 53, 54, 54, 55, 55, 56, 56, 56, + 57, 58, 58, 59 + }; + + const signed char + A2mlParser::yyr2_[] = + { + 0, 2, 0, 5, 1, 2, 2, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 5, 5, 2, 1, + 2, 1, 3, 5, 2, 0, 2, 2, 4, 2, + 0, 4, 5, 2, 1, 2, 2, 4, 2, 4, + 1, 2, 4, 5, 2, 1, 2, 2, 3, 2, + 1, 0, 1, 1 + }; + + +#if A2MLDEBUG + // YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + // First, the terminals, then, starting at \a YYNTOKENS, nonterminals. + const char* + const A2mlParser::yytname_[] = + { + "\"end of file\"", "error", "\"invalid token\"", "A2ML_BEGIN", + "A2ML_END", "A2ML", "ARRAY_BEGIN", "ARRAY_END", "BLOCK", "BLOCK_BEGIN", + "BLOCK_END", "CHAR", "CONSTANT", "DEF_END", "DOUBLE", "ENUM", "EQUAL", + "FLOAT", "IDENT", "IF_DATA", "INT", "INT64", "LONG", "MEM_BEGIN", + "MEM_END", "STRING", "STRUCT", "TAGGED_STRUCT", "TAGGED_UNION", + "TEXT_ARRAY", "UCHAR", "UINT", "UINT64", "ULONG", "$accept", + "a2ml_block", "declaration_list", "declaration", "type_definition", + "type_name", "predefined_type_name", "block_definition", + "enum_type_name", "enumerator_list", "enumerator", "struct_type_name", + "struct_member_list", "struct_member", "member", "array_specifier", + "taggedstruct_type_name", "taggedstruct_member_list", + "taggedstruct_member", "taggedstruct_definition", + "taggedunion_type_name", "taggedunion_member_list", "taggedunion_member", + "keyword", "identifier", "tag", YY_NULLPTR + }; +#endif + + +#if A2MLDEBUG + const short + A2mlParser::yyrline_[] = + { + 0, 100, 100, 101, 105, 109, 114, 115, 117, 119, + 123, 126, 129, 132, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 149, 154, 161, 166, 171, + 185, 200, 204, 209, 214, 219, 220, 225, 228, 232, + 237, 238, 240, 245, 250, 254, 259, 260, 261, 262, + 264, 268, 272, 277, 282, 287, 291, 296, 300, 304, + 308, 310, 311, 313 + }; + + void + A2mlParser::yy_stack_print_ () const + { + *yycdebug_ << "Stack now"; + for (stack_type::const_iterator + i = yystack_.begin (), + i_end = yystack_.end (); + i != i_end; ++i) + *yycdebug_ << ' ' << int (i->state); + *yycdebug_ << '\n'; + } + + void + A2mlParser::yy_reduce_print_ (int yyrule) const + { + int yylno = yyrline_[yyrule]; + int yynrhs = yyr2_[yyrule]; + // Print the symbols being reduced, and their result. + *yycdebug_ << "Reducing stack by rule " << yyrule - 1 + << " (line " << yylno << "):\n"; + // The symbols being reduced. + for (int yyi = 0; yyi < yynrhs; yyi++) + YY_SYMBOL_PRINT (" $" << yyi + 1 << " =", + yystack_[(yynrhs) - (yyi + 1)]); + } +#endif // A2MLDEBUG + + A2mlParser::symbol_kind_type + A2mlParser::yytranslate_ (int t) YY_NOEXCEPT + { + // YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to + // TOKEN-NUM as returned by yylex. + static + const signed char + translate_table[] = + { + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33 + }; + // Last valid token kind. + const int code_max = 288; + + if (t <= 0) + return symbol_kind::S_YYEOF; + else if (t <= code_max) + return static_cast (translate_table[t]); + else + return symbol_kind::S_YYUNDEF; + } + +#line 6 "D:/projects/a2llib/src/a2mlparser.y" +} // a2l +#line 1892 "D:/projects/a2llib/src/a2mlparser.cpp" + +#line 315 "D:/projects/a2llib/src/a2mlparser.y" + + +void a2l::A2mlParser::error(const std::string& err) { + const auto line = scanner.lineno(); + // const auto column = scanner.YYLeng(); + const std::string near = scanner.YYText() != nullptr ? scanner.YYText() : ""; + std::ostringstream error; + error << "Parser error: " << err + << ", Line: " << line + << ", Near: " << near; + scanner.LastError(error.str()); +} diff --git a/a2llib-main/src/a2mlparser.hpp b/a2llib-main/src/a2mlparser.hpp new file mode 100644 index 0000000..f3b6f86 --- /dev/null +++ b/a2llib-main/src/a2mlparser.hpp @@ -0,0 +1,1875 @@ +// A Bison parser, made by GNU Bison 3.8.2. + +// Skeleton interface for Bison LALR(1) parsers in C++ + +// Copyright (C) 2002-2015, 2018-2021 Free Software Foundation, Inc. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// As a special exception, you may create a larger work that contains +// part or all of the Bison parser skeleton and distribute that work +// under terms of your choice, so long as that work isn't itself a +// parser generator using the skeleton or a modified version thereof +// as a parser skeleton. Alternatively, if you modify or redistribute +// the parser skeleton itself, you may (at your option) remove this +// special exception, which will cause the skeleton and the resulting +// Bison output files to be licensed under the GNU General Public +// License without this special exception. + +// This special exception was added by the Free Software Foundation in +// version 2.2 of Bison. + + +/** + ** \file D:/projects/a2llib/src/a2mlparser.hpp + ** Define the a2l::parser class. + */ + +// C++ LALR(1) parser skeleton written by Akim Demaille. + +// DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, +// especially those whose name start with YY_ or yy_. They are +// private implementation details that can be changed or removed. + +#ifndef YY_A2ML_D_PROJECTS_A2LLIB_SRC_A2MLPARSER_HPP_INCLUDED +# define YY_A2ML_D_PROJECTS_A2LLIB_SRC_A2MLPARSER_HPP_INCLUDED +// "%code requires" blocks. +#line 10 "D:/projects/a2llib/src/a2mlparser.y" + +#include +#include +#include +#include +#include "a2l/a2mlobject.h" + +namespace a2l { +class A2mlScanner; +} + + +#line 62 "D:/projects/a2llib/src/a2mlparser.hpp" + + +# include // std::abort +# include +# include +# include +# include + +#if defined __cplusplus +# define YY_CPLUSPLUS __cplusplus +#else +# define YY_CPLUSPLUS 199711L +#endif + +// Support move semantics when possible. +#if 201103L <= YY_CPLUSPLUS +# define YY_MOVE std::move +# define YY_MOVE_OR_COPY move +# define YY_MOVE_REF(Type) Type&& +# define YY_RVREF(Type) Type&& +# define YY_COPY(Type) Type +#else +# define YY_MOVE +# define YY_MOVE_OR_COPY copy +# define YY_MOVE_REF(Type) Type& +# define YY_RVREF(Type) const Type& +# define YY_COPY(Type) const Type& +#endif + +// Support noexcept when possible. +#if 201103L <= YY_CPLUSPLUS +# define YY_NOEXCEPT noexcept +# define YY_NOTHROW +#else +# define YY_NOEXCEPT +# define YY_NOTHROW throw () +#endif + +// Support constexpr when possible. +#if 201703 <= YY_CPLUSPLUS +# define YY_CONSTEXPR constexpr +#else +# define YY_CONSTEXPR +#endif + + + +#ifndef YY_ATTRIBUTE_PURE +# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define YY_ATTRIBUTE_PURE +# endif +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +# else +# define YY_ATTRIBUTE_UNUSED +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YY_USE(E) ((void) (E)) +#else +# define YY_USE(E) /* empty */ +#endif + +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ +# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") +# else +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# endif +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") +#else +# define YY_INITIAL_VALUE(Value) Value +#endif +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + +#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ +# define YY_IGNORE_USELESS_CAST_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") +# define YY_IGNORE_USELESS_CAST_END \ + _Pragma ("GCC diagnostic pop") +#endif +#ifndef YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_END +#endif + +# ifndef YY_CAST +# ifdef __cplusplus +# define YY_CAST(Type, Val) static_cast (Val) +# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) +# else +# define YY_CAST(Type, Val) ((Type) (Val)) +# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) +# endif +# endif +# ifndef YY_NULLPTR +# if defined __cplusplus +# if 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# else +# define YY_NULLPTR ((void*)0) +# endif +# endif + +/* Debug traces. */ +#ifndef A2MLDEBUG +# if defined YYDEBUG +#if YYDEBUG +# define A2MLDEBUG 1 +# else +# define A2MLDEBUG 0 +# endif +# else /* ! defined YYDEBUG */ +# define A2MLDEBUG 0 +# endif /* ! defined YYDEBUG */ +#endif /* ! defined A2MLDEBUG */ + +#line 6 "D:/projects/a2llib/src/a2mlparser.y" +namespace a2l { +#line 206 "D:/projects/a2llib/src/a2mlparser.hpp" + + + + + /// A Bison parser. + class A2mlParser + { + public: +#ifdef A2MLSTYPE +# ifdef __GNUC__ +# pragma GCC message "bison: do not #define A2MLSTYPE in C++, use %define api.value.type" +# endif + typedef A2MLSTYPE value_type; +#else + /// A buffer to store and retrieve objects. + /// + /// Sort of a variant, but does not keep track of the nature + /// of the stored data, since that knowledge is available + /// via the current parser state. + class value_type + { + public: + /// Type of *this. + typedef value_type self_type; + + /// Empty construction. + value_type () YY_NOEXCEPT + : yyraw_ () + {} + + /// Construct and fill. + template + value_type (YY_RVREF (T) t) + { + new (yyas_ ()) T (YY_MOVE (t)); + } + +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + value_type (const self_type&) = delete; + /// Non copyable. + self_type& operator= (const self_type&) = delete; +#endif + + /// Destruction, allowed only if empty. + ~value_type () YY_NOEXCEPT + {} + +# if 201103L <= YY_CPLUSPLUS + /// Instantiate a \a T in here from \a t. + template + T& + emplace (U&&... u) + { + return *new (yyas_ ()) T (std::forward (u)...); + } +# else + /// Instantiate an empty \a T in here. + template + T& + emplace () + { + return *new (yyas_ ()) T (); + } + + /// Instantiate a \a T in here from \a t. + template + T& + emplace (const T& t) + { + return *new (yyas_ ()) T (t); + } +# endif + + /// Instantiate an empty \a T in here. + /// Obsolete, use emplace. + template + T& + build () + { + return emplace (); + } + + /// Instantiate a \a T in here from \a t. + /// Obsolete, use emplace. + template + T& + build (const T& t) + { + return emplace (t); + } + + /// Accessor to a built \a T. + template + T& + as () YY_NOEXCEPT + { + return *yyas_ (); + } + + /// Const accessor to a built \a T (for %printer). + template + const T& + as () const YY_NOEXCEPT + { + return *yyas_ (); + } + + /// Swap the content with \a that, of same type. + /// + /// Both variants must be built beforehand, because swapping the actual + /// data requires reading it (with as()), and this is not possible on + /// unconstructed variants: it would require some dynamic testing, which + /// should not be the variant's responsibility. + /// Swapping between built and (possibly) non-built is done with + /// self_type::move (). + template + void + swap (self_type& that) YY_NOEXCEPT + { + std::swap (as (), that.as ()); + } + + /// Move the content of \a that to this. + /// + /// Destroys \a that. + template + void + move (self_type& that) + { +# if 201103L <= YY_CPLUSPLUS + emplace (std::move (that.as ())); +# else + emplace (); + swap (that); +# endif + that.destroy (); + } + +# if 201103L <= YY_CPLUSPLUS + /// Move the content of \a that to this. + template + void + move (self_type&& that) + { + emplace (std::move (that.as ())); + that.destroy (); + } +#endif + + /// Copy the content of \a that to this. + template + void + copy (const self_type& that) + { + emplace (that.as ()); + } + + /// Destroy the stored \a T. + template + void + destroy () + { + as ().~T (); + } + + private: +#if YY_CPLUSPLUS < 201103L + /// Non copyable. + value_type (const self_type&); + /// Non copyable. + self_type& operator= (const self_type&); +#endif + + /// Accessor to raw memory as \a T. + template + T* + yyas_ () YY_NOEXCEPT + { + void *yyp = yyraw_; + return static_cast (yyp); + } + + /// Const accessor to raw memory as \a T. + template + const T* + yyas_ () const YY_NOEXCEPT + { + const void *yyp = yyraw_; + return static_cast (yyp); + } + + /// An auxiliary type to compute the largest semantic type. + union union_type + { + // predefined_type_name + char dummy1[sizeof (a2l::A2mlDataType)]; + + // enumerator_list + char dummy2[sizeof (a2l::A2mlEnumerateList)]; + + // declaration_list + // struct_member_list + // taggedstruct_member_list + // taggedunion_member_list + char dummy3[sizeof (a2l::A2mlMemberList)]; + + // declaration + // type_definition + // type_name + // block_definition + // enum_type_name + // struct_type_name + // struct_member + // member + // taggedstruct_type_name + // taggedstruct_member + // taggedstruct_definition + // taggedunion_type_name + // taggedunion_member + char dummy4[sizeof (a2l::A2mlObject)]; + + // FLOAT + char dummy5[sizeof (double)]; + + // CONSTANT + char dummy6[sizeof (int64_t)]; + + // enumerator + char dummy7[sizeof (std::pair)]; + + // IDENT + // STRING + // keyword + // identifier + // tag + char dummy8[sizeof (std::string)]; + }; + + /// The size of the largest semantic type. + enum { size = sizeof (union_type) }; + + /// A buffer to store semantic values. + union + { + /// Strongest alignment constraints. + long double yyalign_me_; + /// A buffer large enough to store any of the semantic values. + char yyraw_[size]; + }; + }; + +#endif + /// Backward compatibility (Bison 3.8). + typedef value_type semantic_type; + + + /// Syntax errors thrown from user actions. + struct syntax_error : std::runtime_error + { + syntax_error (const std::string& m) + : std::runtime_error (m) + {} + + syntax_error (const syntax_error& s) + : std::runtime_error (s.what ()) + {} + + ~syntax_error () YY_NOEXCEPT YY_NOTHROW; + }; + + /// Token kinds. + struct token + { + enum token_kind_type + { + A2MLEMPTY = -2, + A2MLEOF = 0, // "end of file" + A2MLerror = 256, // error + A2MLUNDEF = 257, // "invalid token" + A2ML_BEGIN = 258, // A2ML_BEGIN + A2ML_END = 259, // A2ML_END + A2ML = 260, // A2ML + ARRAY_BEGIN = 261, // ARRAY_BEGIN + ARRAY_END = 262, // ARRAY_END + BLOCK = 263, // BLOCK + BLOCK_BEGIN = 264, // BLOCK_BEGIN + BLOCK_END = 265, // BLOCK_END + CHAR = 266, // CHAR + CONSTANT = 267, // CONSTANT + DEF_END = 268, // DEF_END + DOUBLE = 269, // DOUBLE + ENUM = 270, // ENUM + EQUAL = 271, // EQUAL + FLOAT = 272, // FLOAT + IDENT = 273, // IDENT + IF_DATA = 274, // IF_DATA + INT = 275, // INT + INT64 = 276, // INT64 + LONG = 277, // LONG + MEM_BEGIN = 278, // MEM_BEGIN + MEM_END = 279, // MEM_END + STRING = 280, // STRING + STRUCT = 281, // STRUCT + TAGGED_STRUCT = 282, // TAGGED_STRUCT + TAGGED_UNION = 283, // TAGGED_UNION + TEXT_ARRAY = 284, // TEXT_ARRAY + UCHAR = 285, // UCHAR + UINT = 286, // UINT + UINT64 = 287, // UINT64 + ULONG = 288 // ULONG + }; + /// Backward compatibility alias (Bison 3.6). + typedef token_kind_type yytokentype; + }; + + /// Token kind, as returned by yylex. + typedef token::token_kind_type token_kind_type; + + /// Backward compatibility alias (Bison 3.6). + typedef token_kind_type token_type; + + /// Symbol kinds. + struct symbol_kind + { + enum symbol_kind_type + { + YYNTOKENS = 34, ///< Number of tokens. + S_YYEMPTY = -2, + S_YYEOF = 0, // "end of file" + S_YYerror = 1, // error + S_YYUNDEF = 2, // "invalid token" + S_A2ML_BEGIN = 3, // A2ML_BEGIN + S_A2ML_END = 4, // A2ML_END + S_A2ML = 5, // A2ML + S_ARRAY_BEGIN = 6, // ARRAY_BEGIN + S_ARRAY_END = 7, // ARRAY_END + S_BLOCK = 8, // BLOCK + S_BLOCK_BEGIN = 9, // BLOCK_BEGIN + S_BLOCK_END = 10, // BLOCK_END + S_CHAR = 11, // CHAR + S_CONSTANT = 12, // CONSTANT + S_DEF_END = 13, // DEF_END + S_DOUBLE = 14, // DOUBLE + S_ENUM = 15, // ENUM + S_EQUAL = 16, // EQUAL + S_FLOAT = 17, // FLOAT + S_IDENT = 18, // IDENT + S_IF_DATA = 19, // IF_DATA + S_INT = 20, // INT + S_INT64 = 21, // INT64 + S_LONG = 22, // LONG + S_MEM_BEGIN = 23, // MEM_BEGIN + S_MEM_END = 24, // MEM_END + S_STRING = 25, // STRING + S_STRUCT = 26, // STRUCT + S_TAGGED_STRUCT = 27, // TAGGED_STRUCT + S_TAGGED_UNION = 28, // TAGGED_UNION + S_TEXT_ARRAY = 29, // TEXT_ARRAY + S_UCHAR = 30, // UCHAR + S_UINT = 31, // UINT + S_UINT64 = 32, // UINT64 + S_ULONG = 33, // ULONG + S_YYACCEPT = 34, // $accept + S_a2ml_block = 35, // a2ml_block + S_declaration_list = 36, // declaration_list + S_declaration = 37, // declaration + S_type_definition = 38, // type_definition + S_type_name = 39, // type_name + S_predefined_type_name = 40, // predefined_type_name + S_block_definition = 41, // block_definition + S_enum_type_name = 42, // enum_type_name + S_enumerator_list = 43, // enumerator_list + S_enumerator = 44, // enumerator + S_struct_type_name = 45, // struct_type_name + S_struct_member_list = 46, // struct_member_list + S_struct_member = 47, // struct_member + S_member = 48, // member + S_array_specifier = 49, // array_specifier + S_taggedstruct_type_name = 50, // taggedstruct_type_name + S_taggedstruct_member_list = 51, // taggedstruct_member_list + S_taggedstruct_member = 52, // taggedstruct_member + S_taggedstruct_definition = 53, // taggedstruct_definition + S_taggedunion_type_name = 54, // taggedunion_type_name + S_taggedunion_member_list = 55, // taggedunion_member_list + S_taggedunion_member = 56, // taggedunion_member + S_keyword = 57, // keyword + S_identifier = 58, // identifier + S_tag = 59 // tag + }; + }; + + /// (Internal) symbol kind. + typedef symbol_kind::symbol_kind_type symbol_kind_type; + + /// The number of tokens. + static const symbol_kind_type YYNTOKENS = symbol_kind::YYNTOKENS; + + /// A complete symbol. + /// + /// Expects its Base type to provide access to the symbol kind + /// via kind (). + /// + /// Provide access to semantic value. + template + struct basic_symbol : Base + { + /// Alias to Base. + typedef Base super_type; + + /// Default constructor. + basic_symbol () YY_NOEXCEPT + : value () + {} + +#if 201103L <= YY_CPLUSPLUS + /// Move constructor. + basic_symbol (basic_symbol&& that) + : Base (std::move (that)) + , value () + { + switch (this->kind ()) + { + case symbol_kind::S_predefined_type_name: // predefined_type_name + value.move< a2l::A2mlDataType > (std::move (that.value)); + break; + + case symbol_kind::S_enumerator_list: // enumerator_list + value.move< a2l::A2mlEnumerateList > (std::move (that.value)); + break; + + case symbol_kind::S_declaration_list: // declaration_list + case symbol_kind::S_struct_member_list: // struct_member_list + case symbol_kind::S_taggedstruct_member_list: // taggedstruct_member_list + case symbol_kind::S_taggedunion_member_list: // taggedunion_member_list + value.move< a2l::A2mlMemberList > (std::move (that.value)); + break; + + case symbol_kind::S_declaration: // declaration + case symbol_kind::S_type_definition: // type_definition + case symbol_kind::S_type_name: // type_name + case symbol_kind::S_block_definition: // block_definition + case symbol_kind::S_enum_type_name: // enum_type_name + case symbol_kind::S_struct_type_name: // struct_type_name + case symbol_kind::S_struct_member: // struct_member + case symbol_kind::S_member: // member + case symbol_kind::S_taggedstruct_type_name: // taggedstruct_type_name + case symbol_kind::S_taggedstruct_member: // taggedstruct_member + case symbol_kind::S_taggedstruct_definition: // taggedstruct_definition + case symbol_kind::S_taggedunion_type_name: // taggedunion_type_name + case symbol_kind::S_taggedunion_member: // taggedunion_member + value.move< a2l::A2mlObject > (std::move (that.value)); + break; + + case symbol_kind::S_FLOAT: // FLOAT + value.move< double > (std::move (that.value)); + break; + + case symbol_kind::S_CONSTANT: // CONSTANT + value.move< int64_t > (std::move (that.value)); + break; + + case symbol_kind::S_enumerator: // enumerator + value.move< std::pair > (std::move (that.value)); + break; + + case symbol_kind::S_IDENT: // IDENT + case symbol_kind::S_STRING: // STRING + case symbol_kind::S_keyword: // keyword + case symbol_kind::S_identifier: // identifier + case symbol_kind::S_tag: // tag + value.move< std::string > (std::move (that.value)); + break; + + default: + break; + } + + } +#endif + + /// Copy constructor. + basic_symbol (const basic_symbol& that); + + /// Constructors for typed symbols. +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t) + : Base (t) + {} +#else + basic_symbol (typename Base::kind_type t) + : Base (t) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, a2l::A2mlDataType&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const a2l::A2mlDataType& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, a2l::A2mlEnumerateList&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const a2l::A2mlEnumerateList& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, a2l::A2mlMemberList&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const a2l::A2mlMemberList& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, a2l::A2mlObject&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const a2l::A2mlObject& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, double&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const double& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, int64_t&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const int64_t& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, std::pair&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const std::pair& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, std::string&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const std::string& v) + : Base (t) + , value (v) + {} +#endif + + /// Destroy the symbol. + ~basic_symbol () + { + clear (); + } + + + + /// Destroy contents, and record that is empty. + void clear () YY_NOEXCEPT + { + // User destructor. + symbol_kind_type yykind = this->kind (); + basic_symbol& yysym = *this; + (void) yysym; + switch (yykind) + { + default: + break; + } + + // Value type destructor. +switch (yykind) + { + case symbol_kind::S_predefined_type_name: // predefined_type_name + value.template destroy< a2l::A2mlDataType > (); + break; + + case symbol_kind::S_enumerator_list: // enumerator_list + value.template destroy< a2l::A2mlEnumerateList > (); + break; + + case symbol_kind::S_declaration_list: // declaration_list + case symbol_kind::S_struct_member_list: // struct_member_list + case symbol_kind::S_taggedstruct_member_list: // taggedstruct_member_list + case symbol_kind::S_taggedunion_member_list: // taggedunion_member_list + value.template destroy< a2l::A2mlMemberList > (); + break; + + case symbol_kind::S_declaration: // declaration + case symbol_kind::S_type_definition: // type_definition + case symbol_kind::S_type_name: // type_name + case symbol_kind::S_block_definition: // block_definition + case symbol_kind::S_enum_type_name: // enum_type_name + case symbol_kind::S_struct_type_name: // struct_type_name + case symbol_kind::S_struct_member: // struct_member + case symbol_kind::S_member: // member + case symbol_kind::S_taggedstruct_type_name: // taggedstruct_type_name + case symbol_kind::S_taggedstruct_member: // taggedstruct_member + case symbol_kind::S_taggedstruct_definition: // taggedstruct_definition + case symbol_kind::S_taggedunion_type_name: // taggedunion_type_name + case symbol_kind::S_taggedunion_member: // taggedunion_member + value.template destroy< a2l::A2mlObject > (); + break; + + case symbol_kind::S_FLOAT: // FLOAT + value.template destroy< double > (); + break; + + case symbol_kind::S_CONSTANT: // CONSTANT + value.template destroy< int64_t > (); + break; + + case symbol_kind::S_enumerator: // enumerator + value.template destroy< std::pair > (); + break; + + case symbol_kind::S_IDENT: // IDENT + case symbol_kind::S_STRING: // STRING + case symbol_kind::S_keyword: // keyword + case symbol_kind::S_identifier: // identifier + case symbol_kind::S_tag: // tag + value.template destroy< std::string > (); + break; + + default: + break; + } + + Base::clear (); + } + +#if A2MLDEBUG || 0 + /// The user-facing name of this symbol. + const char *name () const YY_NOEXCEPT + { + return A2mlParser::symbol_name (this->kind ()); + } +#endif // #if A2MLDEBUG || 0 + + + /// Backward compatibility (Bison 3.6). + symbol_kind_type type_get () const YY_NOEXCEPT; + + /// Whether empty. + bool empty () const YY_NOEXCEPT; + + /// Destructive move, \a s is emptied into this. + void move (basic_symbol& s); + + /// The semantic value. + value_type value; + + private: +#if YY_CPLUSPLUS < 201103L + /// Assignment operator. + basic_symbol& operator= (const basic_symbol& that); +#endif + }; + + /// Type access provider for token (enum) based symbols. + struct by_kind + { + /// The symbol kind as needed by the constructor. + typedef token_kind_type kind_type; + + /// Default constructor. + by_kind () YY_NOEXCEPT; + +#if 201103L <= YY_CPLUSPLUS + /// Move constructor. + by_kind (by_kind&& that) YY_NOEXCEPT; +#endif + + /// Copy constructor. + by_kind (const by_kind& that) YY_NOEXCEPT; + + /// Constructor from (external) token numbers. + by_kind (kind_type t) YY_NOEXCEPT; + + + + /// Record that this symbol is empty. + void clear () YY_NOEXCEPT; + + /// Steal the symbol kind from \a that. + void move (by_kind& that); + + /// The (internal) type number (corresponding to \a type). + /// \a empty when empty. + symbol_kind_type kind () const YY_NOEXCEPT; + + /// Backward compatibility (Bison 3.6). + symbol_kind_type type_get () const YY_NOEXCEPT; + + /// The symbol kind. + /// \a S_YYEMPTY when empty. + symbol_kind_type kind_; + }; + + /// Backward compatibility for a private implementation detail (Bison 3.6). + typedef by_kind by_type; + + /// "External" symbols: returned by the scanner. + struct symbol_type : basic_symbol + { + /// Superclass. + typedef basic_symbol super_type; + + /// Empty symbol. + symbol_type () YY_NOEXCEPT {} + + /// Constructor for valueless symbols, and symbols from each type. +#if 201103L <= YY_CPLUSPLUS + symbol_type (int tok) + : super_type (token_kind_type (tok)) +#else + symbol_type (int tok) + : super_type (token_kind_type (tok)) +#endif + {} +#if 201103L <= YY_CPLUSPLUS + symbol_type (int tok, double v) + : super_type (token_kind_type (tok), std::move (v)) +#else + symbol_type (int tok, const double& v) + : super_type (token_kind_type (tok), v) +#endif + {} +#if 201103L <= YY_CPLUSPLUS + symbol_type (int tok, int64_t v) + : super_type (token_kind_type (tok), std::move (v)) +#else + symbol_type (int tok, const int64_t& v) + : super_type (token_kind_type (tok), v) +#endif + {} +#if 201103L <= YY_CPLUSPLUS + symbol_type (int tok, std::string v) + : super_type (token_kind_type (tok), std::move (v)) +#else + symbol_type (int tok, const std::string& v) + : super_type (token_kind_type (tok), v) +#endif + {} + }; + + /// Build a parser object. + A2mlParser (a2l::A2mlScanner &scanner_yyarg); + virtual ~A2mlParser (); + +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + A2mlParser (const A2mlParser&) = delete; + /// Non copyable. + A2mlParser& operator= (const A2mlParser&) = delete; +#endif + + /// Parse. An alias for parse (). + /// \returns 0 iff parsing succeeded. + int operator() (); + + /// Parse. + /// \returns 0 iff parsing succeeded. + virtual int parse (); + +#if A2MLDEBUG + /// The current debugging stream. + std::ostream& debug_stream () const YY_ATTRIBUTE_PURE; + /// Set the current debugging stream. + void set_debug_stream (std::ostream &); + + /// Type for debugging levels. + typedef int debug_level_type; + /// The current debugging level. + debug_level_type debug_level () const YY_ATTRIBUTE_PURE; + /// Set the current debugging level. + void set_debug_level (debug_level_type l); +#endif + + /// Report a syntax error. + /// \param msg a description of the syntax error. + virtual void error (const std::string& msg); + + /// Report a syntax error. + void error (const syntax_error& err); + +#if A2MLDEBUG || 0 + /// The user-facing name of the symbol whose (internal) number is + /// YYSYMBOL. No bounds checking. + static const char *symbol_name (symbol_kind_type yysymbol); +#endif // #if A2MLDEBUG || 0 + + + // Implementation of make_symbol for each token kind. +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_A2MLEOF () + { + return symbol_type (token::A2MLEOF); + } +#else + static + symbol_type + make_A2MLEOF () + { + return symbol_type (token::A2MLEOF); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_A2MLerror () + { + return symbol_type (token::A2MLerror); + } +#else + static + symbol_type + make_A2MLerror () + { + return symbol_type (token::A2MLerror); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_A2MLUNDEF () + { + return symbol_type (token::A2MLUNDEF); + } +#else + static + symbol_type + make_A2MLUNDEF () + { + return symbol_type (token::A2MLUNDEF); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_A2ML_BEGIN () + { + return symbol_type (token::A2ML_BEGIN); + } +#else + static + symbol_type + make_A2ML_BEGIN () + { + return symbol_type (token::A2ML_BEGIN); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_A2ML_END () + { + return symbol_type (token::A2ML_END); + } +#else + static + symbol_type + make_A2ML_END () + { + return symbol_type (token::A2ML_END); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_A2ML () + { + return symbol_type (token::A2ML); + } +#else + static + symbol_type + make_A2ML () + { + return symbol_type (token::A2ML); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ARRAY_BEGIN () + { + return symbol_type (token::ARRAY_BEGIN); + } +#else + static + symbol_type + make_ARRAY_BEGIN () + { + return symbol_type (token::ARRAY_BEGIN); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ARRAY_END () + { + return symbol_type (token::ARRAY_END); + } +#else + static + symbol_type + make_ARRAY_END () + { + return symbol_type (token::ARRAY_END); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_BLOCK () + { + return symbol_type (token::BLOCK); + } +#else + static + symbol_type + make_BLOCK () + { + return symbol_type (token::BLOCK); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_BLOCK_BEGIN () + { + return symbol_type (token::BLOCK_BEGIN); + } +#else + static + symbol_type + make_BLOCK_BEGIN () + { + return symbol_type (token::BLOCK_BEGIN); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_BLOCK_END () + { + return symbol_type (token::BLOCK_END); + } +#else + static + symbol_type + make_BLOCK_END () + { + return symbol_type (token::BLOCK_END); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CHAR () + { + return symbol_type (token::CHAR); + } +#else + static + symbol_type + make_CHAR () + { + return symbol_type (token::CHAR); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CONSTANT (int64_t v) + { + return symbol_type (token::CONSTANT, std::move (v)); + } +#else + static + symbol_type + make_CONSTANT (const int64_t& v) + { + return symbol_type (token::CONSTANT, v); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DEF_END () + { + return symbol_type (token::DEF_END); + } +#else + static + symbol_type + make_DEF_END () + { + return symbol_type (token::DEF_END); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DOUBLE () + { + return symbol_type (token::DOUBLE); + } +#else + static + symbol_type + make_DOUBLE () + { + return symbol_type (token::DOUBLE); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ENUM () + { + return symbol_type (token::ENUM); + } +#else + static + symbol_type + make_ENUM () + { + return symbol_type (token::ENUM); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_EQUAL () + { + return symbol_type (token::EQUAL); + } +#else + static + symbol_type + make_EQUAL () + { + return symbol_type (token::EQUAL); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_FLOAT (double v) + { + return symbol_type (token::FLOAT, std::move (v)); + } +#else + static + symbol_type + make_FLOAT (const double& v) + { + return symbol_type (token::FLOAT, v); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_IDENT (std::string v) + { + return symbol_type (token::IDENT, std::move (v)); + } +#else + static + symbol_type + make_IDENT (const std::string& v) + { + return symbol_type (token::IDENT, v); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_IF_DATA () + { + return symbol_type (token::IF_DATA); + } +#else + static + symbol_type + make_IF_DATA () + { + return symbol_type (token::IF_DATA); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_INT () + { + return symbol_type (token::INT); + } +#else + static + symbol_type + make_INT () + { + return symbol_type (token::INT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_INT64 () + { + return symbol_type (token::INT64); + } +#else + static + symbol_type + make_INT64 () + { + return symbol_type (token::INT64); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LONG () + { + return symbol_type (token::LONG); + } +#else + static + symbol_type + make_LONG () + { + return symbol_type (token::LONG); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MEM_BEGIN () + { + return symbol_type (token::MEM_BEGIN); + } +#else + static + symbol_type + make_MEM_BEGIN () + { + return symbol_type (token::MEM_BEGIN); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MEM_END () + { + return symbol_type (token::MEM_END); + } +#else + static + symbol_type + make_MEM_END () + { + return symbol_type (token::MEM_END); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_STRING (std::string v) + { + return symbol_type (token::STRING, std::move (v)); + } +#else + static + symbol_type + make_STRING (const std::string& v) + { + return symbol_type (token::STRING, v); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_STRUCT () + { + return symbol_type (token::STRUCT); + } +#else + static + symbol_type + make_STRUCT () + { + return symbol_type (token::STRUCT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TAGGED_STRUCT () + { + return symbol_type (token::TAGGED_STRUCT); + } +#else + static + symbol_type + make_TAGGED_STRUCT () + { + return symbol_type (token::TAGGED_STRUCT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TAGGED_UNION () + { + return symbol_type (token::TAGGED_UNION); + } +#else + static + symbol_type + make_TAGGED_UNION () + { + return symbol_type (token::TAGGED_UNION); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_TEXT_ARRAY () + { + return symbol_type (token::TEXT_ARRAY); + } +#else + static + symbol_type + make_TEXT_ARRAY () + { + return symbol_type (token::TEXT_ARRAY); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_UCHAR () + { + return symbol_type (token::UCHAR); + } +#else + static + symbol_type + make_UCHAR () + { + return symbol_type (token::UCHAR); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_UINT () + { + return symbol_type (token::UINT); + } +#else + static + symbol_type + make_UINT () + { + return symbol_type (token::UINT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_UINT64 () + { + return symbol_type (token::UINT64); + } +#else + static + symbol_type + make_UINT64 () + { + return symbol_type (token::UINT64); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ULONG () + { + return symbol_type (token::ULONG); + } +#else + static + symbol_type + make_ULONG () + { + return symbol_type (token::ULONG); + } +#endif + + + private: +#if YY_CPLUSPLUS < 201103L + /// Non copyable. + A2mlParser (const A2mlParser&); + /// Non copyable. + A2mlParser& operator= (const A2mlParser&); +#endif + + + /// Stored state numbers (used for stacks). + typedef signed char state_type; + + /// Compute post-reduction state. + /// \param yystate the current state + /// \param yysym the nonterminal to push on the stack + static state_type yy_lr_goto_state_ (state_type yystate, int yysym); + + /// Whether the given \c yypact_ value indicates a defaulted state. + /// \param yyvalue the value to check + static bool yy_pact_value_is_default_ (int yyvalue) YY_NOEXCEPT; + + /// Whether the given \c yytable_ value indicates a syntax error. + /// \param yyvalue the value to check + static bool yy_table_value_is_error_ (int yyvalue) YY_NOEXCEPT; + + static const signed char yypact_ninf_; + static const signed char yytable_ninf_; + + /// Convert a scanner token kind \a t to a symbol kind. + /// In theory \a t should be a token_kind_type, but character literals + /// are valid, yet not members of the token_kind_type enum. + static symbol_kind_type yytranslate_ (int t) YY_NOEXCEPT; + +#if A2MLDEBUG || 0 + /// For a symbol, its name in clear. + static const char* const yytname_[]; +#endif // #if A2MLDEBUG || 0 + + + // Tables. + // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + // STATE-NUM. + static const short yypact_[]; + + // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + // Performed when YYTABLE does not specify something else to do. Zero + // means the default is an error. + static const signed char yydefact_[]; + + // YYPGOTO[NTERM-NUM]. + static const signed char yypgoto_[]; + + // YYDEFGOTO[NTERM-NUM]. + static const signed char yydefgoto_[]; + + // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + // positive, shift that token. If negative, reduce the rule whose + // number is the opposite. If YYTABLE_NINF, syntax error. + static const signed char yytable_[]; + + static const signed char yycheck_[]; + + // YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of + // state STATE-NUM. + static const signed char yystos_[]; + + // YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. + static const signed char yyr1_[]; + + // YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. + static const signed char yyr2_[]; + + +#if A2MLDEBUG + // YYRLINE[YYN] -- Source line where rule number YYN was defined. + static const short yyrline_[]; + /// Report on the debug stream that the rule \a r is going to be reduced. + virtual void yy_reduce_print_ (int r) const; + /// Print the state stack on the debug stream. + virtual void yy_stack_print_ () const; + + /// Debugging level. + int yydebug_; + /// Debug stream. + std::ostream* yycdebug_; + + /// \brief Display a symbol kind, value and location. + /// \param yyo The output stream. + /// \param yysym The symbol. + template + void yy_print_ (std::ostream& yyo, const basic_symbol& yysym) const; +#endif + + /// \brief Reclaim the memory associated to a symbol. + /// \param yymsg Why this token is reclaimed. + /// If null, print nothing. + /// \param yysym The symbol. + template + void yy_destroy_ (const char* yymsg, basic_symbol& yysym) const; + + private: + /// Type access provider for state based symbols. + struct by_state + { + /// Default constructor. + by_state () YY_NOEXCEPT; + + /// The symbol kind as needed by the constructor. + typedef state_type kind_type; + + /// Constructor. + by_state (kind_type s) YY_NOEXCEPT; + + /// Copy constructor. + by_state (const by_state& that) YY_NOEXCEPT; + + /// Record that this symbol is empty. + void clear () YY_NOEXCEPT; + + /// Steal the symbol kind from \a that. + void move (by_state& that); + + /// The symbol kind (corresponding to \a state). + /// \a symbol_kind::S_YYEMPTY when empty. + symbol_kind_type kind () const YY_NOEXCEPT; + + /// The state number used to denote an empty symbol. + /// We use the initial state, as it does not have a value. + enum { empty_state = 0 }; + + /// The state. + /// \a empty when empty. + state_type state; + }; + + /// "Internal" symbol: element of the stack. + struct stack_symbol_type : basic_symbol + { + /// Superclass. + typedef basic_symbol super_type; + /// Construct an empty symbol. + stack_symbol_type (); + /// Move or copy construction. + stack_symbol_type (YY_RVREF (stack_symbol_type) that); + /// Steal the contents from \a sym to build this. + stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym); +#if YY_CPLUSPLUS < 201103L + /// Assignment, needed by push_back by some old implementations. + /// Moves the contents of that. + stack_symbol_type& operator= (stack_symbol_type& that); + + /// Assignment, needed by push_back by other implementations. + /// Needed by some other old implementations. + stack_symbol_type& operator= (const stack_symbol_type& that); +#endif + }; + + /// A stack with random access from its top. + template > + class stack + { + public: + // Hide our reversed order. + typedef typename S::iterator iterator; + typedef typename S::const_iterator const_iterator; + typedef typename S::size_type size_type; + typedef typename std::ptrdiff_t index_type; + + stack (size_type n = 200) YY_NOEXCEPT + : seq_ (n) + {} + +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + stack (const stack&) = delete; + /// Non copyable. + stack& operator= (const stack&) = delete; +#endif + + /// Random access. + /// + /// Index 0 returns the topmost element. + const T& + operator[] (index_type i) const + { + return seq_[size_type (size () - 1 - i)]; + } + + /// Random access. + /// + /// Index 0 returns the topmost element. + T& + operator[] (index_type i) + { + return seq_[size_type (size () - 1 - i)]; + } + + /// Steal the contents of \a t. + /// + /// Close to move-semantics. + void + push (YY_MOVE_REF (T) t) + { + seq_.push_back (T ()); + operator[] (0).move (t); + } + + /// Pop elements from the stack. + void + pop (std::ptrdiff_t n = 1) YY_NOEXCEPT + { + for (; 0 < n; --n) + seq_.pop_back (); + } + + /// Pop all elements from the stack. + void + clear () YY_NOEXCEPT + { + seq_.clear (); + } + + /// Number of elements on the stack. + index_type + size () const YY_NOEXCEPT + { + return index_type (seq_.size ()); + } + + /// Iterator on top of the stack (going downwards). + const_iterator + begin () const YY_NOEXCEPT + { + return seq_.begin (); + } + + /// Bottom of the stack. + const_iterator + end () const YY_NOEXCEPT + { + return seq_.end (); + } + + /// Present a slice of the top of a stack. + class slice + { + public: + slice (const stack& stack, index_type range) YY_NOEXCEPT + : stack_ (stack) + , range_ (range) + {} + + const T& + operator[] (index_type i) const + { + return stack_[range_ - i]; + } + + private: + const stack& stack_; + index_type range_; + }; + + private: +#if YY_CPLUSPLUS < 201103L + /// Non copyable. + stack (const stack&); + /// Non copyable. + stack& operator= (const stack&); +#endif + /// The wrapped container. + S seq_; + }; + + + /// Stack type. + typedef stack stack_type; + + /// The stack. + stack_type yystack_; + + /// Push a new state on the stack. + /// \param m a debug message to display + /// if null, no trace is output. + /// \param sym the symbol + /// \warning the contents of \a s.value is stolen. + void yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym); + + /// Push a new look ahead token on the state on the stack. + /// \param m a debug message to display + /// if null, no trace is output. + /// \param s the state + /// \param sym the symbol (for its value and location). + /// \warning the contents of \a sym.value is stolen. + void yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym); + + /// Pop \a n symbols from the stack. + void yypop_ (int n = 1) YY_NOEXCEPT; + + /// Constants. + enum + { + yylast_ = 198, ///< Last index in yytable_. + yynnts_ = 26, ///< Number of nonterminal symbols. + yyfinal_ = 4 ///< Termination state number. + }; + + + // User arguments. + a2l::A2mlScanner &scanner; + + }; + + +#line 6 "D:/projects/a2llib/src/a2mlparser.y" +} // a2l +#line 1871 "D:/projects/a2llib/src/a2mlparser.hpp" + + + + +#endif // !YY_A2ML_D_PROJECTS_A2LLIB_SRC_A2MLPARSER_HPP_INCLUDED diff --git a/a2llib-main/src/a2mlparser.y b/a2llib-main/src/a2mlparser.y new file mode 100644 index 0000000..a338572 --- /dev/null +++ b/a2llib-main/src/a2mlparser.y @@ -0,0 +1,326 @@ +%require "3.2" +%language "c++" + + +%define api.prefix {a2ml} +%define api.namespace {a2l} +%define api.parser.class {A2mlParser} + + +%code requires { +#include +#include +#include +#include +#include "a2l/a2mlobject.h" + +namespace a2l { +class A2mlScanner; +} + +} + +%parse-param { a2l::A2mlScanner &scanner } + + +%code { + #include + #include "a2mlscanner.h" + + + #include "a2lhelper.h" + #include + + #undef yylex + #define yylex scanner.a2mllex +} + +%define api.value.type variant + +%token A2ML_BEGIN +%token A2ML_END +%token A2ML +%token ARRAY_BEGIN +%token ARRAY_END +%token BLOCK +%token BLOCK_BEGIN +%token BLOCK_END +%token CHAR +%token CONSTANT +%token DEF_END +%token DOUBLE +%token ENUM +%token EQUAL +%token FLOAT +%token IDENT +%token IF_DATA +%token INT +%token INT64 +%token LONG +%token MEM_BEGIN +%token MEM_END +%token STRING +%token STRUCT +%token TAGGED_STRUCT +%token TAGGED_UNION +%token TEXT_ARRAY +%token UCHAR +%token UINT +%token UINT64 +%token ULONG + +%nterm > enumerator +%nterm enumerator_list +%nterm identifier +%nterm keyword +%nterm predefined_type_name +%nterm tag +%nterm type_name +%nterm type_definition +%nterm block_definition +%nterm enum_type_name +%nterm struct_type_name +%nterm member +%nterm struct_member_list +%nterm struct_member +%nterm taggedstruct_type_name +%nterm taggedstruct_member_list +%nterm taggedstruct_member +%nterm taggedstruct_definition +%nterm taggedunion_type_name +%nterm taggedunion_member_list +%nterm taggedunion_member +%nterm declaration +%nterm declaration_list + +%start a2ml_block + +%% + +a2ml_block: %empty + | A2ML_BEGIN A2ML declaration_list A2ML_END A2ML { + scanner.BlockList($3); + }; + +declaration_list: declaration { + $$ = A2mlMemberList(); + $$.emplace_back($1); + } + | declaration_list declaration { + $$ = $1; + $$.emplace_back($2); + }; + +declaration: type_definition DEF_END { $$ = $1; } + | block_definition DEF_END { $$ = $1; }; + +type_definition: type_name { $$ = $1;}; + +type_name : predefined_type_name { + $$ = A2mlObject(A2mlTypeName::PREDEFINED); + $$.DataType($1); + } + | struct_type_name { + $$ = $1; + } + | taggedstruct_type_name { + $$ = $1; + } + | taggedunion_type_name { + $$ = $1; + } + | enum_type_name { + $$ = $1; + }; + +predefined_type_name: CHAR { $$ = A2mlDataType::CHAR;} + | INT { $$ = A2mlDataType::INT;} + | LONG { $$ = A2mlDataType::LONG;} + | INT64 { $$ = A2mlDataType::INT64;} + | UCHAR { $$ = A2mlDataType::UCHAR;} + | UINT { $$ = A2mlDataType::UINT;} + | UINT64 { $$ = A2mlDataType::UINT64;} + | ULONG { $$ = A2mlDataType::ULONG;} + | DOUBLE { $$ = A2mlDataType::DOUBLE;} + | FLOAT { $$ = A2mlDataType::FLOAT;} + | TEXT_ARRAY { $$ = A2mlDataType::TEXT_ARRAY;}; + + +block_definition: BLOCK tag member { + $$ = A2mlObject(A2mlTypeName::BLOCK); + $$.Tag($2); + $$.MemberList().emplace_back($3); + } + | BLOCK tag MEM_BEGIN member MEM_END { + $$ = A2mlObject(A2mlTypeName::BLOCK); + $$.Tag($2); + $$.MemberList().emplace_back($4); + }; + + +enum_type_name : ENUM identifier BLOCK_BEGIN enumerator_list BLOCK_END { + $$ = A2mlObject(A2mlTypeName::ENUMERATE); + $$.Ident($2); + $$.EnumerateList($4); + } + | ENUM IDENT { + $$ = A2mlObject(A2mlTypeName::ENUMERATE); + $$.Ident($2); + }; + +enumerator_list: enumerator { + A2mlEnumerateList list; + auto& enumerator = $1; + const auto itr = list.find(enumerator.first); + if (itr == list.cend() ) { + list.emplace(enumerator.first, enumerator.second); + } else { + // Change key + auto key = list.rbegin()->first; + ++key; + list.emplace(key, enumerator.second); + } + $$ = list; + } + | enumerator_list enumerator { + auto& list = $1; + auto& enumerator = $2; + const auto itr = list.find(enumerator.first); + if (itr == list.cend() ) { + list.emplace(enumerator.first, enumerator.second); + } else { + // Change key + auto key = list.rbegin()->first; + ++key; + list.emplace(key, enumerator.second); + } + $$ = list; + }; + +enumerator: keyword { + $$.first = 0; + $$.second = $1; + } + | keyword EQUAL CONSTANT { + $$.first = $3; + $$.second = $1; + }; + +struct_type_name: STRUCT identifier BLOCK_BEGIN struct_member_list BLOCK_END { + $$ = A2mlObject(A2mlTypeName::STRUCT); + $$.Ident($2); + $$.MemberList($4); + } + | STRUCT IDENT { + $$ = A2mlObject(A2mlTypeName::STRUCT); + $$.Ident($2); + }; + +struct_member_list: %empty {} + | struct_member_list struct_member { + $$ = $1; + $$.emplace_back($2); + }; + +struct_member: member DEF_END { + $$ = $1; + } + | MEM_BEGIN member MEM_END DEF_END { + $$ = $2; + }; + +member: type_name array_specifier { + $$ = $1; + // Todo Array specifier +}; + +array_specifier: %empty + | array_specifier ARRAY_BEGIN CONSTANT ARRAY_END; + +taggedstruct_type_name: TAGGED_STRUCT identifier BLOCK_BEGIN taggedstruct_member_list BLOCK_END { + $$ = A2mlObject(A2mlTypeName::TAGGED_STRUCT); + $$.Ident($2); + $$.MemberList($4); + } + | TAGGED_STRUCT IDENT { + $$ = A2mlObject(A2mlTypeName::TAGGED_STRUCT); + $$.Ident($2); + }; + +taggedstruct_member_list: taggedstruct_member { + $$ = A2mlMemberList(); + $$.emplace_back($1); + } + | taggedstruct_member_list taggedstruct_member { + $$ = $1; + $$.emplace_back($2); + }; + +taggedstruct_member: taggedstruct_definition DEF_END { $$ = $1; } + | MEM_BEGIN taggedstruct_definition MEM_END DEF_END { $$ = $2; } + | block_definition DEF_END {$$ = $1;} + | MEM_BEGIN block_definition MEM_END DEF_END { $$ = $2;}; + +taggedstruct_definition: tag { + $$ = A2mlObject(A2mlTypeName::UNKNOWN); + $$.Tag($1); + } + | tag member { + $$ = $2; + $$.Tag($1); + } + | tag MEM_BEGIN member MEM_END { + $$ = $3; + $$.Tag($1); + }; + +taggedunion_type_name: TAGGED_UNION identifier BLOCK_BEGIN taggedunion_member_list BLOCK_END { + $$ = A2mlObject(A2mlTypeName::TAGGED_UNION); + $$.Ident($2); + $$.MemberList( $4); + } + | TAGGED_UNION IDENT { + $$ = A2mlObject(A2mlTypeName::TAGGED_UNION); + $$.Ident($2); + }; + +taggedunion_member_list: taggedunion_member { + $$ = A2mlMemberList(); + $$.emplace_back($1); + } + | taggedunion_member_list taggedunion_member { + $$ = $1; + $$.emplace_back($2); + }; + +taggedunion_member: tag DEF_END { + $$ = A2mlObject(A2mlTypeName::UNKNOWN); + $$.Tag($1); + } + | tag member DEF_END { + $$ = $2; + $$.Tag($1); + } + | block_definition DEF_END { + $$ = $1; + }; + +keyword : STRING { $$ = $1; }; + +identifier: %empty {} + | IDENT { $$ = $1; }; + +tag: STRING { $$ = $1; }; + +%% + +void a2l::A2mlParser::error(const std::string& err) { + const auto line = scanner.lineno(); + // const auto column = scanner.YYLeng(); + const std::string near = scanner.YYText() != nullptr ? scanner.YYText() : ""; + std::ostringstream error; + error << "Parser error: " << err + << ", Line: " << line + << ", Near: " << near; + scanner.LastError(error.str()); +} diff --git a/a2llib-main/src/a2mlscanner.cpp b/a2llib-main/src/a2mlscanner.cpp new file mode 100644 index 0000000..aed52e7 --- /dev/null +++ b/a2llib-main/src/a2mlscanner.cpp @@ -0,0 +1,16 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT +*/ + +#include "a2mlscanner.h" + +namespace a2l { + +A2mlScanner::A2mlScanner(std::istream& message) + : a2mlFlexLexer(&message), yylval(nullptr) { + +} + + +} // namespace a2l \ No newline at end of file diff --git a/a2llib-main/src/a2mlscanner.h b/a2llib-main/src/a2mlscanner.h new file mode 100644 index 0000000..87b7188 --- /dev/null +++ b/a2llib-main/src/a2mlscanner.h @@ -0,0 +1,50 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT +*/ + +#pragma once + +#include +#include +#include + +#ifndef yyFlexLexerOnce + +#undef yyFlexLexer +#define yyFlexLexer a2mlFlexLexer +#include + +#endif + +#include +#include +#include +#include +#include +#include "a2mlparser.hpp" +#include "a2l/a2mlobject.h" + +namespace a2l { + + +class A2mlScanner : public a2mlFlexLexer { + public: + explicit A2mlScanner(std::istream& in); + int a2mllex(A2mlParser::value_type* yylval); + + void LastError(const std::string& error) { last_error_ = error; } + [[nodiscard]] const std::string& LastError() const { return last_error_; } + + void BlockList(const A2mlBlockList& list) { block_list_ = list; } + [[nodiscard]] const A2mlBlockList& BlockList() const { return block_list_; } + + + private: + A2mlParser::semantic_type* yylval = nullptr; + std::string last_error_; + std::vector block_list_; + +}; + +} // namespace a2l diff --git a/a2llib-main/src/axisdescr.cpp b/a2llib-main/src/axisdescr.cpp new file mode 100644 index 0000000..5f3629d --- /dev/null +++ b/a2llib-main/src/axisdescr.cpp @@ -0,0 +1,10 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#include "a2l/axisdescr.h" + +namespace a2l { + +} // end namespace a2l diff --git a/a2llib-main/src/axispts.cpp b/a2llib-main/src/axispts.cpp new file mode 100644 index 0000000..04a6d14 --- /dev/null +++ b/a2llib-main/src/axispts.cpp @@ -0,0 +1,8 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#include "a2l/axispts.h" + +namespace a2l {} // namespace a2l \ No newline at end of file diff --git a/a2llib-main/src/blob.cpp b/a2llib-main/src/blob.cpp new file mode 100644 index 0000000..a56fb1e --- /dev/null +++ b/a2llib-main/src/blob.cpp @@ -0,0 +1,10 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#include "a2l/blob.h" + +namespace a2l { + +} // end namespace a2l diff --git a/a2llib-main/src/characteristic.cpp b/a2llib-main/src/characteristic.cpp new file mode 100644 index 0000000..6472f92 --- /dev/null +++ b/a2llib-main/src/characteristic.cpp @@ -0,0 +1,12 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#include "a2l/characteristic.h" + +namespace a2l { +void Characteristic::AddAxisDescr(std::unique_ptr& axis_descr) { + axis_descr_list_.emplace_back( std::move(axis_descr)); +} +} // end namespace a2l diff --git a/a2llib-main/src/compumethod.cpp b/a2llib-main/src/compumethod.cpp new file mode 100644 index 0000000..768c051 --- /dev/null +++ b/a2llib-main/src/compumethod.cpp @@ -0,0 +1,10 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#include "a2l/compumethod.h" + +namespace a2l { + +} // end namespace a2l \ No newline at end of file diff --git a/a2llib-main/src/computab.cpp b/a2llib-main/src/computab.cpp new file mode 100644 index 0000000..1a7a8df --- /dev/null +++ b/a2llib-main/src/computab.cpp @@ -0,0 +1,28 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#include "a2l/computab.h" + +namespace a2l { + +void CompuTab::DefaultValue(const std::string& value) { + default_value_ = value; + if (default_value_numeric_ == 0.0) { + try { + default_value_numeric_ = std::stod(value); + } catch (const std::exception& ) {} + } +} + +void CompuTab::DefaultValueNumeric(double value) { + default_value_numeric_ = value; + if (default_value_.empty()) { + try { + default_value_ = std::to_string(default_value_numeric_); + } catch (const std::exception&) {} + } +} + +} // end namespace a2l diff --git a/a2llib-main/src/compuvtab.cpp b/a2llib-main/src/compuvtab.cpp new file mode 100644 index 0000000..6a35717 --- /dev/null +++ b/a2llib-main/src/compuvtab.cpp @@ -0,0 +1,10 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#include "a2l/compuvtab.h" + +namespace a2l { + +} // end namespace a2l \ No newline at end of file diff --git a/a2llib-main/src/compuvtabrange.cpp b/a2llib-main/src/compuvtabrange.cpp new file mode 100644 index 0000000..212370f --- /dev/null +++ b/a2llib-main/src/compuvtabrange.cpp @@ -0,0 +1,10 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#include "a2l/compuvtabrange.h" + +namespace a2l { + +} // end namespace a2l diff --git a/a2llib-main/src/frame.cpp b/a2llib-main/src/frame.cpp new file mode 100644 index 0000000..c6a0645 --- /dev/null +++ b/a2llib-main/src/frame.cpp @@ -0,0 +1,10 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#include "a2l/frame.h" + +namespace a2l { + +} // end namespace a2l diff --git a/a2llib-main/src/function.cpp b/a2llib-main/src/function.cpp new file mode 100644 index 0000000..5e16d03 --- /dev/null +++ b/a2llib-main/src/function.cpp @@ -0,0 +1,3 @@ +// +// Created by ihedv on 2023-08-29. +// diff --git a/a2llib-main/src/group.cpp b/a2llib-main/src/group.cpp new file mode 100644 index 0000000..635b34f --- /dev/null +++ b/a2llib-main/src/group.cpp @@ -0,0 +1,10 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#include "a2l/group.h" + +namespace a2l { + +} // end namespace a2l diff --git a/a2llib-main/src/ifdatablock.cpp b/a2llib-main/src/ifdatablock.cpp new file mode 100644 index 0000000..32ce916 --- /dev/null +++ b/a2llib-main/src/ifdatablock.cpp @@ -0,0 +1,69 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#include "a2l/ifdatablock.h" +#include +#include "ifdatascanner.h" +#include "ifdataparser.hpp" + +namespace a2l { + +IfDataBlock::IfDataBlock(const std::string& ifdata) { + try { + if (ifdata.empty()) { + throw std::runtime_error("Nothing to parse"); + } + std::istringstream temp(ifdata); + IfDataScanner scanner(temp); + IfDataParser parser(scanner); + parse_ = parser.parse() == 0; + last_error_ = scanner.LastError(); + protocol_ = scanner.Protocol(); + item_list_ = scanner.ItemList(); + } catch (const std::exception& err) { + last_error_ = err.what(); + parse_ = false; + } +} + +std::string IfDataBlock::AsString() const { + std::ostringstream temp; + temp << Protocol() << std::endl; + + for (const auto& item : item_list_) { + if (item.BlockName.empty() && item.ItemList.empty()) { + temp << "\t" << item.Value << std::endl; + } else { + temp << AsString(1,item); + } + } + temp << std::endl; + return temp.str(); +} + +std::string IfDataBlock::AsString(size_t tab_level, // NOLINT + const IfDataItem& block_item) const { + std::ostringstream temp; + for (size_t level1 = 0; level1 < tab_level; ++level1 ) { + temp << "\t"; + } + temp << block_item.BlockName << std::endl; + + for (const auto& item : block_item.ItemList) { + if (item.BlockName.empty() && item.ItemList.empty()) { + for (size_t level1 = 0; level1 < tab_level; ++level1 ) { + temp << "\t"; + } + temp << "\t" << item.Value << std::endl; + } else { + temp << AsString(tab_level + 1,item); + } + } + temp << std::endl; + return temp.str(); + +} + +} // namespace a2l \ No newline at end of file diff --git a/a2llib-main/src/ifdataflexer.cpp b/a2llib-main/src/ifdataflexer.cpp new file mode 100644 index 0000000..6e18924 --- /dev/null +++ b/a2llib-main/src/ifdataflexer.cpp @@ -0,0 +1,2158 @@ +#line 1 "D:/projects/a2llib/src/ifdataflexer.cpp" + #include + #include + +#line 5 "D:/projects/a2llib/src/ifdataflexer.cpp" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +/* %not-for-header */ +/* %if-c-only */ +/* %if-not-reentrant */ +/* %endif */ +/* %endif */ +/* %ok-for-header */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 4 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* %if-c++-only */ + /* The c++ scanner is a mess. The FlexLexer.h header file relies on the + * following macro. This is required in order to pass the c++-multiple-scanners + * test in the regression suite. We get reports that it breaks inheritance. + * We will address this in a future release of flex, or omit the C++ scanner + * altogether. + */ + #define yyFlexLexer ifdataFlexLexer +/* %endif */ + +/* %if-c-only */ +/* %endif */ + +#ifdef yyalloc +#define ifdataalloc_ALREADY_DEFINED +#else +#define yyalloc ifdataalloc +#endif + +#ifdef yyrealloc +#define ifdatarealloc_ALREADY_DEFINED +#else +#define yyrealloc ifdatarealloc +#endif + +#ifdef yyfree +#define ifdatafree_ALREADY_DEFINED +#else +#define yyfree ifdatafree +#endif + +/* %if-c-only */ +/* %endif */ + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +/* %if-c-only */ +/* %endif */ + +/* %if-tables-serialization */ +/* %endif */ +/* end standard C headers. */ + +/* %if-c-or-c++ */ +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#ifndef SIZE_MAX +#define SIZE_MAX (~(size_t)0) +#endif + +#endif /* ! C99 */ + +#endif /* ! FLEXINT_H */ + +/* %endif */ + +/* begin standard C++ headers. */ +/* %if-c++-only */ +#include +#include +#include +#include +#include +/* end standard C++ headers. */ +/* %endif */ + +/* TODO: this is always defined, so inline it */ +#define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) +#else +#define yynoreturn +#endif + +/* %not-for-header */ +/* Returned upon end-of-file. */ +#define YY_NULL 0 +/* %ok-for-header */ + +/* %not-for-header */ +/* Promotes a possibly negative, possibly signed char to an + * integer in range [0..255] for use as an array index. + */ +#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) +/* %ok-for-header */ + +/* %if-reentrant */ +/* %endif */ + +/* %if-not-reentrant */ + +/* %endif */ + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN (yy_start) = 1 + 2 * +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START (((yy_start) - 1) / 2) +#define YYSTATE YY_START +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart( yyin ) +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else +#define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +/* %if-not-reentrant */ +extern int yyleng; +/* %endif */ + +/* %if-c-only */ +/* %if-not-reentrant */ +/* %endif */ +/* %endif */ + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires + * access to the local variable yy_act. Since yyless() is a macro, it would break + * existing scanners that call yyless() from OUTSIDE yylex. + * One obvious solution it to make yy_act a global. I tried that, and saw + * a 5% performance hit in a non-yylineno scanner, because yy_act is + * normally declared as a register variable-- so it is not worth it. + */ + #define YY_LESS_LINENO(n) \ + do { \ + int yyl;\ + for ( yyl = n; yyl < yyleng; ++yyl )\ + if ( yytext[yyl] == '\n' )\ + --yylineno;\ + }while(0) + #define YY_LINENO_REWIND_TO(dst) \ + do {\ + const char *p;\ + for ( p = yy_cp-1; p >= (dst); --p)\ + if ( *p == '\n' )\ + --yylineno;\ + }while(0) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) +#define unput(c) yyunput( c, (yytext_ptr) ) + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { +/* %if-c-only */ +/* %endif */ + +/* %if-c++-only */ + std::streambuf* yy_input_file; +/* %endif */ + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* %if-c-only Standard (non-C++) definition */ +/* %not-for-header */ +/* %if-not-reentrant */ +/* %endif */ +/* %ok-for-header */ + +/* %endif */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] + +/* %if-c-only Standard (non-C++) definition */ +/* %if-not-reentrant */ +/* %not-for-header */ +/* %ok-for-header */ + +/* %endif */ +/* %endif */ + +void *yyalloc ( yy_size_t ); +void *yyrealloc ( void *, yy_size_t ); +void yyfree ( void * ); + +#define yy_new_buffer yy_create_buffer +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */ +/* Begin user sect3 */ +#define YY_SKIP_YYWRAP + +#define FLEX_DEBUG +typedef flex_uint8_t YY_CHAR; + +#define yytext_ptr yytext + +#include + +inline int yyFlexLexer::yywrap() { return 1; } +int yyFlexLexer::yylex() + { + LexerError( "yyFlexLexer::yylex invoked but %option yyclass used" ); + return 0; + } + +#define YY_DECL int a2l:IfDataScanner::yylex() + +/* %% [1.5] DFA */ + +/* %if-c-only Standard (non-C++) definition */ +/* %endif */ + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + (yytext_ptr) = yy_bp; \ +/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\ + yyleng = (int) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ +/* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\ + (yy_c_buf_p) = yy_cp; +/* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */ +#define YY_NUM_RULES 14 +#define YY_END_OF_BUFFER 15 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static const flex_int16_t yy_accept[53] = + { 0, + 5, 5, 15, 13, 12, 12, 13, 13, 13, 7, + 7, 4, 4, 12, 0, 5, 0, 8, 0, 11, + 0, 0, 9, 7, 0, 0, 4, 4, 0, 0, + 0, 11, 0, 0, 9, 0, 9, 6, 4, 0, + 10, 0, 2, 4, 0, 0, 0, 4, 1, 4, + 3, 0 + } ; + +static const YY_CHAR yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 4, 1, 1, 1, 1, 1, 1, + 1, 5, 6, 1, 7, 8, 9, 10, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 1, 1, 1, + 1, 1, 1, 1, 12, 13, 13, 14, 15, 16, + 17, 17, 18, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 19, 17, 17, 17, 17, 17, 17, + 1, 20, 1, 1, 21, 1, 13, 22, 13, 23, + + 24, 13, 25, 17, 26, 17, 17, 17, 17, 27, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 28, + 17, 17, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static const YY_CHAR yy_meta[29] = + { 0, + 1, 1, 2, 1, 1, 1, 3, 3, 1, 4, + 4, 4, 4, 4, 4, 4, 3, 3, 3, 1, + 3, 4, 4, 4, 3, 3, 3, 3 + } ; + +static const flex_int16_t yy_base[60] = + { 0, + 0, 0, 116, 117, 27, 29, 29, 24, 31, 48, + 87, 0, 98, 35, 37, 109, 109, 32, 106, 0, + 86, 82, 36, 0, 55, 0, 0, 87, 44, 102, + 45, 0, 81, 82, 58, 34, 60, 0, 80, 76, + 117, 54, 117, 67, 72, 69, 48, 48, 117, 40, + 0, 117, 82, 84, 88, 92, 35, 96, 100 + } ; + +static const flex_int16_t yy_def[60] = + { 0, + 52, 1, 52, 52, 52, 52, 53, 52, 52, 52, + 10, 54, 54, 52, 53, 52, 53, 11, 55, 56, + 52, 52, 52, 11, 52, 57, 54, 54, 53, 55, + 58, 56, 52, 52, 52, 52, 52, 57, 54, 59, + 52, 52, 52, 54, 59, 58, 52, 54, 52, 54, + 54, 0, 52, 52, 52, 52, 52, 52, 52 + } ; + +static const flex_int16_t yy_nxt[146] = + { 0, + 4, 5, 6, 7, 4, 8, 8, 4, 9, 10, + 11, 12, 12, 12, 12, 12, 12, 13, 12, 4, + 12, 12, 12, 12, 12, 12, 12, 12, 14, 14, + 14, 14, 16, 18, 18, 19, 14, 14, 38, 20, + 16, 18, 18, 37, 37, 35, 35, 16, 17, 31, + 25, 51, 21, 41, 22, 23, 17, 24, 24, 25, + 36, 36, 25, 17, 37, 37, 50, 35, 35, 37, + 37, 25, 25, 46, 49, 26, 46, 41, 48, 47, + 46, 25, 15, 15, 15, 15, 27, 27, 30, 30, + 30, 30, 32, 44, 32, 32, 40, 40, 40, 40, + + 45, 45, 45, 45, 43, 42, 31, 39, 34, 33, + 31, 52, 29, 28, 52, 52, 3, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52 + } ; + +static const flex_int16_t yy_chk[146] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, + 6, 6, 7, 8, 8, 9, 14, 14, 57, 9, + 15, 18, 18, 36, 36, 23, 23, 29, 7, 31, + 23, 50, 9, 31, 9, 10, 15, 10, 10, 23, + 25, 25, 10, 29, 25, 25, 48, 35, 35, 37, + 37, 10, 35, 46, 47, 10, 45, 46, 44, 42, + 40, 35, 53, 53, 53, 53, 54, 54, 55, 55, + 55, 55, 56, 39, 56, 56, 58, 58, 58, 58, + + 59, 59, 59, 59, 34, 33, 30, 28, 22, 21, + 19, 17, 16, 13, 11, 3, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52 + } ; + +/* Table of booleans, true if rule could match eol. */ +static const flex_int32_t yy_rule_can_match_eol[15] = + { 0, +0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, }; + +static const flex_int16_t yy_rule_linenum[14] = + { 0, + 44, 45, 46, 47, 55, 66, 114, 124, 134, 145, + 146, 147, 148 + } ; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +#line 1 "D:/projects/a2llib/src/ifdataflexer.l" + +#line 7 "D:/projects/a2llib/src/ifdataflexer.l" + #include "ifdatascanner.h" + #undef YY_DECL + #define YY_DECL int a2l::IfDataScanner::ifdatalex(a2l::IfDataParser::value_type* yy_value) + using token = a2l::IfDataParser::token; +#line 578 "D:/projects/a2llib/src/ifdataflexer.cpp" +#define YY_NO_UNISTD_H 1 +#define YY_NO_INPUT 1 +#line 34 "D:/projects/a2llib/src/ifdataflexer.l" + /* \"([^\"\\]|(\\.))*\" */ +#line 583 "D:/projects/a2llib/src/ifdataflexer.cpp" + +#define INITIAL 0 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +#include +/* %endif */ +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +/* %if-c-only Reentrant structure and macros (non-C++). */ +/* %if-reentrant */ +/* %if-c-only */ +/* %endif */ +/* %if-reentrant */ +/* %endif */ +/* %endif End reentrant structures and macros. */ +/* %if-bison-bridge */ +/* %endif */ +/* %not-for-header */ +/* %ok-for-header */ + +/* %endif */ + +#ifndef yytext_ptr +static void yy_flex_strncpy ( char *, const char *, int ); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen ( const char * ); +#endif + +#ifndef YY_NO_INPUT +/* %if-c-only Standard (non-C++) definition */ +/* %not-for-header */ +/* %ok-for-header */ + +/* %endif */ +#endif + +/* %if-c-only */ +/* %endif */ + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else +#define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* %if-c-only Standard (non-C++) definition */ +/* %endif */ +/* %if-c++-only C++ definition */ +#define ECHO LexerOutput( yytext, yyleng ) +/* %endif */ +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ +/* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\ +\ +/* %if-c++-only C++ definition \ */\ + if ( (int)(result = LexerInput( (char *) buf, max_size )) < 0 ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); +/* %endif */ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +#define YY_FATAL_ERROR(msg) LexerError( msg ) +/* %endif */ +#endif + +/* %if-tables-serialization structures and prototypes */ +/* %not-for-header */ +/* %ok-for-header */ + +/* %not-for-header */ +/* %tables-yydmap generated elements */ +/* %endif */ +/* end tables serialization structures and prototypes */ + +/* %ok-for-header */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 +/* %if-c-only Standard (non-C++) definition */ +/* %endif */ +/* %if-c++-only C++ definition */ +#define YY_DECL int yyFlexLexer::yylex() +/* %endif */ +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK /*LINTED*/break; +#endif + +/* %% [6.0] YY_RULE_SETUP definition goes here */ +#define YY_RULE_SETUP \ + YY_USER_ACTION + +/* %not-for-header */ +/** The main scanner function which does all the work. + */ +YY_DECL +{ + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + + if ( !(yy_init) ) + { + (yy_init) = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ + + if ( ! yyin ) +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + yyin.rdbuf(std::cin.rdbuf()); +/* %endif */ + + if ( ! yyout ) +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + yyout.rdbuf(std::cout.rdbuf()); +/* %endif */ + + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE ); + } + + yy_load_buffer_state( ); + } + + { +/* %% [7.0] user's declarations go here */ +#line 39 "D:/projects/a2llib/src/ifdataflexer.l" + + + yylval = yy_value; + + +#line 781 "D:/projects/a2llib/src/ifdataflexer.cpp" + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + { +/* %% [8.0] yymore()-related code goes here */ + yy_cp = (yy_c_buf_p); + + /* Support of yytext. */ + *yy_cp = (yy_hold_char); + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + +/* %% [9.0] code to set up and find next match goes here */ + yy_current_state = (yy_start); +yy_match: + do + { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 53 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + ++yy_cp; + } + while ( yy_current_state != 52 ); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + +yy_find_action: +/* %% [10.0] code to find the action number goes here */ + yy_act = yy_accept[yy_current_state]; + + YY_DO_BEFORE_ACTION; + +/* %% [11.0] code for yylineno update goes here */ + + if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) + { + int yyl; + for ( yyl = 0; yyl < yyleng; ++yyl ) + if ( yytext[yyl] == '\n' ) + + yylineno++; +; + } + +do_action: /* This label is used only to access EOF actions. */ + +/* %% [12.0] debug code goes here */ + if ( yy_flex_debug ) + { + if ( yy_act == 0 ) + std::cerr << "--scanner backing up\n"; + else if ( yy_act < 14 ) + std::cerr << "--accepting rule at line " << yy_rule_linenum[yy_act] << + "(\"" << yytext << "\")\n"; + else if ( yy_act == 14 ) + std::cerr << "--accepting default rule (\"" << yytext << "\")\n"; + else if ( yy_act == 15 ) + std::cerr << "--(end of buffer or a NUL)\n"; + else + std::cerr << "--EOF (start condition " << YY_START << ")\n"; + } + + switch ( yy_act ) + { /* beginning of action switch */ +/* %% [13.0] actions go here */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + +case 1: +YY_RULE_SETUP +#line 44 "D:/projects/a2llib/src/ifdataflexer.l" +{ return token::IF_DATA_BEGIN; } + YY_BREAK +case 2: +YY_RULE_SETUP +#line 45 "D:/projects/a2llib/src/ifdataflexer.l" +{ return token::IF_DATA_END; } + YY_BREAK +case 3: +YY_RULE_SETUP +#line 46 "D:/projects/a2llib/src/ifdataflexer.l" +{ return token::IF_DATA; } + YY_BREAK +case 4: +YY_RULE_SETUP +#line 47 "D:/projects/a2llib/src/ifdataflexer.l" +{ + if (yylval != nullptr) { + std::string temp(yytext); + yylval->emplace(temp); + } + return token::IDENT; + } + YY_BREAK +case 5: +/* rule 5 can match eol */ +YY_RULE_SETUP +#line 55 "D:/projects/a2llib/src/ifdataflexer.l" +{ + const size_t len = strlen(yytext); + std::string temp; + if (len > 2) { + temp = yytext + 1; + temp.pop_back(); + } + yylval->emplace(temp); + return token::STRING; + } + YY_BREAK +case 6: +YY_RULE_SETUP +#line 66 "D:/projects/a2llib/src/ifdataflexer.l" +{ + uint64_t address = 0; + for ( size_t index = 0; yytext[ index ] != '\0'; ++index ) { + if ( index < 2 ) continue; + const char token = yytext[index]; + switch ( token ) { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + address *= 16; + address += token - '0'; + break; + + case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + address *= 16; + address += token - 'A' + 10; + break; + + case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + address *= 16; + address += token - 'a' + 10; + break; + + default: + break; + } + } + + yylval->emplace(address); + return token::HEX; + } + YY_BREAK +case 7: +YY_RULE_SETUP +#line 114 "D:/projects/a2llib/src/ifdataflexer.l" +{ + uint64_t temp = 0; + try { + temp = std::stoull(yytext); + } catch (const std::exception& ) { + + } + yylval->emplace(temp); + return token::UINT; + } + YY_BREAK +case 8: +YY_RULE_SETUP +#line 124 "D:/projects/a2llib/src/ifdataflexer.l" +{ + int64_t temp = 0; + try { + temp = std::stoll(yytext); + } catch (const std::exception& ) { + + } + yylval->emplace(temp); + return token::INT; + } + YY_BREAK +case 9: +YY_RULE_SETUP +#line 134 "D:/projects/a2llib/src/ifdataflexer.l" +{ + double temp = 0.0; + try { + temp = std::stod(yytext); + } catch (const std::exception&) { + + } + yylval->emplace(temp); + return token::FLOAT; + } + YY_BREAK +case 10: +/* rule 10 can match eol */ +YY_RULE_SETUP +#line 145 "D:/projects/a2llib/src/ifdataflexer.l" +{ } /* Multi line comments */ + YY_BREAK +case 11: +YY_RULE_SETUP +#line 146 "D:/projects/a2llib/src/ifdataflexer.l" +{ /* Single line comment */ } + YY_BREAK +case 12: +/* rule 12 can match eol */ +YY_RULE_SETUP +#line 147 "D:/projects/a2llib/src/ifdataflexer.l" +{} + YY_BREAK +case 13: +YY_RULE_SETUP +#line 148 "D:/projects/a2llib/src/ifdataflexer.l" +{} + YY_BREAK +case 14: +YY_RULE_SETUP +#line 149 "D:/projects/a2llib/src/ifdataflexer.l" +ECHO; + YY_BREAK +#line 1028 "D:/projects/a2llib/src/ifdataflexer.cpp" +case YY_STATE_EOF(INITIAL): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin.rdbuf(); +/* %endif */ + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { +/* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */ + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( yywrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ +} /* end of yylex */ +/* %ok-for-header */ + +/* %if-c++-only */ +/* %not-for-header */ +/* The contents of this function are C++ specific, so the () macro is not used. + * This constructor simply maintains backward compatibility. + * DEPRECATED + */ +yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout ): + yyin(arg_yyin ? arg_yyin->rdbuf() : std::cin.rdbuf()), + yyout(arg_yyout ? arg_yyout->rdbuf() : std::cout.rdbuf()) +{ + ctor_common(); +} + +/* The contents of this function are C++ specific, so the () macro is not used. + */ +yyFlexLexer::yyFlexLexer( std::istream& arg_yyin, std::ostream& arg_yyout ): + yyin(arg_yyin.rdbuf()), + yyout(arg_yyout.rdbuf()) +{ + ctor_common(); +} + +/* The contents of this function are C++ specific, so the () macro is not used. + */ +void yyFlexLexer::ctor_common() +{ + yy_c_buf_p = 0; + yy_init = 0; + yy_start = 0; + yy_flex_debug = 0; + yylineno = 1; // this will only get updated if %option yylineno + + yy_did_buffer_switch_on_eof = 0; + + yy_looking_for_trail_begin = 0; + yy_more_flag = 0; + yy_more_len = 0; + yy_more_offset = yy_prev_more_offset = 0; + + yy_start_stack_ptr = yy_start_stack_depth = 0; + yy_start_stack = NULL; + + yy_buffer_stack = NULL; + yy_buffer_stack_top = 0; + yy_buffer_stack_max = 0; + + yy_state_buf = 0; + +} + +/* The contents of this function are C++ specific, so the () macro is not used. + */ +yyFlexLexer::~yyFlexLexer() +{ + delete [] yy_state_buf; + yyfree( yy_start_stack ); + yy_delete_buffer( YY_CURRENT_BUFFER ); + yyfree( yy_buffer_stack ); +} + +/* The contents of this function are C++ specific, so the () macro is not used. + */ +void yyFlexLexer::switch_streams( std::istream& new_in, std::ostream& new_out ) +{ + // was if( new_in ) + yy_delete_buffer( YY_CURRENT_BUFFER ); + yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE ) ); + + // was if( new_out ) + yyout.rdbuf(new_out.rdbuf()); +} + +/* The contents of this function are C++ specific, so the () macro is not used. + */ +void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out ) +{ + if( ! new_in ) { + new_in = &yyin; + } + + if ( ! new_out ) { + new_out = &yyout; + } + + switch_streams(*new_in, *new_out); +} + +#ifdef YY_INTERACTIVE +int yyFlexLexer::LexerInput( char* buf, int /* max_size */ ) +#else +int yyFlexLexer::LexerInput( char* buf, int max_size ) +#endif +{ + if ( yyin.eof() || yyin.fail() ) + return 0; + +#ifdef YY_INTERACTIVE + yyin.get( buf[0] ); + + if ( yyin.eof() ) + return 0; + + if ( yyin.bad() ) + return -1; + + return 1; + +#else + (void) yyin.read( buf, max_size ); + + if ( yyin.bad() ) + return -1; + else + return yyin.gcount(); +#endif +} + +void yyFlexLexer::LexerOutput( const char* buf, int size ) +{ + (void) yyout.write( buf, size ); +} +/* %ok-for-header */ + +/* %endif */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +int yyFlexLexer::yy_get_next_buffer() +/* %endif */ +{ + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = (yytext_ptr); + int number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1); + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); + } + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + +/* %if-c-only */ +/* %not-for-header */ +/* %endif */ +/* %if-c++-only */ + yy_state_type yyFlexLexer::yy_get_previous_state() +/* %endif */ +{ + yy_state_type yy_current_state; + char *yy_cp; + +/* %% [15.0] code to get the start state into yy_current_state goes here */ + yy_current_state = (yy_start); + + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) + { +/* %% [16.0] code to find the next state goes here */ + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 53 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state ) +/* %endif */ +{ + int yy_is_jam; + /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */ + char *yy_cp = (yy_c_buf_p); + + YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 53 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 52); + + return yy_is_jam ? 0 : yy_current_state; +} + +#ifndef YY_NO_UNPUT +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yyunput( int c, char* yy_bp) +/* %endif */ +{ + char *yy_cp; + + yy_cp = (yy_c_buf_p); + + /* undo effects of setting up yytext */ + *yy_cp = (yy_hold_char); + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + int number_to_move = (yy_n_chars) + 2; + char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; + char *source = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; + + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = + (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + +/* %% [18.0] update yylineno here */ + + if ( c == '\n' ){ + --yylineno; + } + + (yytext_ptr) = yy_bp; + (yy_hold_char) = *yy_cp; + (yy_c_buf_p) = yy_cp; +} +/* %if-c-only */ +/* %endif */ +#endif + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + int yyFlexLexer::yyinput() +/* %endif */ +{ + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + int offset = (int) ((yy_c_buf_p) - (yytext_ptr)); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( ) ) + return 0; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } + + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve yytext */ + (yy_hold_char) = *++(yy_c_buf_p); + +/* %% [19.0] update BOL and yylineno */ + if ( c == '\n' ) + + yylineno++; +; + + return c; +} +/* %if-c-only */ +/* %endif */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yyrestart( std::istream& input_file ) +/* %endif */ +{ + + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE ); + } + + yy_init_buffer( YY_CURRENT_BUFFER, input_file ); + yy_load_buffer_state( ); +} + +/* %if-c++-only */ +/** Delegate to the new version that takes an istream reference. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ +void yyFlexLexer::yyrestart( std::istream* input_file ) +{ + if( ! input_file ) { + input_file = &yyin; + } + yyrestart( *input_file ); +} +/* %endif */ + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) +/* %endif */ +{ + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( ); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + (yy_did_buffer_switch_on_eof) = 1; +} + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_load_buffer_state() +/* %endif */ +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + yyin.rdbuf(YY_CURRENT_BUFFER_LVALUE->yy_input_file); +/* %endif */ + (yy_hold_char) = *(yy_c_buf_p); +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream& file, int size ) +/* %endif */ +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + yy_init_buffer( b, file ); + + return b; +} + +/* %if-c++-only */ +/** Delegate creation of buffers to the new version that takes an istream reference. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ + YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size ) +{ + return yy_create_buffer( *file, size ); +} +/* %endif */ + +/** Destroy the buffer. + * @param b a buffer created with yy_create_buffer() + * + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b ) +/* %endif */ +{ + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + yyfree( (void *) b->yy_ch_buf ); + + yyfree( (void *) b ); +} + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a yyrestart() or at EOF. + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream& file ) +/* %endif */ + +{ + int oerrno = errno; + + yy_flush_buffer( b ); + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + b->yy_input_file = file.rdbuf(); +/* %endif */ + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + b->yy_is_interactive = 0; +/* %endif */ + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b ) +/* %endif */ +{ + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( ); +} + +/* %if-c-or-c++ */ +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +void yyFlexLexer::yypush_buffer_state (YY_BUFFER_STATE new_buffer) +/* %endif */ +{ + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; +} +/* %endif */ + +/* %if-c-or-c++ */ +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +void yyFlexLexer::yypop_buffer_state (void) +/* %endif */ +{ + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } +} +/* %endif */ + +/* %if-c-or-c++ */ +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +void yyFlexLexer::yyensure_buffer_stack(void) +/* %endif */ +{ + yy_size_t num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } +} +/* %endif */ + +/* %if-c-only */ +/* %endif */ + +/* %if-c-only */ +/* %endif */ + +/* %if-c-only */ +/* %endif */ + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_push_state( int _new_state ) +/* %endif */ +{ + if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) ) + { + yy_size_t new_size; + + (yy_start_stack_depth) += YY_START_STACK_INCR; + new_size = (yy_size_t) (yy_start_stack_depth) * sizeof( int ); + + if ( ! (yy_start_stack) ) + (yy_start_stack) = (int *) yyalloc( new_size ); + + else + (yy_start_stack) = (int *) yyrealloc( + (void *) (yy_start_stack), new_size ); + + if ( ! (yy_start_stack) ) + YY_FATAL_ERROR( "out of memory expanding start-condition stack" ); + } + + (yy_start_stack)[(yy_start_stack_ptr)++] = YY_START; + + BEGIN(_new_state); +} + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_pop_state() +/* %endif */ +{ + if ( --(yy_start_stack_ptr) < 0 ) + YY_FATAL_ERROR( "start-condition stack underflow" ); + + BEGIN((yy_start_stack)[(yy_start_stack_ptr)]); +} + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + int yyFlexLexer::yy_top_state() +/* %endif */ +{ + return (yy_start_stack)[(yy_start_stack_ptr) - 1]; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +void yyFlexLexer::LexerError( const char* msg ) +{ + std::cerr << msg << std::endl; + exit( YY_EXIT_FAILURE ); +} +/* %endif */ + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = (yy_hold_char); \ + (yy_c_buf_p) = yytext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/* %if-c-only */ +/* %if-reentrant */ +/* %endif */ +/* %if-reentrant */ +/* %endif */ +/* %endif */ + +/* %if-reentrant */ +/* %if-bison-bridge */ +/* %endif */ +/* %endif if-c-only */ + +/* %if-c-only */ +/* %endif */ + +/* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */ +/* %if-reentrant */ +/* %endif */ +/* %endif */ + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, const char * s2, int n ) +{ + + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (const char * s ) +{ + int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *yyalloc (yy_size_t size ) +{ + return malloc(size); +} + +void *yyrealloc (void * ptr, yy_size_t size ) +{ + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); +} + +void yyfree (void * ptr ) +{ + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ +} + +/* %if-tables-serialization definitions */ +/* %define-yytables The name for this specific scanner's tables. */ +#define YYTABLES_NAME "yytables" +/* %endif */ + +/* %ok-for-header */ + +#line 149 "D:/projects/a2llib/src/ifdataflexer.l" + + + diff --git a/a2llib-main/src/ifdataflexer.l b/a2llib-main/src/ifdataflexer.l new file mode 100644 index 0000000..b7eb202 --- /dev/null +++ b/a2llib-main/src/ifdataflexer.l @@ -0,0 +1,149 @@ +%top { + #include + #include + +} +%{ + #include "ifdatascanner.h" + #undef YY_DECL + #define YY_DECL int a2l::IfDataScanner::ifdatalex(a2l::IfDataParser::value_type* yy_value) + using token = a2l::IfDataParser::token; +%} + +%option prefix="ifdata" +%option 8bit +%option nounistd +%option noyywrap +%option debug +%option never-interactive +%option c++ +%option yyclass="a2l:IfDataScanner" +%option yylineno +%option noinput +%option nounput + + +ws [ \t\n\v\f\r]+ +signed_number [-+]?[0-9]+ +unsigned_number [0-9]+ +hexnumber 0x[0-9a-fA-F]+ +float_val [-+]?[0-9]+(\.[0-9]*)?([eE][-+]?[0-9]+)? +ident [a-zA-Z_]([_a-zA-Z0-9.-]*)? +string (\"(\\.|[^\\"])*\")* + /* \"([^\"\\]|(\\.))*\" */ +nl [\n\r] +keyword [A-Z_0-9]+ + + +%% +%{ + yylval = yy_value; +%} + +"/begin" { return token::IF_DATA_BEGIN; } +"/end" { return token::IF_DATA_END; } +"IF_DATA" { return token::IF_DATA; } +{ident} { + if (yylval != nullptr) { + std::string temp(yytext); + yylval->emplace(temp); + } + return token::IDENT; + } + +{string} { + const size_t len = strlen(yytext); + std::string temp; + if (len > 2) { + temp = yytext + 1; + temp.pop_back(); + } + yylval->emplace(temp); + return token::STRING; + } + +{hexnumber} { + uint64_t address = 0; + for ( size_t index = 0; yytext[ index ] != '\0'; ++index ) { + if ( index < 2 ) continue; + const char token = yytext[index]; + switch ( token ) { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + address *= 16; + address += token - '0'; + break; + + case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + address *= 16; + address += token - 'A' + 10; + break; + + case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + address *= 16; + address += token - 'a' + 10; + break; + + default: + break; + } + } + + yylval->emplace(address); + return token::HEX; + } + {unsigned_number} { + uint64_t temp = 0; + try { + temp = std::stoull(yytext); + } catch (const std::exception& ) { + + } + yylval->emplace(temp); + return token::UINT; + } + {signed_number} { + int64_t temp = 0; + try { + temp = std::stoll(yytext); + } catch (const std::exception& ) { + + } + yylval->emplace(temp); + return token::INT; + } +{float_val} { + double temp = 0.0; + try { + temp = std::stod(yytext); + } catch (const std::exception&) { + + } + yylval->emplace(temp); + return token::FLOAT; + } + +[/][*][^*]*[*]+([^*/][^*]*[*]+)*[/] { } /* Multi line comments */ +"//".* { /* Single line comment */ } +{ws} {} +. {} +%% + diff --git a/a2llib-main/src/ifdataparser.cpp b/a2llib-main/src/ifdataparser.cpp new file mode 100644 index 0000000..d4e59c1 --- /dev/null +++ b/a2llib-main/src/ifdataparser.cpp @@ -0,0 +1,1309 @@ +// A Bison parser, made by GNU Bison 3.8.2. + +// Skeleton implementation for Bison LALR(1) parsers in C++ + +// Copyright (C) 2002-2015, 2018-2021 Free Software Foundation, Inc. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// As a special exception, you may create a larger work that contains +// part or all of the Bison parser skeleton and distribute that work +// under terms of your choice, so long as that work isn't itself a +// parser generator using the skeleton or a modified version thereof +// as a parser skeleton. Alternatively, if you modify or redistribute +// the parser skeleton itself, you may (at your option) remove this +// special exception, which will cause the skeleton and the resulting +// Bison output files to be licensed under the GNU General Public +// License without this special exception. + +// This special exception was added by the Free Software Foundation in +// version 2.2 of Bison. + +// DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, +// especially those whose name start with YY_ or yy_. They are +// private implementation details that can be changed or removed. + + +// Take the name prefix into account. +#define yylex ifdatalex + + + +#include "ifdataparser.hpp" + + +// Unqualified %code blocks. +#line 26 "D:/projects/a2llib/src/ifdataparser.y" + + #include + #include "ifdatascanner.h" + + + #include "a2lhelper.h" + #include + + #undef yylex + #define yylex scanner.ifdatalex + +#line 60 "D:/projects/a2llib/src/ifdataparser.cpp" + + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include // FIXME: INFRINGES ON USER NAME SPACE. +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif +#endif + + +// Whether we are compiled with exception support. +#ifndef YY_EXCEPTIONS +# if defined __GNUC__ && !defined __EXCEPTIONS +# define YY_EXCEPTIONS 0 +# else +# define YY_EXCEPTIONS 1 +# endif +#endif + + + +// Enable debugging if requested. +#if IFDATADEBUG + +// A pseudo ostream that takes yydebug_ into account. +# define YYCDEBUG if (yydebug_) (*yycdebug_) + +# define YY_SYMBOL_PRINT(Title, Symbol) \ + do { \ + if (yydebug_) \ + { \ + *yycdebug_ << Title << ' '; \ + yy_print_ (*yycdebug_, Symbol); \ + *yycdebug_ << '\n'; \ + } \ + } while (false) + +# define YY_REDUCE_PRINT(Rule) \ + do { \ + if (yydebug_) \ + yy_reduce_print_ (Rule); \ + } while (false) + +# define YY_STACK_PRINT() \ + do { \ + if (yydebug_) \ + yy_stack_print_ (); \ + } while (false) + +#else // !IFDATADEBUG + +# define YYCDEBUG if (false) std::cerr +# define YY_SYMBOL_PRINT(Title, Symbol) YY_USE (Symbol) +# define YY_REDUCE_PRINT(Rule) static_cast (0) +# define YY_STACK_PRINT() static_cast (0) + +#endif // !IFDATADEBUG + +#define yyerrok (yyerrstatus_ = 0) +#define yyclearin (yyla.clear ()) + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab +#define YYRECOVERING() (!!yyerrstatus_) + +#line 6 "D:/projects/a2llib/src/ifdataparser.y" +namespace a2l { +#line 134 "D:/projects/a2llib/src/ifdataparser.cpp" + + /// Build a parser object. + IfDataParser::IfDataParser (a2l::IfDataScanner &scanner_yyarg) +#if IFDATADEBUG + : yydebug_ (false), + yycdebug_ (&std::cerr), +#else + : +#endif + scanner (scanner_yyarg) + {} + + IfDataParser::~IfDataParser () + {} + + IfDataParser::syntax_error::~syntax_error () YY_NOEXCEPT YY_NOTHROW + {} + + /*---------. + | symbol. | + `---------*/ + + // basic_symbol. + template + IfDataParser::basic_symbol::basic_symbol (const basic_symbol& that) + : Base (that) + , value () + { + switch (this->kind ()) + { + case symbol_kind::S_block_data: // block_data + value.copy< a2l::IfDataItem > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_FLOAT: // FLOAT + value.copy< double > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_INT: // INT + value.copy< int64_t > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_IDENT: // IDENT + case symbol_kind::S_STRING: // STRING + case symbol_kind::S_protocol: // protocol + case symbol_kind::S_block_name: // block_name + case symbol_kind::S_item_value: // item_value + value.copy< std::string > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_block_data_list: // block_data_list + case symbol_kind::S_item_list: // item_list + value.copy< std::vector > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_UINT: // UINT + case symbol_kind::S_HEX: // HEX + value.copy< uint64_t > (YY_MOVE (that.value)); + break; + + default: + break; + } + + } + + + + + template + IfDataParser::symbol_kind_type + IfDataParser::basic_symbol::type_get () const YY_NOEXCEPT + { + return this->kind (); + } + + + template + bool + IfDataParser::basic_symbol::empty () const YY_NOEXCEPT + { + return this->kind () == symbol_kind::S_YYEMPTY; + } + + template + void + IfDataParser::basic_symbol::move (basic_symbol& s) + { + super_type::move (s); + switch (this->kind ()) + { + case symbol_kind::S_block_data: // block_data + value.move< a2l::IfDataItem > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_FLOAT: // FLOAT + value.move< double > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_INT: // INT + value.move< int64_t > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_IDENT: // IDENT + case symbol_kind::S_STRING: // STRING + case symbol_kind::S_protocol: // protocol + case symbol_kind::S_block_name: // block_name + case symbol_kind::S_item_value: // item_value + value.move< std::string > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_block_data_list: // block_data_list + case symbol_kind::S_item_list: // item_list + value.move< std::vector > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_UINT: // UINT + case symbol_kind::S_HEX: // HEX + value.move< uint64_t > (YY_MOVE (s.value)); + break; + + default: + break; + } + + } + + // by_kind. + IfDataParser::by_kind::by_kind () YY_NOEXCEPT + : kind_ (symbol_kind::S_YYEMPTY) + {} + +#if 201103L <= YY_CPLUSPLUS + IfDataParser::by_kind::by_kind (by_kind&& that) YY_NOEXCEPT + : kind_ (that.kind_) + { + that.clear (); + } +#endif + + IfDataParser::by_kind::by_kind (const by_kind& that) YY_NOEXCEPT + : kind_ (that.kind_) + {} + + IfDataParser::by_kind::by_kind (token_kind_type t) YY_NOEXCEPT + : kind_ (yytranslate_ (t)) + {} + + + + void + IfDataParser::by_kind::clear () YY_NOEXCEPT + { + kind_ = symbol_kind::S_YYEMPTY; + } + + void + IfDataParser::by_kind::move (by_kind& that) + { + kind_ = that.kind_; + that.clear (); + } + + IfDataParser::symbol_kind_type + IfDataParser::by_kind::kind () const YY_NOEXCEPT + { + return kind_; + } + + + IfDataParser::symbol_kind_type + IfDataParser::by_kind::type_get () const YY_NOEXCEPT + { + return this->kind (); + } + + + + // by_state. + IfDataParser::by_state::by_state () YY_NOEXCEPT + : state (empty_state) + {} + + IfDataParser::by_state::by_state (const by_state& that) YY_NOEXCEPT + : state (that.state) + {} + + void + IfDataParser::by_state::clear () YY_NOEXCEPT + { + state = empty_state; + } + + void + IfDataParser::by_state::move (by_state& that) + { + state = that.state; + that.clear (); + } + + IfDataParser::by_state::by_state (state_type s) YY_NOEXCEPT + : state (s) + {} + + IfDataParser::symbol_kind_type + IfDataParser::by_state::kind () const YY_NOEXCEPT + { + if (state == empty_state) + return symbol_kind::S_YYEMPTY; + else + return YY_CAST (symbol_kind_type, yystos_[+state]); + } + + IfDataParser::stack_symbol_type::stack_symbol_type () + {} + + IfDataParser::stack_symbol_type::stack_symbol_type (YY_RVREF (stack_symbol_type) that) + : super_type (YY_MOVE (that.state)) + { + switch (that.kind ()) + { + case symbol_kind::S_block_data: // block_data + value.YY_MOVE_OR_COPY< a2l::IfDataItem > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_FLOAT: // FLOAT + value.YY_MOVE_OR_COPY< double > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_INT: // INT + value.YY_MOVE_OR_COPY< int64_t > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_IDENT: // IDENT + case symbol_kind::S_STRING: // STRING + case symbol_kind::S_protocol: // protocol + case symbol_kind::S_block_name: // block_name + case symbol_kind::S_item_value: // item_value + value.YY_MOVE_OR_COPY< std::string > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_block_data_list: // block_data_list + case symbol_kind::S_item_list: // item_list + value.YY_MOVE_OR_COPY< std::vector > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_UINT: // UINT + case symbol_kind::S_HEX: // HEX + value.YY_MOVE_OR_COPY< uint64_t > (YY_MOVE (that.value)); + break; + + default: + break; + } + +#if 201103L <= YY_CPLUSPLUS + // that is emptied. + that.state = empty_state; +#endif + } + + IfDataParser::stack_symbol_type::stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) that) + : super_type (s) + { + switch (that.kind ()) + { + case symbol_kind::S_block_data: // block_data + value.move< a2l::IfDataItem > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_FLOAT: // FLOAT + value.move< double > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_INT: // INT + value.move< int64_t > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_IDENT: // IDENT + case symbol_kind::S_STRING: // STRING + case symbol_kind::S_protocol: // protocol + case symbol_kind::S_block_name: // block_name + case symbol_kind::S_item_value: // item_value + value.move< std::string > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_block_data_list: // block_data_list + case symbol_kind::S_item_list: // item_list + value.move< std::vector > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_UINT: // UINT + case symbol_kind::S_HEX: // HEX + value.move< uint64_t > (YY_MOVE (that.value)); + break; + + default: + break; + } + + // that is emptied. + that.kind_ = symbol_kind::S_YYEMPTY; + } + +#if YY_CPLUSPLUS < 201103L + IfDataParser::stack_symbol_type& + IfDataParser::stack_symbol_type::operator= (const stack_symbol_type& that) + { + state = that.state; + switch (that.kind ()) + { + case symbol_kind::S_block_data: // block_data + value.copy< a2l::IfDataItem > (that.value); + break; + + case symbol_kind::S_FLOAT: // FLOAT + value.copy< double > (that.value); + break; + + case symbol_kind::S_INT: // INT + value.copy< int64_t > (that.value); + break; + + case symbol_kind::S_IDENT: // IDENT + case symbol_kind::S_STRING: // STRING + case symbol_kind::S_protocol: // protocol + case symbol_kind::S_block_name: // block_name + case symbol_kind::S_item_value: // item_value + value.copy< std::string > (that.value); + break; + + case symbol_kind::S_block_data_list: // block_data_list + case symbol_kind::S_item_list: // item_list + value.copy< std::vector > (that.value); + break; + + case symbol_kind::S_UINT: // UINT + case symbol_kind::S_HEX: // HEX + value.copy< uint64_t > (that.value); + break; + + default: + break; + } + + return *this; + } + + IfDataParser::stack_symbol_type& + IfDataParser::stack_symbol_type::operator= (stack_symbol_type& that) + { + state = that.state; + switch (that.kind ()) + { + case symbol_kind::S_block_data: // block_data + value.move< a2l::IfDataItem > (that.value); + break; + + case symbol_kind::S_FLOAT: // FLOAT + value.move< double > (that.value); + break; + + case symbol_kind::S_INT: // INT + value.move< int64_t > (that.value); + break; + + case symbol_kind::S_IDENT: // IDENT + case symbol_kind::S_STRING: // STRING + case symbol_kind::S_protocol: // protocol + case symbol_kind::S_block_name: // block_name + case symbol_kind::S_item_value: // item_value + value.move< std::string > (that.value); + break; + + case symbol_kind::S_block_data_list: // block_data_list + case symbol_kind::S_item_list: // item_list + value.move< std::vector > (that.value); + break; + + case symbol_kind::S_UINT: // UINT + case symbol_kind::S_HEX: // HEX + value.move< uint64_t > (that.value); + break; + + default: + break; + } + + // that is emptied. + that.state = empty_state; + return *this; + } +#endif + + template + void + IfDataParser::yy_destroy_ (const char* yymsg, basic_symbol& yysym) const + { + if (yymsg) + YY_SYMBOL_PRINT (yymsg, yysym); + } + +#if IFDATADEBUG + template + void + IfDataParser::yy_print_ (std::ostream& yyo, const basic_symbol& yysym) const + { + std::ostream& yyoutput = yyo; + YY_USE (yyoutput); + if (yysym.empty ()) + yyo << "empty symbol"; + else + { + symbol_kind_type yykind = yysym.kind (); + yyo << (yykind < YYNTOKENS ? "token" : "nterm") + << ' ' << yysym.name () << " ("; + YY_USE (yykind); + yyo << ')'; + } + } +#endif + + void + IfDataParser::yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym) + { + if (m) + YY_SYMBOL_PRINT (m, sym); + yystack_.push (YY_MOVE (sym)); + } + + void + IfDataParser::yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym) + { +#if 201103L <= YY_CPLUSPLUS + yypush_ (m, stack_symbol_type (s, std::move (sym))); +#else + stack_symbol_type ss (s, sym); + yypush_ (m, ss); +#endif + } + + void + IfDataParser::yypop_ (int n) YY_NOEXCEPT + { + yystack_.pop (n); + } + +#if IFDATADEBUG + std::ostream& + IfDataParser::debug_stream () const + { + return *yycdebug_; + } + + void + IfDataParser::set_debug_stream (std::ostream& o) + { + yycdebug_ = &o; + } + + + IfDataParser::debug_level_type + IfDataParser::debug_level () const + { + return yydebug_; + } + + void + IfDataParser::set_debug_level (debug_level_type l) + { + yydebug_ = l; + } +#endif // IFDATADEBUG + + IfDataParser::state_type + IfDataParser::yy_lr_goto_state_ (state_type yystate, int yysym) + { + int yyr = yypgoto_[yysym - YYNTOKENS] + yystate; + if (0 <= yyr && yyr <= yylast_ && yycheck_[yyr] == yystate) + return yytable_[yyr]; + else + return yydefgoto_[yysym - YYNTOKENS]; + } + + bool + IfDataParser::yy_pact_value_is_default_ (int yyvalue) YY_NOEXCEPT + { + return yyvalue == yypact_ninf_; + } + + bool + IfDataParser::yy_table_value_is_error_ (int yyvalue) YY_NOEXCEPT + { + return yyvalue == yytable_ninf_; + } + + int + IfDataParser::operator() () + { + return parse (); + } + + int + IfDataParser::parse () + { + int yyn; + /// Length of the RHS of the rule being reduced. + int yylen = 0; + + // Error handling. + int yynerrs_ = 0; + int yyerrstatus_ = 0; + + /// The lookahead symbol. + symbol_type yyla; + + /// The return value of parse (). + int yyresult; + +#if YY_EXCEPTIONS + try +#endif // YY_EXCEPTIONS + { + YYCDEBUG << "Starting parse\n"; + + + /* Initialize the stack. The initial state will be set in + yynewstate, since the latter expects the semantical and the + location values to have been already stored, initialize these + stacks with a primary value. */ + yystack_.clear (); + yypush_ (YY_NULLPTR, 0, YY_MOVE (yyla)); + + /*-----------------------------------------------. + | yynewstate -- push a new symbol on the stack. | + `-----------------------------------------------*/ + yynewstate: + YYCDEBUG << "Entering state " << int (yystack_[0].state) << '\n'; + YY_STACK_PRINT (); + + // Accept? + if (yystack_[0].state == yyfinal_) + YYACCEPT; + + goto yybackup; + + + /*-----------. + | yybackup. | + `-----------*/ + yybackup: + // Try to take a decision without lookahead. + yyn = yypact_[+yystack_[0].state]; + if (yy_pact_value_is_default_ (yyn)) + goto yydefault; + + // Read a lookahead token. + if (yyla.empty ()) + { + YYCDEBUG << "Reading a token\n"; +#if YY_EXCEPTIONS + try +#endif // YY_EXCEPTIONS + { + yyla.kind_ = yytranslate_ (yylex (&yyla.value)); + } +#if YY_EXCEPTIONS + catch (const syntax_error& yyexc) + { + YYCDEBUG << "Caught exception: " << yyexc.what() << '\n'; + error (yyexc); + goto yyerrlab1; + } +#endif // YY_EXCEPTIONS + } + YY_SYMBOL_PRINT ("Next token is", yyla); + + if (yyla.kind () == symbol_kind::S_YYerror) + { + // The scanner already issued an error message, process directly + // to error recovery. But do not keep the error token as + // lookahead, it is too special and may lead us to an endless + // loop in error recovery. */ + yyla.kind_ = symbol_kind::S_YYUNDEF; + goto yyerrlab1; + } + + /* If the proper action on seeing token YYLA.TYPE is to reduce or + to detect an error, take that action. */ + yyn += yyla.kind (); + if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.kind ()) + { + goto yydefault; + } + + // Reduce or error. + yyn = yytable_[yyn]; + if (yyn <= 0) + { + if (yy_table_value_is_error_ (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + // Count tokens shifted since error; after three, turn off error status. + if (yyerrstatus_) + --yyerrstatus_; + + // Shift the lookahead token. + yypush_ ("Shifting", state_type (yyn), YY_MOVE (yyla)); + goto yynewstate; + + + /*-----------------------------------------------------------. + | yydefault -- do the default action for the current state. | + `-----------------------------------------------------------*/ + yydefault: + yyn = yydefact_[+yystack_[0].state]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + + /*-----------------------------. + | yyreduce -- do a reduction. | + `-----------------------------*/ + yyreduce: + yylen = yyr2_[yyn]; + { + stack_symbol_type yylhs; + yylhs.state = yy_lr_goto_state_ (yystack_[yylen].state, yyr1_[yyn]); + /* Variants are always initialized to an empty instance of the + correct type. The default '$$ = $1' action is NOT applied + when using variants. */ + switch (yyr1_[yyn]) + { + case symbol_kind::S_block_data: // block_data + yylhs.value.emplace< a2l::IfDataItem > (); + break; + + case symbol_kind::S_FLOAT: // FLOAT + yylhs.value.emplace< double > (); + break; + + case symbol_kind::S_INT: // INT + yylhs.value.emplace< int64_t > (); + break; + + case symbol_kind::S_IDENT: // IDENT + case symbol_kind::S_STRING: // STRING + case symbol_kind::S_protocol: // protocol + case symbol_kind::S_block_name: // block_name + case symbol_kind::S_item_value: // item_value + yylhs.value.emplace< std::string > (); + break; + + case symbol_kind::S_block_data_list: // block_data_list + case symbol_kind::S_item_list: // item_list + yylhs.value.emplace< std::vector > (); + break; + + case symbol_kind::S_UINT: // UINT + case symbol_kind::S_HEX: // HEX + yylhs.value.emplace< uint64_t > (); + break; + + default: + break; + } + + + + // Perform the reduction. + YY_REDUCE_PRINT (yyn); +#if YY_EXCEPTIONS + try +#endif // YY_EXCEPTIONS + { + switch (yyn) + { + case 3: // if_data_block: IF_DATA_BEGIN IF_DATA protocol block_data_list IF_DATA_END IF_DATA +#line 62 "D:/projects/a2llib/src/ifdataparser.y" + { + scanner.Protocol(yystack_[3].value.as < std::string > ()); + scanner.ItemList(yystack_[2].value.as < std::vector > ()); + } +#line 822 "D:/projects/a2llib/src/ifdataparser.cpp" + break; + + case 4: // protocol: IDENT +#line 67 "D:/projects/a2llib/src/ifdataparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 828 "D:/projects/a2llib/src/ifdataparser.cpp" + break; + + case 5: // block_data_list: %empty +#line 69 "D:/projects/a2llib/src/ifdataparser.y" + {} +#line 834 "D:/projects/a2llib/src/ifdataparser.cpp" + break; + + case 6: // block_data_list: block_data_list block_data +#line 70 "D:/projects/a2llib/src/ifdataparser.y" + { + yylhs.value.as < std::vector > () = yystack_[1].value.as < std::vector > (); + yylhs.value.as < std::vector > ().emplace_back(yystack_[0].value.as < a2l::IfDataItem > ()); + } +#line 843 "D:/projects/a2llib/src/ifdataparser.cpp" + break; + + case 7: // block_data_list: block_data_list item_value +#line 74 "D:/projects/a2llib/src/ifdataparser.y" + { + yylhs.value.as < std::vector > () = yystack_[1].value.as < std::vector > (); + IfDataItem item; + item.Value = yystack_[0].value.as < std::string > (); + yylhs.value.as < std::vector > ().emplace_back(yystack_[0].value.as < std::string > ()); + } +#line 854 "D:/projects/a2llib/src/ifdataparser.cpp" + break; + + case 8: // block_data: IF_DATA_BEGIN block_name item_list IF_DATA_END block_name +#line 81 "D:/projects/a2llib/src/ifdataparser.y" + { + IfDataItem block; + block.BlockName = yystack_[3].value.as < std::string > (); + block.ItemList = yystack_[2].value.as < std::vector > (); + yylhs.value.as < a2l::IfDataItem > () = block; +} +#line 865 "D:/projects/a2llib/src/ifdataparser.cpp" + break; + + case 9: // block_name: IDENT +#line 88 "D:/projects/a2llib/src/ifdataparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 871 "D:/projects/a2llib/src/ifdataparser.cpp" + break; + + case 10: // item_list: %empty +#line 90 "D:/projects/a2llib/src/ifdataparser.y" + {} +#line 877 "D:/projects/a2llib/src/ifdataparser.cpp" + break; + + case 11: // item_list: item_list block_data +#line 91 "D:/projects/a2llib/src/ifdataparser.y" + { + yylhs.value.as < std::vector > () = yystack_[1].value.as < std::vector > (); + yylhs.value.as < std::vector > ().emplace_back(yystack_[0].value.as < a2l::IfDataItem > ()); + } +#line 886 "D:/projects/a2llib/src/ifdataparser.cpp" + break; + + case 12: // item_list: item_list item_value +#line 95 "D:/projects/a2llib/src/ifdataparser.y" + { + yylhs.value.as < std::vector > () = yystack_[1].value.as < std::vector > (); + IfDataItem item; + item.Value = yystack_[0].value.as < std::string > (); + yylhs.value.as < std::vector > ().emplace_back(yystack_[0].value.as < std::string > ()); + } +#line 897 "D:/projects/a2llib/src/ifdataparser.cpp" + break; + + case 13: // item_value: IDENT +#line 102 "D:/projects/a2llib/src/ifdataparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 903 "D:/projects/a2llib/src/ifdataparser.cpp" + break; + + case 14: // item_value: STRING +#line 103 "D:/projects/a2llib/src/ifdataparser.y" + { yylhs.value.as < std::string > () = yystack_[0].value.as < std::string > (); } +#line 909 "D:/projects/a2llib/src/ifdataparser.cpp" + break; + + case 15: // item_value: HEX +#line 104 "D:/projects/a2llib/src/ifdataparser.y" + { yylhs.value.as < std::string > () = std::to_string(yystack_[0].value.as < uint64_t > ()); } +#line 915 "D:/projects/a2llib/src/ifdataparser.cpp" + break; + + case 16: // item_value: UINT +#line 105 "D:/projects/a2llib/src/ifdataparser.y" + { yylhs.value.as < std::string > () = std::to_string(yystack_[0].value.as < uint64_t > ()); } +#line 921 "D:/projects/a2llib/src/ifdataparser.cpp" + break; + + case 17: // item_value: INT +#line 106 "D:/projects/a2llib/src/ifdataparser.y" + { yylhs.value.as < std::string > () = std::to_string(yystack_[0].value.as < int64_t > ()); } +#line 927 "D:/projects/a2llib/src/ifdataparser.cpp" + break; + + case 18: // item_value: FLOAT +#line 107 "D:/projects/a2llib/src/ifdataparser.y" + { yylhs.value.as < std::string > () = std::to_string(yystack_[0].value.as < double > ()); } +#line 933 "D:/projects/a2llib/src/ifdataparser.cpp" + break; + + +#line 937 "D:/projects/a2llib/src/ifdataparser.cpp" + + default: + break; + } + } +#if YY_EXCEPTIONS + catch (const syntax_error& yyexc) + { + YYCDEBUG << "Caught exception: " << yyexc.what() << '\n'; + error (yyexc); + YYERROR; + } +#endif // YY_EXCEPTIONS + YY_SYMBOL_PRINT ("-> $$ =", yylhs); + yypop_ (yylen); + yylen = 0; + + // Shift the result of the reduction. + yypush_ (YY_NULLPTR, YY_MOVE (yylhs)); + } + goto yynewstate; + + + /*--------------------------------------. + | yyerrlab -- here on detecting error. | + `--------------------------------------*/ + yyerrlab: + // If not already recovering from an error, report this error. + if (!yyerrstatus_) + { + ++yynerrs_; + std::string msg = YY_("syntax error"); + error (YY_MOVE (msg)); + } + + + if (yyerrstatus_ == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + // Return failure if at end of input. + if (yyla.kind () == symbol_kind::S_YYEOF) + YYABORT; + else if (!yyla.empty ()) + { + yy_destroy_ ("Error: discarding", yyla); + yyla.clear (); + } + } + + // Else will try to reuse lookahead token after shifting the error token. + goto yyerrlab1; + + + /*---------------------------------------------------. + | yyerrorlab -- error raised explicitly by YYERROR. | + `---------------------------------------------------*/ + yyerrorlab: + /* Pacify compilers when the user code never invokes YYERROR and + the label yyerrorlab therefore never appears in user code. */ + if (false) + YYERROR; + + /* Do not reclaim the symbols of the rule whose action triggered + this YYERROR. */ + yypop_ (yylen); + yylen = 0; + YY_STACK_PRINT (); + goto yyerrlab1; + + + /*-------------------------------------------------------------. + | yyerrlab1 -- common code for both syntax error and YYERROR. | + `-------------------------------------------------------------*/ + yyerrlab1: + yyerrstatus_ = 3; // Each real token shifted decrements this. + // Pop stack until we find a state that shifts the error token. + for (;;) + { + yyn = yypact_[+yystack_[0].state]; + if (!yy_pact_value_is_default_ (yyn)) + { + yyn += symbol_kind::S_YYerror; + if (0 <= yyn && yyn <= yylast_ + && yycheck_[yyn] == symbol_kind::S_YYerror) + { + yyn = yytable_[yyn]; + if (0 < yyn) + break; + } + } + + // Pop the current state because it cannot handle the error token. + if (yystack_.size () == 1) + YYABORT; + + yy_destroy_ ("Error: popping", yystack_[0]); + yypop_ (); + YY_STACK_PRINT (); + } + { + stack_symbol_type error_token; + + + // Shift the error token. + error_token.state = state_type (yyn); + yypush_ ("Shifting", YY_MOVE (error_token)); + } + goto yynewstate; + + + /*-------------------------------------. + | yyacceptlab -- YYACCEPT comes here. | + `-------------------------------------*/ + yyacceptlab: + yyresult = 0; + goto yyreturn; + + + /*-----------------------------------. + | yyabortlab -- YYABORT comes here. | + `-----------------------------------*/ + yyabortlab: + yyresult = 1; + goto yyreturn; + + + /*-----------------------------------------------------. + | yyreturn -- parsing is finished, return the result. | + `-----------------------------------------------------*/ + yyreturn: + if (!yyla.empty ()) + yy_destroy_ ("Cleanup: discarding lookahead", yyla); + + /* Do not reclaim the symbols of the rule whose action triggered + this YYABORT or YYACCEPT. */ + yypop_ (yylen); + YY_STACK_PRINT (); + while (1 < yystack_.size ()) + { + yy_destroy_ ("Cleanup: popping", yystack_[0]); + yypop_ (); + } + + return yyresult; + } +#if YY_EXCEPTIONS + catch (...) + { + YYCDEBUG << "Exception caught: cleaning lookahead and stack\n"; + // Do not try to display the values of the reclaimed symbols, + // as their printers might throw an exception. + if (!yyla.empty ()) + yy_destroy_ (YY_NULLPTR, yyla); + + while (1 < yystack_.size ()) + { + yy_destroy_ (YY_NULLPTR, yystack_[0]); + yypop_ (); + } + throw; + } +#endif // YY_EXCEPTIONS + } + + void + IfDataParser::error (const syntax_error& yyexc) + { + error (yyexc.what ()); + } + +#if IFDATADEBUG || 0 + const char * + IfDataParser::symbol_name (symbol_kind_type yysymbol) + { + return yytname_[yysymbol]; + } +#endif // #if IFDATADEBUG || 0 + + + + + + + + + + const signed char IfDataParser::yypact_ninf_ = -4; + + const signed char IfDataParser::yytable_ninf_ = -1; + + const signed char + IfDataParser::yypact_[] = + { + 4, 8, 16, 10, -4, -4, -4, -3, 11, 12, + -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, + -4, 6, 11, -4, -4, -4 + }; + + const signed char + IfDataParser::yydefact_[] = + { + 2, 0, 0, 0, 1, 4, 5, 0, 0, 0, + 16, 15, 17, 18, 13, 14, 6, 7, 9, 10, + 3, 0, 0, 11, 12, 8 + }; + + const signed char + IfDataParser::yypgoto_[] = + { + -4, -4, -4, -4, 0, 1, -4, 3 + }; + + const signed char + IfDataParser::yydefgoto_[] = + { + 0, 2, 6, 7, 16, 19, 21, 17 + }; + + const signed char + IfDataParser::yytable_[] = + { + 8, 9, 10, 11, 12, 13, 14, 1, 15, 8, + 22, 10, 11, 12, 13, 14, 4, 15, 3, 5, + 18, 23, 20, 25, 24 + }; + + const signed char + IfDataParser::yycheck_[] = + { + 3, 4, 5, 6, 7, 8, 9, 3, 11, 3, + 4, 5, 6, 7, 8, 9, 0, 11, 10, 9, + 9, 21, 10, 22, 21 + }; + + const signed char + IfDataParser::yystos_[] = + { + 0, 3, 13, 10, 0, 9, 14, 15, 3, 4, + 5, 6, 7, 8, 9, 11, 16, 19, 9, 17, + 10, 18, 4, 16, 19, 17 + }; + + const signed char + IfDataParser::yyr1_[] = + { + 0, 12, 13, 13, 14, 15, 15, 15, 16, 17, + 18, 18, 18, 19, 19, 19, 19, 19, 19 + }; + + const signed char + IfDataParser::yyr2_[] = + { + 0, 2, 0, 6, 1, 0, 2, 2, 5, 1, + 0, 2, 2, 1, 1, 1, 1, 1, 1 + }; + + +#if IFDATADEBUG + // YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + // First, the terminals, then, starting at \a YYNTOKENS, nonterminals. + const char* + const IfDataParser::yytname_[] = + { + "\"end of file\"", "error", "\"invalid token\"", "IF_DATA_BEGIN", + "IF_DATA_END", "UINT", "HEX", "INT", "FLOAT", "IDENT", "IF_DATA", + "STRING", "$accept", "if_data_block", "protocol", "block_data_list", + "block_data", "block_name", "item_list", "item_value", YY_NULLPTR + }; +#endif + + +#if IFDATADEBUG + const signed char + IfDataParser::yyrline_[] = + { + 0, 61, 61, 62, 67, 69, 70, 74, 81, 88, + 90, 91, 95, 102, 103, 104, 105, 106, 107 + }; + + void + IfDataParser::yy_stack_print_ () const + { + *yycdebug_ << "Stack now"; + for (stack_type::const_iterator + i = yystack_.begin (), + i_end = yystack_.end (); + i != i_end; ++i) + *yycdebug_ << ' ' << int (i->state); + *yycdebug_ << '\n'; + } + + void + IfDataParser::yy_reduce_print_ (int yyrule) const + { + int yylno = yyrline_[yyrule]; + int yynrhs = yyr2_[yyrule]; + // Print the symbols being reduced, and their result. + *yycdebug_ << "Reducing stack by rule " << yyrule - 1 + << " (line " << yylno << "):\n"; + // The symbols being reduced. + for (int yyi = 0; yyi < yynrhs; yyi++) + YY_SYMBOL_PRINT (" $" << yyi + 1 << " =", + yystack_[(yynrhs) - (yyi + 1)]); + } +#endif // IFDATADEBUG + + IfDataParser::symbol_kind_type + IfDataParser::yytranslate_ (int t) YY_NOEXCEPT + { + // YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to + // TOKEN-NUM as returned by yylex. + static + const signed char + translate_table[] = + { + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11 + }; + // Last valid token kind. + const int code_max = 266; + + if (t <= 0) + return symbol_kind::S_YYEOF; + else if (t <= code_max) + return static_cast (translate_table[t]); + else + return symbol_kind::S_YYUNDEF; + } + +#line 6 "D:/projects/a2llib/src/ifdataparser.y" +} // a2l +#line 1296 "D:/projects/a2llib/src/ifdataparser.cpp" + +#line 110 "D:/projects/a2llib/src/ifdataparser.y" + + +void a2l::IfDataParser::error(const std::string& err) { + const auto line = scanner.lineno(); + // const auto column = scanner.YYLeng(); + const std::string near = scanner.YYText() != nullptr ? scanner.YYText() : ""; + std::ostringstream error; + error << "Parser error: " << err + << ", Line: " << line + << ", Near: " << near; + scanner.LastError(error.str()); +} diff --git a/a2llib-main/src/ifdataparser.hpp b/a2llib-main/src/ifdataparser.hpp new file mode 100644 index 0000000..8329ab5 --- /dev/null +++ b/a2llib-main/src/ifdataparser.hpp @@ -0,0 +1,1406 @@ +// A Bison parser, made by GNU Bison 3.8.2. + +// Skeleton interface for Bison LALR(1) parsers in C++ + +// Copyright (C) 2002-2015, 2018-2021 Free Software Foundation, Inc. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// As a special exception, you may create a larger work that contains +// part or all of the Bison parser skeleton and distribute that work +// under terms of your choice, so long as that work isn't itself a +// parser generator using the skeleton or a modified version thereof +// as a parser skeleton. Alternatively, if you modify or redistribute +// the parser skeleton itself, you may (at your option) remove this +// special exception, which will cause the skeleton and the resulting +// Bison output files to be licensed under the GNU General Public +// License without this special exception. + +// This special exception was added by the Free Software Foundation in +// version 2.2 of Bison. + + +/** + ** \file D:/projects/a2llib/src/ifdataparser.hpp + ** Define the a2l::parser class. + */ + +// C++ LALR(1) parser skeleton written by Akim Demaille. + +// DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, +// especially those whose name start with YY_ or yy_. They are +// private implementation details that can be changed or removed. + +#ifndef YY_IFDATA_D_PROJECTS_A2LLIB_SRC_IFDATAPARSER_HPP_INCLUDED +# define YY_IFDATA_D_PROJECTS_A2LLIB_SRC_IFDATAPARSER_HPP_INCLUDED +// "%code requires" blocks. +#line 10 "D:/projects/a2llib/src/ifdataparser.y" + +#include +#include +#include +#include +#include "a2l/ifdataitem.h" + +namespace a2l { +class IfDataScanner; +} + + +#line 62 "D:/projects/a2llib/src/ifdataparser.hpp" + + +# include // std::abort +# include +# include +# include +# include + +#if defined __cplusplus +# define YY_CPLUSPLUS __cplusplus +#else +# define YY_CPLUSPLUS 199711L +#endif + +// Support move semantics when possible. +#if 201103L <= YY_CPLUSPLUS +# define YY_MOVE std::move +# define YY_MOVE_OR_COPY move +# define YY_MOVE_REF(Type) Type&& +# define YY_RVREF(Type) Type&& +# define YY_COPY(Type) Type +#else +# define YY_MOVE +# define YY_MOVE_OR_COPY copy +# define YY_MOVE_REF(Type) Type& +# define YY_RVREF(Type) const Type& +# define YY_COPY(Type) const Type& +#endif + +// Support noexcept when possible. +#if 201103L <= YY_CPLUSPLUS +# define YY_NOEXCEPT noexcept +# define YY_NOTHROW +#else +# define YY_NOEXCEPT +# define YY_NOTHROW throw () +#endif + +// Support constexpr when possible. +#if 201703 <= YY_CPLUSPLUS +# define YY_CONSTEXPR constexpr +#else +# define YY_CONSTEXPR +#endif + + + +#ifndef YY_ATTRIBUTE_PURE +# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define YY_ATTRIBUTE_PURE +# endif +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +# else +# define YY_ATTRIBUTE_UNUSED +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YY_USE(E) ((void) (E)) +#else +# define YY_USE(E) /* empty */ +#endif + +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ +# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") +# else +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# endif +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") +#else +# define YY_INITIAL_VALUE(Value) Value +#endif +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + +#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ +# define YY_IGNORE_USELESS_CAST_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") +# define YY_IGNORE_USELESS_CAST_END \ + _Pragma ("GCC diagnostic pop") +#endif +#ifndef YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_END +#endif + +# ifndef YY_CAST +# ifdef __cplusplus +# define YY_CAST(Type, Val) static_cast (Val) +# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) +# else +# define YY_CAST(Type, Val) ((Type) (Val)) +# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) +# endif +# endif +# ifndef YY_NULLPTR +# if defined __cplusplus +# if 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# else +# define YY_NULLPTR ((void*)0) +# endif +# endif + +/* Debug traces. */ +#ifndef IFDATADEBUG +# if defined YYDEBUG +#if YYDEBUG +# define IFDATADEBUG 1 +# else +# define IFDATADEBUG 0 +# endif +# else /* ! defined YYDEBUG */ +# define IFDATADEBUG 0 +# endif /* ! defined YYDEBUG */ +#endif /* ! defined IFDATADEBUG */ + +#line 6 "D:/projects/a2llib/src/ifdataparser.y" +namespace a2l { +#line 206 "D:/projects/a2llib/src/ifdataparser.hpp" + + + + + /// A Bison parser. + class IfDataParser + { + public: +#ifdef IFDATASTYPE +# ifdef __GNUC__ +# pragma GCC message "bison: do not #define IFDATASTYPE in C++, use %define api.value.type" +# endif + typedef IFDATASTYPE value_type; +#else + /// A buffer to store and retrieve objects. + /// + /// Sort of a variant, but does not keep track of the nature + /// of the stored data, since that knowledge is available + /// via the current parser state. + class value_type + { + public: + /// Type of *this. + typedef value_type self_type; + + /// Empty construction. + value_type () YY_NOEXCEPT + : yyraw_ () + {} + + /// Construct and fill. + template + value_type (YY_RVREF (T) t) + { + new (yyas_ ()) T (YY_MOVE (t)); + } + +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + value_type (const self_type&) = delete; + /// Non copyable. + self_type& operator= (const self_type&) = delete; +#endif + + /// Destruction, allowed only if empty. + ~value_type () YY_NOEXCEPT + {} + +# if 201103L <= YY_CPLUSPLUS + /// Instantiate a \a T in here from \a t. + template + T& + emplace (U&&... u) + { + return *new (yyas_ ()) T (std::forward (u)...); + } +# else + /// Instantiate an empty \a T in here. + template + T& + emplace () + { + return *new (yyas_ ()) T (); + } + + /// Instantiate a \a T in here from \a t. + template + T& + emplace (const T& t) + { + return *new (yyas_ ()) T (t); + } +# endif + + /// Instantiate an empty \a T in here. + /// Obsolete, use emplace. + template + T& + build () + { + return emplace (); + } + + /// Instantiate a \a T in here from \a t. + /// Obsolete, use emplace. + template + T& + build (const T& t) + { + return emplace (t); + } + + /// Accessor to a built \a T. + template + T& + as () YY_NOEXCEPT + { + return *yyas_ (); + } + + /// Const accessor to a built \a T (for %printer). + template + const T& + as () const YY_NOEXCEPT + { + return *yyas_ (); + } + + /// Swap the content with \a that, of same type. + /// + /// Both variants must be built beforehand, because swapping the actual + /// data requires reading it (with as()), and this is not possible on + /// unconstructed variants: it would require some dynamic testing, which + /// should not be the variant's responsibility. + /// Swapping between built and (possibly) non-built is done with + /// self_type::move (). + template + void + swap (self_type& that) YY_NOEXCEPT + { + std::swap (as (), that.as ()); + } + + /// Move the content of \a that to this. + /// + /// Destroys \a that. + template + void + move (self_type& that) + { +# if 201103L <= YY_CPLUSPLUS + emplace (std::move (that.as ())); +# else + emplace (); + swap (that); +# endif + that.destroy (); + } + +# if 201103L <= YY_CPLUSPLUS + /// Move the content of \a that to this. + template + void + move (self_type&& that) + { + emplace (std::move (that.as ())); + that.destroy (); + } +#endif + + /// Copy the content of \a that to this. + template + void + copy (const self_type& that) + { + emplace (that.as ()); + } + + /// Destroy the stored \a T. + template + void + destroy () + { + as ().~T (); + } + + private: +#if YY_CPLUSPLUS < 201103L + /// Non copyable. + value_type (const self_type&); + /// Non copyable. + self_type& operator= (const self_type&); +#endif + + /// Accessor to raw memory as \a T. + template + T* + yyas_ () YY_NOEXCEPT + { + void *yyp = yyraw_; + return static_cast (yyp); + } + + /// Const accessor to raw memory as \a T. + template + const T* + yyas_ () const YY_NOEXCEPT + { + const void *yyp = yyraw_; + return static_cast (yyp); + } + + /// An auxiliary type to compute the largest semantic type. + union union_type + { + // block_data + char dummy1[sizeof (a2l::IfDataItem)]; + + // FLOAT + char dummy2[sizeof (double)]; + + // INT + char dummy3[sizeof (int64_t)]; + + // IDENT + // STRING + // protocol + // block_name + // item_value + char dummy4[sizeof (std::string)]; + + // block_data_list + // item_list + char dummy5[sizeof (std::vector)]; + + // UINT + // HEX + char dummy6[sizeof (uint64_t)]; + }; + + /// The size of the largest semantic type. + enum { size = sizeof (union_type) }; + + /// A buffer to store semantic values. + union + { + /// Strongest alignment constraints. + long double yyalign_me_; + /// A buffer large enough to store any of the semantic values. + char yyraw_[size]; + }; + }; + +#endif + /// Backward compatibility (Bison 3.8). + typedef value_type semantic_type; + + + /// Syntax errors thrown from user actions. + struct syntax_error : std::runtime_error + { + syntax_error (const std::string& m) + : std::runtime_error (m) + {} + + syntax_error (const syntax_error& s) + : std::runtime_error (s.what ()) + {} + + ~syntax_error () YY_NOEXCEPT YY_NOTHROW; + }; + + /// Token kinds. + struct token + { + enum token_kind_type + { + IFDATAEMPTY = -2, + IFDATAEOF = 0, // "end of file" + IFDATAerror = 256, // error + IFDATAUNDEF = 257, // "invalid token" + IF_DATA_BEGIN = 258, // IF_DATA_BEGIN + IF_DATA_END = 259, // IF_DATA_END + UINT = 260, // UINT + HEX = 261, // HEX + INT = 262, // INT + FLOAT = 263, // FLOAT + IDENT = 264, // IDENT + IF_DATA = 265, // IF_DATA + STRING = 266 // STRING + }; + /// Backward compatibility alias (Bison 3.6). + typedef token_kind_type yytokentype; + }; + + /// Token kind, as returned by yylex. + typedef token::token_kind_type token_kind_type; + + /// Backward compatibility alias (Bison 3.6). + typedef token_kind_type token_type; + + /// Symbol kinds. + struct symbol_kind + { + enum symbol_kind_type + { + YYNTOKENS = 12, ///< Number of tokens. + S_YYEMPTY = -2, + S_YYEOF = 0, // "end of file" + S_YYerror = 1, // error + S_YYUNDEF = 2, // "invalid token" + S_IF_DATA_BEGIN = 3, // IF_DATA_BEGIN + S_IF_DATA_END = 4, // IF_DATA_END + S_UINT = 5, // UINT + S_HEX = 6, // HEX + S_INT = 7, // INT + S_FLOAT = 8, // FLOAT + S_IDENT = 9, // IDENT + S_IF_DATA = 10, // IF_DATA + S_STRING = 11, // STRING + S_YYACCEPT = 12, // $accept + S_if_data_block = 13, // if_data_block + S_protocol = 14, // protocol + S_block_data_list = 15, // block_data_list + S_block_data = 16, // block_data + S_block_name = 17, // block_name + S_item_list = 18, // item_list + S_item_value = 19 // item_value + }; + }; + + /// (Internal) symbol kind. + typedef symbol_kind::symbol_kind_type symbol_kind_type; + + /// The number of tokens. + static const symbol_kind_type YYNTOKENS = symbol_kind::YYNTOKENS; + + /// A complete symbol. + /// + /// Expects its Base type to provide access to the symbol kind + /// via kind (). + /// + /// Provide access to semantic value. + template + struct basic_symbol : Base + { + /// Alias to Base. + typedef Base super_type; + + /// Default constructor. + basic_symbol () YY_NOEXCEPT + : value () + {} + +#if 201103L <= YY_CPLUSPLUS + /// Move constructor. + basic_symbol (basic_symbol&& that) + : Base (std::move (that)) + , value () + { + switch (this->kind ()) + { + case symbol_kind::S_block_data: // block_data + value.move< a2l::IfDataItem > (std::move (that.value)); + break; + + case symbol_kind::S_FLOAT: // FLOAT + value.move< double > (std::move (that.value)); + break; + + case symbol_kind::S_INT: // INT + value.move< int64_t > (std::move (that.value)); + break; + + case symbol_kind::S_IDENT: // IDENT + case symbol_kind::S_STRING: // STRING + case symbol_kind::S_protocol: // protocol + case symbol_kind::S_block_name: // block_name + case symbol_kind::S_item_value: // item_value + value.move< std::string > (std::move (that.value)); + break; + + case symbol_kind::S_block_data_list: // block_data_list + case symbol_kind::S_item_list: // item_list + value.move< std::vector > (std::move (that.value)); + break; + + case symbol_kind::S_UINT: // UINT + case symbol_kind::S_HEX: // HEX + value.move< uint64_t > (std::move (that.value)); + break; + + default: + break; + } + + } +#endif + + /// Copy constructor. + basic_symbol (const basic_symbol& that); + + /// Constructors for typed symbols. +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t) + : Base (t) + {} +#else + basic_symbol (typename Base::kind_type t) + : Base (t) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, a2l::IfDataItem&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const a2l::IfDataItem& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, double&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const double& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, int64_t&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const int64_t& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, std::string&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const std::string& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, std::vector&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const std::vector& v) + : Base (t) + , value (v) + {} +#endif + +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, uint64_t&& v) + : Base (t) + , value (std::move (v)) + {} +#else + basic_symbol (typename Base::kind_type t, const uint64_t& v) + : Base (t) + , value (v) + {} +#endif + + /// Destroy the symbol. + ~basic_symbol () + { + clear (); + } + + + + /// Destroy contents, and record that is empty. + void clear () YY_NOEXCEPT + { + // User destructor. + symbol_kind_type yykind = this->kind (); + basic_symbol& yysym = *this; + (void) yysym; + switch (yykind) + { + default: + break; + } + + // Value type destructor. +switch (yykind) + { + case symbol_kind::S_block_data: // block_data + value.template destroy< a2l::IfDataItem > (); + break; + + case symbol_kind::S_FLOAT: // FLOAT + value.template destroy< double > (); + break; + + case symbol_kind::S_INT: // INT + value.template destroy< int64_t > (); + break; + + case symbol_kind::S_IDENT: // IDENT + case symbol_kind::S_STRING: // STRING + case symbol_kind::S_protocol: // protocol + case symbol_kind::S_block_name: // block_name + case symbol_kind::S_item_value: // item_value + value.template destroy< std::string > (); + break; + + case symbol_kind::S_block_data_list: // block_data_list + case symbol_kind::S_item_list: // item_list + value.template destroy< std::vector > (); + break; + + case symbol_kind::S_UINT: // UINT + case symbol_kind::S_HEX: // HEX + value.template destroy< uint64_t > (); + break; + + default: + break; + } + + Base::clear (); + } + +#if IFDATADEBUG || 0 + /// The user-facing name of this symbol. + const char *name () const YY_NOEXCEPT + { + return IfDataParser::symbol_name (this->kind ()); + } +#endif // #if IFDATADEBUG || 0 + + + /// Backward compatibility (Bison 3.6). + symbol_kind_type type_get () const YY_NOEXCEPT; + + /// Whether empty. + bool empty () const YY_NOEXCEPT; + + /// Destructive move, \a s is emptied into this. + void move (basic_symbol& s); + + /// The semantic value. + value_type value; + + private: +#if YY_CPLUSPLUS < 201103L + /// Assignment operator. + basic_symbol& operator= (const basic_symbol& that); +#endif + }; + + /// Type access provider for token (enum) based symbols. + struct by_kind + { + /// The symbol kind as needed by the constructor. + typedef token_kind_type kind_type; + + /// Default constructor. + by_kind () YY_NOEXCEPT; + +#if 201103L <= YY_CPLUSPLUS + /// Move constructor. + by_kind (by_kind&& that) YY_NOEXCEPT; +#endif + + /// Copy constructor. + by_kind (const by_kind& that) YY_NOEXCEPT; + + /// Constructor from (external) token numbers. + by_kind (kind_type t) YY_NOEXCEPT; + + + + /// Record that this symbol is empty. + void clear () YY_NOEXCEPT; + + /// Steal the symbol kind from \a that. + void move (by_kind& that); + + /// The (internal) type number (corresponding to \a type). + /// \a empty when empty. + symbol_kind_type kind () const YY_NOEXCEPT; + + /// Backward compatibility (Bison 3.6). + symbol_kind_type type_get () const YY_NOEXCEPT; + + /// The symbol kind. + /// \a S_YYEMPTY when empty. + symbol_kind_type kind_; + }; + + /// Backward compatibility for a private implementation detail (Bison 3.6). + typedef by_kind by_type; + + /// "External" symbols: returned by the scanner. + struct symbol_type : basic_symbol + { + /// Superclass. + typedef basic_symbol super_type; + + /// Empty symbol. + symbol_type () YY_NOEXCEPT {} + + /// Constructor for valueless symbols, and symbols from each type. +#if 201103L <= YY_CPLUSPLUS + symbol_type (int tok) + : super_type (token_kind_type (tok)) +#else + symbol_type (int tok) + : super_type (token_kind_type (tok)) +#endif + {} +#if 201103L <= YY_CPLUSPLUS + symbol_type (int tok, double v) + : super_type (token_kind_type (tok), std::move (v)) +#else + symbol_type (int tok, const double& v) + : super_type (token_kind_type (tok), v) +#endif + {} +#if 201103L <= YY_CPLUSPLUS + symbol_type (int tok, int64_t v) + : super_type (token_kind_type (tok), std::move (v)) +#else + symbol_type (int tok, const int64_t& v) + : super_type (token_kind_type (tok), v) +#endif + {} +#if 201103L <= YY_CPLUSPLUS + symbol_type (int tok, std::string v) + : super_type (token_kind_type (tok), std::move (v)) +#else + symbol_type (int tok, const std::string& v) + : super_type (token_kind_type (tok), v) +#endif + {} +#if 201103L <= YY_CPLUSPLUS + symbol_type (int tok, uint64_t v) + : super_type (token_kind_type (tok), std::move (v)) +#else + symbol_type (int tok, const uint64_t& v) + : super_type (token_kind_type (tok), v) +#endif + {} + }; + + /// Build a parser object. + IfDataParser (a2l::IfDataScanner &scanner_yyarg); + virtual ~IfDataParser (); + +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + IfDataParser (const IfDataParser&) = delete; + /// Non copyable. + IfDataParser& operator= (const IfDataParser&) = delete; +#endif + + /// Parse. An alias for parse (). + /// \returns 0 iff parsing succeeded. + int operator() (); + + /// Parse. + /// \returns 0 iff parsing succeeded. + virtual int parse (); + +#if IFDATADEBUG + /// The current debugging stream. + std::ostream& debug_stream () const YY_ATTRIBUTE_PURE; + /// Set the current debugging stream. + void set_debug_stream (std::ostream &); + + /// Type for debugging levels. + typedef int debug_level_type; + /// The current debugging level. + debug_level_type debug_level () const YY_ATTRIBUTE_PURE; + /// Set the current debugging level. + void set_debug_level (debug_level_type l); +#endif + + /// Report a syntax error. + /// \param msg a description of the syntax error. + virtual void error (const std::string& msg); + + /// Report a syntax error. + void error (const syntax_error& err); + +#if IFDATADEBUG || 0 + /// The user-facing name of the symbol whose (internal) number is + /// YYSYMBOL. No bounds checking. + static const char *symbol_name (symbol_kind_type yysymbol); +#endif // #if IFDATADEBUG || 0 + + + // Implementation of make_symbol for each token kind. +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_IFDATAEOF () + { + return symbol_type (token::IFDATAEOF); + } +#else + static + symbol_type + make_IFDATAEOF () + { + return symbol_type (token::IFDATAEOF); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_IFDATAerror () + { + return symbol_type (token::IFDATAerror); + } +#else + static + symbol_type + make_IFDATAerror () + { + return symbol_type (token::IFDATAerror); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_IFDATAUNDEF () + { + return symbol_type (token::IFDATAUNDEF); + } +#else + static + symbol_type + make_IFDATAUNDEF () + { + return symbol_type (token::IFDATAUNDEF); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_IF_DATA_BEGIN () + { + return symbol_type (token::IF_DATA_BEGIN); + } +#else + static + symbol_type + make_IF_DATA_BEGIN () + { + return symbol_type (token::IF_DATA_BEGIN); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_IF_DATA_END () + { + return symbol_type (token::IF_DATA_END); + } +#else + static + symbol_type + make_IF_DATA_END () + { + return symbol_type (token::IF_DATA_END); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_UINT (uint64_t v) + { + return symbol_type (token::UINT, std::move (v)); + } +#else + static + symbol_type + make_UINT (const uint64_t& v) + { + return symbol_type (token::UINT, v); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HEX (uint64_t v) + { + return symbol_type (token::HEX, std::move (v)); + } +#else + static + symbol_type + make_HEX (const uint64_t& v) + { + return symbol_type (token::HEX, v); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_INT (int64_t v) + { + return symbol_type (token::INT, std::move (v)); + } +#else + static + symbol_type + make_INT (const int64_t& v) + { + return symbol_type (token::INT, v); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_FLOAT (double v) + { + return symbol_type (token::FLOAT, std::move (v)); + } +#else + static + symbol_type + make_FLOAT (const double& v) + { + return symbol_type (token::FLOAT, v); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_IDENT (std::string v) + { + return symbol_type (token::IDENT, std::move (v)); + } +#else + static + symbol_type + make_IDENT (const std::string& v) + { + return symbol_type (token::IDENT, v); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_IF_DATA () + { + return symbol_type (token::IF_DATA); + } +#else + static + symbol_type + make_IF_DATA () + { + return symbol_type (token::IF_DATA); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_STRING (std::string v) + { + return symbol_type (token::STRING, std::move (v)); + } +#else + static + symbol_type + make_STRING (const std::string& v) + { + return symbol_type (token::STRING, v); + } +#endif + + + private: +#if YY_CPLUSPLUS < 201103L + /// Non copyable. + IfDataParser (const IfDataParser&); + /// Non copyable. + IfDataParser& operator= (const IfDataParser&); +#endif + + + /// Stored state numbers (used for stacks). + typedef signed char state_type; + + /// Compute post-reduction state. + /// \param yystate the current state + /// \param yysym the nonterminal to push on the stack + static state_type yy_lr_goto_state_ (state_type yystate, int yysym); + + /// Whether the given \c yypact_ value indicates a defaulted state. + /// \param yyvalue the value to check + static bool yy_pact_value_is_default_ (int yyvalue) YY_NOEXCEPT; + + /// Whether the given \c yytable_ value indicates a syntax error. + /// \param yyvalue the value to check + static bool yy_table_value_is_error_ (int yyvalue) YY_NOEXCEPT; + + static const signed char yypact_ninf_; + static const signed char yytable_ninf_; + + /// Convert a scanner token kind \a t to a symbol kind. + /// In theory \a t should be a token_kind_type, but character literals + /// are valid, yet not members of the token_kind_type enum. + static symbol_kind_type yytranslate_ (int t) YY_NOEXCEPT; + +#if IFDATADEBUG || 0 + /// For a symbol, its name in clear. + static const char* const yytname_[]; +#endif // #if IFDATADEBUG || 0 + + + // Tables. + // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + // STATE-NUM. + static const signed char yypact_[]; + + // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + // Performed when YYTABLE does not specify something else to do. Zero + // means the default is an error. + static const signed char yydefact_[]; + + // YYPGOTO[NTERM-NUM]. + static const signed char yypgoto_[]; + + // YYDEFGOTO[NTERM-NUM]. + static const signed char yydefgoto_[]; + + // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + // positive, shift that token. If negative, reduce the rule whose + // number is the opposite. If YYTABLE_NINF, syntax error. + static const signed char yytable_[]; + + static const signed char yycheck_[]; + + // YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of + // state STATE-NUM. + static const signed char yystos_[]; + + // YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. + static const signed char yyr1_[]; + + // YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. + static const signed char yyr2_[]; + + +#if IFDATADEBUG + // YYRLINE[YYN] -- Source line where rule number YYN was defined. + static const signed char yyrline_[]; + /// Report on the debug stream that the rule \a r is going to be reduced. + virtual void yy_reduce_print_ (int r) const; + /// Print the state stack on the debug stream. + virtual void yy_stack_print_ () const; + + /// Debugging level. + int yydebug_; + /// Debug stream. + std::ostream* yycdebug_; + + /// \brief Display a symbol kind, value and location. + /// \param yyo The output stream. + /// \param yysym The symbol. + template + void yy_print_ (std::ostream& yyo, const basic_symbol& yysym) const; +#endif + + /// \brief Reclaim the memory associated to a symbol. + /// \param yymsg Why this token is reclaimed. + /// If null, print nothing. + /// \param yysym The symbol. + template + void yy_destroy_ (const char* yymsg, basic_symbol& yysym) const; + + private: + /// Type access provider for state based symbols. + struct by_state + { + /// Default constructor. + by_state () YY_NOEXCEPT; + + /// The symbol kind as needed by the constructor. + typedef state_type kind_type; + + /// Constructor. + by_state (kind_type s) YY_NOEXCEPT; + + /// Copy constructor. + by_state (const by_state& that) YY_NOEXCEPT; + + /// Record that this symbol is empty. + void clear () YY_NOEXCEPT; + + /// Steal the symbol kind from \a that. + void move (by_state& that); + + /// The symbol kind (corresponding to \a state). + /// \a symbol_kind::S_YYEMPTY when empty. + symbol_kind_type kind () const YY_NOEXCEPT; + + /// The state number used to denote an empty symbol. + /// We use the initial state, as it does not have a value. + enum { empty_state = 0 }; + + /// The state. + /// \a empty when empty. + state_type state; + }; + + /// "Internal" symbol: element of the stack. + struct stack_symbol_type : basic_symbol + { + /// Superclass. + typedef basic_symbol super_type; + /// Construct an empty symbol. + stack_symbol_type (); + /// Move or copy construction. + stack_symbol_type (YY_RVREF (stack_symbol_type) that); + /// Steal the contents from \a sym to build this. + stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym); +#if YY_CPLUSPLUS < 201103L + /// Assignment, needed by push_back by some old implementations. + /// Moves the contents of that. + stack_symbol_type& operator= (stack_symbol_type& that); + + /// Assignment, needed by push_back by other implementations. + /// Needed by some other old implementations. + stack_symbol_type& operator= (const stack_symbol_type& that); +#endif + }; + + /// A stack with random access from its top. + template > + class stack + { + public: + // Hide our reversed order. + typedef typename S::iterator iterator; + typedef typename S::const_iterator const_iterator; + typedef typename S::size_type size_type; + typedef typename std::ptrdiff_t index_type; + + stack (size_type n = 200) YY_NOEXCEPT + : seq_ (n) + {} + +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + stack (const stack&) = delete; + /// Non copyable. + stack& operator= (const stack&) = delete; +#endif + + /// Random access. + /// + /// Index 0 returns the topmost element. + const T& + operator[] (index_type i) const + { + return seq_[size_type (size () - 1 - i)]; + } + + /// Random access. + /// + /// Index 0 returns the topmost element. + T& + operator[] (index_type i) + { + return seq_[size_type (size () - 1 - i)]; + } + + /// Steal the contents of \a t. + /// + /// Close to move-semantics. + void + push (YY_MOVE_REF (T) t) + { + seq_.push_back (T ()); + operator[] (0).move (t); + } + + /// Pop elements from the stack. + void + pop (std::ptrdiff_t n = 1) YY_NOEXCEPT + { + for (; 0 < n; --n) + seq_.pop_back (); + } + + /// Pop all elements from the stack. + void + clear () YY_NOEXCEPT + { + seq_.clear (); + } + + /// Number of elements on the stack. + index_type + size () const YY_NOEXCEPT + { + return index_type (seq_.size ()); + } + + /// Iterator on top of the stack (going downwards). + const_iterator + begin () const YY_NOEXCEPT + { + return seq_.begin (); + } + + /// Bottom of the stack. + const_iterator + end () const YY_NOEXCEPT + { + return seq_.end (); + } + + /// Present a slice of the top of a stack. + class slice + { + public: + slice (const stack& stack, index_type range) YY_NOEXCEPT + : stack_ (stack) + , range_ (range) + {} + + const T& + operator[] (index_type i) const + { + return stack_[range_ - i]; + } + + private: + const stack& stack_; + index_type range_; + }; + + private: +#if YY_CPLUSPLUS < 201103L + /// Non copyable. + stack (const stack&); + /// Non copyable. + stack& operator= (const stack&); +#endif + /// The wrapped container. + S seq_; + }; + + + /// Stack type. + typedef stack stack_type; + + /// The stack. + stack_type yystack_; + + /// Push a new state on the stack. + /// \param m a debug message to display + /// if null, no trace is output. + /// \param sym the symbol + /// \warning the contents of \a s.value is stolen. + void yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym); + + /// Push a new look ahead token on the state on the stack. + /// \param m a debug message to display + /// if null, no trace is output. + /// \param s the state + /// \param sym the symbol (for its value and location). + /// \warning the contents of \a sym.value is stolen. + void yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym); + + /// Pop \a n symbols from the stack. + void yypop_ (int n = 1) YY_NOEXCEPT; + + /// Constants. + enum + { + yylast_ = 24, ///< Last index in yytable_. + yynnts_ = 8, ///< Number of nonterminal symbols. + yyfinal_ = 4 ///< Termination state number. + }; + + + // User arguments. + a2l::IfDataScanner &scanner; + + }; + + +#line 6 "D:/projects/a2llib/src/ifdataparser.y" +} // a2l +#line 1402 "D:/projects/a2llib/src/ifdataparser.hpp" + + + + +#endif // !YY_IFDATA_D_PROJECTS_A2LLIB_SRC_IFDATAPARSER_HPP_INCLUDED diff --git a/a2llib-main/src/ifdataparser.y b/a2llib-main/src/ifdataparser.y new file mode 100644 index 0000000..d6f7121 --- /dev/null +++ b/a2llib-main/src/ifdataparser.y @@ -0,0 +1,121 @@ +%require "3.2" +%language "c++" + + +%define api.prefix {ifdata} +%define api.namespace {a2l} +%define api.parser.class {IfDataParser} + + +%code requires { +#include +#include +#include +#include +#include "a2l/ifdataitem.h" + +namespace a2l { +class IfDataScanner; +} + +} + +%parse-param { a2l::IfDataScanner &scanner } + + +%code { + #include + #include "ifdatascanner.h" + + + #include "a2lhelper.h" + #include + + #undef yylex + #define yylex scanner.ifdatalex +} + +%define api.value.type variant + +%token IF_DATA_BEGIN +%token IF_DATA_END +%token UINT +%token HEX +%token INT +%token FLOAT +%token IDENT +%token IF_DATA +%token STRING + +%nterm protocol +%nterm > block_data_list +%nterm block_data +%nterm item_value +%nterm block_name +%nterm > item_list + +%start if_data_block + +%% + +if_data_block: %empty + | IF_DATA_BEGIN IF_DATA protocol block_data_list IF_DATA_END IF_DATA { + scanner.Protocol($3); + scanner.ItemList($4); + }; + +protocol: IDENT; + +block_data_list: %empty {} + | block_data_list block_data { + $$ = $1; + $$.emplace_back($2); + } + | block_data_list item_value { + $$ = $1; + IfDataItem item; + item.Value = $2; + $$.emplace_back($2); + }; + +block_data: IF_DATA_BEGIN block_name item_list IF_DATA_END block_name { + IfDataItem block; + block.BlockName = $2; + block.ItemList = $3; + $$ = block; +}; + +block_name: IDENT { $$ = $1; }; + +item_list: %empty {} + | item_list block_data { + $$ = $1; + $$.emplace_back($2); + } + | item_list item_value { + $$ = $1; + IfDataItem item; + item.Value = $2; + $$.emplace_back($2); + }; + +item_value: IDENT { $$ = $1; } + | STRING { $$ = $1; } + | HEX { $$ = std::to_string($1); } + | UINT { $$ = std::to_string($1); } + | INT { $$ = std::to_string($1); } + | FLOAT { $$ = std::to_string($1); }; + + +%% + +void a2l::IfDataParser::error(const std::string& err) { + const auto line = scanner.lineno(); + // const auto column = scanner.YYLeng(); + const std::string near = scanner.YYText() != nullptr ? scanner.YYText() : ""; + std::ostringstream error; + error << "Parser error: " << err + << ", Line: " << line + << ", Near: " << near; + scanner.LastError(error.str()); +} diff --git a/a2llib-main/src/ifdatascanner.cpp b/a2llib-main/src/ifdatascanner.cpp new file mode 100644 index 0000000..fe908ef --- /dev/null +++ b/a2llib-main/src/ifdatascanner.cpp @@ -0,0 +1,16 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#include "ifdatascanner.h" + + +namespace a2l { + +IfDataScanner::IfDataScanner(std::istream& message) + : ifdataFlexLexer(&message), yylval(nullptr) { + +} + +} // namespace a2l \ No newline at end of file diff --git a/a2llib-main/src/ifdatascanner.h b/a2llib-main/src/ifdatascanner.h new file mode 100644 index 0000000..29833c6 --- /dev/null +++ b/a2llib-main/src/ifdatascanner.h @@ -0,0 +1,55 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once + +#include +#include +#include + +#ifndef yyFlexLexerOnce + +#undef yyFlexLexer +#define yyFlexLexer ifdataFlexLexer +#include + +#endif + +#include +#include +#include +#include +#include +#include "ifdataparser.hpp" +#include "a2l/ifdataitem.h" + +namespace a2l { + +class IfDataScanner : public ifdataFlexLexer { + public: + explicit IfDataScanner(std::istream& in); + int ifdatalex(IfDataParser::value_type* yylval); + + void LastError(const std::string& error) { last_error_ = error; } + [[nodiscard]] const std::string& LastError() const { return last_error_; } + + void Protocol(const std::string& protocol) { protocol_ = protocol; } + [[nodiscard]] const std::string& Protocol() const { return protocol_; } + + void ItemList(const std::vector& list) { item_list_ = list; } + [[nodiscard]] const std::vector& ItemList() const { + return item_list_; + } + private: + IfDataParser::semantic_type* yylval = nullptr; + std::string last_error_; + + std::string protocol_; + std::vector item_list_; + + +}; + +} // namespace a2l diff --git a/a2llib-main/src/instance.cpp b/a2llib-main/src/instance.cpp new file mode 100644 index 0000000..dc7f102 --- /dev/null +++ b/a2llib-main/src/instance.cpp @@ -0,0 +1,12 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ +#include "a2l/instance.h" +namespace a2l { + +void Instance::AddOverwrite(std::unique_ptr& overwrite) { + overwrite_list_.emplace_back( std::move(overwrite) ); +} + +} diff --git a/a2llib-main/src/measurement.cpp b/a2llib-main/src/measurement.cpp new file mode 100644 index 0000000..06a03ee --- /dev/null +++ b/a2llib-main/src/measurement.cpp @@ -0,0 +1,13 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + + + +#include "a2l/measurement.h" + + +namespace a2l { + +} \ No newline at end of file diff --git a/a2llib-main/src/module.cpp b/a2llib-main/src/module.cpp new file mode 100644 index 0000000..cad27a8 --- /dev/null +++ b/a2llib-main/src/module.cpp @@ -0,0 +1,159 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#include "a2l/module.h" + +namespace a2l { + +void Module::AddAxisPts(std::unique_ptr& axis_pts) { + axis_pts_list_.emplace(axis_pts->Name(), std::move(axis_pts)); +} + +void Module::AddBlob(std::unique_ptr& blob) { + blob_list_.emplace(blob->Name(), std::move(blob)); +} + +void Module::AddCharacteristic(std::unique_ptr& + characteristic) { + characteristic_list_.emplace(characteristic->Name(), + std::move(characteristic)); +} + +void Module::AddCompuMethod(std::unique_ptr& method) { + compu_method_list_.emplace(method->Name(), std::move(method)); +} + +void Module::AddCompuTab(std::unique_ptr& tab) { + compu_tab_list_.emplace(tab->Name(), std::move(tab)); +} + +void Module::AddCompuVtab(std::unique_ptr& tab) { + compu_vtab_list_.emplace(tab->Name(), std::move(tab)); +} + +void Module::AddCompuVtabRange(std::unique_ptr& tab) { + compu_vtab_range_list_.emplace(tab->Name(), std::move(tab)); +} + +void Module::AddFrame(std::unique_ptr& frame) { + frame_list_.emplace(frame->Name(), std::move(frame)); +} + +void Module::AddFunction(std::unique_ptr& func) { + function_list_.emplace(func->Name(), std::move(func)); +} + +void Module::AddGroup(std::unique_ptr& group) { + group_list_.emplace(group->Name(), std::move(group)); +} + +void Module::AddInstance(std::unique_ptr& instance) { + instance_list_.emplace(instance->Name(), std::move(instance)); +} + +void Module::AddMeasurement(std::unique_ptr& measurement) { + measurement_list_.emplace(measurement->Name(), std::move(measurement)); +} + +void Module::AddRecordLayout(std::unique_ptr& record_layout) { + record_layout_list_.emplace(record_layout->Name(), std::move(record_layout)); +} + +void Module::AddTransformer(std::unique_ptr& transformer) { + transformer_list_.emplace(transformer->Name(), std::move(transformer)); +} + +void Module::AddTypedefAxis(std::unique_ptr& axis) { + typedef_axis_list_.emplace(axis->Name(), std::move(axis)); +} + +void Module::AddTypedefBlob(std::unique_ptr& blob) { + typedef_blob_list_.emplace(blob->Name(), std::move(blob)); +} + +void Module::AddTypedefCharacteristic(std::unique_ptr& + characteristic) { + typedef_characteristic_list_.emplace(characteristic->Name(), + std::move(characteristic)); +} + +void Module::AddTypedefMeasurement(std::unique_ptr& measurement){ + typedef_measurement_list_.emplace(measurement->Name(), + std::move(measurement)); +} + +void Module::AddTypedefStructure(std::unique_ptr& structure){ + typedef_structure_list_.emplace(structure->Name(), std::move(structure)); +} + +void Module::AddUnit(std::unique_ptr& unit){ + unit_list_.emplace(unit->Name(), std::move(unit)); +} + +void Module::AddUserRight(std::unique_ptr& user_right){ + user_right_list_.emplace(user_right->UserLevelId, std::move(user_right)); +} + +AxisPts* Module::GetAxisPts(const std::string& name) { + auto itr = axis_pts_list_.find(name); + return itr == axis_pts_list_.end() ? nullptr : itr->second.get(); +} + +Blob* Module::GetBlob(const std::string& name) { + auto itr = blob_list_.find(name); + return itr == blob_list_.end() ? nullptr : itr->second.get(); +} + +Characteristic* Module::GetCharacteristic(const std::string& name) { + auto itr = characteristic_list_.find(name); + return itr == characteristic_list_.end() ? nullptr : itr->second.get(); +} + +CompuTab* Module::GetCompuTab(const std::string& name) { + auto itr = compu_tab_list_.find(name); + return itr == compu_tab_list_.end() ? nullptr : itr->second.get(); +} + +CompuVtab* Module::GetCompuVtab(const std::string& name) { + auto itr = compu_vtab_list_.find(name); + return itr == compu_vtab_list_.end() ? nullptr : itr->second.get(); +} + +CompuVtabRange* Module::GetCompuVtabRange(const std::string& name) { + auto itr = compu_vtab_range_list_.find(name); + return itr == compu_vtab_range_list_.end() ? nullptr : itr->second.get(); +} + +Measurement* Module::GetMeasurement(const std::string& name) { + auto itr = measurement_list_.find(name); + return itr == measurement_list_.end() ? nullptr : itr->second.get(); +} + +AxisPts* Module::GetTypedefAxis(const std::string& name) { + auto itr = typedef_axis_list_.find(name); + return itr == typedef_axis_list_.end() ? nullptr : itr->second.get(); +} + +Blob* Module::GetTypedefBlob(const std::string& name) { + auto itr = typedef_blob_list_.find(name); + return itr == typedef_blob_list_.end() ? nullptr : itr->second.get(); +} + +Characteristic* Module::GetTypedefCharacteristic(const std::string& name) { + auto itr = typedef_characteristic_list_.find(name); + return itr == typedef_characteristic_list_.end() ? nullptr : itr->second.get(); +} + +Measurement* Module::GetTypedefMeasurement(const std::string& name) { + auto itr = typedef_measurement_list_.find(name); + return itr == typedef_measurement_list_.end() ? nullptr : itr->second.get(); +} + +Structure* Module::GetTypedefStructure(const std::string& name) { + auto itr = typedef_structure_list_.find(name); + return itr == typedef_structure_list_.end() ? nullptr : itr->second.get(); +} + +} // namespace a2l \ No newline at end of file diff --git a/a2llib-main/src/overwrite.cpp b/a2llib-main/src/overwrite.cpp new file mode 100644 index 0000000..39f3f8a --- /dev/null +++ b/a2llib-main/src/overwrite.cpp @@ -0,0 +1,10 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#include "a2l/overwrite.h" + +namespace a2l { + +} \ No newline at end of file diff --git a/a2llib-main/src/recordlayout.cpp b/a2llib-main/src/recordlayout.cpp new file mode 100644 index 0000000..609ea54 --- /dev/null +++ b/a2llib-main/src/recordlayout.cpp @@ -0,0 +1,14 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#include "a2l/recordlayout.h" + +namespace a2l { + +void RecordLayout::AddReserved(const A2lDistOp& reserved) { + reserved_list_.emplace_back(reserved); +} + +} // end namespace a2l diff --git a/a2llib-main/src/structure.cpp b/a2llib-main/src/structure.cpp new file mode 100644 index 0000000..9213d1e --- /dev/null +++ b/a2llib-main/src/structure.cpp @@ -0,0 +1,10 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#include "a2l/structure.h" + +namespace a2l { + +} diff --git a/a2llib-main/src/transformer.cpp b/a2llib-main/src/transformer.cpp new file mode 100644 index 0000000..4ee9f4d --- /dev/null +++ b/a2llib-main/src/transformer.cpp @@ -0,0 +1,4 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ diff --git a/a2llib-main/src/unit.cpp b/a2llib-main/src/unit.cpp new file mode 100644 index 0000000..1d94427 --- /dev/null +++ b/a2llib-main/src/unit.cpp @@ -0,0 +1,10 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#include "a2l/unit.h" + +namespace a2l { + +} // end namespace a2l diff --git a/a2llib-main/test/CMakeLists.txt b/a2llib-main/test/CMakeLists.txt new file mode 100644 index 0000000..67796ba --- /dev/null +++ b/a2llib-main/test/CMakeLists.txt @@ -0,0 +1,31 @@ +# Copyright 2023 Ingemar Hedvall +# SPDX-License-Identifier: MIT + +project(TestA2l + VERSION 1.0 + DESCRIPTION "Google unit tests for the A2L library" + LANGUAGES CXX) +set(CMAKE_CXX_STANDARD 20) + +add_executable(test_a2l + testparse.cpp testparse.h + test_a2lhelper.cpp) + +target_include_directories(test_a2l PRIVATE + ../src # dbchelper.h + ${GTEST_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS}) + +if (MINGW) + target_link_options(test_a2l PRIVATE -static -fstack-protector) +elseif (MSVC) + target_compile_definitions(test_a2l PRIVATE -D_WIN32_WINNT=0x0A00) +endif () + +target_link_libraries(test_a2l PRIVATE a2l) +target_link_libraries(test_a2l PRIVATE GTest::gtest GTest::gtest_main) +target_link_libraries(test_a2l PRIVATE ${Boost_LIBRARIES}) +include(GoogleTest) +gtest_discover_tests(test_a2l) + + diff --git a/a2llib-main/test/test_a2lhelper.cpp b/a2llib-main/test/test_a2lhelper.cpp new file mode 100644 index 0000000..a0472d7 --- /dev/null +++ b/a2llib-main/test/test_a2lhelper.cpp @@ -0,0 +1,169 @@ +/* +* Copyright 2022 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#include +#include "a2lhelper.h" +#include + +namespace a2l::test { + +TEST(A2lHelper, TestDouble) { + uint8_t buffer[8] = {}; + for (double orig = -122.34; orig < 122.34; orig += 0.1) { //NOLINT + if (std::endian::native == std::endian::little) { + A2lHelper::DoubleToRaw(true, 0, sizeof(orig)*8, orig, buffer); + double native = 0; + memcpy(&native, buffer, sizeof(native)); + EXPECT_DOUBLE_EQ(native, orig); + native = A2lHelper::RawToDouble(true, 0, sizeof(orig)*8, buffer); + EXPECT_DOUBLE_EQ(native, orig); + + A2lHelper::DoubleToRaw(false, 7, sizeof(orig)*8, orig, buffer); + const double big = A2lHelper::RawToDouble(false, 7, + sizeof(orig)*8, buffer); + EXPECT_DOUBLE_EQ(orig, big); + + // Test faulty start bit + A2lHelper::DoubleToRaw(false, 0, sizeof(orig)*8, orig, buffer); + } else { + A2lHelper::DoubleToRaw(false, 7, sizeof(orig)*8, orig, buffer); + double native = 0; + memcpy(&native, buffer, sizeof(native)); + EXPECT_DOUBLE_EQ(native, orig); + native = A2lHelper::RawToDouble(false, 7, sizeof(orig)*8, buffer); + EXPECT_DOUBLE_EQ(native, orig); + + A2lHelper::DoubleToRaw(true, 0, sizeof(orig)*8, orig, buffer); + const double little = A2lHelper::RawToDouble(true, 0, + sizeof(orig)*8, buffer); + EXPECT_DOUBLE_EQ(orig, little); + } + + } +} + +TEST(DbcHelper, TestFloat) { + uint8_t buffer[8] = {}; // I'm using last 4 bytes only + for (float orig = -122.34F; orig < 122.34F; orig += 0.1F) { //NOLINT + + if (std::endian::native == std::endian::little) { + A2lHelper::FloatToRaw(true, 32, sizeof(orig)*8, orig, buffer); + float native = 0; + memcpy(&native, buffer + 4, sizeof(native)); + EXPECT_FLOAT_EQ(native, orig); + native = A2lHelper::RawToFloat(true, 32, sizeof(orig)*8, buffer); + EXPECT_FLOAT_EQ(native, orig); + + A2lHelper::FloatToRaw(false, 39, sizeof(orig)*8, orig, buffer); + const float big = A2lHelper::RawToFloat(false, 39, + sizeof(orig)*8, buffer); + EXPECT_FLOAT_EQ(orig, big); + + // Test faulty start bit + A2lHelper::FloatToRaw(false, 32, sizeof(orig)*8, orig, buffer); + } else { + A2lHelper::FloatToRaw(false, 39, sizeof(orig)*8, orig, buffer); + float native = 0; + memcpy(&native, buffer + 4, sizeof(native)); + EXPECT_FLOAT_EQ(native, orig); + native = A2lHelper::RawToFloat(true, 39, sizeof(orig)*8, buffer); + EXPECT_FLOAT_EQ(native, orig); + + A2lHelper::FloatToRaw(true, 32, sizeof(orig)*8, orig, buffer); + const float little = A2lHelper::RawToFloat(true, 32, + sizeof(orig)*8, buffer); + EXPECT_FLOAT_EQ(orig, little); + } + } +} + +TEST(DbcHelper, TestSigned) { + uint8_t buffer[8] = {}; + for (size_t length = 3; length <= 64; ++length) { + for (int64_t orig = -3; orig <= 3; ++orig ) { + A2lHelper::SignedToRaw(true, 0, length, orig, buffer); + const auto little = A2lHelper::RawToSigned(true, 0, length, buffer); + EXPECT_EQ(little, orig); + + A2lHelper::SignedToRaw(false, 7, length, orig, buffer); + const auto big = A2lHelper::RawToSigned(false, 7, length, buffer); + EXPECT_EQ(big, orig); + } + } + + int64_t orig0 = 0; + A2lHelper::SignedToRaw(true, 0, 0, orig0, buffer); + const auto little0 = A2lHelper::RawToSigned(true, 0, 0, buffer); + EXPECT_EQ(little0, orig0); + + int64_t orig1 = -1; + A2lHelper::SignedToRaw(true, 62, 1, orig1, buffer); + const auto little1 = A2lHelper::RawToSigned(true, 62, 1, buffer); + EXPECT_EQ(little1, orig1); + + int64_t orig64 = INT64_MIN; + A2lHelper::SignedToRaw(true, 0, 64, orig64, buffer); + const auto little64 = A2lHelper::RawToSigned(true, 0, 64, buffer); + EXPECT_EQ(little64, orig64); +} + +TEST(DbcHelper, TestUnsigned) { + uint8_t buffer[8] = {}; + for (size_t length = 2; length <= 64; ++length) { + for (uint64_t orig = 0; orig <= 3; ++orig ) { + A2lHelper::UnsignedToRaw(true, 0, length, orig, buffer); + const auto little = A2lHelper::RawToUnsigned(true, 0, length, buffer); + EXPECT_EQ(little, orig); + + A2lHelper::UnsignedToRaw(false, 7, length, orig, buffer); + const auto big = A2lHelper::RawToUnsigned(false, 7, length, buffer); + EXPECT_EQ(big, orig); + } + } + + uint64_t orig0 = 0; + A2lHelper::UnsignedToRaw(true, 0, 0, orig0, buffer); + const auto little0 = A2lHelper::RawToUnsigned(true, 0, 0, buffer); + EXPECT_EQ(little0, orig0); + + uint64_t orig1 = 1; + A2lHelper::UnsignedToRaw(true, 62, 1, orig1, buffer); + const auto little1 = A2lHelper::RawToUnsigned(true, 62, 1, buffer); + EXPECT_EQ(little1, orig1); + + uint64_t orig64 = UINT64_MAX; + A2lHelper::UnsignedToRaw(true, 0, 64, orig64, buffer); + const auto little64 = A2lHelper::RawToUnsigned(true, 0, 64, buffer); + EXPECT_EQ(little64, orig64); +} + +TEST(DbcHelper, TestGetStem) { + { + const auto stem = A2lHelper::GetStem(""); + EXPECT_TRUE(stem.empty()); + } + + { + const auto stem = A2lHelper::GetStem("olle.txt"); + EXPECT_STREQ(stem.c_str(), "olle"); + } + + { + const auto stem = A2lHelper::GetStem("c:\\olle.txt"); + EXPECT_STREQ(stem.c_str(), "olle"); + } + + { + const auto stem = A2lHelper::GetStem("c:\\daddy.cool/olle.txt"); + EXPECT_STREQ(stem.c_str(), "olle"); + } + + { + const auto stem = A2lHelper::GetStem("//daddy.cool/olle.txt"); + EXPECT_STREQ(stem.c_str(), "olle"); + } +} + +} diff --git a/a2llib-main/test/testparse.cpp b/a2llib-main/test/testparse.cpp new file mode 100644 index 0000000..1211242 --- /dev/null +++ b/a2llib-main/test/testparse.cpp @@ -0,0 +1,357 @@ +/* + * Copyright 2023 Ingemar Hedvall + * SPDX-License-Identifier: MIT + */ +#include "testparse.h" + +#include +#include +#include +#include + +#include "a2l/a2lfile.h" +#include "a2l/a2mlblock.h" +#include "a2l/ifdatablock.h" + +using namespace std::filesystem; +using namespace std::chrono_literals; +using A2lList = std::map; + +namespace { +constexpr std::string_view kSourceDir = "k:/test/a2l"; +constexpr std::string_view kDemoFile = "k:/test/a2l/asap2_demo_v171.a2l"; + +bool kDemoFileExist = false; +A2lList kA2lList; + +std::string GetA2lFile(const std::string &name) { + const auto itr = kA2lList.find(name); + return itr == kA2lList.cend() ? std::string() : itr->second; +} + +} // namespace + +namespace a2l::test { + +void TestParse::SetUpTestSuite() { + kA2lList.clear(); + try { + kDemoFileExist = exists(kDemoFile); + + for (const auto &entry : recursive_directory_iterator(kSourceDir)) { + if (!entry.is_regular_file()) { + continue; + } + const auto &p = entry.path(); + + if (p.has_extension() && (p.extension().string() == ".a2l" || p.extension().string() == ".A2L") ) { + kA2lList.emplace(p.stem().string(), p.string()); + + } + } + } catch (const std::exception &error) { + std::cout << "Failed to fetch the A2l test files. Error: " + << error.what(); + } +} + +void TestParse::TearDownTestSuite() { +} + +TEST_F(TestParse, ParseDemoFile) +{ + if (!kDemoFileExist) { + GTEST_SKIP(); + } + + a2l::A2lFile file; + file.Filename(kDemoFile.data()); + const auto parse = file.ParseFile(); + EXPECT_TRUE(parse) << file.LastError() << " : " << kDemoFile; + std::cout << file.Name() << (parse ? " : OK" : " : FAIL") << std::endl; + + EXPECT_EQ(file.A2lVersion().VersionNo, 1); + EXPECT_EQ(file.A2lVersion().UpgradeNo, 71); + + const auto& project = file.Project(); + + const auto& header = project.Header(); + EXPECT_FALSE(header.Comment.empty()); + EXPECT_FALSE(header.ProjectNo.empty()); + EXPECT_FALSE(header.VersionNo.empty()); + + const auto& module_list = project.Modules(); + ASSERT_EQ(module_list.size(), 1); + + const auto& module = module_list.cbegin()->second; + ASSERT_TRUE(module); + + EXPECT_STREQ(module->Name().c_str(), "Example"); + EXPECT_FALSE(module->A2ml().empty()); + + for (const auto& [protocol, if_data] : module->IfDatas()) { + IfDataBlock block(if_data); + EXPECT_TRUE(block.IsOk()) << block.LastError(); + std::cout << block.AsString() << std::endl; + } + + const auto& axis_list = module->AxisPtss(); + EXPECT_GT(axis_list.size(), 1); + std::cout << "\t\tAXIS PTS" << std::endl; + for (const auto& [pts_name, pts] : axis_list) { + std::cout << pts_name << std::endl; + } + std::cout << std::endl; + + const auto& blob_list = module->Blobs(); + EXPECT_GT(blob_list.size(), 0); + std::cout << "\t\tBLOB" << std::endl; + for (const auto& [blob_name, blob] : blob_list) { + std::cout << blob_name << " " << blob->Address() << std::endl; + } + std::cout << std::endl; + + const auto& characteristic_list = module->Characteristics(); + EXPECT_GT(characteristic_list.size(), 0); + std::cout << "\t\tCHARACTERISTIC" << std::endl; + for (const auto& [char_name, characteristic] : characteristic_list) { + std::cout << char_name << " " << characteristic->Description() << std::endl; + } + std::cout << std::endl; + + const auto& compu_method_list = module->CompuMethods(); + EXPECT_GT(compu_method_list.size(), 0); + std::cout << "\t\tCOMPU METHOD" << std::endl; + for (const auto& [method_name, method] : compu_method_list) { + std::cout << method_name << " " << method->Description() << std::endl; + } + std::cout << std::endl; + + const auto& compu_tab_list = module->CompuTabs(); + EXPECT_GT(compu_tab_list.size(), 0); + std::cout << "\t\tCOMPU TAB" << std::endl; + for (const auto& [tab_name, tab] : compu_tab_list) { + std::cout << tab_name << " " << tab->Description() << std::endl; + } + std::cout << std::endl; + + const auto& compu_vtab_list = module->CompuVtabs(); + EXPECT_GT(compu_vtab_list.size(), 0); + std::cout << "\t\tCOMPU VTAB" << std::endl; + for (const auto& [vtab_name, vtab] : compu_vtab_list) { + std::cout << vtab_name << " " << vtab->Description() << std::endl; + } + std::cout << std::endl; + + const auto& compu_vtab_range_list = module->CompuVtabRanges(); + EXPECT_GT(compu_vtab_range_list.size(), 0); + std::cout << "\t\tCOMPU VTAB RANGE" << std::endl; + for (const auto& [range_name, range] : compu_vtab_range_list) { + std::cout << range_name << " " << range->Description() << std::endl; + } + std::cout << std::endl; + + const auto& frame_list = module->Frames(); + // EXPECT_GT(frame_list.size(), 0); No frames in file + std::cout << "\t\tFRAME" << std::endl; + for (const auto& [frame_name, frame] : frame_list) { + std::cout << frame_name << " " << frame->Description() << std::endl; + } + std::cout << std::endl; + + const auto& func_list = module->Functions(); + EXPECT_GT(func_list.size(), 0); + std::cout << "\t\tFUNCTION" << std::endl; + for (const auto& [func_name, func] : func_list) { + std::cout << func_name << " " << func->Description() << std::endl; + } + std::cout << std::endl; + + const auto& group_list = module->Groups(); + EXPECT_GT(group_list.size(), 0); + std::cout << "\t\tGROUP" << std::endl; + for (const auto& [group_name, group] : group_list) { + std::cout << group_name << " " << group->Description() << std::endl; + } + std::cout << std::endl; + + const auto& instance_list = module->Instances(); + EXPECT_GT(instance_list.size(), 0); + std::cout << "\t\tINSTANCE" << std::endl; + for (const auto& [instance_name, instance] : instance_list) { + std::cout << instance_name << " " << instance->Description() << std::endl; + } + std::cout << std::endl; + + const auto& meas_list = module->Measurements(); + EXPECT_GT(meas_list.size(), 0); + std::cout << "\t\tMEASUREMENT" << std::endl; + for (const auto& [meas_name, meas] : meas_list) { + std::cout << meas_name << " " << meas->Description() << std::endl; + } + std::cout << std::endl; + + const auto& rec_list = module->RecordLayouts(); + EXPECT_GT(rec_list.size(), 0); + std::cout << "\t\tRECORD LAYOUT" << std::endl; + for (const auto& [rec_name, rec] : rec_list) { + std::cout << rec_name << std::endl; + } + std::cout << std::endl; + + const auto& trans_list = module->Transformers(); + EXPECT_GT(trans_list.size(), 0); + std::cout << "\t\tTRANSFORMER" << std::endl; + for (const auto& [trans_name, trans] : trans_list) { + std::cout << trans_name << std::endl; + } + std::cout << std::endl; + + const auto& taxis_list = module->TypedefAxiss(); + EXPECT_GT(taxis_list.size(), 0); + std::cout << "\t\tTYPEDEF AXIS" << std::endl; + for (const auto& [taxis_name, taxis] : taxis_list) { + std::cout << taxis_name << std::endl; + } + std::cout << std::endl; + + const auto& tblob_list = module->TypedefBlobs(); + //EXPECT_GT(tblob_list.size(), 0); + std::cout << "\t\tTYPEDEF BLOB" << std::endl; + for (const auto& [tblob_name, tblob] : tblob_list) { + std::cout << tblob_name << std::endl; + } + std::cout << std::endl; + + const auto& tchar_list = module->TypedefCharacteristics(); + EXPECT_GT(tchar_list.size(), 0); + std::cout << "\t\tTYPEDEF CHARACTERISTIC" << std::endl; + for (const auto& [tchar_name, tchar] : tchar_list) { + std::cout << tchar_name << std::endl; + } + std::cout << std::endl; + + const auto& tmeas_list = module->TypedefMeasurements(); + //EXPECT_GT(tmeas_list.size(), 0); + std::cout << "\t\tTYPEDEF MEASUREMENT" << std::endl; + for (const auto& [tmeas_name, tmeas] : tmeas_list) { + std::cout << tmeas_name << std::endl; + } + + std::cout << std::endl; + const auto& tstruct_list = module->TypedefStructures(); + EXPECT_GT(tstruct_list.size(), 0); + std::cout << "\t\tTYPEDEF STRUCTURE" << std::endl; + for (const auto& [tstruct_name, tstruct] : tstruct_list) { + std::cout << tstruct_name << std::endl; + } + std::cout << std::endl; + + std::cout << std::endl; + const auto& unit_list = module->Units(); + //EXPECT_GT(unit_list.size(), 0); + std::cout << "\t\tUNIT" << std::endl; + for (const auto& [unit_name, unit] : unit_list) { + std::cout << unit_name << std::endl; + } + std::cout << std::endl; + + A2mlBlock a2ml_block(module->A2ml()); + const auto& a2ml = module->A2ml(); + const auto a2ml_parse = a2ml_block.IsOk(); + + EXPECT_TRUE(a2ml_parse) << a2ml_block.LastError(); +/* + const auto& block_list = a2ml_scanner.BlockList(); + for (const auto& block : block_list) { + std::cout << block.AsString() << std::endl; + } +*/ + +} + +TEST_F(TestParse, ParseAllFiles) +{ + if (kA2lList.empty() ) { + GTEST_SKIP(); + } + + for (const auto &itr : kA2lList) { + a2l::A2lFile file; + file.Filename(itr.second); + const auto parse = file.ParseFile(); + + // Check that the project object exist. If the file is missing that object, it + // is possible an include file and not an A2L file. + if (!file.IsA2lFile()) { + std::cout << "A2L: " << itr.second << " : SKIPPED" << std::endl; + continue; + } + + EXPECT_TRUE(parse) << file.LastError() << " : " << itr.first << std::endl; + std::cout << "A2L: " << itr.second << (parse ? " : OK" : " : FAIL") << std::endl; +/* + for (const auto& [name, module] : file.Project().Modules()) { + A2mlBlock a2ml(module->A2ml()); + const bool a2ml_parse = a2ml.IsOk(); + if (!a2ml_parse) { + std::cout << "A2ML: " << name << " FAIL. Last Error: " << a2ml.LastError() << std::endl; + } + } +*/ + } + +} + +TEST_F(TestParse, ParseIncludeFiles) +{ + constexpr std::string_view kIncludeFile = "engine_ecu"; + const std::string include_file = GetA2lFile(kIncludeFile.data()); + if (include_file.empty() ) { + GTEST_SKIP(); + } + + a2l::A2lFile file; + file.Filename(include_file); + const auto parse = file.ParseFile(); + + EXPECT_TRUE(parse) << file.LastError() << " : " << include_file << std::endl; + std::cout << "A2L: " << include_file << (parse ? " : OK" : " : FAIL") << std::endl; +/* + for (const auto& [name, module] : file.Project().Modules()) { + A2mlBlock a2ml(module->A2ml()); + const bool a2ml_parse = a2ml.IsOk(); + if (!a2ml_parse) { + std::cout << "A2ML: " << name << " FAIL. Last Error: " << a2ml.LastError() << std::endl; + } + } +*/ + +} + +TEST_F(TestParse, ParseIncludeA2lFiles) +{ + constexpr std::string_view kIncludeFile = "mst_abs"; + const std::string include_file = GetA2lFile(kIncludeFile.data()); + if (include_file.empty() ) { + GTEST_SKIP(); + } + + a2l::A2lFile file; + file.Filename(include_file); + const auto parse = file.ParseFile(); + + EXPECT_TRUE(parse) << file.LastError() << " : " << include_file << std::endl; + std::cout << "A2L: " << include_file << (parse ? " : OK" : " : FAIL") << std::endl; +/* + for (const auto& [name, module] : file.Project().Modules()) { + A2mlBlock a2ml(module->A2ml()); + const bool a2ml_parse = a2ml.IsOk(); + if (!a2ml_parse) { + std::cout << "A2ML: " << name << " FAIL. Last Error: " << a2ml.LastError() << std::endl; + } + } +*/ + +} +} // namespace a2l::test diff --git a/a2llib-main/test/testparse.h b/a2llib-main/test/testparse.h new file mode 100644 index 0000000..9d34698 --- /dev/null +++ b/a2llib-main/test/testparse.h @@ -0,0 +1,17 @@ +/* + * Copyright 2023 Ingemar Hedvall + * SPDX-License-Identifier: MIT + */ +#include + +namespace a2l::test { + +class TestParse : public testing::Test { + public: + static void SetUpTestSuite(); + static void TearDownTestSuite(); + + protected: +}; + +} // namespace mdf::test diff --git a/a2llib-main/vcpkg.json b/a2llib-main/vcpkg.json new file mode 100644 index 0000000..2cfa6aa --- /dev/null +++ b/a2llib-main/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "a2l", + "version": "1.0", + "dependencies": [ + "boost-locale", + "boost-endian", + "boost-process", + "boost-filesystem" + ], + "features": { + "tools": { + "description": "Build GUI and daemons", + "dependencies": [ + "boost-asio", + "wxwidgets" + ] + } + } +}