From f0678e01b0d4f60bea9c645f1e2773f2bf4c0eb7 Mon Sep 17 00:00:00 2001 From: ian Date: Thu, 17 Jul 2025 15:08:21 +0900 Subject: [PATCH] add files --- TestLibDlg/IncSourceTestDlg/DlgProxy.cpp | 87 + TestLibDlg/IncSourceTestDlg/DlgProxy.h | 43 + .../IncSourceTestDlg/IncSourceTestDlg.cpp | 153 + .../IncSourceTestDlg/IncSourceTestDlg.h | 33 + .../IncSourceTestDlg/IncSourceTestDlg.idl | 29 + .../IncSourceTestDlg/IncSourceTestDlg.rc | Bin 0 -> 11716 bytes .../IncSourceTestDlg/IncSourceTestDlg.reg | 17 + .../IncSourceTestDlg/IncSourceTestDlg.vcxproj | 286 + .../IncSourceTestDlg.vcxproj.filters | 228 + .../IncSourceTestDlg.vcxproj.user | 6 + .../IncSourceTestDlg/IncSourceTestDlgDlg.cpp | 590 ++ .../IncSourceTestDlg/IncSourceTestDlgDlg.h | 64 + TestLibDlg/IncSourceTestDlg/framework.h | 60 + .../IncSourceTestDlg/include/a2l/a2lenums.h | 253 + .../IncSourceTestDlg/include/a2l/a2lfile.h | 69 + .../IncSourceTestDlg/include/a2l/a2lobject.h | 147 + .../IncSourceTestDlg/include/a2l/a2lproject.h | 34 + .../IncSourceTestDlg/include/a2l/a2lstructs.h | 257 + .../IncSourceTestDlg/include/a2l/a2mlblock.h | 28 + .../IncSourceTestDlg/include/a2l/a2mlobject.h | 90 + .../IncSourceTestDlg/include/a2l/axispts.h | 92 + .../IncSourceTestDlg/include/a2l/blob.h | 32 + .../include/a2l/characteristic.h | 105 + .../include/a2l/compumethod.h | 64 + .../IncSourceTestDlg/include/a2l/compuvtab.h | 46 + .../include/a2l/compuvtabrange.h | 47 + .../IncSourceTestDlg/include/a2l/frame.h | 40 + .../IncSourceTestDlg/include/a2l/function.h | 88 + .../IncSourceTestDlg/include/a2l/group.h | 50 + .../include/a2l/ifdatablock.h | 40 + .../IncSourceTestDlg/include/a2l/ifdataitem.h | 20 + .../IncSourceTestDlg/include/a2l/instance.h | 49 + .../include/a2l/measurement.h | 92 + .../IncSourceTestDlg/include/a2l/module.h | 258 + .../IncSourceTestDlg/include/a2l/overwrite.h | 53 + .../include/a2l/recordlayout.h | 269 + .../IncSourceTestDlg/include/a2l/structure.h | 51 + .../include/a2l/transformer.h | 70 + .../IncSourceTestDlg/include/a2l/unit.h | 48 + TestLibDlg/IncSourceTestDlg/pch.cpp | 5 + TestLibDlg/IncSourceTestDlg/pch.h | 13 + .../IncSourceTestDlg/res/IncSourceTestDlg.ico | Bin 0 -> 67777 bytes .../IncSourceTestDlg/res/IncSourceTestDlg.rc2 | Bin 0 -> 740 bytes TestLibDlg/IncSourceTestDlg/resource.h | 23 + TestLibDlg/IncSourceTestDlg/src/FlexLexer.h | 220 + TestLibDlg/IncSourceTestDlg/src/a2lenums.cpp | 496 ++ TestLibDlg/IncSourceTestDlg/src/a2lfile.cpp | 67 + TestLibDlg/IncSourceTestDlg/src/a2lflexer.cpp | 4119 +++++++++ TestLibDlg/IncSourceTestDlg/src/a2lflexer.l | 400 + TestLibDlg/IncSourceTestDlg/src/a2lhelper.cpp | 706 ++ TestLibDlg/IncSourceTestDlg/src/a2lhelper.h | 55 + TestLibDlg/IncSourceTestDlg/src/a2lobject.cpp | 32 + TestLibDlg/IncSourceTestDlg/src/a2lparser.cpp | 7918 +++++++++++++++++ TestLibDlg/IncSourceTestDlg/src/a2lparser.hpp | 6331 +++++++++++++ TestLibDlg/IncSourceTestDlg/src/a2lparser.y | 1671 ++++ .../IncSourceTestDlg/src/a2lproject.cpp | 14 + .../IncSourceTestDlg/src/a2lscanner.cpp | 523 ++ TestLibDlg/IncSourceTestDlg/src/a2lscanner.h | 231 + TestLibDlg/IncSourceTestDlg/src/a2mlblock.cpp | 30 + .../IncSourceTestDlg/src/a2mlflexer.cpp | 2311 +++++ TestLibDlg/IncSourceTestDlg/src/a2mlflexer.l | 162 + .../IncSourceTestDlg/src/a2mlobject.cpp | 102 + .../IncSourceTestDlg/src/a2mlparser.cpp | 1905 ++++ .../IncSourceTestDlg/src/a2mlparser.hpp | 1875 ++++ TestLibDlg/IncSourceTestDlg/src/a2mlparser.y | 326 + .../IncSourceTestDlg/src/a2mlscanner.cpp | 16 + TestLibDlg/IncSourceTestDlg/src/a2mlscanner.h | 50 + TestLibDlg/IncSourceTestDlg/src/axisdescr.cpp | 10 + TestLibDlg/IncSourceTestDlg/src/axispts.cpp | 8 + TestLibDlg/IncSourceTestDlg/src/blob.cpp | 10 + .../IncSourceTestDlg/src/characteristic.cpp | 12 + .../IncSourceTestDlg/src/compumethod.cpp | 10 + TestLibDlg/IncSourceTestDlg/src/computab.cpp | 28 + TestLibDlg/IncSourceTestDlg/src/compuvtab.cpp | 10 + .../IncSourceTestDlg/src/compuvtabrange.cpp | 10 + TestLibDlg/IncSourceTestDlg/src/frame.cpp | 10 + TestLibDlg/IncSourceTestDlg/src/function.cpp | 3 + TestLibDlg/IncSourceTestDlg/src/group.cpp | 10 + .../IncSourceTestDlg/src/ifdatablock.cpp | 69 + .../IncSourceTestDlg/src/ifdataflexer.cpp | 2158 +++++ .../IncSourceTestDlg/src/ifdataflexer.l | 149 + .../IncSourceTestDlg/src/ifdataparser.cpp | 1309 +++ .../IncSourceTestDlg/src/ifdataparser.hpp | 1406 +++ .../IncSourceTestDlg/src/ifdataparser.y | 121 + .../IncSourceTestDlg/src/ifdatascanner.cpp | 16 + .../IncSourceTestDlg/src/ifdatascanner.h | 55 + TestLibDlg/IncSourceTestDlg/src/instance.cpp | 12 + .../IncSourceTestDlg/src/measurement.cpp | 13 + TestLibDlg/IncSourceTestDlg/src/module.cpp | 159 + TestLibDlg/IncSourceTestDlg/src/overwrite.cpp | 10 + .../IncSourceTestDlg/src/recordlayout.cpp | 14 + TestLibDlg/IncSourceTestDlg/src/structure.cpp | 10 + .../IncSourceTestDlg/src/transformer.cpp | 4 + TestLibDlg/IncSourceTestDlg/src/unit.cpp | 10 + TestLibDlg/IncSourceTestDlg/targetver.h | 8 + 95 files changed, 39233 insertions(+) create mode 100644 TestLibDlg/IncSourceTestDlg/DlgProxy.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/DlgProxy.h create mode 100644 TestLibDlg/IncSourceTestDlg/IncSourceTestDlg.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/IncSourceTestDlg.h create mode 100644 TestLibDlg/IncSourceTestDlg/IncSourceTestDlg.idl create mode 100644 TestLibDlg/IncSourceTestDlg/IncSourceTestDlg.rc create mode 100644 TestLibDlg/IncSourceTestDlg/IncSourceTestDlg.reg create mode 100644 TestLibDlg/IncSourceTestDlg/IncSourceTestDlg.vcxproj create mode 100644 TestLibDlg/IncSourceTestDlg/IncSourceTestDlg.vcxproj.filters create mode 100644 TestLibDlg/IncSourceTestDlg/IncSourceTestDlg.vcxproj.user create mode 100644 TestLibDlg/IncSourceTestDlg/IncSourceTestDlgDlg.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/IncSourceTestDlgDlg.h create mode 100644 TestLibDlg/IncSourceTestDlg/framework.h create mode 100644 TestLibDlg/IncSourceTestDlg/include/a2l/a2lenums.h create mode 100644 TestLibDlg/IncSourceTestDlg/include/a2l/a2lfile.h create mode 100644 TestLibDlg/IncSourceTestDlg/include/a2l/a2lobject.h create mode 100644 TestLibDlg/IncSourceTestDlg/include/a2l/a2lproject.h create mode 100644 TestLibDlg/IncSourceTestDlg/include/a2l/a2lstructs.h create mode 100644 TestLibDlg/IncSourceTestDlg/include/a2l/a2mlblock.h create mode 100644 TestLibDlg/IncSourceTestDlg/include/a2l/a2mlobject.h create mode 100644 TestLibDlg/IncSourceTestDlg/include/a2l/axispts.h create mode 100644 TestLibDlg/IncSourceTestDlg/include/a2l/blob.h create mode 100644 TestLibDlg/IncSourceTestDlg/include/a2l/characteristic.h create mode 100644 TestLibDlg/IncSourceTestDlg/include/a2l/compumethod.h create mode 100644 TestLibDlg/IncSourceTestDlg/include/a2l/compuvtab.h create mode 100644 TestLibDlg/IncSourceTestDlg/include/a2l/compuvtabrange.h create mode 100644 TestLibDlg/IncSourceTestDlg/include/a2l/frame.h create mode 100644 TestLibDlg/IncSourceTestDlg/include/a2l/function.h create mode 100644 TestLibDlg/IncSourceTestDlg/include/a2l/group.h create mode 100644 TestLibDlg/IncSourceTestDlg/include/a2l/ifdatablock.h create mode 100644 TestLibDlg/IncSourceTestDlg/include/a2l/ifdataitem.h create mode 100644 TestLibDlg/IncSourceTestDlg/include/a2l/instance.h create mode 100644 TestLibDlg/IncSourceTestDlg/include/a2l/measurement.h create mode 100644 TestLibDlg/IncSourceTestDlg/include/a2l/module.h create mode 100644 TestLibDlg/IncSourceTestDlg/include/a2l/overwrite.h create mode 100644 TestLibDlg/IncSourceTestDlg/include/a2l/recordlayout.h create mode 100644 TestLibDlg/IncSourceTestDlg/include/a2l/structure.h create mode 100644 TestLibDlg/IncSourceTestDlg/include/a2l/transformer.h create mode 100644 TestLibDlg/IncSourceTestDlg/include/a2l/unit.h create mode 100644 TestLibDlg/IncSourceTestDlg/pch.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/pch.h create mode 100644 TestLibDlg/IncSourceTestDlg/res/IncSourceTestDlg.ico create mode 100644 TestLibDlg/IncSourceTestDlg/res/IncSourceTestDlg.rc2 create mode 100644 TestLibDlg/IncSourceTestDlg/resource.h create mode 100644 TestLibDlg/IncSourceTestDlg/src/FlexLexer.h create mode 100644 TestLibDlg/IncSourceTestDlg/src/a2lenums.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/a2lfile.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/a2lflexer.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/a2lflexer.l create mode 100644 TestLibDlg/IncSourceTestDlg/src/a2lhelper.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/a2lhelper.h create mode 100644 TestLibDlg/IncSourceTestDlg/src/a2lobject.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/a2lparser.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/a2lparser.hpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/a2lparser.y create mode 100644 TestLibDlg/IncSourceTestDlg/src/a2lproject.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/a2lscanner.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/a2lscanner.h create mode 100644 TestLibDlg/IncSourceTestDlg/src/a2mlblock.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/a2mlflexer.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/a2mlflexer.l create mode 100644 TestLibDlg/IncSourceTestDlg/src/a2mlobject.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/a2mlparser.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/a2mlparser.hpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/a2mlparser.y create mode 100644 TestLibDlg/IncSourceTestDlg/src/a2mlscanner.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/a2mlscanner.h create mode 100644 TestLibDlg/IncSourceTestDlg/src/axisdescr.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/axispts.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/blob.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/characteristic.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/compumethod.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/computab.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/compuvtab.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/compuvtabrange.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/frame.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/function.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/group.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/ifdatablock.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/ifdataflexer.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/ifdataflexer.l create mode 100644 TestLibDlg/IncSourceTestDlg/src/ifdataparser.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/ifdataparser.hpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/ifdataparser.y create mode 100644 TestLibDlg/IncSourceTestDlg/src/ifdatascanner.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/ifdatascanner.h create mode 100644 TestLibDlg/IncSourceTestDlg/src/instance.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/measurement.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/module.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/overwrite.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/recordlayout.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/structure.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/transformer.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/src/unit.cpp create mode 100644 TestLibDlg/IncSourceTestDlg/targetver.h diff --git a/TestLibDlg/IncSourceTestDlg/DlgProxy.cpp b/TestLibDlg/IncSourceTestDlg/DlgProxy.cpp new file mode 100644 index 0000000..9c5bb87 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/DlgProxy.cpp @@ -0,0 +1,87 @@ + +// DlgProxy.cpp: 구현 파일 +// + +#include "pch.h" +#include "framework.h" +#include "IncSourceTestDlg.h" +#include "DlgProxy.h" +#include "IncSourceTestDlgDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#endif + + +// CIncSourceTestDlgDlgAutoProxy + +IMPLEMENT_DYNCREATE(CIncSourceTestDlgDlgAutoProxy, CCmdTarget) + +CIncSourceTestDlgDlgAutoProxy::CIncSourceTestDlgDlgAutoProxy() +{ + EnableAutomation(); + + // 자동화 개체가 활성화되어 있는 동안 계속 애플리케이션을 실행하기 위해 + // 생성자에서 AfxOleLockApp를 호출합니다. + AfxOleLockApp(); + + // 애플리케이션의 주 창 포인터를 통해 대화 상자에 대한 + // 액세스를 가져옵니다. 프록시의 내부 포인터를 설정하여 + // 대화 상자를 가리키고 대화 상자의 후방 포인터를 이 프록시로 + // 설정합니다. + ASSERT_VALID(AfxGetApp()->m_pMainWnd); + if (AfxGetApp()->m_pMainWnd) + { + ASSERT_KINDOF(CIncSourceTestDlgDlg, AfxGetApp()->m_pMainWnd); + if (AfxGetApp()->m_pMainWnd->IsKindOf(RUNTIME_CLASS(CIncSourceTestDlgDlg))) + { + m_pDialog = reinterpret_cast(AfxGetApp()->m_pMainWnd); + m_pDialog->m_pAutoProxy = this; + } + } +} + +CIncSourceTestDlgDlgAutoProxy::~CIncSourceTestDlgDlgAutoProxy() +{ + // 모든 개체가 OLE 자동화로 만들어졌을 때 애플리케이션을 종료하기 위해 + // 소멸자가 AfxOleUnlockApp를 호출합니다. + // 이러한 호출로 주 대화 상자가 삭제될 수 있습니다. + if (m_pDialog != nullptr) + m_pDialog->m_pAutoProxy = nullptr; + AfxOleUnlockApp(); +} + +void CIncSourceTestDlgDlgAutoProxy::OnFinalRelease() +{ + // 자동화 개체에 대한 마지막 참조가 해제되면 + // OnFinalRelease가 호출됩니다. 기본 클래스에서 자동으로 개체를 삭제합니다. + // 기본 클래스를 호출하기 전에 개체에 필요한 추가 정리 작업을 + // 추가하세요. + + CCmdTarget::OnFinalRelease(); +} + +BEGIN_MESSAGE_MAP(CIncSourceTestDlgDlgAutoProxy, CCmdTarget) +END_MESSAGE_MAP() + +BEGIN_DISPATCH_MAP(CIncSourceTestDlgDlgAutoProxy, CCmdTarget) +END_DISPATCH_MAP() + +// 참고: IID_IIncSourceTestDlg에 대한 지원을 추가하여 +// VBA에서 형식 안전 바인딩을 지원합니다. +// 이 IID는 .IDL 파일에 있는 dispinterface의 GUID와 일치해야 합니다. + +// {2ef56b3a-ca68-4764-8fdd-5d19ec609144} +static const IID IID_IIncSourceTestDlg = +{0x2ef56b3a,0xca68,0x4764,{0x8f,0xdd,0x5d,0x19,0xec,0x60,0x91,0x44}}; + +BEGIN_INTERFACE_MAP(CIncSourceTestDlgDlgAutoProxy, CCmdTarget) + INTERFACE_PART(CIncSourceTestDlgDlgAutoProxy, IID_IIncSourceTestDlg, Dispatch) +END_INTERFACE_MAP() + +// IMPLEMENT_OLECREATE2 매크로가 이 프로젝트의 pch.h에 정의됩니다. +// {485ee25e-0171-42b5-8cf0-7883ae87945e} +IMPLEMENT_OLECREATE2(CIncSourceTestDlgDlgAutoProxy, "IncSourceTestDlg.Application", 0x485ee25e,0x0171,0x42b5,0x8c,0xf0,0x78,0x83,0xae,0x87,0x94,0x5e) + + +// CIncSourceTestDlgDlgAutoProxy 메시지 처리기 diff --git a/TestLibDlg/IncSourceTestDlg/DlgProxy.h b/TestLibDlg/IncSourceTestDlg/DlgProxy.h new file mode 100644 index 0000000..0dc19c7 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/DlgProxy.h @@ -0,0 +1,43 @@ + +// DlgProxy.h: 헤더 파일 +// + +#pragma once + +class CIncSourceTestDlgDlg; + + +// CIncSourceTestDlgDlgAutoProxy 명령 대상 + +class CIncSourceTestDlgDlgAutoProxy : public CCmdTarget +{ + DECLARE_DYNCREATE(CIncSourceTestDlgDlgAutoProxy) + + CIncSourceTestDlgDlgAutoProxy(); // 동적 만들기에 사용되는 protected 생성자입니다. + +// 특성입니다. +public: + CIncSourceTestDlgDlg* m_pDialog; + +// 작업입니다. +public: + +// 재정의입니다. + public: + virtual void OnFinalRelease(); + +// 구현입니다. +protected: + virtual ~CIncSourceTestDlgDlgAutoProxy(); + + // 생성된 메시지 맵 함수 + + DECLARE_MESSAGE_MAP() + DECLARE_OLECREATE(CIncSourceTestDlgDlgAutoProxy) + + // 생성된 OLE 디스패치 맵 함수 + + DECLARE_DISPATCH_MAP() + DECLARE_INTERFACE_MAP() +}; + diff --git a/TestLibDlg/IncSourceTestDlg/IncSourceTestDlg.cpp b/TestLibDlg/IncSourceTestDlg/IncSourceTestDlg.cpp new file mode 100644 index 0000000..92cd6f6 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/IncSourceTestDlg.cpp @@ -0,0 +1,153 @@ + +// IncSourceTestDlg.cpp: 애플리케이션에 대한 클래스 동작을 정의합니다. +// + +#include "pch.h" +#include "framework.h" +#include "IncSourceTestDlg.h" +#include "IncSourceTestDlgDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#endif + + +// CIncSourceTestDlgApp + +BEGIN_MESSAGE_MAP(CIncSourceTestDlgApp, CWinApp) + ON_COMMAND(ID_HELP, &CWinApp::OnHelp) +END_MESSAGE_MAP() + + +// CIncSourceTestDlgApp 생성 + +CIncSourceTestDlgApp::CIncSourceTestDlgApp() +{ + // 다시 시작 관리자 지원 + m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_RESTART; + + // TODO: 여기에 생성 코드를 추가합니다. + // InitInstance에 모든 중요한 초기화 작업을 배치합니다. +} + + +// 유일한 CIncSourceTestDlgApp 개체입니다. + +CIncSourceTestDlgApp theApp; + +const GUID CDECL BASED_CODE _tlid = + {0xfdcaae6b,0x3d5c,0x4612,{0x8b,0xfc,0x6b,0x4e,0x40,0xf2,0x51,0x8d}}; +const WORD _wVerMajor = 1; +const WORD _wVerMinor = 0; + + +// CIncSourceTestDlgApp 초기화 + +BOOL CIncSourceTestDlgApp::InitInstance() +{ + // Windows XP에서는 InitCommonControlsEx()를 필요로 합니다. + // 사용하도록 지정하는 경우, Windows XP 상에서 반드시 InitCommonControlsEx()가 필요합니다. + // InitCommonControlsEx()를 사용하지 않으면 창을 만들 수 없습니다. + INITCOMMONCONTROLSEX InitCtrls; + InitCtrls.dwSize = sizeof(InitCtrls); + // 응용 프로그램에서 사용할 모든 공용 컨트롤 클래스를 포함하도록 + // 이 항목을 설정하십시오. + InitCtrls.dwICC = ICC_WIN95_CLASSES; + InitCommonControlsEx(&InitCtrls); + + CWinApp::InitInstance(); + + + // OLE 라이브러리를 초기화합니다. + if (!AfxOleInit()) + { + AfxMessageBox(IDP_OLE_INIT_FAILED); + return FALSE; + } + + AfxEnableControlContainer(); + + // 대화 상자에 셸 트리 뷰 또는 + // 셸 목록 뷰 컨트롤이 포함되어 있는 경우 셸 관리자를 만듭니다. + CShellManager *pShellManager = new CShellManager; + + // MFC 컨트롤의 테마를 사용하기 위해 "Windows 원형" 비주얼 관리자 활성화 + CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows)); + + // 표준 초기화 + // 이들 기능을 사용하지 않고 최종 실행 파일의 크기를 줄이려면 + // 아래에서 필요 없는 특정 초기화 + // 루틴을 제거해야 합니다. + // 해당 설정이 저장된 레지스트리 키를 변경하십시오. + // TODO: 이 문자열을 회사 또는 조직의 이름과 같은 + // 적절한 내용으로 수정해야 합니다. + SetRegistryKey(_T("로컬 애플리케이션 마법사에서 생성된 애플리케이션")); + // 자동화 또는 reg/unreg 스위치에 대한 명령줄을 구문 분석합니다. + CCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + + // 응용 프로그램이 /Embedding 또는 /Automation 스위치로 시작되었습니다. + // 응용 프로그램을 자동화 서버로 실행합니다. + if (cmdInfo.m_bRunEmbedded || cmdInfo.m_bRunAutomated) + { + // CoRegisterClassObject()를 통해 클래스 팩터리를 등록합니다. + COleTemplateServer::RegisterAll(); + } + // 응용 프로그램이 /Unregserver 또는 /Unregister 스위치로 시작되었습니다. 레지스트리에서 항목을 + // 제거합니다. + else if (cmdInfo.m_nShellCommand == CCommandLineInfo::AppUnregister) + { + COleObjectFactory::UpdateRegistryAll(FALSE); + AfxOleUnregisterTypeLib(_tlid, _wVerMajor, _wVerMinor); + return FALSE; + } + // 응용 프로그램이 독립 실행형으로 시작되었거나 다른 스위치로 시작되었습니다(예: /Register + // 또는 /Regserver). typelibrary를 포함하여 레지스트리 항목을 업데이트합니다. + else + { + COleObjectFactory::UpdateRegistryAll(); + AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid); + if (cmdInfo.m_nShellCommand == CCommandLineInfo::AppRegister) + return FALSE; + } + + CIncSourceTestDlgDlg dlg; + m_pMainWnd = &dlg; + INT_PTR nResponse = dlg.DoModal(); + if (nResponse == IDOK) + { + // TODO: 여기에 [확인]을 클릭하여 대화 상자가 없어질 때 처리할 + // 코드를 배치합니다. + } + else if (nResponse == IDCANCEL) + { + // TODO: 여기에 [취소]를 클릭하여 대화 상자가 없어질 때 처리할 + // 코드를 배치합니다. + } + else if (nResponse == -1) + { + TRACE(traceAppMsg, 0, "경고: 대화 상자를 만들지 못했으므로 애플리케이션이 예기치 않게 종료됩니다.\n"); + TRACE(traceAppMsg, 0, "경고: 대화 상자에서 MFC 컨트롤을 사용하는 경우 #define _AFX_NO_MFC_CONTROLS_IN_DIALOGS를 수행할 수 없습니다.\n"); + } + + // 위에서 만든 셸 관리자를 삭제합니다. + if (pShellManager != nullptr) + { + delete pShellManager; + } + +#if !defined(_AFXDLL) && !defined(_AFX_NO_MFC_CONTROLS_IN_DIALOGS) + ControlBarCleanUp(); +#endif + + // 대화 상자가 닫혔으므로 응용 프로그램의 메시지 펌프를 시작하지 않고 응용 프로그램을 끝낼 수 있도록 FALSE를 + // 반환합니다. + return FALSE; +} + +int CIncSourceTestDlgApp::ExitInstance() +{ + AfxOleTerm(FALSE); + + return CWinApp::ExitInstance(); +} diff --git a/TestLibDlg/IncSourceTestDlg/IncSourceTestDlg.h b/TestLibDlg/IncSourceTestDlg/IncSourceTestDlg.h new file mode 100644 index 0000000..4591865 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/IncSourceTestDlg.h @@ -0,0 +1,33 @@ + +// IncSourceTestDlg.h: PROJECT_NAME 애플리케이션에 대한 주 헤더 파일입니다. +// + +#pragma once + +#ifndef __AFXWIN_H__ + #error "PCH에 대해 이 파일을 포함하기 전에 'pch.h'를 포함합니다." +#endif + +#include "resource.h" // 주 기호입니다. + + +// CIncSourceTestDlgApp: +// 이 클래스의 구현에 대해서는 IncSourceTestDlg.cpp을(를) 참조하세요. +// + +class CIncSourceTestDlgApp : public CWinApp +{ +public: + CIncSourceTestDlgApp(); + +// 재정의입니다. +public: + virtual BOOL InitInstance(); + virtual int ExitInstance(); + +// 구현입니다. + + DECLARE_MESSAGE_MAP() +}; + +extern CIncSourceTestDlgApp theApp; diff --git a/TestLibDlg/IncSourceTestDlg/IncSourceTestDlg.idl b/TestLibDlg/IncSourceTestDlg/IncSourceTestDlg.idl new file mode 100644 index 0000000..5127df6 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/IncSourceTestDlg.idl @@ -0,0 +1,29 @@ +// IncSourceTestDlg.idl: IncSourceTestDlg.exe의 형식 라이브러리 소스 + +// 이 파일은 MIDL 컴파일러에 의해 처리되어 +// 형식 라이브러리(IncSourceTestDlg.tlb)입니다. + +[ uuid(fdcaae6b-3d5c-4612-8bfc-6b4e40f2518d), version(1.0) ] +library IncSourceTestDlg +{ + importlib("stdole32.tlb"); + importlib("stdole2.tlb"); + + // CIncSourceTestDlgDoc의 기본 디스패치 인터페이스 + + [ uuid(2ef56b3a-ca68-4764-8fdd-5d19ec609144) ] + dispinterface IIncSourceTestDlg + { + properties: + + methods: + }; + + // CIncSourceTestDlgDoc에 대한 클래스 정보 + + [ uuid(485ee25e-0171-42b5-8cf0-7883ae87945e) ] + coclass IncSourceTestDlg + { + [default] dispinterface IIncSourceTestDlg; + }; +}; diff --git a/TestLibDlg/IncSourceTestDlg/IncSourceTestDlg.rc b/TestLibDlg/IncSourceTestDlg/IncSourceTestDlg.rc new file mode 100644 index 0000000000000000000000000000000000000000..761f90d90b838ede2e751055c950c4cbd43293e8 GIT binary patch literal 11716 zcmd^F&2Lmy6h8|W#%SDV;)2CZ9&V>u3{(kq&;obM8>t^sUMnnUMuN<>Vb)fy~QES;D=7{wms8^sS)f zyfgTB0{;U%5!xv^jWJ#FioAqX_PTaAdYABa0i$Q#*i7C0F8N3@ZZv1^cH`#UJi_jm zqLid86Oxw^DM&?*$RK+2_&+YAatu8s{Eo>0dPecz)+Y|_cNuop1~Lr3#CbdiE-lL< z=&yo1)XQKFE0F(l7+ud%!kh&64g+F7Rc=-2z>3p| zs+6`Me@Mf2?5I68)wI=b(>#o6qwydMZl(Dmju`;whMkwRnWM(iRiYXnlJoR6S~p3%4dQUk6w zhRrO1-s8zZECW_Qd=lg1lf|_Ncm?o+aLX>2X&viE8uj0K+B7W8mxkUqEAKjAn{6Q3 zBu&=rW*W0bpiL*BC1LJahIXyOGV{nV=aDHeU+957XPn>BIMsT#TisgQoZ1TH(UrCJ zK)$`YaQXY&yKV(?{ih%9PCp3b()z_)pKpA!b?3^XD_z^9VgcA`bRs2D`zF?gvw0!K zefqxK4P@bR7Fc|?dGS^nx7G6{MOU*ti=~Yq#545_xSE9ZDLIa78PZUWhqxQZhhQz_ z*B>_mc@_6B-(CN4_Ie<9*X645F&&duyk_$;8mW#s>!Pn207k^LxfWGH_i;Bi4aYQp z>F2>wNw$)8TZ|~zl3L2pBz1d@tnbmmNn`rhfUy~siB6KR!NH(Lm#t> znTq!+o(Y{$xd!JD>H;oSwjbBtE~3@CiWoBrj3FklavH)@Kb}~PC0!%11=gxb?~?i~ zS8C1Uk?v*as`1_EeO~k@5B`(e%kbZZyU{{U=fUZISKCh@LbAr60w=i_(2qD@aG5=O zx?OD1->e*{J?}>}AT;hE9CLXA=avAo1bLMqJ4&XE`K&MW%^3Rf4!SSd@cj_hp2BR7 zK89Q89(7QQm|H~EP>l5E0Ii5sxPL)CAS@lP5U4xjm_G( zKQhouVpwv!2&&T>D>ELyjCX62bvPvF@Xho%-7Y#oc^;IJ>#Wtti5%9?O5fw(9z1nI zTHOudQrDWundlzq+7Lvo<%Nzvn zY5Dt|Ha1>?c^o-ualkClTJtkDj`~M`(~lJn)b3u;qL#$y(23Ot08=fTQlJJ?_ZeRf z;r|Gp4x!hV^dx5FoPBVI%74SP2#?mMmSeaz=S~4Wf_X^Dp$cGywp?*AX^BcrGOwbR zO8K;BF5u^ph9%D-xUZbfs03^D?Yy48*jT%(HR9`sj&NiBd@;NoDeGWChku}aR}e* z&S`X%t(=@k(AO56mt+!E+H-spe!vE7_~lINi!#APhH^ZcHk06)>bQMndQg%)r^KN z%w2Q*ZJm3g7(ee;tIxWOB417&sGyjKMdj6n9-ftH&K%}#tQ>Vmid1ozbrxLN4o?bB z-{+mqlP4x^a>&=Er@@;d)?Nn2XFzkcP8vQ}4$7`OpWfez_D0v(xkiO?%xtB;C+bTk z!NHZs{3QRj>qVk=SOzrO`6{Fo?k%Ve(Wk4Aq2;TuiPkP5w&6c&G4JOoA~RoPtR05F z_z~6OH|dGSv{v@IcrM3mjoBZeat+o8$!jHhYO6xx`va7SUw8PvBN>uun8wkvi`_g? zBxZzmAkljt!F$aOxfkS*&$?{ZU)NU9yf8jK89uXIt>eb(FxrP4+=n04Fj|NZ~=bM2hYx1S1Zv>$mOwMS3GecRue zjxo0CiD2WElI>MJZ73&N0`KR^ulkuU&%0-E=D_UN=rEdCOVZQuTL!Hz>81EKnKzV2 z5mk|$gK{QMS}Wi;cdR*^d+v5+Y9r6%%nRh*Y~ZoYP7ZT%)rs<_KE_29RSpEusxjAuo}i`84)TN@tnw)x(k z?tFI0+km+TSr{+P#G;y!ZpE#C!_wZGWxB#vV{xOekf;&S@4ecaI`cMc|Lym3y@1f{ zd%4En7qs&2g36&W9J9~*6aQ9bH~%J~6)3HIe?T}2>)C(76@Eit7{$-5?Q4PN)suZI zK)<7!^|ZbeNW;}XT~GQV!1suXVf=dlgPi=mNBr#HM#p)Ugh%}uzhYyYYUPAq*9%YT llb(}L>6=T>&gcn~H}PuED^9gZRXMqYdYq?0t<+3}^bY~@9{B(O literal 0 HcmV?d00001 diff --git a/TestLibDlg/IncSourceTestDlg/IncSourceTestDlg.reg b/TestLibDlg/IncSourceTestDlg/IncSourceTestDlg.reg new file mode 100644 index 0000000..3192ddc --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/IncSourceTestDlg.reg @@ -0,0 +1,17 @@ +REGEDIT +; .REG 파일은 SETUP 프로그램에 사용될 수 있습니다. +; SETUP 프로그램을 사용할 수 없는 경우 아래 항목이 +; CWinApp::RegisterShellFileTypes 및 COleObjectFactory::UpdateRegistryAll을 +; 호출하여 InitInstance에 자동으로 등록됩니다. + + +HKEY_CLASSES_ROOT\IncSourceTestDlg.Application = IncSourceTestDlg Application + + +HKEY_CLASSES_ROOT\IncSourceTestDlg.Application\CLSID = {485ee25e-0171-42b5-8cf0-7883ae87945e} + +HKEY_CLASSES_ROOT\CLSID\{485ee25e-0171-42b5-8cf0-7883ae87945e} = IncSourceTestDlg Application +HKEY_CLASSES_ROOT\CLSID\{485ee25e-0171-42b5-8cf0-7883ae87945e}\ProgId = IncSourceTestDlg.Application + + +HKEY_CLASSES_ROOT\CLSID\{485ee25e-0171-42b5-8cf0-7883ae87945e}\LocalServer32 = IncSourceTestDlg.EXE diff --git a/TestLibDlg/IncSourceTestDlg/IncSourceTestDlg.vcxproj b/TestLibDlg/IncSourceTestDlg/IncSourceTestDlg.vcxproj new file mode 100644 index 0000000..d0f1f63 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/IncSourceTestDlg.vcxproj @@ -0,0 +1,286 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + {44739900-23B0-7EA4-48FA-099C6C559D77} + MFCProj + IncSourceTestDlg + 10.0 + + + + Application + true + v143 + Unicode + Dynamic + + + Application + false + v143 + true + Unicode + Dynamic + + + Application + true + v143 + Unicode + Dynamic + + + Application + false + v143 + true + Unicode + Dynamic + + + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + + + + NotUsing + Level3 + true + WIN32;_WINDOWS;_DEBUG;%(PreprocessorDefinitions) + pch.h + C:\git_work\a2l\a2l_test\TestLibDlg\IncSourceTestDlg\include;C:\git_work\a2l\a2l_test\TestLibDlg\IncSourceTestDlg\src;C:\boost\include\boost-1_87;%(AdditionalIncludeDirectories) + stdcpp20 + + + Windows + true + C:\boost\x86_lib;%(AdditionalLibraryDirectories) + + + false + true + _DEBUG;%(PreprocessorDefinitions) + $(IntDir)IncSourceTestDlg.tlb + IncSourceTestDlg_h.h + + + 0x0412 + _DEBUG;%(PreprocessorDefinitions) + $(IntDir);%(AdditionalIncludeDirectories) + + + + + Use + Level3 + true + _WINDOWS;_DEBUG;%(PreprocessorDefinitions) + pch.h + + + Windows + true + + + false + true + _DEBUG;%(PreprocessorDefinitions) + $(IntDir)IncSourceTestDlg.tlb + IncSourceTestDlg_h.h + + + 0x0412 + _DEBUG;%(PreprocessorDefinitions) + $(IntDir);%(AdditionalIncludeDirectories) + + + + + Use + Level3 + true + true + true + WIN32;_WINDOWS;NDEBUG;%(PreprocessorDefinitions) + pch.h + + + Windows + true + true + true + + + false + true + NDEBUG;%(PreprocessorDefinitions) + $(IntDir)IncSourceTestDlg.tlb + IncSourceTestDlg_h.h + + + 0x0412 + NDEBUG;%(PreprocessorDefinitions) + $(IntDir);%(AdditionalIncludeDirectories) + + + + + Use + Level3 + true + true + true + _WINDOWS;NDEBUG;%(PreprocessorDefinitions) + pch.h + + + Windows + true + true + true + + + false + true + NDEBUG;%(PreprocessorDefinitions) + $(IntDir)IncSourceTestDlg.tlb + IncSourceTestDlg_h.h + + + 0x0412 + NDEBUG;%(PreprocessorDefinitions) + $(IntDir);%(AdditionalIncludeDirectories) + + + + + + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TestLibDlg/IncSourceTestDlg/IncSourceTestDlg.vcxproj.filters b/TestLibDlg/IncSourceTestDlg/IncSourceTestDlg.vcxproj.filters new file mode 100644 index 0000000..85e8be1 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/IncSourceTestDlg.vcxproj.filters @@ -0,0 +1,228 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {ab092bfb-4c1e-40f2-bfa9-349fda25fa4c} + + + + + 헤더 파일 + + + 헤더 파일 + + + 헤더 파일 + + + 헤더 파일 + + + 헤더 파일 + + + 헤더 파일 + + + 헤더 파일 + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + + + 소스 파일 + + + 소스 파일 + + + 소스 파일 + + + 소스 파일 + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + src + + + + + 소스 파일 + + + + + + 리소스 파일 + + + src + + + src + + + src + + + src + + + src + + + src + + + + + 리소스 파일 + + + + + 리소스 파일 + + + \ No newline at end of file diff --git a/TestLibDlg/IncSourceTestDlg/IncSourceTestDlg.vcxproj.user b/TestLibDlg/IncSourceTestDlg/IncSourceTestDlg.vcxproj.user new file mode 100644 index 0000000..c0cdeac --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/IncSourceTestDlg.vcxproj.user @@ -0,0 +1,6 @@ + + + + IncSourceTestDlg.rc + + \ No newline at end of file diff --git a/TestLibDlg/IncSourceTestDlg/IncSourceTestDlgDlg.cpp b/TestLibDlg/IncSourceTestDlg/IncSourceTestDlgDlg.cpp new file mode 100644 index 0000000..f30038a --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/IncSourceTestDlgDlg.cpp @@ -0,0 +1,590 @@ + +// IncSourceTestDlgDlg.cpp: 구현 파일 +// + +#include "pch.h" +#include "framework.h" +#include "IncSourceTestDlg.h" +#include "IncSourceTestDlgDlg.h" +#include "DlgProxy.h" +#include "afxdialogex.h" + +#include + +#ifdef _DEBUG +#define new DEBUG_NEW +#endif + + +//template +//std::wstring wstring_format(const std::wstring& format, Args ... args); +template +std::string string_format(const std::string& format, Args ... args) +{ + size_t size = snprintf(nullptr, 0, format.c_str(), args ...) + 1; // Extra space for '\0' + if (size <= 0) { + throw std::runtime_error("Error during formatting."); + } + std::unique_ptr buf(new char[size]); + snprintf(buf.get(), size, format.c_str(), args ...); + return std::string(buf.get(), buf.get() + size - 1); // We don't want the '\0' inside } +} + + +// 응용 프로그램 정보에 사용되는 CAboutDlg 대화 상자입니다. + +class CAboutDlg : public CDialogEx +{ +public: + CAboutDlg(); + +// 대화 상자 데이터입니다. +#ifdef AFX_DESIGN_TIME + enum { IDD = IDD_ABOUTBOX }; +#endif + + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 지원입니다. + +// 구현입니다. +protected: + DECLARE_MESSAGE_MAP() +}; + +CAboutDlg::CAboutDlg() : CDialogEx(IDD_ABOUTBOX) +{ +} + +void CAboutDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialogEx::DoDataExchange(pDX); +} + +BEGIN_MESSAGE_MAP(CAboutDlg, CDialogEx) +END_MESSAGE_MAP() + + +// CIncSourceTestDlgDlg 대화 상자 + + +IMPLEMENT_DYNAMIC(CIncSourceTestDlgDlg, CDialogEx); + +CIncSourceTestDlgDlg::CIncSourceTestDlgDlg(CWnd* pParent /*=nullptr*/) + : CDialogEx(IDD_INCSOURCETESTDLG_DIALOG, pParent) +{ + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); + m_pAutoProxy = nullptr; +} + +CIncSourceTestDlgDlg::~CIncSourceTestDlgDlg() +{ + // 이 대화 상자에 대한 자동화 프록시가 있을 경우 이 대화 상자에 대한 + // 후방 포인터를 null로 설정하여 + // 대화 상자가 삭제되었음을 알 수 있게 합니다. + if (m_pAutoProxy != nullptr) + m_pAutoProxy->m_pDialog = nullptr; +} + +void CIncSourceTestDlgDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialogEx::DoDataExchange(pDX); +} + +BEGIN_MESSAGE_MAP(CIncSourceTestDlgDlg, CDialogEx) + ON_WM_SYSCOMMAND() + ON_WM_CLOSE() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_BUTTON_OPEN, &CIncSourceTestDlgDlg::OnBnClickedButtonOpen) +END_MESSAGE_MAP() + + +// CIncSourceTestDlgDlg 메시지 처리기 + +BOOL CIncSourceTestDlgDlg::OnInitDialog() +{ + CDialogEx::OnInitDialog(); + + // 시스템 메뉴에 "정보..." 메뉴 항목을 추가합니다. + + // IDM_ABOUTBOX는 시스템 명령 범위에 있어야 합니다. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != nullptr) + { + BOOL bNameValid; + CString strAboutMenu; + bNameValid = strAboutMenu.LoadString(IDS_ABOUTBOX); + ASSERT(bNameValid); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // 이 대화 상자의 아이콘을 설정합니다. 응용 프로그램의 주 창이 대화 상자가 아닐 경우에는 + // 프레임워크가 이 작업을 자동으로 수행합니다. + SetIcon(m_hIcon, TRUE); // 큰 아이콘을 설정합니다. + SetIcon(m_hIcon, FALSE); // 작은 아이콘을 설정합니다. + + // TODO: 여기에 추가 초기화 작업을 추가합니다. + + return TRUE; // 포커스를 컨트롤에 설정하지 않으면 TRUE를 반환합니다. +} + +void CIncSourceTestDlgDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CAboutDlg dlgAbout; + dlgAbout.DoModal(); + } + else + { + CDialogEx::OnSysCommand(nID, lParam); + } +} + +// 대화 상자에 최소화 단추를 추가할 경우 아이콘을 그리려면 +// 아래 코드가 필요합니다. 문서/뷰 모델을 사용하는 MFC 애플리케이션의 경우에는 +// 프레임워크에서 이 작업을 자동으로 수행합니다. + +void CIncSourceTestDlgDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // 그리기를 위한 디바이스 컨텍스트입니다. + + SendMessage(WM_ICONERASEBKGND, reinterpret_cast(dc.GetSafeHdc()), 0); + + // 클라이언트 사각형에서 아이콘을 가운데에 맞춥니다. + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // 아이콘을 그립니다. + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialogEx::OnPaint(); + } +} + +// 사용자가 최소화된 창을 끄는 동안에 커서가 표시되도록 시스템에서 +// 이 함수를 호출합니다. +HCURSOR CIncSourceTestDlgDlg::OnQueryDragIcon() +{ + return static_cast(m_hIcon); +} + +// 컨트롤러에서 해당 개체 중 하나를 계속 사용하고 있을 경우 +// 사용자가 UI를 닫을 때 자동화 서버를 종료하면 안 됩니다. 이들 +// 메시지 처리기는 프록시가 아직 사용 중인 경우 UI는 숨기지만, +// UI가 표시되지 않아도 대화 상자는 +// 남겨 둡니다. + +void CIncSourceTestDlgDlg::OnClose() +{ + if (CanExit()) + CDialogEx::OnClose(); +} + +void CIncSourceTestDlgDlg::OnOK() +{ + if (CanExit()) + CDialogEx::OnOK(); +} + +void CIncSourceTestDlgDlg::OnCancel() +{ + if (CanExit()) + CDialogEx::OnCancel(); +} + +BOOL CIncSourceTestDlgDlg::CanExit() +{ + // 프록시 개체가 계속 남아 있으면 자동화 컨트롤러에서는 + // 이 애플리케이션을 계속 사용합니다. 대화 상자는 남겨 두지만 + // 해당 UI는 숨깁니다. + if (m_pAutoProxy != nullptr) + { + ShowWindow(SW_HIDE); + return FALSE; + } + + return TRUE; +} + + +void CIncSourceTestDlgDlg::OnBnClickedButtonOpen() +{ + // TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다. + TCHAR a2lExt[] = _T("*.a2l"); + TCHAR a2lBaseFilter[] = _T("A2L file(*.A2L) | *.a2l;*.A2L | 모든파일(*.*) | *.* ||"); + CFileDialog dlg(TRUE, a2lExt, NULL, OFN_HIDEREADONLY, a2lBaseFilter); + + if (dlg.DoModal() == IDOK) { + std::wstring strPath = dlg.GetPathName().GetBuffer(); + + std::string strA2lPath; + + strA2lPath.assign(strPath.begin(), strPath.end()); + + loadA2lFile(strA2lPath.c_str()); + } +} + +void CIncSourceTestDlgDlg::loadA2lFile(std::string strFilePath) +{ + std::string strLogData; + + bool bIsFileExist = false; + try { + bIsFileExist = std::filesystem::exists(strFilePath); + } + catch (const std::exception& error) { + std::cout << "Failed to fetch the A2l test files. Error: " + << error.what(); + } + + a2l::A2lFile file; + file.Filename(strFilePath.data()); + const auto parse = file.ParseFile(); + if (parse) + std::cout << file.LastError() << " : " << strFilePath.data(); + std::cout << file.Name() << (parse ? " : OK" : " : FAIL") << std::endl; + + AddLogString(strFilePath.data()); + + + //if (file.A2lVersion().VersionNo == 1) + // ; + std::cout << file.A2lVersion().VersionNo << " : " << file.A2lVersion().VersionNo; + AddLogString(string_format("file.A2lVersion().VersionNo : %d", file.A2lVersion().VersionNo)); + + //if (file.A2lVersion().UpgradeNo == 71) + // ; + std::cout << file.A2lVersion().UpgradeNo << " : " << file.A2lVersion().UpgradeNo; + AddLogString(string_format("file.A2lVersion().UpgradeNo : %d", file.A2lVersion().UpgradeNo)); + + 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()); + std::cout << header.Comment << " : " << header.Comment; + AddLogString(string_format("header.Comment : %s", header.Comment.c_str())); + std::cout << header.ProjectNo << " : " << header.ProjectNo; + AddLogString(string_format("header.ProjectNo : %s", header.ProjectNo.c_str())); + std::cout << header.VersionNo << " : " << header.VersionNo; + AddLogString(string_format("header.VersionNo : %s", header.VersionNo.c_str())); + + const auto& module_list = project.Modules(); + //ASSERT_EQ(module_list.size(), 1); + std::cout << module_list.size() << " : " << module_list.size(); + AddLogString(string_format("module_list.size() : %d", module_list.size())); + + if (module_list.size() > 0) { + + const auto& module = module_list.cbegin()->second; + //ASSERT_TRUE(module); + + //EXPECT_STREQ(module->Name().c_str(), "Example"); + //EXPECT_FALSE(module->A2ml().empty()); + AddLogString(string_format("module->Name() : %s", module->Name().c_str())); + AddLogString(string_format("module->A2ml() : %s", module->A2ml().c_str())); + + AddLogString(""); + + const auto& modPar = module->ModPar(); + AddLogString(string_format("modPar.Comment() : %s", modPar.Comment.c_str())); + AddLogString(string_format("modPar.epk : %s", modPar.Epk.c_str())); + AddLogString(string_format("modPar.addr_epk size : %d", modPar.AddressEpkList.size())); + for (int i = 0; i < modPar.AddressEpkList.size(); i++) { + AddLogString(string_format("modPar.addr_epk (%d) addr (0x%X)", i, modPar.AddressEpkList.at(i))); + } + AddLogString(string_format("modPar.memory layout size : %d", modPar.MemoryLayoutList.size())); + /* + for (int i = 0; i < modPar.MemoryLayoutList.size(); i++) { + AddLogString(string_format("modPar.MemoryLayoutList (%d) addr (0x%X)", i, modPar.MemoryLayoutList.at(i))); + } + */ + + AddLogString(string_format("modPar.memory segment size : %d", modPar.MemorySegmentList.size())); + + for (int i = 0; i < modPar.MemorySegmentList.size(); i++) { + AddLogString(string_format("(%d) modPar.Memory sement description=[%s] segment_type=[%d] memory_type=[%d] attribution=[%d] addr (0x%X) size(0x%X) offset_list=[%d] ifDataList=[%d]", + i, modPar.MemorySegmentList.at(i).Description.c_str(), modPar.MemorySegmentList.at(i).SegmentType, modPar.MemorySegmentList.at(i).MemoryType, + modPar.MemorySegmentList.at(i).Attribute, modPar.MemorySegmentList.at(i).Address, modPar.MemorySegmentList.at(i).Size, + modPar.MemorySegmentList.at(i).OffsetList.size(), modPar.MemorySegmentList.at(i).IfDataList.size())); + + } + + AddLogString(""); + + const auto& modComm = module->ModCommon(); + AddLogString(string_format("modComm.Comment() : %s", modComm.Comment.c_str())); + AddLogString(string_format("modComm.Deposit : %d", modComm.Deposit)); + AddLogString(string_format("modComm.ByteOrder : %d", modComm.ByteOrder)); + AddLogString(string_format("modComm.AlignmentByte : %d", modComm.AlignmentByte)); + AddLogString(string_format("modComm.AlignmentFloat16 : %d", modComm.AlignmentFloat16)); + AddLogString(string_format("modComm.AlignmentFloat32 : %d", modComm.AlignmentFloat32)); + AddLogString(string_format("modComm.AlignmentFloat64 : %d", modComm.AlignmentFloat64)); + AddLogString(string_format("modComm.AlignmentInt64 : %d", modComm.AlignmentInt64)); + AddLogString(string_format("modComm.AlignmentLong : %d", modComm.AlignmentLong)); + AddLogString(string_format("modComm.AlignmentWord : %d", modComm.AlignmentWord)); + + AddLogString(""); + + for (const auto& [protocol, if_data] : module->IfDatas()) { + a2l::IfDataBlock block(if_data); + //EXPECT_TRUE(block.IsOk()) << block.LastError(); + std::cout << block.AsString() << std::endl; + + AddLogString(string_format("IF_DATA : %s", block.Protocol().c_str())); + AddLogString(string_format("block.ItemList().size() : %d", block.ItemList().size())); + + for (int i = 0; i < block.ItemList().size(); i++) { + AddLogString(string_format("%d block.ItemList() : %s", i, block.ItemList()[i].BlockName.c_str())); + AddLogString(string_format("block.ItemList()[i].ItemList.size() : %d", block.ItemList()[i].ItemList.size())); + + for (int j = 0; j < block.ItemList()[i].ItemList.size(); j++) { + // check digit + bool bIsDigit = true; + if (j > 0) + TRACE("asdf"); + for (int cnt = 0; cnt < block.ItemList()[i].ItemList[j].Value.size(); cnt++) { + //int value = std::isdigit(block.ItemList()[i].ItemList[j].Value.at(cnt)); + //int alpha = std::isalpha(block.ItemList()[i].ItemList[j].Value.at(cnt)); + //TRACE("[%c][%d][%d]\n", block.ItemList()[i].ItemList[j].Value.at(cnt), value, alpha); + if (std::isdigit(block.ItemList()[i].ItemList[j].Value.at(cnt)) == 0) + bIsDigit = false; + } + + if (bIsDigit) + AddLogString(string_format("%d : Address 0x%X (%d) : %s itemlist=%d", j, atoi(block.ItemList()[i].ItemList[j].Value.c_str()), atoi(block.ItemList()[i].ItemList[j].Value.c_str()), block.ItemList()[i].ItemList[j].BlockName.c_str(), block.ItemList()[i].ItemList[j].ItemList.size())); + else + AddLogString(string_format("%d : %s : %s itemlist=%d", j, block.ItemList()[i].ItemList[j].Value.c_str(), block.ItemList()[i].ItemList[j].BlockName.c_str(), block.ItemList()[i].ItemList[j].ItemList.size())); + + + for (int k = 0; k < (block.ItemList()[i].ItemList[j].ItemList.size()); k++) { + AddLogString(string_format(" %d : %s : %s", k, block.ItemList()[i].ItemList[j].ItemList[k].Value.c_str(), block.ItemList()[i].ItemList[j].ItemList[k].BlockName.c_str())); + } + } + + AddLogString(""); + } + //AddLogString(string_format("block.AsString() : %s", block.AsString().c_str())); + + AddLogString(""); + } + + AddLogString(""); + 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; + + AddLogString(""); + + const auto& characteristic_list = module->Characteristics(); + //EXPECT_GT(characteristic_list.size(), 0); + std::cout << "\t\tCHARACTERISTIC" << std::endl; + + AddLogString(string_format("chracteristics : %d", characteristic_list.size())); + int i = 0; + for (const auto& [char_name, characteristic] : characteristic_list) { + std::cout << char_name << " " << characteristic->Description() << std::endl; + AddLogString(string_format(" %d : %s", i, characteristic->Description().c_str())); + } + std::cout << std::endl; + + AddLogString(""); + + 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; + + AddLogString(""); + + const auto& meas_list = module->Measurements(); + //EXPECT_GT(meas_list.size(), 0); + std::cout << "\t\tMEASUREMENT" << std::endl; + + AddLogString(string_format("measurement : %d", meas_list.size())); + + i = 0; + for (const auto& [meas_name, meas] : meas_list) { + std::cout << meas_name << " " << meas->Description() << std::endl; + AddLogString(string_format(" %d : %s", i, meas->Description().c_str())); + } + std::cout << std::endl; + + AddLogString(""); + + 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; + + a2l::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; + } + */ + } +} + +void CIncSourceTestDlgDlg::AddLogString(std::string strMessage) +{ + CListBox* pListBox = (CListBox*)GetDlgItem(IDC_LIST_DATA); + std::wstring message_w; + message_w.assign(strMessage.begin(), strMessage.end()); + + pListBox->AddString(message_w.c_str()); +} \ No newline at end of file diff --git a/TestLibDlg/IncSourceTestDlg/IncSourceTestDlgDlg.h b/TestLibDlg/IncSourceTestDlg/IncSourceTestDlgDlg.h new file mode 100644 index 0000000..d7c7cd3 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/IncSourceTestDlgDlg.h @@ -0,0 +1,64 @@ + +// IncSourceTestDlgDlg.h: 헤더 파일 +// + +#pragma once + +#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; + +class CIncSourceTestDlgDlgAutoProxy; + + +// CIncSourceTestDlgDlg 대화 상자 +class CIncSourceTestDlgDlg : public CDialogEx +{ + DECLARE_DYNAMIC(CIncSourceTestDlgDlg); + friend class CIncSourceTestDlgDlgAutoProxy; + +// 생성입니다. +public: + CIncSourceTestDlgDlg(CWnd* pParent = nullptr); // 표준 생성자입니다. + virtual ~CIncSourceTestDlgDlg(); + +// 대화 상자 데이터입니다. +#ifdef AFX_DESIGN_TIME + enum { IDD = IDD_INCSOURCETESTDLG_DIALOG }; +#endif + + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 지원입니다. + + +// 구현입니다. +protected: + CIncSourceTestDlgDlgAutoProxy* m_pAutoProxy; + HICON m_hIcon; + + BOOL CanExit(); + + // 생성된 메시지 맵 함수 + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnClose(); + virtual void OnOK(); + virtual void OnCancel(); + DECLARE_MESSAGE_MAP() +public: + afx_msg void OnBnClickedButtonOpen(); + +private: + void loadA2lFile(std::string strFilePath); + void AddLogString(std::string strMessage); +}; diff --git a/TestLibDlg/IncSourceTestDlg/framework.h b/TestLibDlg/IncSourceTestDlg/framework.h new file mode 100644 index 0000000..8b77497 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/framework.h @@ -0,0 +1,60 @@ +#pragma once + +#ifndef VC_EXTRALEAN +#define VC_EXTRALEAN // 거의 사용되지 않는 내용은 Windows 헤더에서 제외합니다. +#endif + +#include "targetver.h" + +#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // 일부 CString 생성자는 명시적으로 선언됩니다. + +// MFC의 공통 부분과 무시 가능한 경고 메시지에 대한 숨기기를 해제합니다. +#define _AFX_ALL_WARNINGS + +#include // MFC 핵심 및 표준 구성 요소입니다. +#include // MFC 확장입니다. + + +#include // MFC 자동화 클래스입니다. + + + +#ifndef _AFX_NO_OLE_SUPPORT +#include // Internet Explorer 4 공용 컨트롤에 대한 MFC 지원입니다. +#endif +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // Windows 공용 컨트롤에 대한 MFC 지원입니다. +#endif // _AFX_NO_AFXCMN_SUPPORT + +#include // MFC의 리본 및 컨트롤 막대 지원 + + + + + + + + +// 이 매크로는 TRUE를 전달한다는 점을 제외하면 IMPLEMENT_OLECREATE와 동일합니다 +// 전달하는 점만 제외하면 IMPLEMENT_OLECREATE와 같습니다. +// 자동화 컨트롤러에서 요청한 각 자동화 프록시 개체에 대해 +// 이 응용 프로그램에 대한 별도의 인스턴스가 시작되도록 합니다. +#ifndef IMPLEMENT_OLECREATE2 +#define IMPLEMENT_OLECREATE2(class_name, external_name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ + AFX_DATADEF COleObjectFactory class_name::factory(class_name::guid, \ + RUNTIME_CLASS(class_name), TRUE, _T(external_name)); \ + const AFX_DATADEF GUID class_name::guid = \ + { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }; +#endif // IMPLEMENT_OLECREATE2 + +#ifdef _UNICODE +#if defined _M_IX86 +#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"") +#elif defined _M_X64 +#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"") +#else +#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") +#endif +#endif + + diff --git a/TestLibDlg/IncSourceTestDlg/include/a2l/a2lenums.h b/TestLibDlg/IncSourceTestDlg/include/a2l/a2lenums.h new file mode 100644 index 0000000..fa726d0 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/include/a2l/a2lfile.h b/TestLibDlg/IncSourceTestDlg/include/a2l/a2lfile.h new file mode 100644 index 0000000..b44798e --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/include/a2l/a2lobject.h b/TestLibDlg/IncSourceTestDlg/include/a2l/a2lobject.h new file mode 100644 index 0000000..0b93c3b --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/include/a2l/a2lobject.h @@ -0,0 +1,147 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once + +#include +#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/TestLibDlg/IncSourceTestDlg/include/a2l/a2lproject.h b/TestLibDlg/IncSourceTestDlg/include/a2l/a2lproject.h new file mode 100644 index 0000000..04aeb2a --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/include/a2l/a2lstructs.h b/TestLibDlg/IncSourceTestDlg/include/a2l/a2lstructs.h new file mode 100644 index 0000000..e425716 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/include/a2l/a2lstructs.h @@ -0,0 +1,257 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ +#pragma once + +#include +#include +#include +#include +#include + +#include "a2l/a2lenums.h" + +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/TestLibDlg/IncSourceTestDlg/include/a2l/a2mlblock.h b/TestLibDlg/IncSourceTestDlg/include/a2l/a2mlblock.h new file mode 100644 index 0000000..2ea9c34 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/include/a2l/a2mlobject.h b/TestLibDlg/IncSourceTestDlg/include/a2l/a2mlobject.h new file mode 100644 index 0000000..47e341a --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/include/a2l/a2mlobject.h @@ -0,0 +1,90 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT +*/ + +#pragma once + +#include +#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/TestLibDlg/IncSourceTestDlg/include/a2l/axispts.h b/TestLibDlg/IncSourceTestDlg/include/a2l/axispts.h new file mode 100644 index 0000000..7b6bd9f --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/include/a2l/axispts.h @@ -0,0 +1,92 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once +#include +#include +#include + +#include "a2l/a2lobject.h" +#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/TestLibDlg/IncSourceTestDlg/include/a2l/blob.h b/TestLibDlg/IncSourceTestDlg/include/a2l/blob.h new file mode 100644 index 0000000..8b3b706 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/include/a2l/blob.h @@ -0,0 +1,32 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once +#include +#include + +#include "a2l/a2lobject.h" + +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/TestLibDlg/IncSourceTestDlg/include/a2l/characteristic.h b/TestLibDlg/IncSourceTestDlg/include/a2l/characteristic.h new file mode 100644 index 0000000..9671e3d --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/include/a2l/characteristic.h @@ -0,0 +1,105 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once +#include +#include +#include +#include + +#include "a2l/a2lobject.h" + +#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/TestLibDlg/IncSourceTestDlg/include/a2l/compumethod.h b/TestLibDlg/IncSourceTestDlg/include/a2l/compumethod.h new file mode 100644 index 0000000..391792d --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/include/a2l/compumethod.h @@ -0,0 +1,64 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once + +#include +#include +#include +#include + +#include "a2l/a2lobject.h" +#include "a2l/a2lenums.h" + +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/TestLibDlg/IncSourceTestDlg/include/a2l/compuvtab.h b/TestLibDlg/IncSourceTestDlg/include/a2l/compuvtab.h new file mode 100644 index 0000000..bd9f5ed --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/include/a2l/compuvtab.h @@ -0,0 +1,46 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once +#include +#include +#include +#include + +#include "a2l/a2lobject.h" + + +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/TestLibDlg/IncSourceTestDlg/include/a2l/compuvtabrange.h b/TestLibDlg/IncSourceTestDlg/include/a2l/compuvtabrange.h new file mode 100644 index 0000000..53abc8a --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/include/a2l/compuvtabrange.h @@ -0,0 +1,47 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once + +#include +#include +#include +#include +#include + +#include "a2l/a2lobject.h" + + +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/TestLibDlg/IncSourceTestDlg/include/a2l/frame.h b/TestLibDlg/IncSourceTestDlg/include/a2l/frame.h new file mode 100644 index 0000000..7bb9a67 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/include/a2l/frame.h @@ -0,0 +1,40 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once +#include +#include +#include +#include +#include + +#include "a2l/a2lobject.h" + + +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/TestLibDlg/IncSourceTestDlg/include/a2l/function.h b/TestLibDlg/IncSourceTestDlg/include/a2l/function.h new file mode 100644 index 0000000..3518496 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/include/a2l/function.h @@ -0,0 +1,88 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once + +#include +#include +#include +#include + +#include "a2l/a2lobject.h" + + +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/TestLibDlg/IncSourceTestDlg/include/a2l/group.h b/TestLibDlg/IncSourceTestDlg/include/a2l/group.h new file mode 100644 index 0000000..f35bea8 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/include/a2l/group.h @@ -0,0 +1,50 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once +#include +#include +#include +#include + +#include "a2l/a2lobject.h" + + +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/TestLibDlg/IncSourceTestDlg/include/a2l/ifdatablock.h b/TestLibDlg/IncSourceTestDlg/include/a2l/ifdatablock.h new file mode 100644 index 0000000..ea4fef8 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/include/a2l/ifdatablock.h @@ -0,0 +1,40 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once + +#include +#include + +#include "a2l/ifdataitem.h" + + +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/TestLibDlg/IncSourceTestDlg/include/a2l/ifdataitem.h b/TestLibDlg/IncSourceTestDlg/include/a2l/ifdataitem.h new file mode 100644 index 0000000..2edbf0e --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/include/a2l/ifdataitem.h @@ -0,0 +1,20 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ +#pragma once + +#include +#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/TestLibDlg/IncSourceTestDlg/include/a2l/instance.h b/TestLibDlg/IncSourceTestDlg/include/a2l/instance.h new file mode 100644 index 0000000..5e03aec --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/include/a2l/instance.h @@ -0,0 +1,49 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once +#include +#include +#include +#include + +#include "a2l/a2lobject.h" +#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/TestLibDlg/IncSourceTestDlg/include/a2l/measurement.h b/TestLibDlg/IncSourceTestDlg/include/a2l/measurement.h new file mode 100644 index 0000000..8f8b5a5 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/include/a2l/measurement.h @@ -0,0 +1,92 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once +#include +#include +#include +#include +#include + +#include "a2l/a2lobject.h" + + +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/TestLibDlg/IncSourceTestDlg/include/a2l/module.h b/TestLibDlg/IncSourceTestDlg/include/a2l/module.h new file mode 100644 index 0000000..34e5ed7 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/include/a2l/overwrite.h b/TestLibDlg/IncSourceTestDlg/include/a2l/overwrite.h new file mode 100644 index 0000000..cbff7a3 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/include/a2l/overwrite.h @@ -0,0 +1,53 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once + +#include +#include +#include +#include + +#include "a2l/a2lobject.h" + +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/TestLibDlg/IncSourceTestDlg/include/a2l/recordlayout.h b/TestLibDlg/IncSourceTestDlg/include/a2l/recordlayout.h new file mode 100644 index 0000000..d3047de --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/include/a2l/recordlayout.h @@ -0,0 +1,269 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once +#include +#include +#include +#include +#include + +#include "a2l/a2lobject.h" + + +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/TestLibDlg/IncSourceTestDlg/include/a2l/structure.h b/TestLibDlg/IncSourceTestDlg/include/a2l/structure.h new file mode 100644 index 0000000..a48c841 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/include/a2l/structure.h @@ -0,0 +1,51 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once +#include +#include +#include +#include +#include + +#include "a2l/a2lobject.h" +#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/TestLibDlg/IncSourceTestDlg/include/a2l/transformer.h b/TestLibDlg/IncSourceTestDlg/include/a2l/transformer.h new file mode 100644 index 0000000..e586970 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/include/a2l/transformer.h @@ -0,0 +1,70 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once + +#include +#include +#include +#include +#include + +#include "a2l/a2lobject.h" + + +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/TestLibDlg/IncSourceTestDlg/include/a2l/unit.h b/TestLibDlg/IncSourceTestDlg/include/a2l/unit.h new file mode 100644 index 0000000..f397266 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/include/a2l/unit.h @@ -0,0 +1,48 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#pragma once +#include +#include +#include + + +#include "a2l/a2lobject.h" + + +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/TestLibDlg/IncSourceTestDlg/pch.cpp b/TestLibDlg/IncSourceTestDlg/pch.cpp new file mode 100644 index 0000000..bd23a58 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/pch.cpp @@ -0,0 +1,5 @@ +// pch.cpp: 미리 컴파일된 헤더에 해당하는 소스 파일 + +#include "pch.h" + +// 미리 컴파일된 헤더를 사용하는 경우 컴파일이 성공하려면 이 소스 파일이 필요합니다. diff --git a/TestLibDlg/IncSourceTestDlg/pch.h b/TestLibDlg/IncSourceTestDlg/pch.h new file mode 100644 index 0000000..d99e280 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/pch.h @@ -0,0 +1,13 @@ +// pch.h: 미리 컴파일된 헤더 파일입니다. +// 아래 나열된 파일은 한 번만 컴파일되었으며, 향후 빌드에 대한 빌드 성능을 향상합니다. +// 코드 컴파일 및 여러 코드 검색 기능을 포함하여 IntelliSense 성능에도 영향을 미칩니다. +// 그러나 여기에 나열된 파일은 빌드 간 업데이트되는 경우 모두 다시 컴파일됩니다. +// 여기에 자주 업데이트할 파일을 추가하지 마세요. 그러면 성능이 저하됩니다. + +#ifndef PCH_H +#define PCH_H + +// 여기에 미리 컴파일하려는 헤더 추가 +#include "framework.h" + +#endif //PCH_H diff --git a/TestLibDlg/IncSourceTestDlg/res/IncSourceTestDlg.ico b/TestLibDlg/IncSourceTestDlg/res/IncSourceTestDlg.ico new file mode 100644 index 0000000000000000000000000000000000000000..d56fbcdfdf6eac0f4727c34770c26689271d96af GIT binary patch literal 67777 zcmeFYc|4U}`!{@SGetCs%!DQx%1~mPDN~e)khut%$88(;HqRkMBs9@rPAH+2l%z67 zGG~a|g#E0oy6)?`?(6>jp5NzvKkxhe@vJ)cI@em?<5=T)Oy>yz1I!>U&WdsxaG(Qt z3jln4Kg*+301ET~+qV5GV*rGi09aXnmPJvSWj!EzK=cey!~!7AOrif(W&r5hPNDx< zZbAGbgedes%MP>vy1P+_C}DsPT9X0F5wD;8_@HP9Kyc%4eyEJ-c8>q%#|K14fLBYu z`SF1R4S)#^21F4*#0D(a_@YXb@ISM)`@jC+Q6s9s<9}x87u})@5B2r+sDZrpAIN0N z9lFpzN)_ej?};A&_Zmu>-cH@_-|Ok^oNR0Y?ElulU~d=T<<(@TZuyr6db@xCdnX%@ zfB+lUKR3|DjEp$h+d0|U8L9tjpqG?EyW(x{L?p%7+apd`3IV;8prxP)(2q>U$HzxF zdD*Ksp?Z25DQjyfYXfomW?VceF2c(xz|P1LWKgw?Mm$)yXh9<>ZA@GZx{=QSKD{4pGE@ zWHQ2Oq{-gS61*$oL){BSWJDx+h{W#^5jX^IYSM>_LUJh4T}DuHt882lIe-`w5Hn(L zR}X{=5;;E9T1HyZdz6S4p6Kiq;N)cq(V=8A$z4W7%372-5>Fn8s-cDZ42p>fzR!I5D$Ot+RM~R~&gg6{w1dWGSK_(ChGBWw@vZI7i zR2x9RnFqK6k$^gj_H%a^LHq-70WopTE#57NPc#}sl)t;XyR2v8$p9SA+k0dbN5K<) zD*U}=3MGzlaL8@-@@{K!3W#upXks)W+DBF<86^&138NzkbR7km(zm>y3^t3oY*;tvdU z^fWY{KgLh#p1~(FI+EZU85!y8>q@Ekl^BSX1Y&x6dIeghzwoa_wUw1s-iY9Dcw!~u z66yc9eu=0$+B-cngW!w*%^c-uQ3;j4kyVkAY2JV4Pgzv&%5+~}@65D6|CMj})jt|PC2jbX^P(J&%9MQISB^%%R$l&< zQ=pV~^1%PgIqGPQFY0J5Cj*8|>4#j;`!oNDRvy;$3?CW;7F`tmxt5U5{O5%KIUziL zZC;dLbo)QmGk?`E41duq3|@B4PJhxU5yQj?buV=+WjOSbt`OlvBsh6FAzei8F6rjx z8bgW;K-xwfkc@U0bmxmBQ3SW05y<9;ib%Rj`;hEEH%|uGfxjX_%GzDfhd9z~=Vk8% zGDTnAq}<$aWa9Uj7_TOX4kCSbbC>oBB1epj*m(g_mK2JFEYc@25iv3LNdA5GlgW1@ z5=Y~Rao$cqEFqEHL#2I22_v}XIB(QW3Pr-yJ5?hfB4Q*Ch@qjx3K@w+jsx~~IP;UJ z9TkzB;_%&K-)uh$@x)4hByN0?lM^@lpvjRcqY1L<1R{Fk*(j6UK&QcGndy=LYOkzJFY`^0{EcTIrdJ{1mHxX747C&~ z@kbFLvT9A}qZ%@KHHb_eP(+XQ2J$k{uW|wP01Z&1rvJ&MNMVKl`M6Ld14T;wJkI}= z<5AlHHJLo4NT%3R+t4MBuHWaJ57~bIobc#SqZV|y*D~~rZvRK;{I@7V2i3;L9`T~2 z2s;< z3<(W~0d!xHM$BPPq#O{2O84*aL1{nLW^^4IXLpR>wK!~vqb(0byHhI~&&520IdBu2#l4NA!zeU)Ge)kp`@g}wr ziJ{)!an8i(Xz%2V&E5_qV!BUSB3e}>Kz=@n@j2;hPhg#FdLo58!6$m{2_&M233Y>Z zE)6|m{Rm13C7RkbPbXGF=rQ*FhNa zoOZ#r3wt5gNgN8?_Cv9!1Qhy8!%e^aQ0O6x%5qTXCl5FM4?>QM8r%+4hMl3Na3Iti z_C#BQbd(*4B{+a&iX%v0as!!sUpP*11l0^Luu1g?m4YBB2|fsSLk~e2Q4wwhD?@3B zGL%OtL1nBm+zr=)vZ$lzUK<`Hs=_4G zRZBs`?HagTxB=W^4Zth@2zE%fz#fHm*n@ouvYOA}z=`J|ru-TXXubtG{XS5z?1#ff z1Ax_g1}ev1fX2x#IA+lWdJcVHXw?lmu03Gn@d3`b^n;B@4=9@rg1X%>7@ZviZMRW4 z;XMkrKErSUHv)1uL*VdT0%+a{hhsO1png9FG#?~`QB@i^6~%%>NfJ0zW`Ji^HW+8! z23*w@IQb|GOq;KO?bB=E`urxGYrhRHuS&u9O&RzQ-huzc9yk>`0d|pN;2kv%4vCZC znf?VF(`Udldj|ZjeTA&VR0u80ftcz7NO*W1it>t~xsU*D_v7GgO(?WiCO}%#JqUgO z0P-8}LuqR*^gIrSw~Z`v}d5zPGaxnm%+u zM|T$tysU?huO7i*UpIUl=z~YCW6;zw0Xy@xM=}9{l&1-w3mvyj+|+f5l6FSN@0moUEvj06#A;*KU6P zlm7wpyV_CzfVjB0s1SvKOC0?O{BHTDT=$5U)&VJm7u_Mm&(AACq1t}%pO8Q640Lt0 zG${mPs0V(2Ng+WrtnEDJf2C00KtsEAt;)baR|^r?J#B4$ih7U~rS!5L^GlpkAi0Ox z*jQ+3X*biVqLKw7IAS_6i&EVwix0=C0! zEX=etPEJm>D=Q8*0-wbt6yQuh$r2JN-26BOV__(FtV zT$)tLtIwnKph%eoU1Ot@!|Lj)!?Dv(C-meF7#)yATP-R`ITJUFu4ONww761FSyeR( zo}~#9%pd}kCJglt8Ed0Xe&cTz<*iWCw*oY0tm0t`K@%ddpQga4&lw%lw>qXRyGDTc zH#FS5wz~2yKTAbLNePQpqpT}S3x&YR>72u9TT@HpV^&7T4p9hp{KV(2u1;Oc$zI#H zH9T9(F9Iif+p}lwZSAd%C_U_^*s$FV4HSG{_2WmGXrnc-Sk%E!d}HH7CntNGGZvOM zj>blMhomGBzNedlr=+RuObs;+MJ$>@OH0d>3KLUP<1=S$&YZD8$@VlNkX^%f|HMxg zy*=IeQ;+NOi;Ax08x40~lYb#!$N3@mhXbd9Y}Q1FNV&EaNIaZ%p2tA0LSI9yLq$A#bk59BbqFw!FmJqHSwk_J%f>qP^)em#jm zAwUUtdurIjgGiYMA~?_S6Z!M^`&d7kLBq`(*9()A2`S-WZ)acOUe6+YWB`T0)z#(C zaDeZ9y=cBS*6{O-NimDF^Y~Yb!vO)2fxkNVD;`bZC;P&Z)WyY!_T}Zp#Mg^+2#@By z*1_NL=+ND~URZdotYm2^Vt#Rc>FukfIb1*#TG+KI|2rPK*YKq)D{(6;@hi)(R_1WH zD9XZ8I`{`XK+(0L4urqG`YCCC<=ZL+kG5j1gMY-M%8t_2)laK067HbGHy0EXy@p2} z{3rYygkN1PO-rEQ!-8VNesukNOoq@<)I zMMb4Wg$1u2zW>DkG3H~G1!kdmY{7?3Ta7seX%zu$Oe~u;<4TV4;{MXo@Y)aQgpOk#( zzu@|prkAM~+x}AV=K`{U{%?E|nStbi{}bYqzx-5W0{xLFM$a!p33r$tRQE~&r>XQG zKB};#0+=evLy(~;>=ZZ-3I|RDJ5M0+*kOU!L3zzj75L?&?(o(}eyRb8;!c9ByCEF% zGl896b|7)qXU#W_R9^=%+N{VY-2zF5=sLjxsmLeIIL!m;<^pTJXqKZGWIM`3?%ALI zX94m*ueeCTRhL6>)k6}By`BoF zD$WyBuLgkrl_0o{mqY&PVW^BzM7}B(`KX$3CrtGZAN5YSHrz)(YE_&bJV-tQN^qLKH+;>KPsRy)NLq00PJ<1P+=ePXf=L{L^OGtMCeB)S5tA z;|<6i?}o!CJ_1(vDX5%y0h%Y@fR0r!oUnNd76E-=iTqIO!1v%5)DOz0gP>_Y49Cw7 zt@)ycKBHhCi2TqScsN`d4jP$J;1!+)TE$^tcr6T0T@450Vj?J)$ACsnBAlqX2<~}N zU{{_2ZnZfOSd#~O4Hb^s9<)<}&HMO@9YTiDFy7z5R_q-S42AUvks1>qC+aZ6f1FDeEn%08+(-)Ia z)-()-t&4CAz2v_CZW*ePull(2IXwCB3i^9{;p3Zn80hbVHv{jX`{Oh`Ul@fa!z<7? zI15O9!KaZ)m>3^N{^=L^Iy(&$Ulw3`ZUz<>767ULH8JpC_^BqR{ty)Zc2g_C#mOPc z_iy!-ibp4R3-j@8=i=PM!zuXh2nTJAo%#>!M7DE@BY$?=zW`aAX||w}gNF8t>FMc{ z+&mJzJlnVZlutQWNwy8lwDPnn;H3F-q3xuu2=YCVze-_{nRrlozvL#i4J?P5Y3NL? zNndvE78Vxf*A?RD*^VsGjHH9I+57jiv29RbSx;^Dc)3nkLw&cfkghO4FApch?>pEt zElU9?ZeXE3{dlGE=+Ps4b_*K_Qy3tJ^U|T-1=;!uz2cXV{qoA z^%+BZJuMMoK7bE5u1>C8RK-e3U)(Rr_Tbsm78j@bdZ+VF=M1%WBS)vdxuADtX61>T zT)H%BZ+-ggQN4qWm6he0^QVsNMRs`qwaMk48pRB?beRKNQ+&PLnD%KOvpi<0bIifs z7*GtO`0~}fg2IAib{}s~4-a<_+&X#@2@M^Tj-lwl;K#v%?(XZQVL`~+5Abkz^9b>9 zV`LE6siC2*cOGD9XmGIm=Cxb+Ak^#^`pOfvd$_q$37-AAd2{1~{msP%xA1X6xBCdM zrae7EQ73K}{@B{Nfe$x}uHGViBYa+X|9ZhQAk5Fh-ThzfXbQzw^Y7dzmHk-$_G%fm zBU9A zw({-Us;c;ovapaq@4xr|X=HTdU3K}r_?VcOvhWbx-`l^Ab#+mi<6@$tqsyYg{@xCw zUDcK4@rXP+7^QzQE`O5;$8`J~^;*T-dvP%dl#hJ=l>X0pzx2~i!T$L@>YwbCBl`~m zm&HL8Lzf5f-R5hy2)Ba@h*)8P&*@(=^S$nRu)|9qcK8{>&cKr(;e+052AqbyR?ZM$ zZw{6x10h(65rUObyj*Pq5H*;AfMVwat&I??vk{_nwm^(NJH!}mUyGq99p8##=-VN~ zoCgw5@xet4en>VKL2-0ZNVDFtX1}D_?t*MvQOI@@gBa@raLMT)Tumpd(DQ~8)XFtVjVys&IuG#FM#AFS2%FR z8`ROeD$Tg_U>Ir-hVkxjG{pmSGX20h*%#EW1RxuQ5=&Qr61)oB4mk>ULX_YhQ5o4J zs&Fq{2kKHa;by2l6os5bwv92AM<0W7WUrLR8ADCtaTGg04iyO|DAsO@V(q7)_M$D+ zWm+S<#eL0Yxl!Z-B_&>Pw;Trzmvm5k-2h(Pv_p2vd1%VNfNT{nXu9RLX0N=s<$-Jz zZ+LYd2b;Es0|Q$cFl@~P7LKdHyuBFMxQo}~>TG-^uu0%Pu!~d!2a2zA?s@=xa;31- zFcl7IJ_OTKNx;3k9{432VfUeDps3RVl4_lB=x7JX>GXoE!!wXSJ^%{FgP>~g0#prO z!BMj}pmFv&V7;Ehu?sK2#PcPnTEBxMc70%A(+)cR?O=}UfwNw{plmS&sy3ex{xckP z9$B+#j=O#a3)f*d<~a(-1INME^Anu+8$|K;K~PI3fZi` zDF{fN0;dcVm(QI89Ey>r#^*rJjW{T;4Tr8;B6QZ}K-k-Ai0rI^50B!Yza&I+mckdl?=eyQOAu6`HzV z!(hjwHJjx_{}jCMn}zPtkI+9j3QcpLU~pgn#y_KLY!qfDhGAxE6z0CpqVJnX{~S*@ z{F4y-eQO}Jed|^!+26&V`8h4&eaB69a!B*A|87vHUk7kbOQMrRGUAfq+fIo-UzcNM zqNT!8DWBc@X7RKTpU6>u3V{N%Jl%RmS|vs*3!UW`+>(3u>51?myFjscj+vR6QI(0- zQuoK~u02BH$M;e6{k7ty;tkA9YRrshY|W8@wMYBZUNL@v(wnO@ta2>*a!gjQtdAN< zNu0FP-X{WZ?*_S0g-Nd9Aam>6j@Rwa&pVyB*OmZiyG34EU^#sCkleGUfg4X4+gR(L zb1*~7@^*2a#-S^0{(in5E&(*V51=@qt|`*f{cRsVCWVCr;oRdc1baARL?txs(X_sN z|NQBGctXhg-sm}ZBBI&!YY{&6m)(h3O8&MKyW|n+>*4u(ZQ%3WlFHSZ)vu$gK2brw z|EdRgS&nL}S66*gf^dIPa1~_ohe$FRpNkLr;m>%0iRQWo>1h!WnO%Ra z2WY(Xu=`JS|KGkp|K)E}bl2}hx&Ku@E+-0`kRID;DF@rF6k)rq64GT#z;RX;xIOiN zGe94Na7G~Ic^uBWt3&irR-}hE0YwjGm{Z>6^1x-g9gyj;8?w&HBON0I`7WYR=!Se} z*S&Dva~I^DmxTiN15n^93;D=rzUg}i`Ok`Q>8vu+L#l8arwYY>=p8e9mns}<34Spq zpb~BiD$&R{j&g*Pg!7=6a28BrFMv_17o5%tf_q_yke<;+KCm8CCmey&FhjUcG)DIp zfX}dn+Dm7UziSIo#jfxuLkk*nPQvROCh#Q35?Tt~;Mom-=tDm1Y_hKY z4=C5e0o7KJQ*D96TCYLQ1nGiPgP>>j7}QVofWCPr=$(H8Cv7^wz_uUE&b|XH*IrOJ z{Rm1{!=T~t8T7oy;3SgsM-zfU^LiMVT?qrzvScu;O@}iDL@;}i4bDy1z^$zWeBYLX zfA?K5Pn`v;*eUP}{|vs-6M%~u2k+QD11_htmpmh8l+@0!%s7EVM`)C>pn@LdfW)W(T+u(G@ei%aMm=hgqM z_m{s<_W#ZQH&@{A{Pa|w(YXKZ2X}+$O-El8Kkk~d@h{CCc$|7YYsd23dt$SAC?Wn^Pmt| zR&L^MyCd4Z0S6Br!Ud){pARuJ(LAB5qm1F$CrQY=lHz(S&h(urJm;Ra%{m#b0c>H-QVTZ3vMxyQI^MlmoH_cx!G8G5Tk!rqZ))=cX`7+VUDr41&DHR<~Cg6pQ9yd#%2nlAIQ z`8UV4$dB~wI-SsXm_NHZF(WZCF=ICHNB1ECso)Eog}?rP@O>)Z#k{TXRzY$_?Sj$f z*zRK&qgC(6+%>y~b6Fg4L9ZHLdUiLBg=aR=%*g8%;>ONvv}|pTz0(!S;7Vf2$1`W88H3_gp#POu)sN6(7=6dWaFk3mElQkQ5HPz?n{AuB}HN?=DfvU*M_dqGsc>>=MEz(kOGtQUzB~yIy7`I&g&9 zR=O?D%*Mwtp2-r5WgPHLxx891eY$>fa7z4}vr3k$n!vxpBBZccRlLSpp zzCHO@H}Rbkc56)|uV#>9m52I9JR@E&=Df9!>13Tt!}FH*laV*GI9j6tY*f6uo@=#2GHJnb4o>iAMq#O2F%+h8ru1uTxt`3k>iI7v6Csw1Sj@(yWFnFA!a%IOgC);YHo?5ZG+5A zGaQUz5gKl?7|VYR3iA99G@SSIN}aqH9GTMU$nB<7Sji`Z{}?`tY+aRQO@Rp!quz{131cPD*1v zE)OP7N!5CAmCMqx^i&xvE~jjSs_VN4vgotoHt6eazDk8VW5Y*XoudJ2RBbXzke2dw z_YQ@GDh50&w&x33foWKhYcV-Kp7EpaC3G@8b?t+uK8IV44V)LfR6#8q_u^~iLoW;w zpOo?>t}#Jlbtns5KISiT%mBMu0tcN7JGu(AvuQ_Zc z04*Kq;I*&QE5#Gf8z(Ppj?LH4jo;e8laKH|(3X$pFnz8hS5a@UHZ4uK{`ScZCFP6X z3n4BZSh7zxeV4qjKlza6C(y~h9GI-u#sJ8J0}v1a6{bdyry4$ua|a~u%VJY zJw6i6`;u>DtoGCvnj5DL_Uv9&X!RLZu)!!A_|AUa6s=brU4J#<2Jn3;nPWdn6}2wq z$PAN`IwyWOKWH`bNBLJ=Ovk`}Vf=YrcHGE_i{!1bp=%C%3^I-^M==$#;tlAk-q_nF z7~`h4hK*pdE-rFOwF_Z)R&Kfr_X~KBP;oKzh;3}22;RbdTz)B7f0IRPYnn0z;!y#dz&44mWak(Il;u8EBrsD)=RwT2)=5SLQ3S<(9D=puQsp z2YFbZ@@GA0v(D7SCrvWpZS|P$FXwH*xoI)&GM}AVsq?v!Vg7*IW^37wc&O8y zP;``*)9-~ZCwk^Ng8L1aF`+VQ33zTFosYN)9`7?c#o@Fh5HGHBu5@Oc);!a2u)rwdS! zFWT|YXr2C6^JJxWr#0(`@wfPc4`N4z5?aW6lkvKdtuuLb+crHiLd?Y^&M!Z$^OF%~ zca|x|#9$_e88)``U@+BlvxWwi?Hke=QnbjL>p2IsInSBgtTChk%^uL~rQ*9sB8DYm zeh5U+J8I(3J$t+5sb=mYMn?V^-e8`DCK}hovqO5g#e-6{KPq>g(&!-8ej9TqKb*(z z9GWpt1*^-gpC1OMkeTL>Y{4^#9ivsvMstdGI8Yy&#+ zS^M?DG2y|~Ce%X=HZlEOB!#gF3H(=I{3FQ*sbgd`8pa?$#=Cig3P~7bTGHF1Y)&7cq0q- z!S20k3(|>rs_#ac_1Zf5J%Jnti3EVcN#hnU<+Lmt%E# ze3hAw1vTjM*e1`>3B%!I-NJ&wMO&^5=_k%v&~I!(k(;d-+cQkC?kIN^2yz|?7rRY#?&y3BpACohMbremJCU@jA6dWmB?k>b}x0LdXIbtULaDm)W4PY zML8?|<_pH8z^q7o`PQbY(ireTQM?*fy3Ko}1}~`iZVNX!A)KVTYr)ahUs*e&F5YiHzsvx30UZ%6e@*6r#|2lcBG7@OjnWtVu%bF-Bh#t(RI&u2Gt*6$ohe)*$f zVb^Y#SmQIi+wlVQ3)FebBh@Cf_+akwyG`_CRHK7;u?G#gV^|)GRf{mDJq@rZ5?CB2 zZSEzEJ`u%+o}jB>R^m7&#Mb!uO%t`pbwSMWiK0)K+*jZ=rDSi#dApyzeWG8svrqz4 z^rmK{zizwX4`;$1h1X(pheNtHpQ)OEt4LdZ@sm29BQRi7sNY+f8{Flla|;JI-EtXp z4pYB-qoF~AubS!YZVVg==PS<%47~GYrr8s(o+`qkR4c-+x{ydiE5~!?(fl(}jSfX3 z&AIyzjuCY8h9CmI`Y=;*%xN$=Yk1BSPKKfWK4qrnPKFy@KcYzGb#eQeBK^RwrLnfPwA<98S2P8i)a zA6qBN$@sQ5g65r*)T>Xk_~>mMny=wxy|#9U*OW@L^uWQ>`udKzU7m8n_`TP-bzr4# zv6$9mKnU#arLX6>ncmKEH$N8*%~I9I_KmWT43MB zU(F=Z-u&R|7Gl5duBQ4!^!Tqce3JDy+#dE~NPCphJ;pV$Rx~d!)6g|h@3HirQgJ!Q zvSQBr#`>v6gx2wb?<-oHu;(jXvr0o5bC-MS>R6-*@tIBY$MPiOCfr4|ZE6KDi55FTQFeY++T)zV2}^-@PU{C3`K&T%SunGUDg)wl>r$OYBm&k&>ImJYIy7?g2y5Ji zuy0859XU)qu|6bSJC`a%o9|4)-FJ^8=!Z$BLYPB`sVgekGuu?F_F3*5R=OU>+Qek( z@Zkc@z?bC=S}vcC3))|5GjiU2y{H?UB}%vO?9HXen2qa1Qy*uVOjnbXX!e@oj#O-? zS?7F)*vsluR{uB@Z$P_egkOF*(3?h}9iv)y_|6j6gALGM#-x;u1O_tpJKxr?;=gi} zg~_?K1%F4pW}iwBS`6JnqrnZ!uhJo+fLjATKbiJf@8uV4wjuX6{-h>W?fVm}dt1_q za8OK|q`v9@MY;6E<|hd(81)LQ$+1>R1@)2qUAe3-d<7ei*Rx_bVpB5kHx)vjr}-#j zd26I*Y*Xms7pRKj))%qS?3{N}r`t1$p1ttHqx0OQRldh^*(VgeFm%^Y&!7C(l?LWY zFyH?iyn2nCdOCNqAzug|lkz}sPg&%E;N_;wDkkZ7M-S}QpR;VW1LJLm!pV^jrd=$# zHXCnI0xfeZR(TD+^-9;2RKnbe9Z4U@sc{l^Kx-+u@WX1e7M51%@q7Lz>V#dyTTRrQ zI`2-WUFphVGE!8qmtdNi9lnm^l`#V9jyOSZx=h<6bw^5O1pC4y_rN;qOS!9b?T-G+ zxjgbS_fxtq=G>Ci>p8Q(}dlaO#z->>;p<0qE>4dx1OS>+MBoCDsLUzX=+gB z#M98aTkssKZQINQ+ zB5^$yN#YbQ9?VR%I0K(-?mepeFENwxXgs$#(m%^Tx1kA^1gw!of&Q}uO%{kjCqd)3A4Ms}YQGhaF{B;m7YsD}z>`C{fyLu;54QG&kl zS)S*Jd%+StK|OZ;{Y&+Ik4NRA-K1z1mGRQtecM@l%wMWhThofmPRUcT&TN_=Dw%Vb zxF$kF#syICw-0{1UfU6q?gYKe`YzO?-ts$V0`T$)qDBf17^bhwXC9fsf!;J;PNs{e z;fDQ6#!MLBBVw?&U>sj6mTyyn@VaC4EywZI`-NLIg)T>i>&t61*2;huIn9&2Zo)a!>Ps%OT+tK zy)(mn*nMHEnd8=L2dJgwsEyan%P3_Z$n9FVTHg`&q(A;#FfVPJHRG%BT-M~64YWJL zum?wpq?XceSA2uG$Jo8GrVC(a{YHO#!NA3OksV)x@`f|C=Uag9YC;0Ao~GT(Y1mPJ zn|kycDYlN;<1MzArF{apRK&T=R8ziQ6xqB}Yu`QcySaOJu{0;!dp2tB zCt8!GC$Hmq?b+ts^hL2wo7RWaT@e<$<2Tc#(#$60nrUFr0vcmy>I+9 zJZ6R2P{rh@oK2;9vql&&I3bLTFh2NfGaKL;oJ4a~>ckvbN%W1(LetpH8?IBGSTQ;W z-ACGO_1b&u+c@;Sso$AVFMI&cp~s3F-xwzKlPVZ7VjM5K_HATa=Lp-@S!Y*#W|?ge z6nm5yD7^mSj}P`EACx z7Jd${q8dF9nKyFH=|}JLOHi+*@ab_5o>7UE;9KY}i@zNi{6ajQli>_atIK}ldw7e% z$GaI>BiQr}#^$I@^-oS$Z3zALq< zSQ=AT^)EiNT0Yr;o_|wjBwn~v-ARH$0lXRU7}%X@7`01%3!y%V|&X* z!d3b8tyXSGv0-@Kv4dplXW0ps+=DTSwC4M|-dkM@R$%N2E);HVJ?LOlzu#2czXV(2 zIAGKrSyEyfq_#xwSQ42#CvoEZ)ICq#XS4!5g&*!yGXi6gA+~VqgNn#7*~z{IbKNQqn2&Vd2oAu6n0t75beRblus{1LhRf) z?PkT7GFgVh4~!DLcfB>I{W=Fcbc>{FGr9l)rddqV5_M**p$^i{GdBfR%@m>q^{LL; zOq@He{#iiC^W4d+9=Ux7mnIy~WCx$ssn>m3ue(dxp@b@1x~OK1*Rh=6jQu#q<{MAa z*n^J+j}sUk9>W|Kbfv4oQ0H(AT+w#a-@~K&K3$Ehy#03n4d@>`Q+-fTk(}g~Jrj|6ddy!T+-Xk)htM5Ja>j-9V*Uh-MyU>!JRsSgA8jDnz zEumT2%t3NQ%K7o@I6?f8#{M${9s@@j>)Hss+h$Kr=v&wyk=BQ<<{MuOk8MrzM#}ox zg6F&*ZFHYQ!}GS>^s4n<*BC3M+f8Z9x?MBR@|?^8hf|tcInD}6n*ShqZdKS<68y4t=y;|V7v`!F4|cEYfg-+%`@TCpqBJ!7BQF(Qkgz#DHsH5CH`a4Lo0`qiG+ErRL)7m3qc6^n zQqJdApv}Nf_$d!`5hJ-EZ#R|(J%;W-UQL(lU#@~@=1*b|Dq7q;taUu6&RUjX{;X^K z39Rr`wo0*ia*Y-&(B7#R1Qkc`B{gt4F$& zGDjR6PBVY8-D*brWBgX_^&7g3;ti}U5}%Ks2@qX!KirZZ9LZ( z!>vKAqK{&UQmiOM|d6<|O&33!YdMa7Gqr+j(7v($q z8Hc3LJY%kGqkG#PJ}vxGVi;6xmyz|x z(D`QQ+pc#14;EWGF5$B?A2&V{YnS4#G^fA7v~NdlSHlC3Hiex*K~U*fan`kPBFoJB z@_c?k(2&yrwpUHzSoTs6$>UJ)R*bsn4C3a<~Y%C`K`uy&wZD@ zmQE!4{>5kK zPBu^O?v`xbr+`zK7a6%aZfK;KRI;g+6U8W&DwprC5=n7S=rGHo( zm(IZUa-wR~eqX|ULB@e3!Bx&>s`aX+U8LnQPrIlqr|iA7)wbpfuHvwxAOE2JlAqcsG{7-vUmj%&wYaN@jET`@1oGo!&i}y z>bA^?DAY~M*DmPXl>fF_XfP*qS4E55JE^A%tSx1q!1hVmv)r)F=WgL}Swdc{)V9T) z8s%BT+3UXkSaGaAc0C>cY~AQl?mfrvgjT=9x_zn2%q?6PpWx~~`g(Pq3o9h}fU+Lf zsEY8lOgPpv!>>ew)B1_Y>_)ENq`awL%170nNIaj*`7eH$U#17D=FFeCE9RgNKdOwN>#S$ zZIH(YUmE@0_Y#jd(6KPk_jypCS{Ge8r-9oD?Fyb7?Wf6HZGqo5886Oj-0^Ug*~(%O zu}JN|NsWyWW7%Kl=2RG$u}Oo)#)M$cJL@e*wWBB`{X3r^wlmU?9K<)XWhXJ~WyIIb z#j1-Iv=0RXvklHpCs$wQ`e2ikEMUD6IVDI2Dk<93$9G4H;*?Aaid(-8wP(6CUXkf% z08ts43m-r38+=YJ;<_XlgsJ(q->Z%!{`vc~n!A-i@=eWylDri>qbF=HJY@@_s}Z15 zX4!M~Y7teq#K1}QGQNhI=Xo_fb$Xr9I4F2$e$1<`ZHFp%FFTVZyKU|s+!2~HbuQRC zzbh1H@x!yDgzcMW`$L9Bg+=bnU$-{)>y$8Cd|ZLPvDC|HtoorhkVu|)nSH(eVIa2A zB3N;3xd`|xCbd}i(FgJH7Tx<|QoEkCAByTXeCs9X^l?Cd4pT;I*Fed}{JSW&y*YzZ zU|MQGg9G?OC=XKt==Z<6zc5^v=0hwF{2{T>+aK-zJ&4YAM3PVCQxyx-H5L4`C@KC< z<3-JFn%(9YpL1HC@404JkDA`AEB{P2bIEs!gHiLa9El!sZq>bMXxDuMC*o5t+EpZB>wfi z{QCxFz7O7T9lx^g@a`^DN#y zmzh6);8lJ6c@?W!TVs8(-fsyc8GnlK-#+{D;Aw%b95u=uSL3aqltuQ*o- z55`~p^2uzQ6Z@uFz0U*g{?E3}^3nxhybsKzH8M%w^|;DA_li$9IA=6)F~1kDFEf3I z`TK0997QJ9hp|Z87`Mk1o!dRut~0ItWBJ_VyR^---|O0z4z^8JQB9QiaPuhoV^BP} zwQ}ZphQ3kj=_7O7*k<*X=O@`iLldslJ&UPZKiM}vF?7dNpBDGz1GSskF%lEWY2|GC z!iXpFM~q?MhhU}p>reFXi7r7G&whDw^5d(0iczg4ix)q#k$coMZwi5i?AK4pJ_|vl zlF}DjXZAT$r|ytmJ62zwWW+CTc{^RlF7-nAn!VjCCmqolJI~=w=RF!NOoDb6+OJ5+ zp6RpCnrkGn$7esOzi6yu{YqT^ptb=fvwZ)JD5`{Wf-?onvYnKNsgc-r=%^Y;3y)wbHprSgb}S>fdqdy6*gX03_g4=4 z8!t_WtZtm+V4by448mvxjiqUn7swqVobGzKwdQunxV#FE7V> zTVFWq&4goaySt%l>d`{AQr~W@@?jbw)r_{GlIzU09tH|Hy9VxAN$SHDq*)^vyQM|@ zQ26}A+t%!s#viUo!1>g3ZzZ52{h+-rbMM26cN4SEtu1by@>NrAsn2iFi<_CxD7-_8 za@@D%5xZC1eKFc~;6;DDZpo&U*t_$#yu+XAmK@pjZ{KS0Jj6({6~Yrlec$ORR^Jfe z9y|N+2qu9FC)BrRrg?|WqQK2MGj*N5M{Gm;`KDxP6HYDe8r`MhzO6UtnX|nEM~72h zkN5st{kF|FBS{lpQ`NKdmpv6ffB#YAEMvUH(~^qOe>N^at!S0`daP#rU?(OgDC0>< z4|SvU@y+C3~ZKR)Xm(#5QgB2CaA*-!E;w{OuMEvYZLC1$aGMw0Kb&yft( z+zspIpE#yh(-JM%MON%@)OSs>;0bLS6E8<3bvy45F~If5Z>|G7zP{Fdoptbb3x6A% zi~`4p%rE6PKldmXsm)Z2lTcMHUPf}0!!CSmek0A51@yS%I+rW=%E&=`B z^@ZnfR~PhB@B-9Hg7Fk*iz&BlZr$iTEhST(O;R1kzB7G^!{2&HZ62>*;>YSYZs2@yq;w47(wlA}GzTEx3)uyHv>rGGeg1fXhjp>np{~P1NLD zBsI&&Rv6#=vR8u7 z-bdM@gk#E7sty%h7iO}_PK~qNPWL44#=_!;fKT|&#Zv~Br6(J5b`gD8*xdJY^4EI~ zeEn>cc&aaCVPs{IwQ7MNrdLgp?YzpZ1)gj{Q!J&!;+lI$b1m-N-*A+k#cJ3+XPb%F z_gF>I$ANyLdvkzBAgliY{(ag5H;2I9d-iy%N@XHbz0k!?mf{3?0iWGlvtHYZ)omI0 z>UNx7ZpN46x_KuHmJMV7_~HIa`LW>(*LC(eQ29)2Je+RvR}2_RjD9atQO<|$qt8_w zWV=T7<9kRf2?bFlA`4eZim`iY=9eZee4HGk(f2Hwcbk&lS~v1JapBhLV|$H?_#kzR zM(9CmA5MBK-K0DZYw-49G4iO>RH+3^pC6wiSuu(DCLvL?lgw*apF1DIMN0}&Sh`5- z$XUT&?zvr#(7!yY6MxXHwP0c|we0NI{*{y8nR`r3e823m5~y;w-^cLYfaWrTVXaQe zl;^vrW5G`*->jF;q_s=kcxJ}1ZbL;m)47TZXTDOI&j%{*pLMP9aT^s!i@Vo^13J+f|8@~p&`XIB1 zi`9>$<4wC|kErrFTDI`)#a3)C_l(Y0==N`VZzz+|zkQpk)>&VW=Aau*Z1~~F z@l!{#RvP=AYC}z_$4>?>U+*kz0K1v|2+ecfzqY0woRoRDM6e#OPA~~-{K`?dG#|o` zC;N<;vNLt~>75aAmJoM!#l^9h9uU}OZF#KTxW*yUnQqihgN6LjrOqXsc+thU)-6%G zjJ9>}DIuEcl@OXN0bEz!XEkQT_x>*c$Ury0fyLKdKeYV(u{YrKpZp%0Jp!$-DObS% z?YR zTK{U>#wkxP2m<)6yWf6OvoU?#qFCgYL>e+61DMb;jLdX5GJB7RV2y>bW|4?)UMadb zl1cA09+3WY5O8QRM(VMTe+jPNhbabM+QzQ^Sl?X5LPr5b{oOPj9D3~yBaeIL|NCuB zz3N-HtN?rvFjoK?d>L@H#nt68%=!Zf;xrJ2bP~Rh`f>%3$auu-BP~dPPf|XTkk$s{ zRF|IDLBQX-`{pD6@5g`eqf@PgKWo_LqA>=>dZ-&lxiK)tMBMACyGAV-fK5dj@z;b9 zitr?zkZ8nz#z5SMnT6fh`11WD_gQ-9KaX;mO>J0izUc;_(HOdaxxRwl=O2VA%*bPj zWwl1gLIYM?eFlsMzsPFdmsCCj{-s*~xOc28-hiA$NRgga1M2u0iHuWydfpPi@lU?< z*6E3*6BDhu>y5D<%*OaXHsk{p$S&CXf`IW za_66q+-Lr^H=u`psGj6+&-AhHtv^0;{|le_C|dnO)W?>7!3P)}@mGM0j8OsWAm9s> zHHjp^uhu1(Is-1Lb|~I~sxCc#O@5pPr{|pu@H-!W$F;5I?D1wXc}&=wr?3GC!aVx_ zgy5$e-N*fq7c309WcW+uE5)UMmYBr;}!f$4dr0Dk||Kl<*O$-O5g8nefYvB8=L>unIEez5LVOgjvsM~wjBKGr{e$-^hWP8@CRd1uAD>fsjs3ua|)BrqW$RSNA9=uuAfO>K0-v8|Nb8w zxnKX8C((GO4S-;*-MRp<7OB-oq5uG@N_IKP2>dNsf3Am%OQ65;ki6hI`7 zye(q|Fg!h{1n|3m|IUSpV(#`t7`uthkTza~^THFOYy=2ngT^AOU3jM?E?G zM?pn!8aVt{lQ$-Iv|-6u6P}J0vx)v^?gsrtAF##1{Th1@qdQq*V%=MD`_e06=az5m3 zK0RkHz#rWE<2TK;c0W4Z+I5>X%^196*>6mg_5ie?=U^aUe5Y1Hz`9@{Cj+WP{F6s= za}^L$d>E$w$7Nz*5t!^Z(fR5ZhVJJGnEw8E003Nru<*7YA9<|ym+pmKCjkg6fUW$D zQUKb=&m;b6UIR{{PFs9UK+0mLz)$zDRRA@>kGqVr{;{Fj`X@~ur%L*U6TpAD_gzQ+ z_`aY0)A`8*e>TyWUrc>_mhgIr5B1S~O&B&%fZ9LC1LD3SSGl9P*r}>209*d)_yX5u zN`tkJePHCiv#|U-s5@DH%_s_9b=O)ICc`NNxf2=z+9%oNCiIlmPzdzMsBze(KPPnbw}0ttm1q zZ=!XF0S5t-Af8eKV)sor4XgL}DGmiH4MC_p2F!moLAY)g?!ws!fME*2Al*MGf&QoN z0+s!t`!+9o5z1+xc-fVp#>DXBv{%tN@j$fT;iR^z0A#`v7)S#m{tEn>Kn4LHHNd?z z>mLsn3f3-HiHFoVgc3sNifG2ElD;7^fd6*lM~}?3_8o5(v)B9KItReOkP&cFF88^^ za!^ksEYJBfGW_m`{tU<}q~On=!4I9uwKw2a&%>==0GWO)Gb|Ye1_mbq zjgCR@$uFXD=oJHZElmOJnZ^9~{Mg9jY<}Srzy*%}g==E%==O0ltx;BANBnE#Kh(K^ zAm0>3yjF?DXBoR|TY<13;1z-h`NBkAIl05s?@%;4ZYBk_jQrwm) z2_clEP7Qp-b3@uTRjIP@sywS4WXpWKF$)Y#UpE5yqX&NCy19vi@0lp(kNKP7K*qpO z=(WLW8xx23AXK0x_$ZYCvfge5a$w)vgWZGGSP#PZtU#y&h`?6hr(PHRGf#oq8wq&5 zvRCqXNHXeK0O`o#Z~xPGfo}dqzziM@m_GJq(8TOeb7j{~gPyoh0jLQt`rJygQ3Pd{ zo*_#q_*Gu)|3z84YZ`FGPwVrnJr3A~D7_B;QH=0|EMQz*C)Pf?1Qgb>m6xy~69zF?c-7!t0l$(u zZS=l&5-7_A{JL|A^>NaTMgz3qA8F%9EW4R@JVH2?Fwq zOX>le0yG>1I$ogcvmk3bzV4$fIA6SYN-3cb(z^8d08H2^ag0e|aC+7R@S%r){?_@{ z6}L|mvx@`=M=tf}gVhJrc)4sRwcUs>Z;gRVrU2`h0TAUm`PqU*GS2U(55qgW&Vq~! zghQasjTHP0T5a`R?CX3eHOBrcE?Hd-k%7j?!NhAgW`52Kz#uP9(T`~dO z@$kjL{N|Q*MC#Qp+zEhyTi3gVhT(h9nQHydDMCHHY${kHLJ~yDs`V7u3hb zJ)ezW$$a&T8U{30fj# zkmne{mL>vmydbNilGo=Q^3gQ=b=w*E3l~d7m{gsU2<2^KOCL!@$U?VkoCc=W1x#U>8`goA-oJCR>vJ8^rt;wUgK1ownPAb_t-BiOcuLupKo4%TfFAKi~6Ag+KAg#}EB2!198 z?;5bbo^A(3$D2qJ>0^F8BuEnM5=S9CttY*%CgQJ2LDqE~`oDcEimQ*Ic-eQLTsVTV zIaeRzvDWQn#}H@o)*kW4o#fK(~d@K>m*LKQN6XfR8=#?(1e7`;SjG_8w*6 zC*VX>0CDOri*xm(IKEG00XPA_pCANZP6Z7)7$}4gVg~Y{kEj7sBLJZ;RtNAMz}RR( zBH%;5;tm9I*mQ6YokjV@kD&KwABJ6M0J8;(t6zb}%f1z~|5Yfbc7t3mcFGD^qZ;Uc z;%`CMykpBZ$Nl4-=%4E*om|%!7{JG0wvbGi36xv?I>4q1APxgEK~{mU>P6i#P_h20 z?C0Z3LAiH{#aASvt$#{r@%Y-U7^i9)NC3-U`yUsk82b}4l|H!@Qe&}A92@AWs1v8}saaFK#zVq-I%(S0IcXIFO8)FSt|MdNtg{w+j z!;^cql0-d43z~qm0$7&dke8$;!+tsNYsp1j-x?C(o1lGm;pWWx3kj%w6ZZtF9Mby6 zsXo;bz^6|Bo0}F|FFrm|EG-f_I4V8F6!7DWzI0jp?^*>|GANlWh#-Etni$0EDzgKV zslOcMr$|5m^5TU*k~gF~7DWI4-IwndJ?S*-xn zwPtv0uxrxF_T_7>L|vNS($(3SDItK5o&4n^bB)W7FSK5KJy1aA?`xTlFqB7>MCGHz z&y+zHBZwAW#pn}vLO&NkieLy#Ch^#ia`Kne0hFr{)&od^o?CeZ^dwMNGh!eS|6mg9 z{PQFq%xnLXe}~qK|2uT-%+MR-?tVX9$0bA}_DusTJo~Vfe$F1|Nm)zd6bBj)VeQk}kKTi>` z6xR!IbwE&!5?JE{f>I{{z|a1ZQ3Uqe5lMnnTtJQ!EIiLFBreUoK+!dj*Mf0pNFx5# zb($ceixA5uf0gwanh(`pxa%>r9{y>x4o;!@vR9%wb{)#OE6{1~Lf`pwY*~lZyFOh7 zYo;hDD1a@y0Q@wNssll_FtF?MVG>dW_?k$n`2_fiSbVl>{Y7y=fm?4^B%*_Wkm~_e zf2?E-|G}wo&*^`4?PBv~$7dRcj~U~wek#ccVF1~KlC5|0;7%IwOGg3_%SfHk!fUs| zmk$9#M3RUBMpDOMmjFRs1k#}39`M+F2nzC^VnO6DCF=y(iHney9To9s@Jk0&`xAi8 zC)ct0#2V=DKMMNYkD#@C0(3BgFA2>dGQBk+Yp)OD>6`{}w;(8uzseTr1ZshS!Gr*AmXG;<*8 zLn8c{{|+$7_@Nao8#1O0ib%-V4|pWQUUv5unGXc)%$uoXEw2Ux($5(Ea;Ah2GmDMeNwG8 z{$;9LNczam0zNlpS;{e!JPUqDrt+9wu|DkY!shio}NCstl# z{0~lzo?C-K2bMe$Skr<*fdc-sQzbfZ)PsPXC+;wSg(z4(AOIeb9I`nBmcry9SbwVw zPY`lSJ&+IvOy&mUBLm@B!C~-cCXWJBTnE3LJo1~o7!+bX^xu>)(#|LyE(2~Pf;=x9 zEBWeh-(VsEyk1-V=qIr_F$MdQ*P%0W6djsEudKh>F$h>ww*q^DQ{lfF;L|AJXM_U2 zKEtg)=Vh~M52-dKM8MZj4yP5sm;wf+M(KJ0y57*k0H%OJ0gDDabSw;-Fos|aP`WOh z=|#Y)AR&2yFY5%5wf;YEH3C+S9f+SFRE5kPAhljSEeJjiDE_iSwZ4$3Xx2E)!+_vlS5=aC85|La${-#6 zdjbglEkQ24Er|2gZ6w<{@4%l7b0DYkL}7pO>-Ar9z8%4VzxI?X{R-d#PgY%l)v{g+3MJQ&bv9ML6_gyIbe0>*)@Sy|WiHDC|2U}R!qJXg$wy-eP zz!vs|EsAAR*kx;r<%fUo)*VL(jltkY=m}2UY==H|K(q-e2|yqOQ^2AbhVmv*pao+} zkSPJ`!l5TpUym?wOd+}fRzi8XMVI&f$*e=plPCmvF^7rjfZY@p0&#X<3IG8-pZHMl z`&Q}eq&vP?zsz!7GWhvcsQRjPUkv!wHQ?6PfuFaA^|5R`f8G!+ZcUph-B;J05C}|$cyzHO7_k=0T zvbA>E7`y!7Z~lvKdO~POpA9MY;gkq!iGm#Z)K{P}Fs6aRG+<2=Ad3Q%urvXO9>|n1 z=modI178Ay9MnS`>f>QNjvWv|1tDYJD}E1pKiSAH`}zp-PyiD}-8%s4BK~;?+!9zb z;A-*!R6c?g>N*RQBp=D6@(~a2^$aL=ulRr(n01n0TjvV+8C0Mc8-Y3&(qqZ_hkCf3 z3iWDP6M^n{HNe;HQ`apeDF5GSJApe6eJ372{OvH-q9`n^Eno@@Q&?DQ{IVwi|A16s zJu#R-2o|>)YjMrb|IUe`**HN&%huTC&;DOO_E-&uUeKu_7E3xWb9JQD2!5yzo0TC? z2%tXt(&+;spb2Z5Fs23LEE;AK4qX`Z;7lJ5T>*0H>aQq*?6ch|SaX05$_s*OR7C8=0|{3u9Q@gCzC#hi-)E%Y@!f(iWPOW%q!dtVM)c&l%0p@45- zm=H9;dD(vFb2lhqsHJCW6Uka8hrcz{D+SkW0qmevN3k~6Su$p1xE-C z0W)7xZS_gr-~i~v$|R)0Ozxx}F6#t1C3>z8LL2O>TX;ffm=>C7p`?Czt8f=3bz#vD zq`=P%5aNSI6ebYqNkEjk4hU_RAuxnau0T->em)0(p=#y7BE4woRUR2YN8|-|3arCF z+dZhhc#Z-f$>-qIz^oyKq-|BQNrA813RRy1vI2f${rMWpwv>45tbd1q5AJ;(9z1eA zFfolrp}}qf0Tc@K;aB+A&RJs;ix0yDU;+ssyhX_fDR{dS`kygJjWM^t;1&S*C;#i8 zJ!%Y=jWNrBS-$&UzwLQX2o334l@2aFKazoT95Af8NK^spCVT6}9mvT#Q5DXiBt;1D zgiu(o5SnHZ4m~(mqNFZL>cAQYXM7BShx_=w032A1F9bo{&JCA{e`s#@@J~Vzh}Q$j zwc$Jign?VlhmvB_B0%f&x{lEie^oc>d}@u8Jn4J})CBw)80F4Gor_*hfu9nK27a}E zeZA{QLD$8%<#WXxKK#;~u)6C?FY|4b`X&bX1oYN=D<9WI>&~DDFB=Vb6Gp0)8bG>E zmSK*1GBCHm0N?p*AM}JkScb7D?)+D8xew2?6z2gjNR|Fd0Gk8CXH`c}t^Tlj2IWB| z`skroZiqrCjE^4_riH>zp>$msB9ycV3WQLi>utS^5&)hY_&Wn?K9B->B5f}s;vcV> zKu`#9FjzD4P<2pJp8}E23%1kx5-??XvGgiG5d3xERA3asL|%V-3~4h|o4L2eE+PBq z{V8i>+&^BsGer2SL*I#iJbD9cVbNfj&sJY60B!Yy)Hg*0x0d+g1_-dN+76koqCaI1 zBx(TSf*R>>M*|t$0szazvKl zAs#*jd}8VA!CC<>lL}ukr2ujjA^D`fNFH1LY&S8a27pOheW|Yw{8D{dpU;PR7};?L zkxK-6UT-87sN>{h7fC|b1$=z=3Vis=??Jh6Fhutw@J(3uWDtgwZ3Mh!i>@rbv3}TD z6oAzLkAHn0aTY7P0ij(&05Xw{*F(ztoLK~LbNJ!9fA^Ow04)Pp2C#hRuYBVbLPKt) z?yL-04fa9cuLCnt27Z|Iq5uFO07*naRQ??Jy0c{4$YmWj-R96kw;w=b;0eLB(6Ccz z**WxG2hNq~Q5(*6VN4$|{)3`ElCHpC_YsewVCBoC@(Nt3a>()w8V#U$A>#GG;NiX$ ztW?P-#3a|S4wz8+!SzXAKRH?9)R>X5x z`FLG3u&Vsvi2oMyd3{0{IeFBr*XI?_p8yn-lUUrl2eh_YbBvs%(qlQ*E@>mhVNIeq zt50tuB5XRshi9(9JuiPd+{`ZT#lr!4{*-IzY;!?`#RXCTmZK4@B{%9L7w~h z3CLwXUK8h}NGU}EngG&OG-&(Roe<0y&ipP#@I!UVJmSxvrcyU6%$U&t7SLuSP|Zi+ zR!PF8;IF9z1~@KHoD24@lk1X9@nA`uKn`&sP+q!5?ao%b4c@==;uf@NU)PRj)xj4)>K< zH%QgbdAV+WhYODI!9CaDi&wuzhW7L%9vf!vvBkH>0utD>{+$OZ!VeDcDZq0XASeMK zl@Zwzh`cOcY0Q-q3(79Hd&|G zx@xTzIZ#qd3dEW`a?obP!1c=Ug>X_rk#0@O`h)z}fb!#$L#NyTbps(7pkXIa*a^_? zMYQ+q!^*4M_;T5SJ-dpTubjiu<83TGzJbZ}eQ;Ny*h<|u-Zvux0G}-8apx=FfwetXrgC4C zfR_FS$q=6bD}pSL7bo&W3tkECMF|hX);{&|dA%>|{~3487WX1{VCOJCc-uE*ObR(fb!|D3&mm9JbxTqJ_z zdZpySQxPJl#B?fvXTYrikOpq*LO|uy`uGH5o~rfnD+l?Uxc6uhlXl5QzC{C$6Wjf@ zlJKD`uE$r8z5z5bjYd(ZC-&-w^pFni*&O7lpYPGERR9Fg;@gK-8)M}Cvqp{Qg%wc+ z$g)4@_&U1`m;&Z!M*xdUf_(`8j>s-^Azdc?7d(3Hwj4;qWtE9NHkv@RxeIz0pJpSYuv;pRY|0+|+s|M4(9})ThDD z^#Qz3eSP%`FV@EuXz3n_ijS3%fL@l>im*byLxhh{T!y<|{SNe(4#|WbqyHK$`GYTC zWRZL!04q{m&)Q4<`YgB?thai7Z4C)%$YiS9P=ypKz#e4Lw?G1gF_>>yEHny~{Stj5 zIOn#J04g^*f+m&NNVkX1QWx=u?nnSY*(^Y@)`-W_WWyF)I`uH%^ROX2z`;O5cFeT> zQ3WV6$bOCp{r);OX-(oA&0-48Vj5;{0w-x5Uz=~>-j_Df=sWB=+sEZAB@Ul0abVS9 z(hPY87Y04xlYy1bs6qr;eL@(T2#~Dj`k?BAl#7HB2{^qTIpIW-$&L%Y-a>ck*gpRy zwD5sL-+{9)`)*ik(JZ{Qx60qogM0#dJ&P|HzqbPVWWtV~sFMf%z{7X`t0{@!A5!`j zYqee#irw8nUPB$%1QMuWf+50Ss<7DGY5+v&^-BT1qis|G{$_1`j=u(vQ{^;ih#V$D z-Ed!}o&@-@V@Dux8&e`8-9DGAi3n;J_UGdY9Z6XYz^ub3KcL-R12uugnMIsGe;!36 zbhbu;XAU)R_Aqdt0UABRo-kN5sB4x2AL(&x+It}k?S1Z5KLDEB?d87A+vkUM3N^$RBKk!b(yIl& z3i^S4b>lxd0RWbt6jg)(D4*U$l(Im8r-Q`cQx^Oq=#mP@14tmt4N3)oJyT6g!=Ud< zlqDs==lpi0M%n=&zyVUQ>5jvo<((oJ>+-Ra38X6^g|cXr95W90MM6mkBtK?ePh<_X z%~i`fO)&mgA&w|*6c>UBrZ58jXkem0Ns|Vr4^QIs;Yobn07chf>FEv*p6+4)=^pm1 zlxP_f+lL6;Bu_d&0IXR)R+AG!3eH@K4XzvE6YG%>xXsYVi7i*akH`8PHSyuA--7d3 zyv{$hXDw_a0^b&1!drecS5MnjLwsW4WnR8f(|9eQfXnxXRG^Ltg7F)DeSd+pLqHnH zfiSAj^MFq=UoE+npx{iyV((-FR62CaG6B5gx7P(wjF0q&rPex-1Bky9Da*CMQ~7}K z8o=@e*+RrW(uuO_VV#cnXW-9|=}1tWZHEwB;xdTxQ0pDyymMpN^^}_|eL`JmH(~J1 z<&!vb`6TWKq0x2Nb*hW~Py65Qb0r#l7Z}7sgf(F0inRr<%h%PBS!JrJFReQ~PeJk6 zmE%cWfLa3(aJnSiv3NDU^6Ga2lQU=*{8A1-ZPzAp-&Ev2jCTzrq7MsW2ng$}miY{H z6};nVyCl(mL=s38zlpg3Rv`gI$#3|24YHOHY(yjEVx(!zWTY^d^%Z$ z>$3(Z3X@oVzOC^)hLqlC1L+X`34>FYPvF$$Eu09~boWV52A7@cV*jb0w?hMgn-W(& z5eQSKdG3^|4yf~u_g!|5_c4@})zU6yLc%dRMEHcA!`;W;iT=Kq_?L79z{h#}*|Yf} zk0i*4WGp`h^$_!b%;IC~4M05`rag9c6;d!nH=Wc9z#1#pA6!?31ZwVgD4UZ&zR%)B z6N}-aE!}>ZfV^}ufF1MB3$krUG76x!7I`Ai?0St=xYv3o~ z7f_~P7d25A@#p%7kboRR1Kz3i;pZi*skith?FI7Ya$?t!LSBIkz?uC`oW87q`(HT) za=_lFJGks*5BpDbaoN+J5b7*F__`wZk=6pDRlN>7}9R^4^_7i=F z4<3F4PQLt~!c5NiXZ2-Vp8;QE`SWSJHv01t15m?vB*T1B$}_e^<|C2-5i5cC^~nUU zL?K>4vJbdi?hXtffePm96u$u`tij%iCR)~@*YDT+`W4^bZL5iWtliwsf0`z))O?hKPfkL$3z$9>zMFGEwfYcy@Aw0dWg_C=l zxbKxya75TA3ZaJsr+V>T@iobbRRk`0Lg_Jn-t9 z(BJ>k@RANImY;!dlX?3wu;;Bm;v>4++A|rb;k+2lM+Cj70EE}d`6WUK5fA`a*^Tsx zz{m?_W!s=zyJZr{eFI?kL<38$0{wo8PPg1L=(l|oK!e$X3D6OLw&a%@@vnd|CmYp? zV_8KA$$nwE67i4qx~%lz(w5uTIW61SHyk~OknCJcY zJXm#^nlhSjPIMfWU;JG-_sZ`@Q50wt#y`1N6fhRqlY2&FzWDbBo&YRF1;B()%L~}G ze2>;YBAx?v;l@zVO$kq!nQ(CwAz zmmb_iae|L?t`hNgj>HY%KDZsJ5iMtp)nxGJRzm+x@~Jh}3gO}-{=mRF{yF$FAg5M8 z9M`F`7ZdSEYW?|U`RB?Zy~@9eEWNmbb)skiOtj7lis7%Ga+i@Fmsb}2$$brc?Fat{ zOj?Vji2_p(J%HB352AedAFy%H-RPZq68&~Nv_&0Jkz6$&J3ik}1M;yJT?VnKr%S>| zW{=>Z>wXxR+l`if5ohw~t{T(NAInwKcl{^Kf(n3@x%p|34|4JI>+anw3yojZ-0&JX zKA%7bQePxX6SO)LNG%EEdS8=(8X2(0VE04=i%pAO-(j;~1$pV55B${(`K1bA8%F_v z*zr?l=g!YXYhLM9140nti6>6u;KAKB)?3x1iGmbRRsD6~hjUrIH7b}_=U#OD*>enxlOz+f}O7c-xqPid`|`u(C#~I z^d0E%)v%Xejfw9zSiH4?=_ejR^NSClyzkRkzvpAl3Mw)&9mz6Bu`K%^u;#eMiv zs++^-ss&hx9?JQ}x&0(0KqTlNNCHtEWyt`u4U7GgO%Mp1Js#KR$UZ6)eCqNX_}lgv zKqAKzKqKjZ3Gi#cFLeM|dEx+e+pF*okKTi)E<8*aq>FBF(~{41Dy_(9P9pGNzhyU}^-DU|K? zNGJ?!eIBx28wcQtKH)>VUWSw3{v$9`GiX{Hqx|~)d~)~8TfdDHfnuji!41lTezDWlfnNjfpS=1_c-<@Ch_~Vg008GMoW)n4dIa}8 z@KJp6@lRrY7h(TpyRd)%BD8xDJ6Q()aMG6=@z-_M62XXwzjKh|`|`>#1;5_k^JulT z9H3A}pl%|Vq>Lt^gwT-vOj4fvDRDiJ%P1Coy+>HHgiH48@A0tNmb;oDGB57xu-=2uSD3qWA#3}}< z$iY1?^Vv3$n79v(8kalyOB>gXfUondUvR_{U==V#sdnIV;5bU=d zMC0{0V*Xzin0ew6%zfzr;KZlV{?wi5o;r!%#+ne*Lmh_?AAKWMuYC*5)QtH0$?%?u z!+bK4N57y$1^0~20k493P~UW5OAZD;&)GNX%7s5Buz`)&%~u;g8>g=ggBFM&PgFnv zctQdyRFJ1e;pP5x0d#ua>X)Iv4JLpL_!{(jIoWr6CIZN7!NvL_1;2Dg1%3fn0{qyK zN2O+?h0FIJ#pU~t;>I_=9e`H}kDq)5pZUUFc;Jy`OwE zRbH9I+%K3|^RLjXMl_y#tN?MGi)?q~kKuub@5PCS?!u|{FW~UuCG6QVhi0=#)Jm=V zhhE1;8PsYSNY0}!;xBop&o=-)Tq?i9FGP#$*Rg`}MOfQtvW3Jqc$xSO#+vvtM91sS zZP4J4>LZ?Gby?kN-yR3_DJX>20?fC(5sg=VCw5H~cxO>yb7K={o>{|Fr_bYSPn|{A zQS!XLRd3^(MTcIBw_X230DzU%v-rYS?!!NR^*(&^!9U01t|qR! zYF}u3j3cD&g(5aeBL19r;wmU&$idG9$)v(v(8O_mg~SkyLU`e*ZWjOnI?2aL<$XI+ zJX-pM2$c1YWg&G7c_Sw{AQA+{ma1zc_f*yAh|nj(X20~Y4*<=@SzNVe0k6L1DB2qx zoIAgP(<>V|y|Rj4Ny#g@lDG1(|E>rj0^Nq|mXd((Mj`YHLU?#LSZ}!)WIYKmQh7f@ zWC{gzo-x435a)nNzywz=>&i?5)&RRF3M@?&DEkiUopOM$?`r+{TK~Rg9jR?X4%7{J!fpz7~rAUA+q{X>ic*C_f;0@Q_fLq>r8~*t3eh+8yS4o?ONBmP@G0+)A z{vuQr1G8?w?4e)wKxEOdlaS#(5TJuW0%S#yvN`~rkE^dYD-##@Nr4?|=eDWZHTaY5 zvSYp;RW(4;`h;u%l30r)pdTde8S=h(b7l%hmuB(u=0WtkU97HkaOOfAE9;x+^aE=s z0`N#H_;ZcmDY`n~$JW=V%V_}rCF#&mW5Q$A;Mscs!YAb9o(e&SV-v-B032kL11QE( z@<6P=)(_2}o#0|P$IS-e%LGSO#q2B{Gx+Mr5 zSQs>m2KMh=z>5y=g6lb~b$VFY=wM}|i~qm9FORb9D(n57TeqsZyQ;gZx;p93Kn9W! zAefFAG$@!xoWS?uywv4W`?;3$6cBhKEbT0wpyCkLdQasc(?WfyU=lz;7h(b=gcp${ zBoN48I^7w1uCDQp=X-ygv-kde-`?jARn?iiyVvcy=j?sH{Y}5$-e;e4&uMk?68PmJ zo|)>~g*~rhxluzggK##gyZr^l;$L1vhP*s|4@g$)dIWYpkN5W$!08CpF3W)3o9ozG zA48{;W2M>dyTadV%CATN975Oni#jBU!9B`;y`>J3XvN1qW| zgl!Q7*)(dWz^_Jk63qShcJ_GJJOO@7UZGE*D>*t{V5QZ8ESEEcu?#cQn{oEsG^CSb zx!uJ=vx9|33(ZbRpvb(Q;SAh6*S{HB8C{@M%^CnH7ZPj8BsZhHpY)d(8r+tX?-a<) z<-uaTXY2SF&YY;DRuil?+vRorYS2e3|B4850<{A@%AB*a0F=a_2d#}L_0)>L12kuW z20kUY`SA~rI;Xp2$mo$?2>tgUg2LIsks^X_-a)I~M7!HcfS$q6318ZmIiDf;%Z{W@ zr}D-hKZ57w>b@ZlJwl5IDqwY>5RnQ%Od#+?5c;p`!?(>v%OJUYdJvAWWDMlU(QN~( ztqzVY6?mGc)v$GZ3}XiSWN=;u?)K=#xXr!L#xxl%4#> z6aZN5bg?yjA3rPxaWJh*+!=v^}EUQcz3&QVl6=8_9?Kd zX}8yLX<4`dEEn<%{dX zPG1M8kci=OU!iBG+eWM1K)c&Qx7$r7u0CJ33C=(a`?9P&jq=mw^5bvyEfb9OftKM1 zQ{Q*s6u{`{t6MJeRh{3bZ}D{lQq|pj5$Mf=U;%!8Lz}-{eFKVmEO^y- zq+a5o0<5pUXYO3BU&(-NyOyxJ`BvQY@1MjIhfe~XX;OvzSSQ9ZOxA1I zJy}P6^Eg(zIhMP{?aj?j7buqefElO!?lwhIUJ(P(Qm)r2 zlEpD}vKfqYY>yTH2>h;1iZq}>AAz6q$mI^=_POL(=?a#cg5yi8$WX&XJ;Ubu7|xm) z$N1(+EO!N~-5iUp9F2CT$RYO&L6LGHu(&c%SebbrxO0XKz@}OaXHM2JSx3)eqtB&wl_%k1nE)?RehVFU7-;K7hINi{pxgyat+`Rdl)? zeeRzaX@uA{MGUFq7*#&)RRWVg9H?oAz@SqgHejh7eSLeDAAGIq!3_fu0HMDylPSLs zx#ACRhqfj3hYJ0j-(2n_NKFw*h((SZD^0<2qYcO^1cFWVIyTkEuxql8iLDb@=?GTx z97~-XjaE0DB+$(Td=pR&8RjNxn5ox`QGd0GPB*N^Cs+D=f!<8xQ|I++nxC5X6WIN> zZ_9+gzT$5M_EGEkNUylAh@gI?7v*H{QeK$#AW*>;ohT4&-8zZs>2Zh%mgRO#o!LaI z-9e+Xigu?}0p2QL2g2)nT%M{6r0Id57dG*)6XE*^J_#U20Fd*UAUZ|?o^=;3-wRbh zBM=%}RsXq>p>)vTX7EO%xFrwv83_Em&Y078Ns0jRCtR$1w(Awbd#|{TS?(*YRzeUQ>VCpPc%a zF;JKL%Jl_L1nh$iD0QDiQg)<9_K;8{=^PkwEAN=^iDAn0Utaj~&8p(IHt zVb)(Z_A!vX9U$N)`tjR&XzSAtVfIOng$y$|&cj@=(rja?A&|ue0AR9S!=`!-vy*k~ z-ZF_sSI`77E`rTjacASHW~+EmM+InmUh;Eo2VL2BVD>o=KggtSP%G*^d2A>FIA<%c zgbWM73%AI^wI^b5TDo(SffN*kOL2rL0bgbxN?EQw6OXYo42KBLeUQFBt>;TLT4K&KqA>j43K>o4?UAm=`)P9k7ZawsR$G=7*a3vAUP8Omh(<&e@BtU`G^+To-ZzM>(6>u^QOEj3R*6^vF48FmCkPOlBtm@;@GC-z z^#=$P9&~iPA{K6=fzI_#A8T`HPq~At_Wi-{^vp@`0CZ7x(M-X`s|2gPwx9fEo)~cV zTjZnf(P*!}^J#$Sd@j%Zi~XP(FZp2uO5OFS!Cw8??V{i6*LFkr=dpc?i)AiocN=K5 zm(c306xZv4IMM9i$~J2w3$0XdvVihWZyf;I2E05Y&VbwyLy87=X~mD*ys&s8jue^raR5 zKnXFpT}2F1+n@E7+wBqPd(n1jq6vOVulTEeh)DR{+WVJt+K^pXyvzOTw!-KiZtT$` zJYuk0Qb^S41wE*CcE1{M%^HA+-sc0i&Qj+NoQItf{-G7(!xaTL_1bPY5cDaVCZ_R= z-}lE5$+6s6z{7{Xg0CL@Jnnz|vyl1{CMJQgx<{2taG&Tp57$o?G>TTr^2tlUM$n6~ zOuNest&1GPliCIAPD4&=OP^|32p4ZRr&&$hwj7OhC z?*ENp0RLhTFk`OcwcR2^oC5fgVQSNMTz39TaoPDV1@Kz5yG+Dll}_>)PVSyh}0;nbl1cafTv|DGN@Sb46~;2yIa2ohEi0%)JFvR%_Qb`p~I_A}OJOA_#&=cOwmopmd9* zAkwWMNS7!L5(<*i9fBeupp-O7rx_$?svMRd^c4o+RM*EpG1Y44Ac?ipSm(Yiax4YJ4d2PJn76zj)! zFZLyE&x;^+1fl1~{fxIwFEMJL1zQnfNbR6mnCfsn)ZJ1LsvO~oeRU~F!`t2XZ0;59 ztJJ7w&KC`#8n}~na|-8#UjC9YSGPN~<5ExN3|FM<9*!jzYvp@YqG)bT=xIy$JfCnq z+clYdNdHsUm1llQ^X26#%B?Rk8SQKFab?l=8nW za@+8d2BU%(wz>5HA&Q+I7r(*Q&v$lUh`%=2>;axa$CDhRbXXS34#c&uZNL;c1`zrZXz9kHVm z{_GV|2_1~?MOvh)n?k6-Ob5-H^XgFLY>+oz!tm)h~hO@o| zMG~94!6$zvD{`kZ*EG^iEjZMMuU%jc^z~h-Um|V9Q*GV6xBmDMnG=pNZdvde}NPN%b8&wK#DJ zTk1pLX5PlB1cN++)=qTH&2{~^n-96d zyBXe(ElNC$(PJz`Z%a8$Xj_onh!H+|aU*y4jKM9p{&!tLUi5z5bZHNcd?=PGs_#z! ztgNima>6^mFt*#?+Eyjh=P>GAXWzN*v&cGg0Vy}{$azoV@GFEEW39Dg;yq)y`)i}T zfdd1dR=b>xh~t1YydRCSwe;hN^AUf3Gk8LPb2WsV~s$1r;u35J*rp zlhord5h$Bn5a}*FZAwUcYqMSaeG1mc?RUyUhV}aICpqrcLXx1H>prH8S@y+51txNp zJcEfoe9U@n^Hp3CYNHm>cf1S0+Q{?{!;_#rWJ>FPBK}f~%)>|rt{B&u9)0nh;17*IcrdLK zEQA8@(K!=`bM~pWYVkZH=sGZ~9$&I;{l4ikz{MXx`2Lf$m;!F?TJ2Ui*5@%=IwBi? z>(`Zz3^|NSD99ppt~_i@Fd)5w)B(pL)r?vc_D4Doc(!ueuBAa zYqmVvCd*;e7=I*bx9`{k!8t-P)K0=^%or4Ej0m0lshyB=6$WqYWYeAt(*MB zWk>ZQ&rEK4JBt;`En>XBjArfN4ED%4sKxjqWzOyK?c>$w$|Ib4ygmVosyUV`4& zI|qH@2XmYaIK5Am2EH_6EqLaS^Km-Oht=1KSGIVhF+u(ST{)Sh(3)=C?uo%mABfI`K*C%s?*fl&=_ zt9ZBCdsK4JJ>oX5b~UWha5Oqn(qVHNKXVAuW{fQyRqy(FI`-bB!X7@Kca9he6`q&d zA2pWyU+=s;eEK227=Lb9mVbXrHp*)3o;Pn2TX;`==#G{09*(HGS0_pAWwzb3Boe zdXj?`eUH;ws!iWJ^Oz=rXeU^wC{QC;#K#tEn08N@Z|kj15l3ch75F;r;A^(ssuu=0M*< zEAP!1v&XoK8!608eC2WlMscGS<0Wj<`@Ah*NOg(ZmeoI|MqOc&jCvAcO)2?pu+47& zUIQ?2Erj*+{MFhNhJ5A1OU!rz99(z)CbVLo5xCqU?xGs-{ z`caYcbvf)f6tBMtAg{ zvBaH@9#gv$`)ZT7?k~|VJP~Z@gk_UNb9B1})_CZK@d0&CxL*4|R$HA%4zZ^;y^`Fv z32n+(0_@i6)l9RzxNKZFywXQnCN0;oCud}`P<36Dl7S-qEv@{*%UzP4FKE`N&BV|S zA4QOoy$|>jjBgrnU&Uh)6VKy9k8a;%at7-MzR%^h6CZyM z3xm!b2S5ZjnWP zRDB1{`+#z>;jlMQO3OD+oO(vTaTc{pmC;wT@#$GK#kkblsqar`d_^_t71+>E3Y_gz2~|y3t~W*e3RR z;P38UE5Oq)XnpXRpSn^1lJntfT7mIty!xFWy9=&7{*Rx2@;qBcxWgJ5lZEnQo8+&G z5>qP4$FxuOyn=cmz>Z~ftL@glAGOjo$%huIk+cSs32>wpq0`Fm%#;R?p(v58okns4|qFVqg2+=r(`xLR5Aru!S$=Ys0)$Y8Yl zDxIIz*U6A?@Eyu}bMr#@LD7Si&HJwBxM_FPhndL}LKG>h z<}%%eK6;cYXxHj9HBjO37H-gEz7T!yTmAI|ZxU}n^3gl;iBAfTcNqOYiyD0RSm1fd z3$Kj89^XDgh}5A4sr(nTV>kHw{lt}>xf;~yGrOA+?a`RYVNTy7t2`5aMpf=Uj{8G_ z=NCz|@axBkFmv!maHW)UF|DuyH69s^yct4b_mL=7-sTwD;YX>Kh08FnAG^B>Ds<5*LFeA>*-#cy zQ;}(tnx_eNwx8+*oMcpPtGrm}B(cVs3fg=>U67>Si>F}rkn5Mw!|_?E(>GmbCBqd) zcP%&FTM~x;?$#;(RMXw<(@SX`H|Nd@C3Q39RAsLU zlva*1l%QS7z4evI^Ul)y2n3Br?6t?0{O9i6Tjr5(%{-w3+w!n9qR$KMq$Z+PxDxFeIRA&_X`>9fNoQHA!LfH(FXWY+; zG+Glf5gWO4--y8U!f|0%;mguFc$zu0piY3Nj(@IZImQs@mq1pcau0{l(P^56BaF&d zr|Dm5VUN=mW{9?=9$4h7AEnfdYqa$$YwRZ!yM0<13BxHQFpk#34rKUoWulxTFZpzN zPidCi}$rGkl$?PinIh(-uY?rtu@57$WJMjv zMc2HAFe9k16H6XSi49O9JUHPteaFBsa^dDNhl6^!*A z$XjSLqOe|v;cdkgJv+1#w?6o0`?TTF%@5>?+dj`Z@)JDWEXZAr)ig7TX|LYbXKR} z%(9LBozaKI8oOJU zretA=_aetesGUW$ZX1-eZp{r3WP$6?E9WrtKI?q-Yk5NR^`Y)$lpbdzqY$-9?mM=w zg%3qJ4g><&Au8%Y4}S6U*FB$IO4uk|zJuJ`LDvw>Tx-rD^CGI{RsPl1;=Rv!URci0 zbJ#pfv1;v$6Xuvj%Dj`Nvc)3zX`Tm_r#wD*L=al0bLvpQK@iZ5Lw6NcC{Op{otz-^7fQ7^PDbz$;`qf7_ub zBx>X>RiN8N{oxR{CX*VG%SY?+Zgj1Y`z?vrUmV`#kHHMG#revvM2dEE$xWL6dq7A; z$Kv=G;(NWCi=WmrDcrc}t)gmZ9F=J7kJjgiuxl699P<}h9@$p;({t|L=5m`^w)jS% zGcT~3iXXmSYbYi}p}i^a&Pz1H^8F@!YAWcfa*Xru{&3>01ig9gk!hMIa zr2WftYKgxZ0_jeXK3mxGw|I2MMI~)J~^Uut|tG9LW>oqWM@WM`4x`Y{+}}=Ti;zeNdIaP4#x|*}5QZo@%{) ze)%U)p`+T}{I`9#H`H(#;^q0dQmDi*ycIt3e!R!@z?%$+<<4(<8Z6}Kzd1d>U9gc- zc6gf3!$FaonVx%GIKnCj?_H@LrI=8%Ur?*Lj-Nwtjq*<Wsq;zg@PRPC%4@MSIp2*S@jUs)LDNM?!OnYF zRCiR^FP)MkWHGxRey7=w#HzGj#I%b48HKt3McY&R_c3ldUngerEsl-)prWBF;QB&Z zXfylbML#;8r)-fK&B@}L2T{%G`pJ3%EvS#JicH2uqTTk}#$wqXOtt&r8B_zR^$+cp z_8+8vX`HmAz7+RTOUv5O@?pUxFwy>%;2qu+{s+_~41 z`1p0`kvKKR+1kY6`>FdxuGjC|3lf|y#WRV+%H0ULpVh!D!#wNWEi2u+W9*n;bTtj{ z(nvZJ@ssr^W-iW+kLNUPFoNoc=x;J=VzPK|;p8g2z8ZLjNjG`UAWws%Xil2z>*3}_ zg5+jqZGHoivJ6L6Bdi5GC;dU~Y+j!F1-hLksqU2@d=)*-M(H6oE0g*(ycPFpc7#3g zXO{=KR7rKOm0`8M)J>MWcIbDgvB&xCIz?_~MUFskC#>%GE{ln*amhQ88D?u~&<4D~ zJtSICc;3m_^n;>A?`BaG(;1xhF>m#s^BJTpCeBnA=S*@iS0gsD3#d#Q?AP@LwjFbK zcdUuV%Dj@(f)fi~3Q)ec&h)tQC3+;y^q$wPP{t3nT=p*$*-vx4o18eK!1sPgqMs>V z@ZGJS^@XNhigjIO!nS2MEw|4{QD3r)WOT2*w2+&ht;-}IF60wC<(0J5WK`A&wMml~ zKZ;1Y*C>}X?R&eWHX9|odfCwybg)^Rf1TMt!*vyvMxKq0ii^zOa23<`i;#Zpi2-_I za%D#*6Jo})Z^!F`L_CbBRxxoeTu8{H|H|`dieDpE^k%y|cMOd%SNba= zj2hP`VPY~8-Owa?{yI(G9_}qQ%V|fA4SCv~)fj!R9R5ZA`_A}Sgt$hS7_R8nwMBR7{?}}8{6qK0BK#5(!^<(6I5@L$_I93we#yhT*648< zqL>tPbWMk?vDmKfB%ji7RGGx7SYQWG8M4eURO&O!oVpb|wHdms)WO9@j8U(X>%N^W zMC4(4h#ww*k4zN6qL|j6n|xk4Dou_dd)u^ z^$efFrvs~narot4Ax}9fr&(@LJ5|q}&w~J+jO6U$sD*6h3}TxK`_%YH)7;WZfsYB? ziN%=VsL;Z@r|9ZtpZVMNB3MIY>TNx6yj5#3yPx_2rxmXMqC8-V$fH)XOf}BJofk&YpKYsFHXFN(ru?k; zXE_?}yy>D5W{-%eS(>$)-7RdwE>zE7P28)V< zP*>n_7sg$S^gm`et9v(>GKn!il3j2nx4J{;`(xz6!z=-E3p<7j>CJa{f~hQtmjcFr zq!^IdsZU?qor}kgAB@BAra$B}CvwxFOSCq6k}@-MeYzJ-VNZ^Uz_(L?4)@mdB@sP4 z4{RO#E+ttTw4lY^0CH;QwcQJv_pJN*y!}YK@qQXiXQ<=dDaq;Q`hHMf=rg*(=n~pr zJDE25I*A+AoL&~5?C3@MzPMCy*s9h-3_n6%ic~L@`8DI^#JU5s-Lau;ZxyG9%2gBv zQsg*6PrJzVZ3BJGG~aJT8HSjooZhRUu3NSw8DycF}a*rrIz_QgmW%bPSmFKFmg z&xd6Pq6fK_qS<=2)?u}7b2s>FDIEmM3}5q))p7!Pp2dO+~Qr zw*J^5|9q^9f#$_pg*40pm*KLksR~c`v{0ghW?rN2ICNphBA>C{adL)4cC_d9xEOb_ z`W&n1FWFpTTH7o2TUmWxaerw*C) z+@$=Rjqb($QqzxM-Tf*Gb;d|uO8k~Sro|1x-OoNQIvz*cKBNnc@$%K{b?z9WdtW#( zmP0qf7F&Hq=ZuCK=9*C^$=m3n5;TKdn=MNi=ffOpmS4%(tZGK#Hk=N6yWe@Sj_z<| z)UG;iexZnpcx`wK|Lk~Id8^*~!mrw_Ls8d#UDOKt+G&(?ufEq$TC{C^ll&A$e?2jQ zQ~ArZ+f1}ET>XmYTJ(2hRtAudac^QP9r1Nvkw`oGPKbB}?54#YMQ_U8T1xY%R>~MR z$GwJUI~0sN`tw(S{nv^(WB2;UF7EC8z0OlN;-+>)w@n?Xu5L)nd2$N4ULF)+##m81;&PG{wFib&>EYxI$3?OWOG*(u7EAI?#1X8PS@IX>uhgu7>VN0#U% zjm!$(N&E9wuYM9%|4g|3!-b4N4(@wy3S^3;(Aa(9Smo_d`Sd1SzKFS%*Vx8}RdYBC zyZ6!~OH$$V@T~|J)PCLOPQcg~4($9r(PaDhH{PkG9x}`e6bA{<31v)nx7#}#^Q)(q zQa7fYueUz1-Q`lI(G?pFF;_gtmow;t+@q@K5@#H#)NIn9Zd=#!22;#2@zTqpg!(I7(e^&0_F_c8 z@7P*CU3>YshEK$l0#iq?7)@r9LGxfsm310@C?Lqwb%}M=vaeq9)z%T=eJ0)>YCm2hT8fkG zY)89V`)kpHEjRo?WPHc7aJl4YRI!KBXww{3<;0(Te!u;_Lv4txmt2CrA+_r(#=-1) zo=G>OhwB?2-#_h5)^n0}&_BM8#%o@jg{#-wyH`7_e>iq$DZ+@ekltU1{W6OCbKvK( z-ir^54(o%1-;FJ7SA4NGazEp=@;ylAL7^=iSmrn;if$X?zB`;86Y=c5hI~Vhpe>1T z&qY)`S_&%CM#D;7(1JL`I=)%|pxgAtJECMBelGWUEex-t!2r9-UDCVlr>18lQn5w0 zctxIeT<>iY)Mca9?Pg33G(>T6J~Ce!2pSx``i#>1r~KEsr0hEwaoE>5HU{f#rUS~y zV!Lrwwp_8p(0_r<}JETVhu9EmwZOis8xhmOMg?1n*OAlg??B(wRIOeH~Krdymn}x5tiFr^<4> zipj=h2i_sAYQJxCR+aMTvr9kLhrC=-UI!!OhFsLUmQh!X+w9kGJq^w(MGg2S*BP0= z)^#Zh&UKemBij{s`X%T5%4p4vTA00>TvDiGed*%B(c${!7N&&FFKaR)Y%d`{xuMy~ zrI-ea%|^OU%T(y&y1L|IZx41iGDy9zuDTow2N8QN?C3eymiJ;s)KpyZM-y|W`gj4I zKfIi(p@KA$nK5j@X@7P1RcmD2_R}kbxTDPKxF414Wxk8N#0$i9voI0bp2MqN(V#pU zk0Cd3V2-#+ty^?AWQkB@hSlu*HPI#|v(@#w2@!|wpQUuY&ZXnlsxRzx=MzrTxwv7GUnA!*216IR(=VG=b~QPd z^fcS;)~i(?Md?- z^$hG%Z7ad?w)EEZ4`DoOQ5;_EdM-cwz51tQ$e~-!){HQGuCHEv$oo!9l*b)YTd6Zt zovzBnW-n>HlxXlGNw3C~1@mzl`VUudk8M}|U0*xt8>T^fz}ViF2Fm7& zX!(yVa$E8SJr z(U(W3mn@_4ON+gF(h~}%bEmo^Tf48x|qn8>jSlK6TqYq2O9E34QGuJG6RZ ztwme3r1_aM{h}GT6M|m9e2t#g`-?p@LQDEtTl<(~NNtQ$NN4FCP63qeoTu9B8C8`I zu~hv?aGC4MZ~*4!l#69_M&%~=tEl(k6%QZc>F<8`DBn+F(Q%%L-z{wKYL-63|6yaR z1OGdf7-r|VFQ(liq;%alm5sgNC7egDt1=x)b0{B&8lsP%`_$}j>MvE)JZo~{fU4jb z`mW^cP;n5->Q`T~a4zn|Lb6~NNh2Al8NQlWLoUH(85|sHL$AO@A*7nfTNN(pRB-bn zyK$jny0Bh`9%lmcLKTMUr|oBqcRp&B5sL=gelkFM1m?U?h=k8zj+@uYt z-QtPu&5s_T0@S>{l-TxjnNjy_T>396;`XD}mmPiPzY||1VZ{gu@_Ki=G6T)q{NzWcqyHxDUf zU1xc89KZ4Cl)ABY#?!V|O!;!+mi9deSH_uh3Rkj`NPm@nmGboa>)dy!lxG41qdTSC zjh4*9=OZ-FU=UAdlqR?f(_4`CWl$&$H}O2VNHgcExVY-TvC59VD-d)akoVPGL6?ge z9);{Zyv-O<`&b75aAy(hm3VIk=EoPBYP*hR8ctP|@ZL&QllK{0E*v+%Ac=pO-mct9 zb-9O8{8=!!4;u~t6O90siEd%vdpBL~nPsZdEIEdb@PpptS?O?r&ILw z&u_SPv5e8~8nd+zT-Oe-CTj%^YwM;(kQp*=wiPuSm^~0`+&d!O&L+`MK35@}iWQY; zepC3ahQ9b}3PCxC8Q}#?j`U#{n&sEYF>a%W9}RzIym^kBqEfLa89>IMvwdi;qnjUA zSEPx2Z?(A1}$$jv(UJ1N}F#365#X|su# ziLrB5?=9Z0C@|l{^H|s16=hBh`Z5;&^scB~Et(B>kw+rO!O?xu8XA)N>(z78!WL@| z>P_fkVUbOV!LK&6)Oamrn{V9+`jAB-Y(}Xj*zA1+b58EkeL-KLZp{>iJe5z6N#@rH zeb;Cw87t%L4urfP442g{A4*j(sX-oS2@G+iKxy=znW{;ar$qdUAie4YdoY|7alL{!m%XmV9-9 zi4>~qz$hx&J9AMoGT^>Q8m3YtW+0<$epkD7Zhn(tzmv;|l?;q93RTA!|%&NHzo%?i^6E7~o>^kaV z3jG&$EI#x+w4hCkS;OXxm&ZIqjcr7G(@}JwlGdNdns!GQTSl|J%sO+=?+O|p_L~RhxR}C2IT7WvY#8F^ z3;KSiY9nYPsB>*U>UF(u`(h(Qgv|MtvRB344%mkU?#dQQ z2FVrFBz9jE|ejg%z7~-u{b--ckc{gNFM+S2( zxw?8pp7Sz)j36>2P`+B`x~Yxj`J!wKpMIkNwSNxg%aS$}+?t|E(4K!% zoq1Asgrqj(aK_eo zgAS`q+*AscUX(hMmh9HGeN7Pey8jL2adjt*a49-2``*LR>)y^EQe{Br2ij6H>@Ft9 zB5eZ;BGWOwciDGWSBKd5K4jE5apseHn{}Yn1d}Fr_*gdKT;X~3uBaC=ix`uy1RXiMtDWEtiSLN9#rOwC3}AER5CO(qatAK5SIlP zwC%)$Ia`rsB=?&!H8hQT=(2Pe@B597fnv_%bDxmb^_t$jRs~|#e$gy9!^xjtR46g zBw}mVF!w{frf+m*|7B)x?Na#wjT`TM+2wo)}L3Wn&+KdK9}{C-n!;X z1_O?p65|T)me{BYN?#9InBYw!`*TH)oVtUnZuG8CuL%lt1H@hP2eKp~5~w6fGY z2?O8D$o4g47$5@;`HP(6#hdA5^?%%tXEFqIPbF~m{e&@-)2w)3L~4)`{U2xK-wcY^ zJx>>_O{E`s>s)e}3hCJMo2MaA8XumBVMCHB8$_y;jUmTX{`Oz~f8ES>mfU&TVH{c`^=DNasgiIA7h|KFpxvI+F1xuB!)C=u0Obrj|D3b!&7NO@D|0ba~H&> z`|m(Op~=ZXt;cUmXDET|U@*P_ z@p`lndzbozGvNqlGVHj2AJe7+Bt8&sks>}g4So{%;4Xx{X2XRM`2Q5c#fJ(U3|2C> zw5DSDH2MOol-k@tV;}&W4r*)Xjf8Cf*Xz|r%Rp7Q6qG-gfcJr-P;`vJix2WWd7vfJ z7QVH_zv3hM4#kOI{_=sBC@whjVS*7Gx*+m9k*_EE zua~PKrW~w+2DU6d+WE|Gw^kV+DZ>Rjd7!tH0$LLhK<55r&E=#4=aGE`Qyta48-ILT zA14PjQ8G{&E{R|ehxY*@Q1?<7zJG0k@zK$LjPE^F@XCk*Ug(}b;eECv-yd$pYEvUV zAV+*~1_I?zgD>I(Hz91W;KUF>ET={W-Z29Hx89;W87{WmiH`Z4aW<+1V3h`PsZ4{7U(VyhtASaXwP>CM3er^`J2arkZi_;>?4?T&ON25UfZ7Ph<$;*ayeIROMejki`Fo{o?O~ zL8veQ_;V2qneK2S^)c|KIDy*RKwu9uM=%(|6@MML?5PP%&T0q-MPRU&feZFGfyYZ1 z!Grh&@x^%~VW8IG1&Z68&{ysZUy2=|J;w~1Q}keMb@gP7biDtqNj`sR5~8b!CS}>5PKhlV0a3WCC{OLup9aY z`=RDr2V9GO0PLY=!1l}#Sp4q6B@YC{V^u)n8IEIu*H8aso8C$q@qyTJ9KdmG_gA?? zZ`ot`Qse;L$h9|r{yZ5UG9CVCQo-Lf>EXXMDc?&RUfZ%ks^w)QPawQ9pg+;msM{2X z56&WSK=cp$Wve1VvOE+-OM*bAEDR>b$4*AwKo@Yu+rhOcOF-fokaz|b-@9yrL#0P_Q-teu`4SGwRV4xudc6WA8#>X6IsC%IaPzce-m(bI4Z#0N-D`-}U>YlXU4IKfaB0NoN`kAx4t6UH2NU`h7k+{HJ;F#`4A2c4o=3_`Z9cY?FMDf zm7p=v2Jy`snCNama)dmRAB2${&5fK>fjl=p1P>QvAUsMz>W#l*IR??wV;}r|{#|;C z;eLA#s5iVs><|7EYk$SuU+dVGA~@Dnw&35IbnFYENbBGJIMG)`o2(ISLiBX}Q!tFS zJcZ!~-xCfkjP}6M(b0c7#=GjFB2483LxGP3)Wm2b91=tFHG;vB6Uo)ANGu~fI?fS@ zo{=0i}F?YNknVkgBid483V+HKt$C_kx;tP=&```NN zdFOXrBbr2SDGieyp)me22u2VLL-jt;{>Ba_dz#^YT_(RYA-Ta8s-tfsF`<0IoyG(c zq;`@=Fo;90D?d{AaUptyU_f%hOC*+$een1B_Z_H)V+@bK6oFCIOW4`oJ{e>4)8Jf@ z1ZsKD5M6bH8;GWIy|hO#Aet0rc9I{&;vIi$6B5_QF>#Wo5j~ymj)ck2p)hugq4~)P zhGR`?f9njjaSsqpb%6SK187Y*fuyT!}hUgI!Qftut!~THbdhi{n0{6aBFs*zEd%u32jP{W}(5ZU`>J`x-Q}7G~ko?A- z{OGqPA-c*LZ3PmE&cJ@GO~*0er3FkbNPa-H^+#_kf*}II5CUUu&)|EL|35UTyYL}& zZsUh>11`9&LiB zL$z=png7GX!~b%89PR<-q7aZrFi5`k0+EErAeV&jDiZMp;)AQl+UkvHE0Px$1``kr zFJPu88oo70LqbFhBn4VQb(|qo#oR?|Ic;c4z6&jBci}^t7JNuOwp|^X5|p7K9;uyT z<)Ai39zLWa`8(AH%0q8M(Gvxv?huD8q`vz*|6``xA$+10f<_wQLB*^8n?|htT!+^F zPVjr53>xK8pj7xAfm|PHC=R*_oZ}@9SL1n1qNgs4v zgV)4pAUVSlN&?mYVSmzm55)iIgy^YH5IXh&o_%iszrlZNl6^-WSbod~la@5lt51YG zrHP=G@D5}jW&(@!YhdQBMaD=^c)3Ki)12LiR&s zki4z)5Bt-WzCz;s7kKfb1EMBBLdaMP1b+XwCb{*#2bZ1_@a!vt+mDCfrp^TL$PdGH z>3-ml=mR#9ZeS7U0HzZREkMiB2-GJSDo^H{guWQTkPo7YAAy49H!c!}A_PMokWl)9 z8V@go>o7yS1yZxwBR#SU59E6CBXtFW<*5jQMf9YXM*8Vhq#w;k#y|SKtknTXTkM0x zxo(J?`3&*XpW($+JG`3u4ADqz2OwD72P(j#I}b$fO@ffdIPfcu0*~Afa2;b1?*&%j zF1Rf48JKw5fPw26LjzE;*1(P1pW*DqQXr-;0x^|OC&$PyAwIbH9*F4*fRO49;F2W( z4V4bqNHRd!Jw|w8#tJF6*C6xpjj?y$0{Mmh!nP#=q8xvZ*}rcWZ;V0d`WO_geut8k z?~u9B2k|o<@N}#ZJcg>k@#}lA`jQVO9XTLwI1M7&2nO|W;8Prd8^;)=z5%;fFK{aK z0=sNCFy3ebkE9X!{B;DXyT{?Ty`>I zL!d6`Hobn7;bpqN+xWlRuHBp-tJ;`=qLpDtL3nhmN5SLG;Pbr}T>8twuD1{@kOz7U zKV^cH`412`Krm=c!mWpsz^^(AH)IFlP2TY#`S0f(W*UidmixnABlG?WiQ{7}eL7MP z9)p$O*jEBp-S5EUb2jLi8)&S~(&o+q#0sn!tCc2Asc@ zg6)?Au;_RL1|MI8_J>$3>bcGG`qY!QPoc$PZ(XaBgzHF6t*sNC_BV-4Lu{-sHE zAgkE}7rB3H)W75VJ&+)AaEdwy@j>eUC;R`x;WJ$0<eyQh54v)}q&*9CTGK$Y zDG?sUuY%r_AAf4>WBWV4Eu8HCwa%%WhKQ{3lVc5?vxu&?03D)9@>+d=;`=;165m&9 z5MGrddV1`GTts7E|F_tGjKjP;m(IHDU7h*o9586h0PSWZ_agm)OY%Ax1^)O`V=LKx z|FeC^e&}R-c3}+?5dIw3-Hjb{e{5E``}HI?E^@a5{k5hOUY+PEV=0i(BR-(X`ERrT zFJB;>x7BG$S-stu04jBHU7oKuz$9oIc6N{&8yT*VLnrIf##xZjnS}0d%P0HaCs$9_ zji2Y?GJpGtCMoF*0E^(?^TcnBCBO79AJFFhx7&Y=1L=>6kpA-IKBsT)CYU1j@9iNq zHZn?TXHM2W(W9XA@CSH=e*bgs_KW`HyprALo($&#ViXbH@G7Qn!H4oYigVP$m} znm;arqt926P#*vRg+9=?LUNw`R|LZs1VaZ>Gact@L{Hi4kyx&Rb4;cGar;AScflfT z@*g#JNWv)CMXZ2j;1Za6FTgFt&fE7V;FjqWDCv!X?49o*t~LM`PE#PRJ_rIg`+!Tb z8{twrF!TK8(eIkC;y-SGWYaIOjF^HC?Thf@^*Fdije%R@GC00i1>3M?utc7RG4Y%S zy+^a4Z8ZZL#*?6^I|eeE!(i?>4T?G=Aa!d11QmPXx>Of};S=JA4~QN$05xm%f874q zwmpbw`~@LZI}lj14Sso>;F-ArE=gzXP$=+Yny14W4f|!8&mrOd?l7 zH)sVkk$OYTbpaF++vSkjN!ok{l&yY%fx{G-J{$ujoqmv1??Gas131Oo{^Rz)9z24Q z?}v~-Z~%E<_aUWy4?=2o!KY{&oO3q84$05vv1?!uvI5%vOQ7Mt0LqW%;ikEv7Sd(nAPqPJlGh51Boh z0u%dTxT)RqAGiNF7bJG=tE6`9jm0(pjsf3-ZE(r_33do?ETUGyAZQu1eUZ6Gc%$qv z2l7@3Z_Ivx1k(G6>Hgbxp<5FteUP9kQiB^zf`#MA|A_s^7+$sR5k=PSh8=5==Nn}1 zQ#QaV4w-vIe{`QLfhNKm)kkxnU^5G{$GkB@c%z5#=I$hj+?fF3zu7LJG6n)lV<2&B zyzcng|C7t(tW8mujGtY0uaLP%a+m>^!}tl#6EGw*xma?p$!<1S_}W{k-Qp-3(zH0k1!bkl{#B}z%?iLP`NF_k1l7o$Xs zlqaHOQsgdOB+50KVR9M2^II!V?b*XYalKzu)(7S(DD+ zyh7Lf>c4!vuR4cmirbo&KDU(So}7Evx&|Yc8|h;muDg!1t^HrMgIBflrpJUP@5eib zRnxyU*S=~B@wrJ&jWZ={uAb4v&vd-u>m`69wI;O=vMXP;cYbriRgU<-s^)mb_7=}W zY$~N))OjyH-+xi_Y~(_38oN%lc_)Plv@?Kgq!TW`ssknKYR*{dMKHoQZdw^8)hhm&y_ME_VT zei5AMZ3(tP__%%Oe+u79cyHsv=1Rt-o1>m&VzzIdjWfA1ctl^aG%Es$!XpnHE_o!u zkO-bCk^G48Mg(^u*tQt!Zse&t$T?8;ZQTsxnmE?tk=ZjHQQGvnq(Zm=8r}NqJ z$ z9pBSm%!_wyiTTgxCF4rbKKXfXh!yV(eU3p3*=wfBS}=YI&OH%h%Q<+-tM;V7Yg4cV zBQgSTxcn3v8t$RsN|~%JxB8)9h=aTq-)!`5z8>UD#P1;^!wYBj&PNWtUe)%?PYo#9 z8%ytJ92qN9&b=XhTW7L*BgifYul5Vcwyn47(sKU3^f!gaY&&L4mi=b(`Ni|aWtH4tOAErWjSB7C;W7GKk! zH{b5hxtJ;M3-O!G%3g_UC6TBWJ}{XG;bWKW^}xC805Uc!x$lG0-JaxymeSw$rblFo zj1{9f25pX^Z_D|I)1M10KZH4C9mIJHpY&|?C0WPi?}pAs59n@MjA<#s7$DfIKwJ8` z^u(1x^rPwJo{T_ENj%OS48fTn0@>Fb6sJ0HPUwGbHluGlk^ZMS{pV%$JQvbCH{=+G zw)8K21>sFCq>ocbHm9NSKJv~KAs{0TMzLPfTQ*Gch1K>TXs?-r0jnMHxu-Kc12)3m zF%7-?r%|U)#E3!G*yPUVF`178QO5Kxjiq;~TyG?qyPPOP6s5SKFljLkedp5B|3>;t z!sA;^PrxlV0ZxTmVSP9rZUsBw_2VuqIJzB%ajWsQix>J%j=`t8ne_5K53-!@OW}xuvM$v1e-$-^;aEsZI<2g2)mi~oL7gt}3ZFObX zR8x%gl?7OLC0}}TGdAZzkFm7yQu@=A6Pl&)6oudL(I>m{VUOKt)nS|TMMq31kp5Mh zE<5n~Cl*kc_o0XQmGG-Tzv_kOHd1(Q(r;7!{`NOk;{biC9kJ@a>+AqDQk>3=dJ$+2!0k-Otf;Jzo z#F&0s2%r9G)uwrx2`S#%wizpRG*tbn>Y_*WRfigD=rNUH4f|e6f60U1mNs5lL5YwWA?RG6seao#g5i#@_S5+RtQhJK>Pp4xh{RxXr$6%|d!cD&4Y?o9btKhoa zPd<1Jk=rWeez(B~rDkkkQ6k47Jgl~24(Ofy$4BwM+rMf&{*`%pD=+7i3V%d+JJ$3@ zoYM>78eT)s;~o~hsKtJ5-5o@3t&+#P4#=SnUx;z^afEg){LOaMOy3uC&|&Lq_pchq zw%#ymTeieFq?A?iZJnfY(Dm> zmQw21lO4;co0iCHA-wXA^bf=wsM`7?b%e4>5wP_}i!MD&aT)fCn=oNtlO0b(pE}{- zv1QZ@%V9_DaIj$+$54!(1CL1`sXgc5kMyhh4mC|hz|OnyU0aU1t1Ibq-G|%SdvKwi zEPRP+)RIl?sWOJ3 zPq6Jcby4Lna8GQ6!L2LA%(>|5gpW7b0 z{wwxU*Ni&c1V7G!$F`r~LQULe)m>ODrv~fRtYHcrO>hwU-S) zt~P9y&N$fh&o;~aAx*|ut|6A)mElvmG_E#o2fwlESTU+KlH7)iyeDOlLF?DP7K|VM zT{R{V*Nfbe4Gz5+OMc1tdJ^_WS|Z-54}y%^Ld5eTw~AVVh@%y%@4Z};H`QZ|qF}t9 z&fJ3r#%v8;>~-XME29nB{s?Sw)54Y02T@a9Ez7>}Y19nbW9Kph$>oO`x5Wzmcf~c8 z8yQ^%V$*OTsRB=cf~9udU6DpmUfVi%wX8OIUfbJ4|RjLb=p{5#|SapChISbhdxk$Eu`#NgQ96>y}&bWEHWXbxF^VF2_tjGZn%&^cCRP77? zarX8Q@-4UFyd@Z4driS-%&idYuW_8W%ykhQc6z!exmai9#<;hu?ku7jbi{hH+XB03_8?ww=GSY%=owU_g<`9U!GWYpNHa9PZOr*at zcKS^s$H&}}1p{$#jRj+%xzq^sIA5B~0r<3~{l&$*;JzagPoF-8Q(_>@Bi!+cn=!s* zp3CIqK*`dIzV_t?kU`x-hBg+J$JdgZ4abGtVDjWXjP(}dRHhI4(uKUvquIxRmiGP6 zXJcu~I(g3be|~`S`m6Y2*;MF}^|ne1!oYCGcK+5#NDD`FL;|d)M`7748|;r@zD$e- z^5aD;$CxU59Ex`?VqEKq-1SZ^?XRgk2KVeun3=p9Cf^6aAaNPA!)9ab+933sIUk>! zN2B}D47oNG?BF|Go9m1_g#LYP5b7`pX^fZl1`C$4na#|OFl78@-O_%1T`9sV@)3Og zAd)IiU{ggQjF+CmP~!@+5Er=KC`31Ma36F{fu%<&+H~9oJ>%mtCi<{*0LBj-h7C?% zP#YPD^c6aSrBsqRRH&|R4q3N?##&_Exr}YsOEJGJ14Cw?z<6iIKZa)!yrmlPd-z^+ zDV920+peh?HK|y}fr1%)=i@kh+1*STW!qa%)#l4}(w*}ru{TaOh#13@@r^SXqLH4( zxOKB0Ha=HSRZ}nbO&6Y&bvwp)29rxAb19fO!D7AK-mCT_uNJ5)E@nrNQGyNQ2g|5a zXl#6drRy)r`f}A>WF5UO_dAl28b9rfWR3)H^g;LZ-)&#jr_+fYdQ*y^N3$t!pEsU(swQw+f z$+|3Dew8tCvE)TMk`;N~c2)mp5pevLD*s}P!$nvuxB)Xq#uB#Y$rYc)EDy4bU*zSd!$vL_l~;;yYQPZ6xZx%nREdDDOUri{G8o39n= zdn@;qKf|umPmoy9gs2}L!FgQ+rgCj2)`enCx**^t*Tpp$V}AOL=jY_D=O)Q#o;F0$ zkM^M#EqrL3sCYuH}Wl zD!f&Cd#d$hDgDTZ*PZuQ{omZ^20i+SRi^Y1=^vKrTVIQy?dvBChmHIjKm5UsIpA%=#;aR} zO;itH-ui2uW5Jryx*02mB(JyY-WX%kiR+vXnYTQIxu)$9IHr~F%R^z#Vvink#?I|z zrJc<@%bfRT4EeGo#=vWpv;Qp4{}ow6tOGF#?k>dAapztQiV(Aw%%+-cb) z)ctf1ZS97l^GrQhZ&aWo*DT(lmiXyfA&&2G!xrYLCAklx*5@R16TYMN9%9_K$WfV4 z)H}>hO2+#y6hX_w0`^J4=*oOQ-xw!UQqTSM*<(DsSBtHSbWuWGdf#dj=DYR6+Nm9i zmX+=)8kg#i#>c;4MxsB)t)7D^(VqC!Z#q_|EWm?P3Y4W;GVj94KO-H2nUe#noRz`T)h zIGQk(TCP9Wa<1nSZkGM%R+5hS1>3Qb{I$uvV=$RP-KUolL&qG)yPfu--Dib(uYEWy zhW0_K#}~}?))Bb^jd^i4!3B@%b{^w=5@?lLJoPx$#^Ud`x%$2p5XBl;MBQ?7&IymGh8lG zmpROL3iXfoQN9c#|d8B(L4=t0R2xWc}0cuRiiCY@!*{hTcJR`p*bR zXh29}1IIvyeaw&4lk)!Q_j9j3e|(V7;2nicn91jtiRVq|&!i3zavK4WH(+31;{U2~ zzkF;})}yHT-`&Sl#`A(J89|<8m}zx`u4#3$h12yBFaIy{)zqHTr_X!&;6Lv3@#IUd NK9A-8OQnhX{{?OVn?wKr literal 0 HcmV?d00001 diff --git a/TestLibDlg/IncSourceTestDlg/res/IncSourceTestDlg.rc2 b/TestLibDlg/IncSourceTestDlg/res/IncSourceTestDlg.rc2 new file mode 100644 index 0000000000000000000000000000000000000000..f5465b7428fd898f436d926090b2caae5264d5a2 GIT binary patch literal 740 zcmd6kF-yZx5Xb+s=-}qyaNsC5#o0kohgxcdR&gk(Xi^FiA!)aKgpTRETXtyTt zOfv|TlEK~4&!GNaL)x`&<#F#lj{n{L?(X-;fPoFH@irhR!NxsmctQsbep|QYWZPDfuaz#Ql1Hy@Z+~uSh3WtR literal 0 HcmV?d00001 diff --git a/TestLibDlg/IncSourceTestDlg/resource.h b/TestLibDlg/IncSourceTestDlg/resource.h new file mode 100644 index 0000000..ee9d76a --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/resource.h @@ -0,0 +1,23 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++에서 생성한 포함 파일입니다. +// IncSourceTestDlg.rc에서 사용되고 있습니다. +// +#define IDM_ABOUTBOX 0x0010 +#define IDD_ABOUTBOX 100 +#define IDP_OLE_INIT_FAILED 100 +#define IDS_ABOUTBOX 101 +#define IDD_INCSOURCETESTDLG_DIALOG 102 +#define IDR_MAINFRAME 128 +#define IDC_LIST_DATA 1001 +#define IDC_BUTTON_OPEN 1002 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 130 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/TestLibDlg/IncSourceTestDlg/src/FlexLexer.h b/TestLibDlg/IncSourceTestDlg/src/FlexLexer.h new file mode 100644 index 0000000..c4dad2b --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/a2lenums.cpp b/TestLibDlg/IncSourceTestDlg/src/a2lenums.cpp new file mode 100644 index 0000000..b149e45 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/a2lfile.cpp b/TestLibDlg/IncSourceTestDlg/src/a2lfile.cpp new file mode 100644 index 0000000..6d1c8fc --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/a2lflexer.cpp b/TestLibDlg/IncSourceTestDlg/src/a2lflexer.cpp new file mode 100644 index 0000000..1cc655f --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/a2lflexer.l b/TestLibDlg/IncSourceTestDlg/src/a2lflexer.l new file mode 100644 index 0000000..0c475b5 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/a2lhelper.cpp b/TestLibDlg/IncSourceTestDlg/src/a2lhelper.cpp new file mode 100644 index 0000000..f28a547 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/a2lhelper.h b/TestLibDlg/IncSourceTestDlg/src/a2lhelper.h new file mode 100644 index 0000000..2c4fb54 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/a2lobject.cpp b/TestLibDlg/IncSourceTestDlg/src/a2lobject.cpp new file mode 100644 index 0000000..0986e6d --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/a2lparser.cpp b/TestLibDlg/IncSourceTestDlg/src/a2lparser.cpp new file mode 100644 index 0000000..f528381 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/a2lparser.hpp b/TestLibDlg/IncSourceTestDlg/src/a2lparser.hpp new file mode 100644 index 0000000..b4419fa --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/a2lparser.y b/TestLibDlg/IncSourceTestDlg/src/a2lparser.y new file mode 100644 index 0000000..2df4ec9 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/a2lproject.cpp b/TestLibDlg/IncSourceTestDlg/src/a2lproject.cpp new file mode 100644 index 0000000..d2fa1a5 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/a2lscanner.cpp b/TestLibDlg/IncSourceTestDlg/src/a2lscanner.cpp new file mode 100644 index 0000000..fa96fa3 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/a2lscanner.h b/TestLibDlg/IncSourceTestDlg/src/a2lscanner.h new file mode 100644 index 0000000..37988f0 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/a2mlblock.cpp b/TestLibDlg/IncSourceTestDlg/src/a2mlblock.cpp new file mode 100644 index 0000000..be580db --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/a2mlflexer.cpp b/TestLibDlg/IncSourceTestDlg/src/a2mlflexer.cpp new file mode 100644 index 0000000..d728327 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/a2mlflexer.l b/TestLibDlg/IncSourceTestDlg/src/a2mlflexer.l new file mode 100644 index 0000000..3bb2e45 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/a2mlobject.cpp b/TestLibDlg/IncSourceTestDlg/src/a2mlobject.cpp new file mode 100644 index 0000000..36e176b --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/a2mlparser.cpp b/TestLibDlg/IncSourceTestDlg/src/a2mlparser.cpp new file mode 100644 index 0000000..11efebd --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/a2mlparser.hpp b/TestLibDlg/IncSourceTestDlg/src/a2mlparser.hpp new file mode 100644 index 0000000..f3b6f86 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/a2mlparser.y b/TestLibDlg/IncSourceTestDlg/src/a2mlparser.y new file mode 100644 index 0000000..a338572 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/a2mlscanner.cpp b/TestLibDlg/IncSourceTestDlg/src/a2mlscanner.cpp new file mode 100644 index 0000000..aed52e7 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/a2mlscanner.h b/TestLibDlg/IncSourceTestDlg/src/a2mlscanner.h new file mode 100644 index 0000000..87b7188 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/axisdescr.cpp b/TestLibDlg/IncSourceTestDlg/src/axisdescr.cpp new file mode 100644 index 0000000..5f3629d --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/axispts.cpp b/TestLibDlg/IncSourceTestDlg/src/axispts.cpp new file mode 100644 index 0000000..04a6d14 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/blob.cpp b/TestLibDlg/IncSourceTestDlg/src/blob.cpp new file mode 100644 index 0000000..a56fb1e --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/characteristic.cpp b/TestLibDlg/IncSourceTestDlg/src/characteristic.cpp new file mode 100644 index 0000000..6472f92 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/compumethod.cpp b/TestLibDlg/IncSourceTestDlg/src/compumethod.cpp new file mode 100644 index 0000000..768c051 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/computab.cpp b/TestLibDlg/IncSourceTestDlg/src/computab.cpp new file mode 100644 index 0000000..1a7a8df --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/compuvtab.cpp b/TestLibDlg/IncSourceTestDlg/src/compuvtab.cpp new file mode 100644 index 0000000..6a35717 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/compuvtabrange.cpp b/TestLibDlg/IncSourceTestDlg/src/compuvtabrange.cpp new file mode 100644 index 0000000..212370f --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/frame.cpp b/TestLibDlg/IncSourceTestDlg/src/frame.cpp new file mode 100644 index 0000000..c6a0645 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/function.cpp b/TestLibDlg/IncSourceTestDlg/src/function.cpp new file mode 100644 index 0000000..5e16d03 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/src/function.cpp @@ -0,0 +1,3 @@ +// +// Created by ihedv on 2023-08-29. +// diff --git a/TestLibDlg/IncSourceTestDlg/src/group.cpp b/TestLibDlg/IncSourceTestDlg/src/group.cpp new file mode 100644 index 0000000..635b34f --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/ifdatablock.cpp b/TestLibDlg/IncSourceTestDlg/src/ifdatablock.cpp new file mode 100644 index 0000000..32ce916 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/ifdataflexer.cpp b/TestLibDlg/IncSourceTestDlg/src/ifdataflexer.cpp new file mode 100644 index 0000000..6e18924 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/ifdataflexer.l b/TestLibDlg/IncSourceTestDlg/src/ifdataflexer.l new file mode 100644 index 0000000..b7eb202 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/ifdataparser.cpp b/TestLibDlg/IncSourceTestDlg/src/ifdataparser.cpp new file mode 100644 index 0000000..d4e59c1 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/ifdataparser.hpp b/TestLibDlg/IncSourceTestDlg/src/ifdataparser.hpp new file mode 100644 index 0000000..8329ab5 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/ifdataparser.y b/TestLibDlg/IncSourceTestDlg/src/ifdataparser.y new file mode 100644 index 0000000..d6f7121 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/ifdatascanner.cpp b/TestLibDlg/IncSourceTestDlg/src/ifdatascanner.cpp new file mode 100644 index 0000000..fe908ef --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/ifdatascanner.h b/TestLibDlg/IncSourceTestDlg/src/ifdatascanner.h new file mode 100644 index 0000000..29833c6 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/instance.cpp b/TestLibDlg/IncSourceTestDlg/src/instance.cpp new file mode 100644 index 0000000..dc7f102 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/measurement.cpp b/TestLibDlg/IncSourceTestDlg/src/measurement.cpp new file mode 100644 index 0000000..06a03ee --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/module.cpp b/TestLibDlg/IncSourceTestDlg/src/module.cpp new file mode 100644 index 0000000..cad27a8 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/overwrite.cpp b/TestLibDlg/IncSourceTestDlg/src/overwrite.cpp new file mode 100644 index 0000000..39f3f8a --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/recordlayout.cpp b/TestLibDlg/IncSourceTestDlg/src/recordlayout.cpp new file mode 100644 index 0000000..609ea54 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/src/structure.cpp b/TestLibDlg/IncSourceTestDlg/src/structure.cpp new file mode 100644 index 0000000..9213d1e --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/src/structure.cpp @@ -0,0 +1,10 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ + +#include "a2l/structure.h" + +namespace a2l { + +} diff --git a/TestLibDlg/IncSourceTestDlg/src/transformer.cpp b/TestLibDlg/IncSourceTestDlg/src/transformer.cpp new file mode 100644 index 0000000..4ee9f4d --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/src/transformer.cpp @@ -0,0 +1,4 @@ +/* +* Copyright 2023 Ingemar Hedvall +* SPDX-License-Identifier: MIT + */ diff --git a/TestLibDlg/IncSourceTestDlg/src/unit.cpp b/TestLibDlg/IncSourceTestDlg/src/unit.cpp new file mode 100644 index 0000000..1d94427 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/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/TestLibDlg/IncSourceTestDlg/targetver.h b/TestLibDlg/IncSourceTestDlg/targetver.h new file mode 100644 index 0000000..331a6e2 --- /dev/null +++ b/TestLibDlg/IncSourceTestDlg/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// SDKDDKVer.h를 포함하면 최고 수준의 가용성을 가진 Windows 플랫폼이 정의됩니다. + +// 이전 Windows 플랫폼에 대해 애플리케이션을 빌드하려는 경우에는 SDKDDKVer.h를 포함하기 전에 +// WinSDKVer.h를 포함하고 _WIN32_WINNT 매크로를 지원하려는 플랫폼으로 설정하십시오. + +#include