diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md
index 91417cb9ff0..762c6844506 100644
--- a/.github/ISSUE_TEMPLATE/bug.md
+++ b/.github/ISSUE_TEMPLATE/bug.md
@@ -2,6 +2,7 @@
name: Bug report
about: Report a defect
title:
+type: bug
labels:
assignees:
---
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 00000000000..98ee85f95f5
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1,12 @@
+contact_links:
+ - name: Community forums
+ url: https://discourse.panda3d.org/
+ about: Please visit the community forums for technical support and other questions.
+
+ - name: Documentation bugs
+ url: https://github.com/panda3d/panda3d-docs/issues
+ about: Problems with the online documentation should be reported on the panda3d-docs issue tracker, not here.
+
+ - name: Discord server
+ url: https://discord.gg/UyepRMm
+ about: Get real-time help with questions about Panda3D or discuss ideas with the developers on our Discord server.
diff --git a/.github/ISSUE_TEMPLATE/enhancement.md b/.github/ISSUE_TEMPLATE/enhancement.md
index 954153caf3e..190f226dbb6 100644
--- a/.github/ISSUE_TEMPLATE/enhancement.md
+++ b/.github/ISSUE_TEMPLATE/enhancement.md
@@ -2,6 +2,7 @@
name: Enhancement request
about: Request new functionality or improvement to existing functionality
title:
+type: feature
labels: enhancement
assignees:
---
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 00000000000..4fc308718e4
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,7 @@
+version: 2
+updates:
+- package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "weekly"
+ open-pull-requests-limit: 5
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 00000000000..04cea3eec72
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,554 @@
+name: Continuous Integration
+on: [push, pull_request]
+
+jobs:
+ cmake:
+ name: CMake Buildsystem
+ if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
+
+ strategy:
+ fail-fast: false
+
+ matrix:
+ profile:
+ - ubuntu-bionic-double-standard-unity-makefile
+ - ubuntu-bionic-coverage-ninja
+ #- macos-coverage-unity-xcode
+ - macos-nometa-standard-makefile
+ - windows-standard-unity-msvc
+ - windows-nopython-nometa-standard-msvc
+
+ include:
+ - profile: ubuntu-bionic-double-standard-unity-makefile
+ os: ubuntu-20.04
+ config: Standard
+ unity: YES
+ generator: Unix Makefiles
+ compiler: Default
+ metalibs: YES
+ python: YES
+ eigen: NO
+ double: YES
+
+ - profile: ubuntu-bionic-coverage-ninja
+ os: ubuntu-20.04
+ config: Coverage
+ unity: NO
+ generator: Ninja
+ compiler: Clang
+ metalibs: YES
+ python: YES
+ eigen: NO
+ double: NO
+
+ #- profile: macos-coverage-unity-xcode
+ # os: macOS-13
+ # config: Coverage
+ # unity: YES
+ # generator: Xcode
+ # compiler: Default
+ # metalibs: YES
+ # python: YES
+ # eigen: NO
+ # double: NO
+
+ - profile: macos-nometa-standard-makefile
+ os: macOS-13
+ config: Standard
+ unity: NO
+ generator: Unix Makefiles
+ compiler: Default
+ metalibs: NO
+ python: YES
+ eigen: NO
+ double: NO
+
+ - profile: windows-standard-unity-msvc
+ os: windows-2022
+ config: Standard
+ unity: YES
+ generator: Visual Studio 17 2022
+ compiler: Default
+ metalibs: YES
+ python: YES
+ eigen: NO
+ double: NO
+
+ - profile: windows-nopython-nometa-standard-msvc
+ os: windows-2022
+ config: Standard
+ unity: NO
+ generator: Visual Studio 17 2022
+ compiler: Default
+ metalibs: NO
+ python: NO
+ eigen: NO
+ double: NO
+
+ runs-on: ${{ matrix.os }}
+
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 10
+
+ - name: Self-destruct makepanda
+ run: python3 makepanda/selfdestruct.py --yes
+
+ - name: Install dependencies (macOS)
+ if: runner.os == 'macOS'
+ run: |
+ curl -O https://www.panda3d.org/download/panda3d-1.10.15/panda3d-1.10.15-tools-mac.tar.gz
+ tar -xf panda3d-1.10.15-tools-mac.tar.gz
+ mv panda3d-1.10.15/thirdparty thirdparty
+ rmdir panda3d-1.10.15
+
+ # Temporary hack so that pzip can run, since we are about to remove Cg anyway.
+ install_name_tool -id "$(pwd)/thirdparty/darwin-libs-a/nvidiacg/lib/libCg.dylib" thirdparty/darwin-libs-a/nvidiacg/lib/libCg.dylib
+
+ brew install ccache
+
+ - name: Set up XCode (macOS)
+ if: runner.os == 'macOS'
+ run: sudo xcode-select -s /Applications/Xcode_14.3.1.app/Contents/Developer
+
+ - name: Install dependencies (Ubuntu)
+ if: startsWith(matrix.os, 'ubuntu')
+ run: >
+ sudo apt-get update
+
+ sudo apt-get install
+ build-essential ninja-build clang llvm ccache
+ bison flex
+ libeigen3-dev libfreetype6-dev libgl1-mesa-dev libjpeg-dev libode-dev
+ libopenal-dev libpng-dev libssl-dev libvorbis-dev libx11-dev
+ libxcursor-dev libxrandr-dev nvidia-cg-toolkit zlib1g-dev
+ python3-setuptools python3-tk
+
+ - name: Cache dependencies (Windows)
+ if: runner.os == 'Windows'
+ uses: actions/cache@v4
+ with:
+ path: thirdparty
+ key: ci-cmake-${{ runner.OS }}-thirdparty-v1.10.15-r1
+ - name: Install dependencies (Windows)
+ if: runner.os == 'Windows'
+ shell: powershell
+ run: |
+ if (!(Test-Path thirdparty/win-libs-vc14-x64)) {
+ $wc = New-Object System.Net.WebClient
+ $wc.DownloadFile("https://www.panda3d.org/download/panda3d-1.10.15/panda3d-1.10.15-tools-win64.zip", "thirdparty-tools.zip")
+ Expand-Archive -Path thirdparty-tools.zip
+ Move-Item -Path thirdparty-tools/panda3d-1.10.15/thirdparty -Destination .
+ }
+
+ - name: ccache (non-Windows)
+ if: runner.os != 'Windows'
+ uses: actions/cache@v4
+ with:
+ path: ccache
+ key: ci-cmake-ccache-${{ matrix.profile }}
+
+ - name: Configure
+ shell: bash
+ env:
+ CMAKE_GENERATOR: "${{ matrix.generator }}"
+ run: >
+ mkdir -p build
+
+ cd build
+
+ if ${{ matrix.compiler == 'Clang' }}; then
+ if [[ "$CMAKE_GENERATOR" =~ Studio.+20(19|22) ]]; then
+ export CMAKE_GENERATOR_TOOLSET=ClangCL
+ elif [[ "$CMAKE_GENERATOR" == *Studio* ]]; then
+ export CMAKE_GENERATOR_TOOLSET=LLVM
+ else
+ export CC=clang CXX=clang++
+ fi
+ fi
+
+ if ${{ runner.os != 'Windows' }}; then
+ compilerLauncher=$(echo -DCMAKE_C{,XX}_COMPILER_LAUNCHER=ccache)
+ export CCACHE_DIR="$(dirname $PWD)/ccache"
+ echo "CCACHE_DIR=$(dirname $PWD)/ccache" >> $GITHUB_ENV
+ fi
+
+ cmake
+ ${compilerLauncher:-}
+ -D CMAKE_UNITY_BUILD=${{ matrix.unity }}
+ -D CMAKE_BUILD_TYPE="${{ matrix.config }}"
+ -D BUILD_METALIBS=${{ matrix.metalibs }}
+ -D HAVE_PYTHON=${{ runner.os != 'Windows' && matrix.python || 'NO' }}
+ -D HAVE_EIGEN=${{ matrix.eigen }}
+ -D STDFLOAT_DOUBLE=${{ matrix.double }}
+ ..
+
+ - name: Build (no Python)
+ if: contains(matrix.python, 'NO')
+ # BEGIN A
+ working-directory: build
+ run: cmake --build . --config ${{ matrix.config }} --parallel 4
+ # END A
+
+ - name: Setup Python (Python 3.8)
+ if: contains(matrix.python, 'YES')
+ uses: actions/setup-python@v5
+ with:
+ python-version: '3.8'
+ - name: Configure (Python 3.8)
+ if: contains(matrix.python, 'YES')
+ working-directory: build
+ shell: bash
+ run: >
+ cmake -DWANT_PYTHON_VERSION=3.8 -DHAVE_PYTHON=YES
+ -DPython_FIND_REGISTRY=NEVER -DPython_ROOT="$pythonLocation" .
+ - name: Build (Python 3.8)
+ if: contains(matrix.python, 'YES')
+ # BEGIN A
+ working-directory: build
+ run: cmake --build . --config ${{ matrix.config }} --parallel 4
+ # END A
+ - name: Test (Python 3.8)
+ # BEGIN B
+ if: contains(matrix.python, 'YES')
+ working-directory: build
+ shell: bash
+ env:
+ PYTHONPATH: ${{ matrix.config }}
+ run: |
+ PYTHON_EXECUTABLE=$(grep 'Python_EXECUTABLE:' CMakeCache.txt | sed 's/.*=//')
+ $PYTHON_EXECUTABLE -m pip install -r ../requirements-test.txt
+ export COVERAGE_FILE=.coverage.$RANDOM LLVM_PROFILE_FILE=$PWD/pid-%p.profraw
+ $PYTHON_EXECUTABLE -m pytest ../tests --cov=.
+ # END B
+
+ - name: Setup Python (Python 3.9)
+ if: contains(matrix.python, 'YES')
+ uses: actions/setup-python@v5
+ with:
+ python-version: '3.9'
+ - name: Configure (Python 3.9)
+ if: contains(matrix.python, 'YES')
+ working-directory: build
+ shell: bash
+ run: >
+ cmake -DWANT_PYTHON_VERSION=3.9 -DHAVE_PYTHON=YES
+ -DPython_FIND_REGISTRY=NEVER -DPython_ROOT="$pythonLocation" .
+ - name: Build (Python 3.9)
+ if: contains(matrix.python, 'YES')
+ # BEGIN A
+ working-directory: build
+ run: cmake --build . --config ${{ matrix.config }} --parallel 4
+ # END A
+ - name: Test (Python 3.9)
+ # BEGIN B
+ if: contains(matrix.python, 'YES')
+ working-directory: build
+ shell: bash
+ env:
+ PYTHONPATH: ${{ matrix.config }}
+ run: |
+ PYTHON_EXECUTABLE=$(grep 'Python_EXECUTABLE:' CMakeCache.txt | sed 's/.*=//')
+ $PYTHON_EXECUTABLE -m pip install -r ../requirements-test.txt
+ export COVERAGE_FILE=.coverage.$RANDOM LLVM_PROFILE_FILE=$PWD/pid-%p.profraw
+ $PYTHON_EXECUTABLE -m pytest ../tests --cov=.
+ # END B
+
+ - name: Setup Python (Python 3.10)
+ if: contains(matrix.python, 'YES')
+ uses: actions/setup-python@v5
+ with:
+ python-version: '3.10'
+ - name: Configure (Python 3.10)
+ if: contains(matrix.python, 'YES')
+ working-directory: build
+ shell: bash
+ run: >
+ cmake -DWANT_PYTHON_VERSION=3.10 -DHAVE_PYTHON=YES
+ -DPython_FIND_REGISTRY=NEVER -DPython_ROOT="$pythonLocation" .
+ - name: Build (Python 3.10)
+ if: contains(matrix.python, 'YES')
+ # BEGIN A
+ working-directory: build
+ run: cmake --build . --config ${{ matrix.config }} --parallel 4
+ # END A
+ - name: Test (Python 3.10)
+ # BEGIN B
+ if: contains(matrix.python, 'YES')
+ working-directory: build
+ shell: bash
+ env:
+ PYTHONPATH: ${{ matrix.config }}
+ run: |
+ PYTHON_EXECUTABLE=$(grep 'Python_EXECUTABLE:' CMakeCache.txt | sed 's/.*=//')
+ $PYTHON_EXECUTABLE -m pip install -r ../requirements-test.txt
+ export COVERAGE_FILE=.coverage.$RANDOM LLVM_PROFILE_FILE=$PWD/pid-%p.profraw
+ $PYTHON_EXECUTABLE -m pytest ../tests --cov=.
+ # END B
+
+ - name: Setup Python (Python 3.11)
+ if: contains(matrix.python, 'YES')
+ uses: actions/setup-python@v5
+ with:
+ python-version: '3.11'
+ - name: Configure (Python 3.11)
+ if: contains(matrix.python, 'YES')
+ working-directory: build
+ shell: bash
+ run: >
+ cmake -DWANT_PYTHON_VERSION=3.11 -DHAVE_PYTHON=YES
+ -DPython_FIND_REGISTRY=NEVER -DPython_ROOT="$pythonLocation" .
+ - name: Build (Python 3.11)
+ if: contains(matrix.python, 'YES')
+ # BEGIN A
+ working-directory: build
+ run: cmake --build . --config ${{ matrix.config }} --parallel 4
+ # END A
+ - name: Test (Python 3.11)
+ # BEGIN B
+ if: contains(matrix.python, 'YES')
+ working-directory: build
+ shell: bash
+ env:
+ PYTHONPATH: ${{ matrix.config }}
+ run: |
+ PYTHON_EXECUTABLE=$(grep 'Python_EXECUTABLE:' CMakeCache.txt | sed 's/.*=//')
+ $PYTHON_EXECUTABLE -m pip install -r ../requirements-test.txt
+ export COVERAGE_FILE=.coverage.$RANDOM LLVM_PROFILE_FILE=$PWD/pid-%p.profraw
+ $PYTHON_EXECUTABLE -m pytest ../tests --cov=.
+ # END B
+
+ - name: Setup Python (Python 3.12)
+ if: contains(matrix.python, 'YES')
+ uses: actions/setup-python@v5
+ with:
+ python-version: '3.12'
+ - name: Configure (Python 3.12)
+ if: contains(matrix.python, 'YES')
+ working-directory: build
+ shell: bash
+ run: >
+ cmake -DWANT_PYTHON_VERSION=3.12 -DHAVE_PYTHON=YES
+ -DPython_FIND_REGISTRY=NEVER -DPython_ROOT="$pythonLocation" .
+ - name: Build (Python 3.12)
+ if: contains(matrix.python, 'YES')
+ # BEGIN A
+ working-directory: build
+ run: cmake --build . --config ${{ matrix.config }} --parallel 4
+ # END A
+ - name: Test (Python 3.12)
+ # BEGIN B
+ if: contains(matrix.python, 'YES')
+ working-directory: build
+ shell: bash
+ env:
+ PYTHONPATH: ${{ matrix.config }}
+ run: |
+ PYTHON_EXECUTABLE=$(grep 'Python_EXECUTABLE:' CMakeCache.txt | sed 's/.*=//')
+ $PYTHON_EXECUTABLE -m pip install -r ../requirements-test.txt
+ export COVERAGE_FILE=.coverage.$RANDOM LLVM_PROFILE_FILE=$PWD/pid-%p.profraw
+ $PYTHON_EXECUTABLE -m pytest ../tests --cov=.
+ # END B
+
+ - name: Upload coverage reports
+ if: always() && matrix.config == 'Coverage'
+ working-directory: build
+ shell: bash
+ env:
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
+ run: |
+ shopt -s expand_aliases
+ if ${{ runner.os == 'macOS' }}; then alias llvm-profdata='xcrun llvm-profdata' llvm-cov='xcrun llvm-cov'; fi
+
+ python -m pip install coverage
+ python -m coverage combine $(find . -name '.coverage.*')
+
+ llvm-profdata merge pid-*.profraw -o coverage.profdata
+ llvm-cov show $(grep -Rl LLVM_PROFILE_FILE . | sed 's/^/-object /') -instr-profile=coverage.profdata > coverage.txt
+ bash <(curl -s https://codecov.io/bash) -y ../.github/codecov.yml
+
+ makepanda:
+ if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
+ strategy:
+ matrix:
+ os: [ubuntu-20.04, windows-2019, macOS-13]
+ runs-on: ${{ matrix.os }}
+ steps:
+ - uses: actions/checkout@v4
+ - name: Install dependencies (Ubuntu)
+ if: matrix.os == 'ubuntu-20.04'
+ run: |
+ sudo apt-get update
+ sudo apt-get install build-essential bison flex libfreetype6-dev libgl1-mesa-dev libjpeg-dev libode-dev libopenal-dev libpng-dev libssl-dev libvorbis-dev libx11-dev libxcursor-dev libxrandr-dev nvidia-cg-toolkit zlib1g-dev
+ - name: Get thirdparty packages (Windows)
+ if: runner.os == 'Windows'
+ shell: powershell
+ run: |
+ $wc = New-Object System.Net.WebClient
+ $wc.DownloadFile("https://www.panda3d.org/download/panda3d-1.10.15/panda3d-1.10.15-tools-win64.zip", "thirdparty-tools.zip")
+ Expand-Archive -Path thirdparty-tools.zip
+ Move-Item -Path thirdparty-tools/panda3d-1.10.15/thirdparty -Destination .
+ - name: Get thirdparty packages (macOS)
+ if: runner.os == 'macOS'
+ run: |
+ curl -O https://www.panda3d.org/download/panda3d-1.10.15/panda3d-1.10.15-tools-mac.tar.gz
+ tar -xf panda3d-1.10.15-tools-mac.tar.gz
+ mv panda3d-1.10.15/thirdparty thirdparty
+ rmdir panda3d-1.10.15
+ (cd thirdparty/darwin-libs-a && rm -rf rocket)
+
+ - name: Set up XCode (macOS)
+ if: runner.os == 'macOS'
+ run: sudo xcode-select -s /Applications/Xcode_14.3.1.app/Contents/Developer
+
+ - name: Set up Python 3.13
+ uses: actions/setup-python@v5
+ with:
+ python-version: '3.13'
+ - name: Build Python 3.13
+ shell: bash
+ run: |
+ python makepanda/makepanda.py --git-commit=${{github.sha}} --outputdir=built --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10 --msvc-version=14.2
+ - name: Test Python 3.13
+ shell: bash
+ run: |
+ python -m pip install -r requirements-test.txt
+ PYTHONPATH=built LD_LIBRARY_PATH=built/lib:$pythonLocation/lib DYLD_LIBRARY_PATH=built/lib python -m pytest
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: '3.12'
+ - name: Build Python 3.12 (double)
+ shell: bash
+ run: |
+ python makepanda/makepanda.py --override STDFLOAT_DOUBLE=1 --git-commit=${{github.sha}} --outputdir=built_dbl --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10 --msvc-version=14.2
+ - name: Test Python 3.12 (double)
+ shell: bash
+ run: |
+ python -m pip install -r requirements-test.txt
+ PYTHONPATH=built_dbl LD_LIBRARY_PATH=built_dbl/lib:$pythonLocation/lib DYLD_LIBRARY_PATH=built_dbl/lib python -m pytest
+
+ - name: Make installer
+ run: |
+ python makepanda/makepackage.py --verbose --lzma --outputdir=built_dbl
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: '3.11'
+ - name: Build Python 3.11
+ shell: bash
+ run: |
+ python makepanda/makepanda.py --git-commit=${{github.sha}} --outputdir=built --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10 --msvc-version=14.2
+ - name: Test Python 3.11
+ shell: bash
+ run: |
+ python -m pip install -r requirements-test.txt
+ PYTHONPATH=built LD_LIBRARY_PATH=built/lib:$pythonLocation/lib DYLD_LIBRARY_PATH=built/lib python -m pytest
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: '3.10'
+ - name: Build Python 3.10
+ shell: bash
+ run: |
+ python makepanda/makepanda.py --git-commit=${{github.sha}} --outputdir=built --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10 --msvc-version=14.2
+ - name: Test Python 3.10
+ shell: bash
+ run: |
+ python -m pip install -r requirements-test.txt
+ PYTHONPATH=built LD_LIBRARY_PATH=built/lib:$pythonLocation/lib DYLD_LIBRARY_PATH=built/lib python -m pytest
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: '3.9'
+ - name: Build Python 3.9
+ shell: bash
+ run: |
+ python makepanda/makepanda.py --git-commit=${{github.sha}} --outputdir=built --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10 --msvc-version=14.2
+ - name: Test Python 3.9
+ shell: bash
+ run: |
+ python -m pip install -r requirements-test.txt
+ PYTHONPATH=built LD_LIBRARY_PATH=built/lib:$pythonLocation/lib DYLD_LIBRARY_PATH=built/lib python -m pytest
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: '3.8'
+ - name: Build Python 3.8
+ shell: bash
+ run: |
+ python makepanda/makepanda.py --git-commit=${{github.sha}} --outputdir=built --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10 --msvc-version=14.2
+ - name: Test Python 3.8
+ shell: bash
+ run: |
+ python -m pip install -r requirements-test.txt
+ PYTHONPATH=built LD_LIBRARY_PATH=built/lib:$pythonLocation/lib DYLD_LIBRARY_PATH=built/lib python -m pytest
+
+ - name: Make installer
+ run: |
+ python makepanda/makepackage.py --verbose --lzma
+
+ emscripten:
+ if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
+ runs-on: ubuntu-24.04
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Install dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install build-essential ninja-build bison flex nodejs python3-pip
+
+ - name: Setup emsdk
+ uses: mymindstorm/setup-emsdk@v14
+ with:
+ version: 4.0.2
+ actions-cache-folder: 'emsdk-cache'
+
+ - name: Restore Python build cache
+ id: cache-emscripten-python-restore
+ uses: actions/cache/restore@v4
+ with:
+ path: ~/python
+ key: cache-emscripten-python-3.12.8
+
+ - name: Build Python 3.12
+ if: steps.cache-emscripten-python-restore.outputs.cache-hit != 'true'
+ run: |
+ wget https://www.python.org/ftp/python/3.12.8/Python-3.12.8.tar.xz
+ tar -xJf Python-3.12.8.tar.xz
+ (cd Python-3.12.8 && EM_CONFIG=$EMSDK/.emscripten python3 Tools/wasm/wasm_build.py emscripten-browser)
+ (cd Python-3.12.8/builddir/emscripten-browser && make install DESTDIR=~/python)
+ cp Python-3.12.8/builddir/emscripten-browser/Modules/_hacl/libHacl_Hash_SHA2.a ~/python/usr/local/lib
+ cp Python-3.12.8/builddir/emscripten-browser/Modules/_decimal/libmpdec/libmpdec.a ~/python/usr/local/lib
+ cp Python-3.12.8/builddir/emscripten-browser/Modules/expat/libexpat.a ~/python/usr/local/lib
+ rm -rf Python-3.12.8
+
+ - name: Save Python build cache
+ id: cache-emscripten-python-save
+ if: steps.cache-emscripten-python-restore.outputs.cache-hit != 'true'
+ uses: actions/cache/save@v4
+ with:
+ path: ~/python
+ key: ${{ steps.cache-emscripten-python-restore.outputs.cache-primary-key }}
+
+ - name: Build for Emscripten
+ shell: bash
+ run: |
+ python3 makepanda/makepanda.py --git-commit=${{github.sha}} --target emscripten --python-incdir=~/python/usr/local/include --python-libdir=~/python/usr/local/lib --static --everything --no-pandatool --no-deploytools --verbose --threads=4
+
+ - name: Install test dependencies
+ shell: bash
+ run: |
+ python3 -m pip install -t ~/python/usr/local/lib/python3.12/site-packages -r requirements-test.txt
+
+ - name: Test in node.js
+ shell: bash
+ run: |
+ PYTHONHOME=~/python/usr/local PYTHONPATH=built node built/bin/run_tests.js tests
diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml
new file mode 100644
index 00000000000..377ab8ffa0b
--- /dev/null
+++ b/.github/workflows/mypy.yml
@@ -0,0 +1,23 @@
+name: Run Mypy
+on: [push, pull_request]
+
+jobs:
+ mypy:
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ os: [ubuntu-latest, macos-latest, windows-latest]
+ python-version: ['3.9', '3.13']
+ fail-fast: false
+ steps:
+ - uses: actions/checkout@v4
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v5
+ with:
+ python-version: ${{ matrix.python-version }}
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install mypy==1.14.1
+ - name: Run mypy on direct
+ run: python tests/run_mypy.py
diff --git a/BACKERS.md b/BACKERS.md
index d1a9dd8727a..2b48940fc39 100644
--- a/BACKERS.md
+++ b/BACKERS.md
@@ -4,10 +4,11 @@ This is a list of all the people who are contributing financially to Panda3D. I
## Bronze Sponsors
-[
](https://changecrab.com/) 
+[
](https://route4me.com/)
* [Daniel Stokes](https://opencollective.com/daniel-stokes)
* [David Rose](https://opencollective.com/david-rose)
+* [Route4Me](https://route4me.com/)
## Benefactors
@@ -32,6 +33,7 @@ This is a list of all the people who are contributing financially to Panda3D. I
* GameDev JONI
* Max Rodriguez
* Jethro Schoppenhorst
+* dabe
## Backers
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1d1ced66a40..fba23f92d64 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -109,6 +109,7 @@ option(BUILD_DIRECT "Build the direct source tree." ON)
option(BUILD_PANDATOOL "Build the pandatool source tree." ON)
option(BUILD_CONTRIB "Build the contrib source tree." ON)
option(BUILD_MODELS "Build/install the built-in models." ON)
+option(BUILD_TOOLS "Build binary tools." ON)
# Include Panda3D packages
if(BUILD_DTOOL)
diff --git a/README.md b/README.md
index 54fb9fd07f3..2d96c5ca56b 100644
--- a/README.md
+++ b/README.md
@@ -30,7 +30,7 @@ Please ensure that you build Panda3D with Python 3.11.9.
Windows
-------
-You can build Panda3D with the Microsoft Visual C++ 2015, 2017, 2019 or 2022
+You can build Panda3D with the Microsoft Visual C++ 2017, 2019 or 2022
compiler, which can be downloaded for free from the [Visual Studio site](https://visualstudio.microsoft.com/downloads/).
You will also need to install the [Windows SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-sdk),
and if you intend to target Windows Vista, you will also need the
@@ -42,8 +42,8 @@ depending on whether you are on a 32-bit or 64-bit system, or you can
[click here](https://github.com/rdb/panda3d-thirdparty) for instructions on
building them from source.
-- https://www.panda3d.org/download/panda3d-1.10.14/panda3d-1.10.14-tools-win64.zip
-- https://www.panda3d.org/download/panda3d-1.10.14/panda3d-1.10.14-tools-win32.zip
+- https://www.panda3d.org/download/panda3d-1.10.15/panda3d-1.10.15-tools-win64.zip
+- https://www.panda3d.org/download/panda3d-1.10.15/panda3d-1.10.15-tools-win32.zip
After acquiring these dependencies, you can build Panda3D from the command
prompt using the following command. Change the `--msvc-version` option based
@@ -114,7 +114,7 @@ macOS
-----
On macOS, you will need to download a set of precompiled thirdparty packages in order to
-compile Panda3D, which can be acquired from [here](https://www.panda3d.org/download/panda3d-1.10.14/panda3d-1.10.14-tools-mac.tar.gz).
+compile Panda3D, which can be acquired from [here](https://www.panda3d.org/download/panda3d-1.10.15/panda3d-1.10.15-tools-mac.tar.gz).
After placing the thirdparty directory inside the panda3d source directory,
you may build Panda3D using a command like the following:
@@ -133,6 +133,73 @@ package file in order to install the SDK onto your system.
+You will also need to choose which version of Python you want to use.
+Install the appropriate package for it (such as `python37` or `python38`) and
+run the makepanda script with your chosen Python version:
+
+```bash
+python3.11 makepanda/makepanda.py --everything --installer --no-egl --no-gles --no-gles2
+```
+
+If successful, this will produce a .pkg file in the root of the source
+directory which you can install using `pkg install`.
+
+Android
+-------
+
+Although it's possible to build Panda3D on an Android device using the
+[termux](https://termux.com/) shell, the recommended route is to cross-compile
+.whl files using the SDK and NDK, which can then be used by the `build_apps`
+command to build a Python application into an .apk or .aab bundle. You will
+need to get the latest thirdparty packages, which can be obtained from here:
+
+https://rdb.name/thirdparty-android.tar.gz
+
+This includes a copy of Python 3.13 compiled for Android. You will need to
+use Python 3.13 on the host as well.
+
+These commands show how to compile wheels for the supported Android ABIs:
+
+```bash
+export ANDROID_SDK_ROOT=/home/rdb/local/android
+python3.13 makepanda/makepanda.py --everything --outputdir built-droid-arm64 --arch arm64 --target android-21 --threads 6 --wheel
+python3.13 makepanda/makepanda.py --everything --outputdir built-droid-armv7a --arch arm --target android-21 --threads 6 --wheel
+python3.13 makepanda/makepanda.py --everything --outputdir built-droid-x86_64 --arch x86_64 --target android-21 --threads 6 --wheel
+python3.13 makepanda/makepanda.py --everything --outputdir built-droid-x86 --arch x86 --target android-21 --threads 6 --wheel
+```
+
+It is now possible to use the generated wheels with `build_apps`, as explained
+on this page:
+
+https://discourse.panda3d.org/t/deployment-for-android/28226
+
+Running Tests
+=============
+
+Install [PyTest](https://docs.pytest.org/en/latest/getting-started.html#installation)
+and run the `pytest` command. If you have not installed Panda3D, you will
+need to configure your environment by pointing the `PYTHONPATH` variable at
+the `built` directory. On Linux, you will also need to point the
+`LD_LIBRARY_PATH` variable at the `built/lib` directory.
+
+As a convenience, you can alternatively pass the `--tests` option to makepanda.
+
+Reporting Issues
+================
+
+If you encounter any bugs when using Panda3D, please report them in the bug
+tracker. This is hosted at:
+
+ https://github.com/panda3d/panda3d/issues
+
+Make sure to first use the search function to see if the bug has already been
+reported. When filling out a bug report, make sure that you include as much
+information as possible to help the developers track down the issue, such as
+your version of Panda3D, operating system, architecture, and any code and
+models that are necessary for the developers to reproduce the issue.
+
+If you're not sure whether you've encountered a bug, feel free to ask about
+it in the forums or the IRC channel first.
Supporting the Project
======================
diff --git a/cmake/macros/Interrogate.cmake b/cmake/macros/Interrogate.cmake
index eea12f95681..7533be7564c 100644
--- a/cmake/macros/Interrogate.cmake
+++ b/cmake/macros/Interrogate.cmake
@@ -257,7 +257,7 @@ function(interrogate_sources target output database language_flags)
make_directory "${output_directory}"
COMMAND ${CMAKE_COMMAND} -E
make_directory "${database_directory}"
- COMMAND host_interrogate
+ COMMAND interrogate
-oc "${output}"
-od "${database}"
-srcdir "${srcdir}"
@@ -272,7 +272,7 @@ function(interrogate_sources target output database language_flags)
${include_flags}
${scan_sources}
- DEPENDS host_interrogate ${sources} ${extensions} ${nfiles}
+ DEPENDS interrogate ${sources} ${extensions} ${nfiles}
COMMENT "Interrogating ${target}")
# Propagate the target's compile definitions to the output file
@@ -283,7 +283,7 @@ endfunction(interrogate_sources)
#
# Function: add_python_module(module [lib1 [lib2 ...]] [LINK lib1 ...]
-# [IMPORT mod1 ...])
+# [IMPORT mod1 ...] [INIT func1 ...])
# Uses interrogate to create a Python module. If the LINK keyword is specified,
# the Python module is linked against the specified libraries instead of those
# listed before. The IMPORT keyword makes the output module import another
@@ -305,7 +305,7 @@ function(add_python_module module)
set(keyword)
foreach(arg ${ARGN})
- if(arg STREQUAL "LINK" OR arg STREQUAL "IMPORT" OR arg STREQUAL "COMPONENT")
+ if(arg STREQUAL "LINK" OR arg STREQUAL "IMPORT" OR arg STREQUAL "INIT" OR arg STREQUAL "COMPONENT")
set(keyword "${arg}")
elseif(keyword STREQUAL "LINK")
@@ -316,6 +316,10 @@ function(add_python_module module)
list(APPEND import_flags "-import" "${arg}")
set(keyword)
+ elseif(keyword STREQUAL "INIT")
+ list(APPEND import_flags "-init" "${arg}")
+ set(keyword)
+
elseif(keyword STREQUAL "COMPONENT")
set(component "${arg}")
set(keyword)
@@ -362,13 +366,13 @@ function(add_python_module module)
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${PANDA_CFG_INTDIR}/${module}_module.cxx"
COMMAND ${CMAKE_COMMAND} -E
make_directory "${CMAKE_CURRENT_BINARY_DIR}/${PANDA_CFG_INTDIR}"
- COMMAND host_interrogate_module
+ COMMAND interrogate_module
-oc "${CMAKE_CURRENT_BINARY_DIR}/${PANDA_CFG_INTDIR}/${module}_module.cxx"
-module ${module} -library ${modname}
${import_flags}
${INTERROGATE_MODULE_OPTIONS}
${IMOD_FLAGS} ${infiles_rel}
- DEPENDS host_interrogate_module ${infiles_abs}
+ DEPENDS interrogate_module ${infiles_abs}
COMMENT "Generating module ${module}")
# CMake chokes on ${CMAKE_CFG_INTDIR} in source paths when unity builds are
diff --git a/cmake/macros/Python.cmake b/cmake/macros/Python.cmake
index 32258d4a6dc..ce605e00b92 100644
--- a/cmake/macros/Python.cmake
+++ b/cmake/macros/Python.cmake
@@ -49,6 +49,7 @@ function(add_python_target target)
add_library(${target} ${MODULE_TYPE} ${sources})
target_link_libraries(${target} PKG::PYTHON)
+ target_include_directories(${target} PRIVATE "${PROJECT_SOURCE_DIR}/dtool/src/interrogatedb")
if(BUILD_SHARED_LIBS)
set(_outdir "${PANDA_OUTPUT_DIR}/${slash_namespace}")
diff --git a/direct/src/actor/Actor.py b/direct/src/actor/Actor.py
index 263ac8803af..cc81d525cab 100644
--- a/direct/src/actor/Actor.py
+++ b/direct/src/actor/Actor.py
@@ -737,6 +737,13 @@ def getLOD(self, lodName):
else:
return None
+ def getPlayMode(self, animName=None, partName=None):
+ if self.__animControlDict:
+ controls = self.getAnimControls(animName, partName, onlyPlaying=False)
+ if controls:
+ return controls[0].getPlayMode()
+ return None
+
def hasLOD(self):
"""
Return 1 if the actor has LODs, 0 otherwise
@@ -1762,7 +1769,7 @@ def getAnimControl(self, animName, partName=None, lodName=None,
return None
def getAnimControls(self, animName=None, partName=None, lodName=None,
- allowAsyncBind = True):
+ allowAsyncBind = True, onlyPlaying = True):
"""getAnimControls(self, string, string=None, string=None)
Returns a list of the AnimControls that represent the given
@@ -1840,7 +1847,7 @@ def getAnimControls(self, animName=None, partName=None, lodName=None,
# get all playing animations
for thisPart, animDict in animDictItems:
for anim in animDict.values():
- if anim.animControl and anim.animControl.isPlaying():
+ if anim.animControl and (not onlyPlaying or anim.animControl.isPlaying()):
controls.append(anim.animControl)
else:
# get the named animation(s) only.
@@ -2660,3 +2667,4 @@ def renamePartBundles(self, partName, newBundleName):
get_base_frame_rate = getBaseFrameRate
remove_anim_control_dict = removeAnimControlDict
load_anims_on_all_lods = loadAnimsOnAllLODs
+ get_play_mode = getPlayMode
diff --git a/direct/src/dcparse/CMakeLists.txt b/direct/src/dcparse/CMakeLists.txt
index e5cdee5b18b..b48d772c174 100644
--- a/direct/src/dcparse/CMakeLists.txt
+++ b/direct/src/dcparse/CMakeLists.txt
@@ -1,3 +1,7 @@
+if(NOT BUILD_TOOLS)
+ return()
+endif()
+
add_executable(p3dcparse dcparse.cxx)
target_link_libraries(p3dcparse p3direct)
install(TARGETS p3dcparse EXPORT Direct COMPONENT Direct DESTINATION ${CMAKE_INSTALL_BINDIR})
diff --git a/direct/src/dcparser/dcClass_ext.cxx b/direct/src/dcparser/dcClass_ext.cxx
index cf09a97d348..65f55bf33ba 100644
--- a/direct/src/dcparser/dcClass_ext.cxx
+++ b/direct/src/dcparser/dcClass_ext.cxx
@@ -522,31 +522,35 @@ client_format_generate_CMU(PyObject *distobj, DOID_TYPE do_id,
}
// Also specify the optional fields.
- int num_optional_fields = 0;
if (PyObject_IsTrue(optional_fields)) {
- num_optional_fields = PySequence_Size(optional_fields);
- }
- packer.raw_pack_uint16(num_optional_fields);
-
- for (int i = 0; i < num_optional_fields; i++) {
- PyObject *py_field_name = PySequence_GetItem(optional_fields, i);
- std::string field_name = PyUnicode_AsUTF8(py_field_name);
- Py_XDECREF(py_field_name);
-
- DCField *field = _this->get_field_by_name(field_name);
- if (field == nullptr) {
- std::ostringstream strm;
- strm << "No field named " << field_name << " in class " << _this->get_name()
- << "\n";
- nassert_raise(strm.str());
- return Datagram();
- }
- packer.raw_pack_uint16(field->get_number());
- packer.begin_pack(field);
- if (!pack_required_field(packer, distobj, field)) {
- return Datagram();
+ optional_fields = PySequence_Tuple(optional_fields);
+ Py_ssize_t num_optional_fields = PyTuple_GET_SIZE(optional_fields);
+ packer.raw_pack_uint16(num_optional_fields);
+
+ for (Py_ssize_t i = 0; i < num_optional_fields; i++) {
+ PyObject *py_field_name = PyTuple_GET_ITEM(optional_fields, i);
+ std::string field_name = PyUnicode_AsUTF8(py_field_name);
+
+ DCField *field = _this->get_field_by_name(field_name);
+ if (field == nullptr) {
+ std::ostringstream strm;
+ strm << "No field named " << field_name << " in class " << _this->get_name()
+ << "\n";
+ nassert_raise(strm.str());
+ Py_DECREF(optional_fields);
+ return Datagram();
+ }
+ packer.raw_pack_uint16(field->get_number());
+ packer.begin_pack(field);
+ if (!pack_required_field(packer, distobj, field)) {
+ Py_DECREF(optional_fields);
+ return Datagram();
+ }
+ packer.end_pack();
}
- packer.end_pack();
+ Py_DECREF(optional_fields);
+ } else {
+ packer.raw_pack_uint16(0);
}
return Datagram(packer.get_data(), packer.get_length());
@@ -602,13 +606,13 @@ ai_format_generate(PyObject *distobj, DOID_TYPE do_id,
// Also specify the optional fields.
if (has_optional_fields) {
- int num_optional_fields = PySequence_Size(optional_fields);
+ optional_fields = PySequence_Tuple(optional_fields);
+ Py_ssize_t num_optional_fields = PyTuple_GET_SIZE(optional_fields);
packer.raw_pack_uint16(num_optional_fields);
- for (int i = 0; i < num_optional_fields; ++i) {
- PyObject *py_field_name = PySequence_GetItem(optional_fields, i);
+ for (Py_ssize_t i = 0; i < num_optional_fields; ++i) {
+ PyObject *py_field_name = PyTuple_GET_ITEM(optional_fields, i);
std::string field_name = PyUnicode_AsUTF8(py_field_name);
- Py_XDECREF(py_field_name);
DCField *field = _this->get_field_by_name(field_name);
if (field == nullptr) {
@@ -616,6 +620,7 @@ ai_format_generate(PyObject *distobj, DOID_TYPE do_id,
strm << "No field named " << field_name << " in class "
<< _this->get_name() << "\n";
nassert_raise(strm.str());
+ Py_DECREF(optional_fields);
return Datagram();
}
@@ -623,10 +628,13 @@ ai_format_generate(PyObject *distobj, DOID_TYPE do_id,
packer.begin_pack(field);
if (!pack_required_field(packer, distobj, field)) {
+ Py_DECREF(optional_fields);
return Datagram();
}
packer.end_pack();
}
+
+ Py_DECREF(optional_fields);
}
return Datagram(packer.get_data(), packer.get_length());
diff --git a/direct/src/dcparser/dcField_ext.cxx b/direct/src/dcparser/dcField_ext.cxx
index e2c1167811c..a10fffd4564 100644
--- a/direct/src/dcparser/dcField_ext.cxx
+++ b/direct/src/dcparser/dcField_ext.cxx
@@ -278,8 +278,9 @@ get_pystr(PyObject *value) {
return result;
}
- if (value->ob_type != nullptr) {
- PyObject *typestr = PyObject_Str((PyObject *)(value->ob_type));
+ PyTypeObject *type = Py_TYPE(value);
+ if (type != nullptr) {
+ PyObject *typestr = PyObject_Str((PyObject *)type);
if (typestr != nullptr) {
std::string result = PyUnicode_AsUTF8(typestr);
Py_DECREF(typestr);
diff --git a/direct/src/dcparser/dcPacker_ext.cxx b/direct/src/dcparser/dcPacker_ext.cxx
index 276a2dd7f92..9ffca60ba91 100644
--- a/direct/src/dcparser/dcPacker_ext.cxx
+++ b/direct/src/dcparser/dcPacker_ext.cxx
@@ -136,6 +136,7 @@ pack_object(PyObject *object) {
// The supplied object is not an instance of the expected class object,
// but it is a sequence. This is case (2).
_this->push();
+ Py_BEGIN_CRITICAL_SECTION(object);
int size = PySequence_Size(object);
for (int i = 0; i < size; ++i) {
PyObject *element = PySequence_GetItem(object, i);
@@ -146,6 +147,7 @@ pack_object(PyObject *object) {
std::cerr << "Unable to extract item " << i << " from sequence.\n";
}
}
+ Py_END_CRITICAL_SECTION();
_this->pop();
} else {
// The supplied object is not a sequence, and we weren't expecting a
diff --git a/direct/src/dcparser/dcParser.cxx.prebuilt b/direct/src/dcparser/dcParser.cxx.prebuilt
index 6f4f167302c..aeab2dc34cf 100644
--- a/direct/src/dcparser/dcParser.cxx.prebuilt
+++ b/direct/src/dcparser/dcParser.cxx.prebuilt
@@ -179,7 +179,7 @@ dc_cleanup_parser() {
# endif
# endif
-#include "dcParser.yxx.h"
+#include "dcParser.h"
/* Symbol kind. */
enum yysymbol_kind_t
{
diff --git a/direct/src/directbase/TestStart.py b/direct/src/directbase/TestStart.py
index bdbab206e57..16ada8e9e7e 100755
--- a/direct/src/directbase/TestStart.py
+++ b/direct/src/directbase/TestStart.py
@@ -8,6 +8,9 @@
# Put an axis in the world:
base.loader.loadModel("models/misc/xyzAxis").reparentTo(base.render)
+assert base.camera is not None
+assert base.camLens is not None
+
base.camera.setPosHpr(0, -10.0, 0, 0, 0, 0)
base.camLens.setFov(52.0)
base.camLens.setNearFar(1.0, 10000.0)
diff --git a/direct/src/directbase/ThreeUpStart.py b/direct/src/directbase/ThreeUpStart.py
index 3ca50b34fe6..26f9bf74012 100644
--- a/direct/src/directbase/ThreeUpStart.py
+++ b/direct/src/directbase/ThreeUpStart.py
@@ -10,6 +10,9 @@
# Put an axis in the world:
base.loader.loadModel("models/misc/xyzAxis").reparentTo(base.render)
+assert base.camera is not None
+assert base.camLens is not None
+
base.camera.setPosHpr(0, -10.0, 0, 0, 0, 0)
base.camLens.setFov(52.0)
base.camLens.setNearFar(1.0, 10000.0)
diff --git a/direct/src/dist/FreezeTool.py b/direct/src/dist/FreezeTool.py
index 678f8c08885..37b697f8781 100644
--- a/direct/src/dist/FreezeTool.py
+++ b/direct/src/dist/FreezeTool.py
@@ -88,6 +88,7 @@ def pytest_imports():
'numpy.core._dtype_ctypes',
'numpy.core._methods',
],
+ 'panda3d.core': ['enum'],
'pandas.compat': ['lzma', 'cmath'],
'pandas._libs.tslibs.conversion': ['pandas._libs.tslibs.base'],
'plyer': ['plyer.platforms'],
@@ -925,7 +926,22 @@ def __init__(self, previous = None, debugLevel = 0,
if sys.version_info < (3, 8):
abi_flags += 'm'
- if 'linux' in self.platform:
+ if 'android' in self.platform:
+ arch = self.platform.split('_', 1)[1]
+ if arch in ('arm64', 'aarch64'):
+ suffixes.append(('.cpython-{0}{1}-aarch64-linux-android.so'.format(abi_version, abi_flags), 'rb', 3))
+ elif arch in ('arm', 'armv7l'):
+ suffixes.append(('.cpython-{0}{1}-arm-linux-androideabi.so'.format(abi_version, abi_flags), 'rb', 3))
+ elif arch in ('x86_64', 'amd64'):
+ suffixes.append(('.cpython-{0}{1}-x86_64-linux-android.so'.format(abi_version, abi_flags), 'rb', 3))
+ elif arch in ('i386', 'i686'):
+ suffixes.append(('.cpython-{0}{1}-i686-linux-android.so'.format(abi_version, abi_flags), 'rb', 3))
+
+ suffixes += [
+ ('.abi{0}.so'.format(sys.version_info[0]), 'rb', 3),
+ ('.so', 'rb', 3),
+ ]
+ elif 'linux' in self.platform:
suffixes += [
('.cpython-{0}{1}-x86_64-linux-gnu.so'.format(abi_version, abi_flags), 'rb', 3),
('.cpython-{0}{1}-i686-linux-gnu.so'.format(abi_version, abi_flags), 'rb', 3),
@@ -1150,6 +1166,9 @@ def done(self, addStartupModules = False):
self.modules['_frozen_importlib'] = self.ModuleDef('importlib._bootstrap', implicit = True)
self.modules['_frozen_importlib_external'] = self.ModuleDef('importlib._bootstrap_external', implicit = True)
+ if self.platform.startswith('android'):
+ self.modules['_android_support'] = self.ModuleDef('_android_support', implicit = True)
+
for moduleName in startupModules:
if moduleName not in self.modules:
self.addModule(moduleName, implicit = True)
diff --git a/direct/src/dist/_android.py b/direct/src/dist/_android.py
index ac6a8c85b96..bebb7bf9df2 100644
--- a/direct/src/dist/_android.py
+++ b/direct/src/dist/_android.py
@@ -50,7 +50,7 @@ def compile(attrib, manifest):
bitmask = 0
flags = attrib.value.split('|')
for flag in flags:
- bitmask = values[flag]
+ bitmask |= values[flag]
attrib.compiled_item.prim.int_hexadecimal_value = bitmask
return compile
@@ -168,10 +168,11 @@ def compile(attrib, manifest):
'allowSingleTap': bool_resource(0x1010259),
'allowTaskReparenting': bool_resource(0x1010204),
'alwaysRetainTaskState': bool_resource(0x1010203),
+ 'appCategory': enum_resource(0x01010545, "game", "audio", "video", "image", "social", "news", "maps", "productivity", "accessibility"),
'clearTaskOnLaunch': bool_resource(0x1010015),
+ 'configChanges': flag_resource(0x0101001f, mcc=0x0001, mnc=0x0002, locale=0x0004, touchscreen=0x0008, keyboard=0x0010, keyboardHidden=0x0020, navigation=0x0040, orientation=0x0080, screenLayout=0x0100, uiMode=0x0200, screenSize=0x0400, smallestScreenSize=0x0800, layoutDirection=0x2000, colorMode=0x4000, grammaticalGender=0x8000, fontScale=0x40000000, fontWeightAdjustment=0x10000000),
'debuggable': bool_resource(0x0101000f),
'documentLaunchMode': enum_resource(0x1010445, "none", "intoExisting", "always", "never"),
- 'configChanges': flag_resource(0x0101001f, mcc=0x0001, mnc=0x0002, locale=0x0004, touchscreen=0x0008, keyboard=0x0010, keyboardHidden=0x0020, navigation=0x0040, orientation=0x0080, screenLayout=0x0100, uiMode=0x0200, screenSize=0x0400, smallestScreenSize=0x0800, layoutDirection=0x2000, fontScale=0x40000000),
'enabled': bool_resource(0x101000e),
'excludeFromRecents': bool_resource(0x1010017),
'exported': bool_resource(0x1010010),
@@ -179,6 +180,7 @@ def compile(attrib, manifest):
'finishOnTaskLaunch': bool_resource(0x1010014),
'fullBackupContent': bool_resource(0x10104eb),
'glEsVersion': int_resource(0x1010281),
+ 'hardwareAccelerated': bool_resource(0x10102d3),
'hasCode': bool_resource(0x101000c),
'host': str_resource(0x1010028),
'icon': ref_resource(0x1010002),
@@ -194,8 +196,9 @@ def compile(attrib, manifest):
'name': str_resource(0x1010003),
'noHistory': bool_resource(0x101022d),
'pathPattern': str_resource(0x101002c),
- 'resizeableActivity': bool_resource(0x10104f6),
+ 'preferMinimalPostProcessing': bool_resource(0x101060c),
'required': bool_resource(0x101028e),
+ 'resizeableActivity': bool_resource(0x10104f6),
'scheme': str_resource(0x1010027),
'screenOrientation': enum_resource(0x101001e, 'landscape', 'portrait', 'user', 'behind', 'sensor', 'nosensor', 'sensorLandscape', 'sensorPortrait', 'reverseLandscape', 'reversePortrait', 'fullSensor', 'userLandscape', 'userPortrait', 'fullUser', 'locked'),
'stateNotNeeded': bool_resource(0x1010016),
diff --git a/direct/src/dist/commands.py b/direct/src/dist/commands.py
index 505e57697b2..cfddcd89aff 100644
--- a/direct/src/dist/commands.py
+++ b/direct/src/dist/commands.py
@@ -75,6 +75,7 @@ def _model_to_bam(_build_cmd, srcpath, dstpath):
src_fn = p3d.Filename.from_os_specific(srcpath)
dst_fn = p3d.Filename.from_os_specific(dstpath)
+ dst_fn.set_binary()
_register_python_loaders()
@@ -85,8 +86,30 @@ def _model_to_bam(_build_cmd, srcpath, dstpath):
if not node:
raise IOError('Failed to load model: %s' % (srcpath))
- if not p3d.NodePath(node).write_bam_file(dst_fn):
- raise IOError('Failed to write .bam file: %s' % (dstpath))
+ stream = p3d.OFileStream()
+ if not dst_fn.open_write(stream):
+ raise IOError('Failed to open .bam file for writing: %s' % (dstpath))
+
+ # We pass it the source filename here so that texture files are made
+ # relative to the original pathname and don't point from the destination
+ # back into the source directory.
+ dout = p3d.DatagramOutputFile()
+ if not dout.open(stream, src_fn) or not dout.write_header("pbj\0\n\r"):
+ raise IOError('Failed to write to .bam file: %s' % (dstpath))
+
+ writer = p3d.BamWriter(dout)
+ writer.root_node = node
+ writer.init()
+ if _build_cmd.bam_embed_textures:
+ writer.set_file_texture_mode(p3d.BamEnums.BTM_rawdata)
+ else:
+ writer.set_file_texture_mode(p3d.BamEnums.BTM_relative)
+ writer.write_object(node)
+ writer.flush()
+ writer = None
+ dout.close()
+ dout = None
+ stream.close()
macosx_binary_magics = (
@@ -165,11 +188,26 @@ def get_data(path):
"""
SITE_PY_ANDROID = """
+# Define this first, before we import anything that might import an extension
+# module.
import sys, os
+from importlib import _bootstrap, _bootstrap_external
+
+class AndroidExtensionFinder:
+ @classmethod
+ def find_spec(cls, fullname, path=None, target=None):
+ soname = 'libpy.' + fullname + '.so'
+ path = os.path.join(sys.platlibdir, soname)
+
+ if os.path.exists(path):
+ loader = _bootstrap_external.ExtensionFileLoader(fullname, path)
+ return _bootstrap.ModuleSpec(fullname, loader, origin=path)
+
+
+sys.meta_path.append(AndroidExtensionFinder)
+
+
from _frozen_importlib import _imp, FrozenImporter
-from importlib import _bootstrap_external
-from importlib.abc import Loader, MetaPathFinder
-from importlib.machinery import ModuleSpec
from io import RawIOBase, TextIOWrapper
from android_log import write as android_log_write
@@ -219,8 +257,9 @@ def readable(self):
def writable(self):
return True
-sys.stdout = AndroidLogStream(2, 'Python')
-sys.stderr = AndroidLogStream(3, 'Python')
+if sys.version_info < (3, 13):
+ sys.stdout = AndroidLogStream(4, 'python.stdout')
+ sys.stderr = AndroidLogStream(5, 'python.stderr')
# Alter FrozenImporter to give a __file__ property to frozen modules.
@@ -239,20 +278,6 @@ def get_data(path):
FrozenImporter.find_spec = find_spec
FrozenImporter.get_data = get_data
-
-
-class AndroidExtensionFinder(MetaPathFinder):
- @classmethod
- def find_spec(cls, fullname, path=None, target=None):
- soname = 'libpy.' + fullname + '.so'
- path = os.path.join(os.path.dirname(sys.executable), soname)
-
- if os.path.exists(path):
- loader = _bootstrap_external.ExtensionFileLoader(fullname, path)
- return ModuleSpec(fullname, loader, origin=path)
-
-
-sys.meta_path.append(AndroidExtensionFinder)
"""
@@ -271,6 +296,7 @@ def initialize_options(self):
self.application_id = None
self.android_abis = None
self.android_debuggable = False
+ self.android_app_category = None
self.android_version_code = 1
self.android_min_sdk_version = 21
self.android_max_sdk_version = None
@@ -289,6 +315,11 @@ def initialize_options(self):
'macosx_10_9_x86_64',
'win_amd64',
]
+
+ if sys.version_info >= (3, 13):
+ # This version of Python is only available for 10.13+.
+ self.platforms[1] = 'macosx_10_13_x86_64'
+
self.plugins = []
self.embed_prc_data = True
self.extra_prc_files = []
@@ -307,6 +338,7 @@ def initialize_options(self):
]
self.file_handlers = {}
self.bam_model_extensions = ['.egg', '.gltf', '.glb']
+ self.bam_embed_textures = False
self.exclude_dependencies = [
# Windows
'kernel32.dll', 'user32.dll', 'wsock32.dll', 'ws2_32.dll',
@@ -321,7 +353,8 @@ def initialize_options(self):
# manylinux1/linux
'libdl.so.*', 'libstdc++.so.*', 'libm.so.*', 'libgcc_s.so.*',
- 'libpthread.so.*', 'libc.so.*', 'ld-linux-x86-64.so.*',
+ 'libpthread.so.*', 'libc.so.*',
+ 'ld-linux-x86-64.so.*', 'ld-linux-aarch64.so.*',
'libgl.so.*', 'libx11.so.*', 'libncursesw.so.*', 'libz.so.*',
'librt.so.*', 'libutil.so.*', 'libnsl.so.1', 'libXext.so.6',
'libXrender.so.1', 'libICE.so.6', 'libSM.so.6', 'libEGL.so.1',
@@ -486,6 +519,18 @@ def finalize_options(self):
tmp.update(self.package_data_dirs)
self.package_data_dirs = tmp
+ if 'android' in self.platforms:
+ assert self.application_id, \
+ 'Must have a valid application_id when targeting Android!'
+
+ parts = self.application_id.split('.')
+ assert len(parts) >= 2, \
+ 'application_id must contain at least one \'.\' separator!'
+
+ for part in parts:
+ assert part.isidentifier(), \
+ 'Each part of application_id must be a valid identifier!'
+
# Default to all supported ABIs (for the given Android version).
if self.android_max_sdk_version and self.android_max_sdk_version < 21:
assert self.android_max_sdk_version >= 19, \
@@ -646,14 +691,20 @@ def download_wheels(self, platform):
subprocess.check_call([sys.executable, '-m', 'pip'] + pip_args)
except:
# Display a more helpful message for these common issues.
- if platform.startswith('manylinux2010_') and sys.version_info >= (3, 11):
+ if platform.startswith('macosx_10_9_') and sys.version_info >= (3, 13):
+ new_platform = platform.replace('macosx_10_9_', 'macosx_10_13_')
+ self.announce('This error likely occurs because {} is not a supported target as of Python 3.13.\nChange the target platform to {} instead.'.format(platform, new_platform), distutils.log.ERROR)
+ elif platform.startswith('manylinux2010_') and sys.version_info >= (3, 11):
new_platform = platform.replace('manylinux2010_', 'manylinux2014_')
self.announce('This error likely occurs because {} is not a supported target as of Python 3.11.\nChange the target platform to {} instead.'.format(platform, new_platform), distutils.log.ERROR)
elif platform.startswith('manylinux1_') and sys.version_info >= (3, 10):
new_platform = platform.replace('manylinux1_', 'manylinux2014_')
self.announce('This error likely occurs because {} is not a supported target as of Python 3.10.\nChange the target platform to {} instead.'.format(platform, new_platform), distutils.log.ERROR)
elif platform.startswith('macosx_10_6_') and sys.version_info >= (3, 8):
- new_platform = platform.replace('macosx_10_6_', 'macosx_10_9_')
+ if sys.version_info >= (3, 13):
+ new_platform = platform.replace('macosx_10_6_', 'macosx_10_13_')
+ else:
+ new_platform = platform.replace('macosx_10_6_', 'macosx_10_9_')
self.announce('This error likely occurs because {} is not a supported target as of Python 3.8.\nChange the target platform to {} instead.'.format(platform, new_platform), distutils.log.ERROR)
raise
@@ -746,10 +797,29 @@ def generate_android_manifest(self, path):
version = self.distribution.get_version()
classifiers = self.distribution.get_classifiers()
- is_game = False
- for classifier in classifiers:
- if classifier == 'Topic :: Games/Entertainment' or classifier.startswith('Topic :: Games/Entertainment ::'):
- is_game = True
+ # If we have no app category, determine it based on the classifiers.
+ category = self.android_app_category
+ if not category:
+ for classifier in classifiers:
+ classifier = tuple(classifier.split(' :: '))
+ if len(classifier) < 2 or classifier[0] != 'Topic':
+ continue
+
+ if classifier[:2] == ('Topic', 'Games/Entertainment'):
+ category = 'game'
+ break
+ elif classifier[:3] == ('Topic', 'Multimedia', 'Audio'):
+ category = 'audio'
+ elif classifier[:4] == ('Topic', 'Multimedia', 'Graphics', 'Editors'):
+ category = 'image'
+ elif classifier[:2] == ('Topic', 'Communications', 'Usenet News'):
+ category = 'news'
+ elif classifier[:2] == ('Topic', 'Office/Business'):
+ category = 'productivity'
+ elif classifier[:3] == ('Topic', 'Communications', 'Chat'):
+ category = 'social'
+ elif classifier[:3] == ('Topic', 'Multimedia', 'Video'):
+ category = 'video'
manifest = ET.Element('manifest')
manifest.set('xmlns:android', 'http://schemas.android.com/apk/res/android')
@@ -780,9 +850,13 @@ def generate_android_manifest(self, path):
application = ET.SubElement(manifest, 'application')
application.set('android:label', name)
- application.set('android:isGame', ('false', 'true')[is_game])
+ if category == 'game':
+ application.set('android:isGame', 'true')
+ if category:
+ application.set('android:appCategory', category)
application.set('android:debuggable', ('false', 'true')[self.android_debuggable])
application.set('android:extractNativeLibs', 'true')
+ application.set('android:hardwareAccelerated', 'true')
app_icon = self.icon_objects.get('*', self.icon_objects.get(self.macos_main_app))
if app_icon:
@@ -792,9 +866,11 @@ def generate_android_manifest(self, path):
activity = ET.SubElement(application, 'activity')
activity.set('android:name', 'org.panda3d.android.PythonActivity')
activity.set('android:label', appname)
- activity.set('android:theme', '@android:style/Theme.NoTitleBar')
- activity.set('android:configChanges', 'orientation|keyboardHidden')
+ activity.set('android:theme', '@android:style/Theme.NoTitleBar.Fullscreen')
+ activity.set('android:alwaysRetainTaskState', 'true')
+ activity.set('android:configChanges', 'layoutDirection|locale|grammaticalGender|fontScale|fontWeightAdjustment|orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation')
activity.set('android:launchMode', 'singleInstance')
+ activity.set('android:preferMinimalPostProcessing', 'true')
act_icon = self.icon_objects.get(appname)
if act_icon and act_icon is not app_icon:
diff --git a/direct/src/distributed/ConnectionRepository.py b/direct/src/distributed/ConnectionRepository.py
index 62c2d5da466..a29c61cafa8 100644
--- a/direct/src/distributed/ConnectionRepository.py
+++ b/direct/src/distributed/ConnectionRepository.py
@@ -174,35 +174,6 @@ def _adjustGcThreshold(self, task):
return retVal
def generateGlobalObject(self, doId, dcname, values=None):
- def applyFieldValues(distObj, dclass, values):
- for i in range(dclass.getNumInheritedFields()):
- field = dclass.getInheritedField(i)
- if field.asMolecularField() is None:
- value = values.get(field.getName(), None)
- if value is None and field.isRequired():
- # Gee, this could be better. What would really be
- # nicer is to get value from field.getDefaultValue
- # or similar, but that returns a binary string, not
- # a python tuple, like the following does. If you
- # want to change something better, please go ahead.
- packer = DCPacker()
- packer.beginPack(field)
- packer.packDefaultValue()
- packer.endPack()
-
- unpacker = DCPacker()
- unpacker.setUnpackData(packer.getString())
- unpacker.beginUnpack(field)
- value = unpacker.unpackObject()
- unpacker.endUnpack()
- if value is not None:
- function = getattr(distObj, field.getName())
- if function is not None:
- function(*value)
- else:
- self.notify.error("\n\n\nNot able to find %s.%s"%(
- distObj.__class__.__name__, field.getName()))
-
# Look up the dclass
dclass = self.dclassesByName.get(dcname+self.dcSuffix)
if dclass is None:
@@ -229,7 +200,37 @@ def applyFieldValues(distObj, dclass, values):
distObj.generateInit() # Only called when constructed
distObj.generate()
if values is not None:
- applyFieldValues(distObj, dclass, values)
+ for i in range(dclass.getNumInheritedFields()):
+ field = dclass.getInheritedField(i)
+ if field.asMolecularField() is None:
+ value = values.get(field.getName(), None)
+ if value is None and field.isRequired():
+ # Gee, this could be better. What would really be
+ # nicer is to get value from field.getDefaultValue
+ # or similar, but that returns a binary string, not
+ # a python tuple, like the following does. If you
+ # want to change something better, please go ahead.
+ packer = DCPacker()
+ packer.beginPack(field)
+ packer.packDefaultValue()
+ packer.endPack()
+
+ unpacker = DCPacker()
+ unpacker.setUnpackData(packer.getString())
+ unpacker.beginUnpack(field)
+ value = unpacker.unpackObject()
+ unpacker.endUnpack()
+ if value is not None:
+ function = getattr(distObj, field.getName())
+ if function is not None:
+ function(*value)
+ else:
+ self.notify.error(
+ "\n\n\nNot able to find %s.%s" % (
+ distObj.__class__.__name__,
+ field.getName()
+ )
+ )
distObj.announceGenerate()
distObj.parentId = 0
distObj.zoneId = 0
diff --git a/direct/src/distributed/DistributedObjectAI.py b/direct/src/distributed/DistributedObjectAI.py
index b67ee57d1ee..164d57eb2c8 100644
--- a/direct/src/distributed/DistributedObjectAI.py
+++ b/direct/src/distributed/DistributedObjectAI.py
@@ -299,7 +299,7 @@ def getZoneData(self):
# setLocation destroys self._zoneData if we move away to
# a different zone
if self._zoneData is None:
- from otp.ai.AIZoneData import AIZoneData # type: ignore[import]
+ from otp.ai.AIZoneData import AIZoneData # type: ignore[import-not-found]
self._zoneData = AIZoneData(self.air, self.parentId, self.zoneId)
return self._zoneData
@@ -489,7 +489,7 @@ def beginBarrier(self, name, avIds, timeout, callback):
# simultaneously on different lists of avatars, although they
# should have different names.
- from otp.ai import Barrier # type: ignore[import]
+ from otp.ai import Barrier # type: ignore[import-not-found]
context = self.__nextBarrierContext
# We assume the context number is passed as a uint16.
self.__nextBarrierContext = (self.__nextBarrierContext + 1) & 0xffff
diff --git a/direct/src/distributed/DistributedObjectUD.py b/direct/src/distributed/DistributedObjectUD.py
index 341ce41616d..a49110e472e 100755
--- a/direct/src/distributed/DistributedObjectUD.py
+++ b/direct/src/distributed/DistributedObjectUD.py
@@ -424,7 +424,7 @@ def beginBarrier(self, name, avIds, timeout, callback):
# simultaneously on different lists of avatars, although they
# should have different names.
- from otp.ai import Barrier # type: ignore[import]
+ from otp.ai import Barrier # type: ignore[import-not-found]
context = self.__nextBarrierContext
# We assume the context number is passed as a uint16.
self.__nextBarrierContext = (self.__nextBarrierContext + 1) & 0xffff
diff --git a/direct/src/distributed/cConnectionRepository.cxx b/direct/src/distributed/cConnectionRepository.cxx
index 0eb40547efd..8dd11eadbe7 100644
--- a/direct/src/distributed/cConnectionRepository.cxx
+++ b/direct/src/distributed/cConnectionRepository.cxx
@@ -688,11 +688,12 @@ handle_update_field() {
nassertr(doId2do != nullptr, false);
PyObject *doId = PyLong_FromUnsignedLong(do_id);
- PyObject *distobj = PyDict_GetItem(doId2do, doId);
+ PyObject *distobj;
+ int result = PyDict_GetItemRef(doId2do, doId, &distobj);
Py_DECREF(doId);
Py_DECREF(doId2do);
- if (distobj != nullptr) {
+ if (result > 0) {
PyObject *dclass_obj = PyObject_GetAttrString(distobj, "dclass");
nassertr(dclass_obj != nullptr, false);
@@ -711,9 +712,11 @@ handle_update_field() {
nassertr(neverDisable != nullptr, false);
unsigned int cNeverDisable = PyLong_AsLong(neverDisable);
+ Py_DECREF(neverDisable);
if (!cNeverDisable) {
// in quiet zone and distobj is disable-able drop update on the
// floor
+ Py_DECREF(distobj);
#if defined(HAVE_THREADS) && !defined(SIMPLE_THREADS)
PyGILState_Release(gstate);
#endif
@@ -721,13 +724,8 @@ handle_update_field() {
}
}
- // It's a good idea to ensure the reference count to distobj is raised
- // while we call the update method--otherwise, the update method might
- // get into trouble if it tried to delete the object from the doId2do
- // map.
- PyObject *distobj_ref = Py_NewRef(distobj);
- invoke_extension(dclass).receive_update(distobj_ref, _di);
- Py_DECREF(distobj_ref);
+ invoke_extension(dclass).receive_update(distobj, _di);
+ Py_DECREF(distobj);
if (PyErr_Occurred()) {
#if defined(HAVE_THREADS) && !defined(SIMPLE_THREADS)
@@ -777,10 +775,11 @@ handle_update_field_owner() {
PyObject *doId = PyLong_FromUnsignedLong(do_id);
// pass the update to the owner view first
- PyObject *distobjOV = PyDict_GetItem(doId2ownerView, doId);
+ PyObject *distobjOV;
+ int result = PyDict_GetItemRef(doId2ownerView, doId, &distobjOV);
Py_DECREF(doId2ownerView);
- if (distobjOV != nullptr) {
+ if (result > 0) {
PyObject *dclass_obj = PyObject_GetAttrString(distobjOV, "dclass");
nassertr(dclass_obj != nullptr, false);
@@ -798,32 +797,29 @@ handle_update_field_owner() {
int field_id = packer.raw_unpack_uint16();
DCField *field = dclass->get_field_by_index(field_id);
if (field->is_ownrecv()) {
- // It's a good idea to ensure the reference count to distobjOV is
- // raised while we call the update method--otherwise, the update
- // method might get into trouble if it tried to delete the object from
- // the doId2do map.
- PyObject *distobjOV_ref = Py_NewRef(distobjOV);
// make a copy of the datagram iterator so that we can use the main
// iterator for the non-owner update
DatagramIterator _odi(_di);
- invoke_extension(dclass).receive_update(distobjOV_ref, _odi);
- Py_DECREF(distobjOV_ref);
+ invoke_extension(dclass).receive_update(distobjOV, _odi);
if (PyErr_Occurred()) {
+ Py_DECREF(distobjOV);
#if defined(HAVE_THREADS) && !defined(SIMPLE_THREADS)
PyGILState_Release(gstate);
#endif
return false;
}
}
+ Py_DECREF(distobjOV);
}
// now pass the update to the visible view
- PyObject *distobj = PyDict_GetItem(doId2do, doId);
+ PyObject *distobj;
+ result = PyDict_GetItemRef(doId2do, doId, &distobj);
Py_DECREF(doId);
Py_DECREF(doId2do);
- if (distobj != nullptr) {
+ if (result > 0) {
PyObject *dclass_obj = PyObject_GetAttrString(distobj, "dclass");
nassertr(dclass_obj != nullptr, false);
@@ -842,21 +838,17 @@ handle_update_field_owner() {
//int field_id = packer.raw_unpack_uint16();
//DCField *field = dclass->get_field_by_index(field_id);
if (true) {//field->is_broadcast()) {
- // It's a good idea to ensure the reference count to distobj is raised
- // while we call the update method--otherwise, the update method might
- // get into trouble if it tried to delete the object from the doId2do
- // map.
- PyObject *distobj_ref = Py_NewRef(distobj);
- invoke_extension(dclass).receive_update(distobj_ref, _di);
- Py_DECREF(distobj_ref);
+ invoke_extension(dclass).receive_update(distobj, _di);
if (PyErr_Occurred()) {
+ Py_DECREF(distobj);
#if defined(HAVE_THREADS) && !defined(SIMPLE_THREADS)
PyGILState_Release(gstate);
#endif
return false;
}
}
+ Py_DECREF(distobj);
}
}
@@ -956,12 +948,14 @@ describe_message(std::ostream &out, const string &prefix,
nassertv(doId2do != nullptr);
PyObject *doId = PyLong_FromUnsignedLong(do_id);
- PyObject *distobj = PyDict_GetItem(doId2do, doId);
+ PyObject *distobj;
+ int result = PyDict_GetItemRef(doId2do, doId, &distobj);
Py_DECREF(doId);
Py_DECREF(doId2do);
- if (distobj != nullptr) {
+ if (result > 0) {
PyObject *dclass_obj = PyObject_GetAttrString(distobj, "dclass");
+ Py_DECREF(distobj);
nassertv(dclass_obj != nullptr);
PyObject *dclass_this = PyObject_GetAttrString(dclass_obj, "this");
diff --git a/direct/src/filter/CommonFilters.py b/direct/src/filter/CommonFilters.py
index 85d0a18f16c..942b2748f68 100644
--- a/direct/src/filter/CommonFilters.py
+++ b/direct/src/filter/CommonFilters.py
@@ -100,6 +100,11 @@
"""
+class ToneMap:
+ ACES = object()
+ PBR_NEUTRAL = object()
+
+
class FilterConfig:
pass
@@ -279,16 +284,19 @@ def reconfigure(self, fullrebuild, changed):
text = "//Cg\n"
if "HighDynamicRange" in configuration:
- text += "static const float3x3 aces_input_mat = {\n"
- text += " {0.59719, 0.35458, 0.04823},\n"
- text += " {0.07600, 0.90834, 0.01566},\n"
- text += " {0.02840, 0.13383, 0.83777},\n"
- text += "};\n"
- text += "static const float3x3 aces_output_mat = {\n"
- text += " { 1.60475, -0.53108, -0.07367},\n"
- text += " {-0.10208, 1.10813, -0.00605},\n"
- text += " {-0.00327, -0.07276, 1.07602},\n"
- text += "};\n"
+ tonemap = configuration["HighDynamicRange"]
+ if tonemap is ToneMap.ACES:
+ text += "static const float3x3 aces_input_mat = {\n"
+ text += " {0.59719, 0.35458, 0.04823},\n"
+ text += " {0.07600, 0.90834, 0.01566},\n"
+ text += " {0.02840, 0.13383, 0.83777},\n"
+ text += "};\n"
+ text += "static const float3x3 aces_output_mat = {\n"
+ text += " { 1.60475, -0.53108, -0.07367},\n"
+ text += " {-0.10208, 1.10813, -0.00605},\n"
+ text += " {-0.00327, -0.07276, 1.07602},\n"
+ text += "};\n"
+
text += "void vshader(float4 vtx_position : POSITION,\n"
text += " out float4 l_position : POSITION,\n"
@@ -381,10 +389,30 @@ def reconfigure(self, fullrebuild, changed):
if "ExposureAdjust" in configuration:
text += " o_color.rgb *= k_exposure;\n"
- # With thanks to Stephen Hill!
if "HighDynamicRange" in configuration:
- text += " float3 aces_color = mul(aces_input_mat, o_color.rgb);\n"
- text += " o_color.rgb = saturate(mul(aces_output_mat, (aces_color * (aces_color + 0.0245786f) - 0.000090537f) / (aces_color * (0.983729f * aces_color + 0.4329510f) + 0.238081f)));\n"
+ tonemap = configuration["HighDynamicRange"]
+ if tonemap is ToneMap.ACES:
+ # With thanks to Stephen Hill!
+ text += " float3 aces_color = mul(aces_input_mat, o_color.rgb);\n"
+ text += " o_color.rgb = saturate(mul(aces_output_mat, (aces_color * (aces_color + 0.0245786f) - 0.000090537f) / (aces_color * (0.983729f * aces_color + 0.4329510f) + 0.238081f)));\n"
+ elif tonemap is ToneMap.PBR_NEUTRAL:
+ text += " const float start_compression = 0.8 - 0.04;\n"
+ text += " const float desaturation = 0.15;\n"
+
+ text += " float x = min(o_color.r, min(o_color.g, o_color.b));\n"
+ text += " float offset = x < 0.08 ? x - 6.25 * x * x : 0.04;\n"
+ text += " o_color.rgb -= offset;\n"
+
+ text += " float peak = max(o_color.r, max(o_color.g, o_color.b));\n"
+
+ text += " if (peak >= start_compression) {\n"
+ text += " const float d = 1.0 - start_compression;\n"
+ text += " float new_peak = 1.0 - d * d / (peak + d - start_compression);\n"
+ text += " o_color.rgb *= new_peak / peak;\n"
+ text += " float g = 1.0 - 1.0 / (desaturation * (peak - new_peak) + 1.0);\n"
+
+ text += " o_color.rgb = lerp(o_color.rgb, new_peak * float3(1, 1, 1), g);\n"
+ text += "}\n"
if "GammaAdjust" in configuration:
gamma = configuration["GammaAdjust"]
@@ -668,10 +696,10 @@ def delSrgbEncode(self):
return self.reconfigure(old_enable, "SrgbEncode")
return True
- def setHighDynamicRange(self):
+ def setHighDynamicRange(self, tonemap=ToneMap.ACES):
""" Enables HDR rendering by using a floating-point framebuffer,
disabling color clamping on the main scene, and applying a tone map
- operator (ACES).
+ operator (ACES or Khronos PBR Neutral).
It may also be necessary to use setExposureAdjust to perform exposure
compensation on the scene, depending on the lighting intensity.
@@ -679,8 +707,11 @@ def setHighDynamicRange(self):
.. versionadded:: 1.10.7
"""
- fullrebuild = (("HighDynamicRange" in self.configuration) is False)
- self.configuration["HighDynamicRange"] = 1
+ fullrebuild = "HighDynamicRange" not in self.configuration or \
+ self.configuration["HighDynamicRange"] is not tonemap
+ if tonemap is not ToneMap.ACES and tonemap is not ToneMap.PBR_NEUTRAL:
+ raise ValueError("Invalid value for tonemap")
+ self.configuration["HighDynamicRange"] = tonemap
return self.reconfigure(fullrebuild, "HighDynamicRange")
def delHighDynamicRange(self):
diff --git a/direct/src/fsm/FSM.py b/direct/src/fsm/FSM.py
index 06efc4b1a55..e7a44986912 100644
--- a/direct/src/fsm/FSM.py
+++ b/direct/src/fsm/FSM.py
@@ -485,9 +485,8 @@ def requestNext(self, *args):
new_index = (cur_index + 1) % len(self.stateArray)
return self.request(self.stateArray[new_index], args)
else:
- assert self.notifier.debug(
+ assert self.notify.debug(
"stateArray empty. Can't switch to next.")
-
finally:
self.fsmLock.release()
@@ -503,7 +502,7 @@ def requestPrev(self, *args):
new_index = (cur_index - 1) % len(self.stateArray)
return self.request(self.stateArray[new_index], args)
else:
- assert self.notifier.debug(
+ assert self.notify.debug(
"stateArray empty. Can't switch to next.")
finally:
self.fsmLock.release()
diff --git a/direct/src/interval/cMetaInterval.cxx b/direct/src/interval/cMetaInterval.cxx
index 3627a99bc00..a203167557e 100644
--- a/direct/src/interval/cMetaInterval.cxx
+++ b/direct/src/interval/cMetaInterval.cxx
@@ -679,7 +679,7 @@ write(std::ostream &out, int indent_level) const {
int total_digits = num_decimals + 4;
static const int max_digits = 32; // totally arbitrary
nassertv(total_digits <= max_digits);
- char format_str[16];
+ char format_str[26];
sprintf(format_str, "%%%d.%df", total_digits, num_decimals);
indent(out, indent_level) << get_name() << ":\n";
@@ -708,7 +708,7 @@ timeline(std::ostream &out) const {
int total_digits = num_decimals + 4;
static const int max_digits = 32; // totally arbitrary
nassertv(total_digits <= max_digits);
- char format_str[16];
+ char format_str[26];
sprintf(format_str, "%%%d.%df", total_digits, num_decimals);
int extra_indent_level = 0;
diff --git a/direct/src/showbase/DistancePhasedNode.py b/direct/src/showbase/DistancePhasedNode.py
index fc4c5a471b1..5fc12769e00 100755
--- a/direct/src/showbase/DistancePhasedNode.py
+++ b/direct/src/showbase/DistancePhasedNode.py
@@ -87,7 +87,8 @@ def __deallocateId(id):
"""
Reuse abandoned ids.
"""
- DistancePhasedNode.__InstanceDeque.append(id)
+ if DistancePhasedNode is not None:
+ DistancePhasedNode.__InstanceDeque.append(id)
def __init__(self, name, phaseParamMap = {},
autoCleanup = True,
diff --git a/direct/src/showbase/Loader.py b/direct/src/showbase/Loader.py
index 141c71a3684..7febb9012dc 100644
--- a/direct/src/showbase/Loader.py
+++ b/direct/src/showbase/Loader.py
@@ -126,7 +126,7 @@ async def __aiter__(self):
yield await req
# special methods
- def __init__(self, base):
+ def __init__(self, base=None):
self.base = base
self.loader = PandaLoader.getGlobalPtr()
@@ -134,15 +134,15 @@ def __init__(self, base):
self.hook = "async_loader_%s" % (Loader.loaderIndex)
Loader.loaderIndex += 1
- self.accept(self.hook, self.__gotAsyncObject)
-
- self._loadPythonFileTypes()
def destroy(self):
self.ignore(self.hook)
self.loader.stopThreads()
del self.base
- del self.loader
+
+ def _init_base(self, base):
+ self.base = base
+ self.accept(self.hook, self.__gotAsyncObject)
@classmethod
def _loadPythonFileTypes(cls):
@@ -229,6 +229,10 @@ def loadModel(self, modelPath, loaderOptions = None, noCache = None,
"""
assert Loader.notify.debug("Loading model: %s" % (modelPath,))
+
+ if not self._loadedPythonFileTypes:
+ self._loadPythonFileTypes()
+
if loaderOptions is None:
loaderOptions = LoaderOptions()
else:
@@ -416,6 +420,9 @@ def saveModel(self, modelPath, node, loaderOptions = None,
a callback is used, the model is saved asynchronously, and the
true/false status is passed to the callback function. """
+ if not self._loadedPythonFileTypes:
+ self._loadPythonFileTypes()
+
if loaderOptions is None:
loaderOptions = LoaderOptions()
else:
diff --git a/direct/src/showbase/ShowBase.py b/direct/src/showbase/ShowBase.py
index 75436a4d647..26370c65a11 100644
--- a/direct/src/showbase/ShowBase.py
+++ b/direct/src/showbase/ShowBase.py
@@ -32,6 +32,8 @@
"""
+from __future__ import annotations
+
__all__ = ['ShowBase', 'WindowControls']
# This module redefines the builtin import function with one
@@ -71,9 +73,11 @@
GraphicsPipe,
GraphicsPipeSelection,
GraphicsWindow,
+ InputDevice,
InputDeviceManager,
InputDeviceNode,
KeyboardButton,
+ Lens,
LensNode,
Mat4,
ModelNode,
@@ -118,9 +122,11 @@
from direct.extensions_native import NodePath_extensions # pylint: disable=unused-import
# This needs to be available early for DirectGUI imports
+from typing import Any
+builtins: Any # Tell mypy not to worry about us setting attributes on builtins
import sys
import builtins
-builtins.config = DConfig # type: ignore[attr-defined]
+builtins.config = DConfig
from direct.directnotify.DirectNotifyGlobal import directNotify, giveNotify
from direct.directnotify.Notifier import Notifier
@@ -141,7 +147,7 @@
from direct.showbase import ExceptionVarDump
from . import DirectObject
from . import SfxPlayer
-from typing import ClassVar, Optional
+from typing import Callable, ClassVar, Literal, NoReturn
if __debug__:
from direct.showbase import GarbageReport
from direct.directutil import DeltaProfiler
@@ -150,9 +156,10 @@
@atexit.register
-def exitfunc():
- if getattr(builtins, 'base', None) is not None:
- builtins.base.destroy()
+def exitfunc() -> None:
+ base = getattr(builtins, 'base', None)
+ if base is not None:
+ base.destroy()
# Now ShowBase is a DirectObject. We need this so ShowBase can hang
# hooks on messages, particularly on window-event. This doesn't
@@ -170,7 +177,9 @@ class ShowBase(DirectObject.DirectObject):
aspect2d: NodePath
pixel2d: NodePath
- def __init__(self, fStartDirect=True, windowType=None):
+ cluster: Any | None
+
+ def __init__(self, fStartDirect: bool = True, windowType: str | None = None) -> None:
"""Opens a window, sets up a 3-D and several 2-D scene graphs, and
everything else needed to render the scene graph to the window.
@@ -233,10 +242,10 @@ def __init__(self, fStartDirect=True, windowType=None):
self.wantRender2dp = ConfigVariableBool('want-render2dp', True).value
self.screenshotExtension = ConfigVariableString('screenshot-extension', 'jpg').value
- self.musicManager = None
- self.musicManagerIsValid = None
- self.sfxManagerList = []
- self.sfxManagerIsValidList = []
+ self.musicManager: AudioManager | None = None
+ self.musicManagerIsValid: bool | None = None
+ self.sfxManagerList: list[AudioManager] = []
+ self.sfxManagerIsValidList: list[bool] = []
self.wantStats = ConfigVariableBool('want-pstats', False).value
self.wantTk = False
@@ -245,12 +254,12 @@ def __init__(self, fStartDirect=True, windowType=None):
#: Fill this in with a function to invoke when the user "exits"
#: the program by closing the main window.
- self.exitFunc = None
+ self.exitFunc: Callable[[], object] | None = None
#: Add final-exit callbacks to this list. These will be called
#: when sys.exit() is called, after Panda has unloaded, and
#: just before Python is about to shut down.
- self.finalExitCallbacks = []
+ self.finalExitCallbacks: list[Callable[[], object]] = []
# Set up the TaskManager to reset the PStats clock back
# whenever we resume from a pause. This callback function is
@@ -268,7 +277,7 @@ def __init__(self, fStartDirect=True, windowType=None):
self.__configAspectRatio = ConfigVariableDouble('aspect-ratio', 0).value
# This variable is used to see if the aspect ratio has changed when
# we get a window-event.
- self.__oldAspectRatio = None
+ self.__oldAspectRatio: float | None = None
#: This is set to the value of the window-type config variable, but may
#: optionally be overridden in the Showbase constructor. Should either
@@ -279,68 +288,68 @@ def __init__(self, fStartDirect=True, windowType=None):
self.requireWindow = ConfigVariableBool('require-window', True).value
#: This is the main, or only window; see `winList` for a list of *all* windows.
- self.win = None
- self.frameRateMeter = None
- self.sceneGraphAnalyzerMeter = None
+ self.win: GraphicsOutput | None = None
+ self.frameRateMeter: FrameRateMeter | None = None
+ self.sceneGraphAnalyzerMeter: SceneGraphAnalyzerMeter | None = None
#: A list of all windows opened via `openWindow()`.
- self.winList = []
- self.winControls = []
- self.mainWinMinimized = 0
- self.mainWinForeground = 0
+ self.winList: list[GraphicsEngine] = []
+ self.winControls: list[WindowControls] = []
+ self.mainWinMinimized = False
+ self.mainWinForeground = False
#: Contains the :class:`~panda3d.core.GraphicsPipe` object created by
#: `makeDefaultPipe()`.
- self.pipe = None
+ self.pipe: GraphicsPipe | None = None
#: The full list of :class:`~panda3d.core.GraphicsPipe` objects,
#: including any auxiliary pipes. Filled by `makeAllPipes()`.
- self.pipeList = []
- self.mouse2cam = None
- self.buttonThrowers = None
- self.mouseWatcher = None
+ self.pipeList: list[GraphicsPipe] = []
+ self.mouse2cam: NodePath | None = None
+ self.buttonThrowers: list[ButtonThrower] | None = None
+ self.mouseWatcher: NodePath | None = None
#: The :class:`~panda3d.core.MouseWatcher` object, created by
#: `setupMouse()`.
- self.mouseWatcherNode = None
- self.pointerWatcherNodes = None
- self.mouseInterface = None
- self.drive = None
- self.trackball = None
- self.texmem = None
- self.showVertices = None
- self.deviceButtonThrowers = []
+ self.mouseWatcherNode: MouseWatcher | None = None
+ self.pointerWatcherNodes: list[MouseWatcher] | None = None
+ self.mouseInterface: NodePath | None = None
+ self.drive: NodePath | None = None
+ self.trackball: NodePath | None = None
+ self.texmem: Any | None = None
+ self.showVertices: NodePath | None = None
+ self.deviceButtonThrowers: list[NodePath] = []
#: This is a :class:`~panda3d.core.NodePath` pointing to the
#: :class:`~panda3d.core.Camera` object set up for the 3D scene.
#: Usually a child of `camera`.
- self.cam = None
+ self.cam: NodePath | None = None
#: Same as `cam`, but for the 2D scene graph.
- self.cam2d = None
+ self.cam2d: NodePath | None = None
#: Same as `cam2d`, but for the 2D overlay scene graph.
- self.cam2dp = None
+ self.cam2dp: NodePath | None = None
#: This is the :class:`~panda3d.core.NodePath` that should be used to
#: manipulate the camera. It points at the node to which the default
#: camera (`cam`, `camNode`) is attached.
- self.camera = None
+ self.camera: NodePath | None = None
#: Same as `camera`, but for the 2D scene graph. Parent of `cam2d`.
- self.camera2d = None
+ self.camera2d: NodePath | None = None
#: Same as `camera2d`, but for the 2D overlay scene graph. Parent of
#: `cam2dp`.
- self.camera2dp = None
+ self.camera2dp: NodePath | None = None
#: A list of all cameras created with `makeCamera()`, including `cam`.
- self.camList = []
+ self.camList: list[NodePath] = []
#: Convenience accessor for base.cam.node(), containing a
#: :class:`~panda3d.core.Camera` object.
- self.camNode = None
+ self.camNode: Camera | None = None
#: Convenience accessor for base.camNode.get_lens(), containing a
#: :class:`~panda3d.core.Lens` object.
- self.camLens = None
- self.camFrustumVis = None
+ self.camLens: Lens | None = None
+ self.camFrustumVis: NodePath | None = None
self.direct = None
#: This is used to store the wx.Application object used when want-wx is
#: set or `startWx()` is called.
- self.wxApp = None
+ self.wxApp: Any | None = None
self.wxAppCreated = False
- self.tkRoot = None
+ self.tkRoot: Any | None = None
self.tkRootCreated = False
# This is used for syncing multiple PCs in a distributed cluster
@@ -371,11 +380,11 @@ def __init__(self, fStartDirect=True, windowType=None):
#: traverse it automatically in the collisionLoop task, so you won't
#: need to call :meth:`~panda3d.core.CollisionTraverser.traverse()`
#: yourself every frame.
- self.cTrav = 0
- self.shadowTrav = 0
+ self.cTrav: CollisionTraverser | Literal[0] = 0
+ self.shadowTrav: CollisionTraverser | Literal[0] = 0
self.cTravStack = Stack()
# Ditto for an AppTraverser.
- self.appTrav = 0
+ self.appTrav: Any | Literal[0] = 0
# This is the DataGraph traverser, which we might as well
# create now.
@@ -383,7 +392,7 @@ def __init__(self, fStartDirect=True, windowType=None):
# Maybe create a RecorderController to record and/or play back
# the user session.
- self.recorder = None
+ self.recorder: RecorderController | None = None
playbackSession = ConfigVariableFilename('playback-session', '')
recordSession = ConfigVariableFilename('record-session', '')
if not playbackSession.empty():
@@ -429,9 +438,9 @@ def __init__(self, fStartDirect=True, windowType=None):
self.useTrackball()
#: `.Loader.Loader` object.
- self.loader = Loader.Loader(self)
+ self.loader = ShowBaseGlobal.loader
+ self.loader._init_base(self)
self.graphicsEngine.setDefaultLoader(self.loader.loader)
- ShowBaseGlobal.loader = self.loader
#: The global event manager, as imported from `.EventManagerGlobal`.
self.eventMgr = eventMgr
@@ -448,22 +457,22 @@ def __init__(self, fStartDirect=True, windowType=None):
#: If `enableParticles()` has been called, this is the particle manager
#: as imported from :mod:`direct.particles.ParticleManagerGlobal`.
self.particleMgr = None
- self.particleMgrEnabled = 0
+ self.particleMgrEnabled = False
#: If `enableParticles()` has been called, this is the physics manager
#: as imported from :mod:`direct.showbase.PhysicsManagerGlobal`.
self.physicsMgr = None
- self.physicsMgrEnabled = 0
- self.physicsMgrAngular = 0
+ self.physicsMgrEnabled = False
+ self.physicsMgrAngular = False
#: This is the global :class:`~panda3d.core.InputDeviceManager`, which
#: keeps track of connected input devices.
self.devices = InputDeviceManager.getGlobalPtr()
- self.__inputDeviceNodes = {}
+ self.__inputDeviceNodes: dict[InputDevice, NodePath] = {}
self.createStats()
- self.AppHasAudioFocus = 1
+ self.AppHasAudioFocus = True
# Get a pointer to Panda's global ClockObject, used for
# synchronizing events between Python and C.
@@ -502,7 +511,7 @@ def __init__(self, fStartDirect=True, windowType=None):
affinity = ConfigVariableInt('client-cpu-affinity', -1).value
if (affinity in (None, -1)) and autoAffinity:
affinity = 0
- if affinity not in (None, -1):
+ if affinity is not None and affinity != -1:
# Windows XP supports a 32-bit affinity mask
TrueClock.getGlobalPtr().setCpuAffinity(1 << (affinity % 32))
@@ -575,7 +584,7 @@ def __init__(self, fStartDirect=True, windowType=None):
# Now hang a hook on the window-event from Panda. This allows
# us to detect when the user resizes, minimizes, or closes the
# main window.
- self.__prevWindowProperties = None
+ self.__prevWindowProperties: WindowProperties | None = None
self.__directObject.accept('window-event', self.windowEvent)
# Transition effects (fade, iris, etc)
@@ -658,7 +667,7 @@ def printEnvDebugInfo(self):
#print getDnaPath()
print("}")
- def destroy(self):
+ def destroy(self) -> None:
""" Call this function to destroy the ShowBase and stop all
its tasks, freeing all of the Panda resources. Normally, you
should not need to call it explicitly, as it is bound to the
@@ -672,7 +681,7 @@ def destroy(self):
complete.
"""
- if Thread.getCurrentThread() != Thread.getMainThread():
+ if sys.platform != "android" and Thread.getCurrentThread() != Thread.getMainThread():
task = taskMgr.add(self.destroy, extraArgs=[])
task.wait()
return
@@ -704,6 +713,7 @@ def destroy(self):
self.shutdown()
if getattr(self, 'musicManager', None):
+ assert self.musicManager is not None
self.musicManager.shutdown()
self.musicManager = None
for sfxManager in self.sfxManagerList:
@@ -711,12 +721,12 @@ def destroy(self):
self.sfxManagerList = []
if getattr(self, 'loader', None):
self.loader.destroy()
- self.loader = None
+ del self.loader
if getattr(self, 'graphicsEngine', None):
self.graphicsEngine.removeAllWindows()
try:
- self.direct.panel.destroy()
+ self.direct.panel.destroy() # type: ignore[attr-defined]
except Exception:
pass
@@ -1185,7 +1195,7 @@ def openMainWindow(self, *args, **kw):
self.setSceneGraphAnalyzerMeter(flag.value)
return success
- def setSleep(self, amount):
+ def setSleep(self, amount: float) -> None:
"""
Sets up a task that calls python 'sleep' every frame. This is a simple
way to reduce the CPU usage (and frame rate) of a panda program.
@@ -1200,12 +1210,12 @@ def setSleep(self, amount):
self.taskMgr.remove('clientSleep')
self.taskMgr.add(self.__sleepCycleTask, 'clientSleep', sort = 55)
- def __sleepCycleTask(self, task):
+ def __sleepCycleTask(self, task: object) -> int:
Thread.sleep(self.clientSleep)
#time.sleep(self.clientSleep)
return Task.cont
- def setFrameRateMeter(self, flag):
+ def setFrameRateMeter(self, flag: bool) -> None:
"""
Turns on or off (according to flag) a standard frame rate
meter in the upper-right corner of the main window.
@@ -1219,7 +1229,7 @@ def setFrameRateMeter(self, flag):
self.frameRateMeter.clearWindow()
self.frameRateMeter = None
- def setSceneGraphAnalyzerMeter(self, flag):
+ def setSceneGraphAnalyzerMeter(self, flag: bool) -> None:
"""
Turns on or off (according to flag) a standard frame rate
meter in the upper-right corner of the main window.
@@ -1242,7 +1252,7 @@ def setupWindowControls(self, winCtrl=None):
mouseKeyboard = self.dataRoot.find("**/*"))
self.winControls.append(winCtrl)
- def setupRender(self):
+ def setupRender(self) -> None:
"""
Creates the render scene graph, the primary scene graph for
rendering 3-d geometry.
@@ -1252,11 +1262,11 @@ def setupRender(self):
self.render.setAttrib(RescaleNormalAttrib.makeDefault())
self.render.setTwoSided(0)
- self.backfaceCullingEnabled = 1
- self.textureEnabled = 1
- self.wireframeEnabled = 0
+ self.backfaceCullingEnabled = True
+ self.textureEnabled = True
+ self.wireframeEnabled = False
- def setupRender2d(self):
+ def setupRender2d(self) -> None:
"""
Creates the render2d scene graph, the primary scene graph for
2-d objects and gui elements that are superimposed over the
@@ -1355,7 +1365,7 @@ def setupRender2d(self):
if xsize > 0 and ysize > 0:
self.pixel2d.setScale(2.0 / xsize, 1.0, 2.0 / ysize)
- def setupRender2dp(self):
+ def setupRender2dp(self) -> None:
"""
Creates a render2d scene graph, the secondary scene graph for
2-d objects and gui elements that are superimposed over the
@@ -1436,7 +1446,7 @@ def setAspectRatio(self, aspectRatio):
self.__configAspectRatio = aspectRatio
self.adjustWindowAspectRatio(self.getAspectRatio())
- def getAspectRatio(self, win = None):
+ def getAspectRatio(self, win: GraphicsOutput | None = None) -> float:
# Returns the actual aspect ratio of the indicated (or main
# window), or the default aspect ratio if there is not yet a
# main window.
@@ -1445,7 +1455,7 @@ def getAspectRatio(self, win = None):
if self.__configAspectRatio:
return self.__configAspectRatio
- aspectRatio = 1
+ aspectRatio: float = 1
if win is None:
win = self.win
@@ -1468,7 +1478,7 @@ def getAspectRatio(self, win = None):
return aspectRatio
- def getSize(self, win = None):
+ def getSize(self, win: GraphicsOutput | None = None) -> tuple[int, int]:
"""
Returns the actual size of the indicated (or main window), or the
default size if there is not yet a main window.
@@ -1677,7 +1687,7 @@ def makeCamera2dp(self, win, sort = 20,
return camera2dp
- def setupDataGraph(self):
+ def setupDataGraph(self) -> None:
"""
Creates the data graph and populates it with the basic input
devices.
@@ -2006,7 +2016,7 @@ def updateManagers(self, state):
self.physicsMgr.doPhysics(dt)
return Task.cont
- def createStats(self, hostname=None, port=None):
+ def createStats(self, hostname: str | None = None, port: int | None = None) -> bool:
"""
If want-pstats is set in Config.prc, or the `wantStats` member is
otherwise set to True, connects to the PStats server.
@@ -2168,7 +2178,7 @@ def playMusic(self, music, looping = 0, interrupt = 1, volume = None, time = 0.0
music.setLoop(looping)
music.play()
- def __resetPrevTransform(self, state):
+ def __resetPrevTransform(self, state: object) -> int:
# Clear out the previous velocity deltas now, after we have
# rendered (the previous frame). We do this after the render,
# so that we have a chance to draw a representation of spheres
@@ -2179,7 +2189,7 @@ def __resetPrevTransform(self, state):
PandaNode.resetAllPrevTransform()
return Task.cont
- def __dataLoop(self, state):
+ def __dataLoop(self, state: object) -> int:
# Check if there were newly connected devices.
self.devices.update()
@@ -2189,7 +2199,7 @@ def __dataLoop(self, state):
self.dgTrav.traverse(self.dataRootNode)
return Task.cont
- def __ivalLoop(self, state):
+ def __ivalLoop(self, state: object) -> int:
# Execute all intervals in the global ivalMgr.
IntervalManager.ivalMgr.step()
return Task.cont
@@ -2207,7 +2217,7 @@ def __shadowCollisionLoop(self, state):
self.shadowTrav.traverse(self.render)
return Task.cont
- def __collisionLoop(self, state):
+ def __collisionLoop(self, state: object) -> int:
# run the collision traversal if we have a
# CollisionTraverser set.
if self.cTrav:
@@ -2219,14 +2229,14 @@ def __collisionLoop(self, state):
messenger.send("collisionLoopFinished")
return Task.cont
- def __audioLoop(self, state):
+ def __audioLoop(self, state: object) -> int:
if self.musicManager is not None:
self.musicManager.update()
for x in self.sfxManagerList:
x.update()
return Task.cont
- def __garbageCollectStates(self, state):
+ def __garbageCollectStates(self, state: object) -> int:
""" This task is started only when we have
garbage-collect-states set in the Config.prc file, in which
case we're responsible for taking out Panda's garbage from
@@ -2237,7 +2247,7 @@ def __garbageCollectStates(self, state):
RenderState.garbageCollect()
return Task.cont
- def __igLoop(self, state):
+ def __igLoop(self, state: object) -> int:
if __debug__:
# We render the watch variables for the onScreenDebug as soon
# as we reasonably can before the renderFrame().
@@ -2277,7 +2287,7 @@ def __igLoop(self, state):
throw_new_frame()
return Task.cont
- def __igLoopSync(self, state):
+ def __igLoopSync(self, state: object) -> int:
if __debug__:
# We render the watch variables for the onScreenDebug as soon
# as we reasonably can before the renderFrame().
@@ -2286,6 +2296,7 @@ def __igLoopSync(self, state):
if self.recorder:
self.recorder.recordFrame()
+ assert self.cluster is not None
self.cluster.collectData()
# Finally, render the frame.
@@ -2315,6 +2326,7 @@ def __igLoopSync(self, state):
time.sleep(0.1)
self.graphicsEngine.readyFlip()
+ assert self.cluster is not None
self.cluster.waitForFlipCommand()
self.graphicsEngine.flipFrame()
@@ -2323,7 +2335,7 @@ def __igLoopSync(self, state):
throw_new_frame()
return Task.cont
- def restart(self, clusterSync=False, cluster=None):
+ def restart(self, clusterSync: bool = False, cluster=None) -> None:
self.shutdown()
# __resetPrevTransform goes at the very beginning of the frame.
self.taskMgr.add(
@@ -2354,7 +2366,7 @@ def restart(self, clusterSync=False, cluster=None):
self.taskMgr.add(self.__audioLoop, 'audioLoop', sort = 60)
self.eventMgr.restart()
- def shutdown(self):
+ def shutdown(self) -> None:
self.taskMgr.remove('audioLoop')
self.taskMgr.remove('igLoop')
self.taskMgr.remove('shadowCollisionLoop')
@@ -2745,7 +2757,7 @@ def oobe(self, cam = None):
self.oobeVis.reparentTo(self.camera)
self.oobeMode = 1
- def __oobeButton(self, suffix, button):
+ def __oobeButton(self, suffix: str, button: str) -> None:
if button.startswith('mouse'):
# Eat mouse buttons.
return
@@ -3065,7 +3077,7 @@ def _movieTask(self, state):
else:
return Task.cont
- def windowEvent(self, win):
+ def windowEvent(self, win: GraphicsOutput) -> None:
if win != self.win:
# This event isn't about our window.
return
@@ -3084,9 +3096,9 @@ def windowEvent(self, win):
self.userExit()
if properties.getForeground() and not self.mainWinForeground:
- self.mainWinForeground = 1
+ self.mainWinForeground = True
elif not properties.getForeground() and self.mainWinForeground:
- self.mainWinForeground = 0
+ self.mainWinForeground = False
if __debug__:
if self.__autoGarbageLogging:
GarbageReport.b_checkForGarbageLeaks()
@@ -3094,12 +3106,12 @@ def windowEvent(self, win):
if properties.getMinimized() and not self.mainWinMinimized:
# If the main window is minimized, throw an event to
# stop the music.
- self.mainWinMinimized = 1
+ self.mainWinMinimized = True
messenger.send('PandaPaused')
elif not properties.getMinimized() and self.mainWinMinimized:
# If the main window is restored, throw an event to
# restart the music.
- self.mainWinMinimized = 0
+ self.mainWinMinimized = False
messenger.send('PandaRestarted')
# If we have not forced the aspect ratio, let's see if it has
@@ -3117,7 +3129,7 @@ def windowEvent(self, win):
if self.wantRender2dp:
self.pixel2dp.setScale(2.0 / xsize, 1.0, 2.0 / ysize)
- def adjustWindowAspectRatio(self, aspectRatio):
+ def adjustWindowAspectRatio(self, aspectRatio: float) -> None:
""" This function is normally called internally by
`windowEvent()`, but it may also be called to explicitly adjust
the aspect ratio of the render/render2d DisplayRegion, by a
@@ -3195,14 +3207,14 @@ class that has redefined these. """
# If anybody needs to update their GUI, put a callback on this event
messenger.send("aspectRatioChanged")
- def userExit(self):
+ def userExit(self) -> NoReturn:
# The user has requested we exit the program. Deal with this.
if self.exitFunc:
self.exitFunc()
self.notify.info("Exiting ShowBase.")
self.finalizeExit()
- def finalizeExit(self):
+ def finalizeExit(self) -> NoReturn:
"""
Called by `userExit()` to quit the application. The default
implementation just calls `sys.exit()`.
@@ -3431,7 +3443,7 @@ def run(self) -> None: # pylint: disable=method-hidden
This method must be called from the main thread, otherwise an error is
thrown.
"""
- if Thread.getCurrentThread() != Thread.getMainThread():
+ if Thread.getCurrentThread() != Thread.getMainThread() and sys.platform != "android":
self.notify.error("run() must be called from the main thread.")
return
diff --git a/direct/src/showbase/ShowBaseGlobal.py b/direct/src/showbase/ShowBaseGlobal.py
index 4cd4e8623b3..fe891e9c1ba 100644
--- a/direct/src/showbase/ShowBaseGlobal.py
+++ b/direct/src/showbase/ShowBaseGlobal.py
@@ -62,7 +62,8 @@
#: A dummy scene graph that is not being rendered by anything.
hidden = NodePath("hidden")
-loader: Loader
+#: The global Loader instance for models, textures, etc.
+loader = Loader()
# Set direct notify categories now that we have config
directNotify.setDconfigLevels()
diff --git a/direct/src/showbase/Transitions.py b/direct/src/showbase/Transitions.py
index aa79e4b38b9..1db17d97a46 100644
--- a/direct/src/showbase/Transitions.py
+++ b/direct/src/showbase/Transitions.py
@@ -264,6 +264,54 @@ def loadIris(self):
self.iris = base.loader.loadModel(self.IrisModelName)
self.iris.setPos(0, 0, 0)
+ def getIrisInIval(self, t=0.5, finishIval=None, blendType='noBlend'):
+ """
+ Returns an interval without starting it. This is particularly useful in
+ cutscenes, so when the cutsceneIval is escaped out of we can finish the iris immediately
+ """
+ self.noTransitions()
+ self.loadIris()
+
+ scale = 0.18 * max(base.a2dRight, base.a2dTop)
+ transitionIval = Sequence(Func(self.iris.reparentTo, ShowBaseGlobal.aspect2d, DGG.FADE_SORT_INDEX),
+ LerpScaleInterval(self.iris, t,
+ scale = scale,
+ startScale = 0.01,
+ blendType=blendType),
+ Func(self.iris.detachNode),
+ Func(self.__finishTransition),
+ name = self.irisTaskName,
+ )
+ if finishIval:
+ transitionIval.append(finishIval)
+ return transitionIval
+
+ def getIrisOutIval(self, t=0.5, finishIval=None, blendType='noBlend'):
+ """
+ Create a sequence that lerps the iris out, then
+ parents the iris to hidden
+ """
+ self.noTransitions()
+ self.loadIris()
+ self.loadFade() # we need this to cover up the hole.
+
+ scale = 0.18 * max(base.a2dRight, base.a2dTop)
+ transitionIval = Sequence(Func(self.iris.reparentTo, ShowBaseGlobal.aspect2d, DGG.FADE_SORT_INDEX),
+ LerpScaleInterval(self.iris, t,
+ scale = 0.01,
+ startScale = scale,
+ blendType=blendType),
+ Func(self.iris.detachNode),
+ # Use the fade to cover up the hole that the iris would leave
+ Func(self.fadeOut, 0),
+ Func(self.__finishTransition),
+ name = self.irisTaskName,
+ )
+
+ if finishIval:
+ transitionIval.append(finishIval)
+ return transitionIval
+
def irisIn(self, t=0.5, finishIval=None, blendType = 'noBlend'):
"""
Play an iris in transition over t seconds.
@@ -271,28 +319,14 @@ def irisIn(self, t=0.5, finishIval=None, blendType = 'noBlend'):
of the iris polygon up so it looks like we iris in. When the
scale lerp is finished, it parents the iris polygon to hidden.
"""
- self.noTransitions()
- self.loadIris()
if t == 0:
self.iris.detachNode()
fut = AsyncFuture()
fut.setResult(None)
return fut
else:
- self.iris.reparentTo(ShowBaseGlobal.aspect2d, DGG.FADE_SORT_INDEX)
-
- scale = 0.18 * max(base.a2dRight, base.a2dTop)
- self.transitionIval = Sequence(LerpScaleInterval(self.iris, t,
- scale = scale,
- startScale = 0.01,
- blendType=blendType),
- Func(self.iris.detachNode),
- Func(self.__finishTransition),
- name = self.irisTaskName,
- )
+ self.transitionIval = self.getIrisInIval(t, finishIval, blendType)
self.__transitionFuture = AsyncFuture()
- if finishIval:
- self.transitionIval.append(finishIval)
self.transitionIval.start()
return self.__transitionFuture
@@ -304,9 +338,6 @@ def irisOut(self, t=0.5, finishIval=None, blendType='noBlend'):
lerp is finished, it leaves the iris polygon covering the
aspect2d plane until you irisIn or call noIris.
"""
- self.noTransitions()
- self.loadIris()
- self.loadFade() # we need this to cover up the hole.
if t == 0:
self.iris.detachNode()
self.fadeOut(0)
@@ -314,22 +345,8 @@ def irisOut(self, t=0.5, finishIval=None, blendType='noBlend'):
fut.setResult(None)
return fut
else:
- self.iris.reparentTo(ShowBaseGlobal.aspect2d, DGG.FADE_SORT_INDEX)
-
- scale = 0.18 * max(base.a2dRight, base.a2dTop)
- self.transitionIval = Sequence(LerpScaleInterval(self.iris, t,
- scale = 0.01,
- startScale = scale,
- blendType=blendType),
- Func(self.iris.detachNode),
- # Use the fade to cover up the hole that the iris would leave
- Func(self.fadeOut, 0),
- Func(self.__finishTransition),
- name = self.irisTaskName,
- )
+ self.transitionIval = self.getIrisOutIval(t, finishIval, blendType)
self.__transitionFuture = AsyncFuture()
- if finishIval:
- self.transitionIval.append(finishIval)
self.transitionIval.start()
return self.__transitionFuture
diff --git a/direct/src/stdpy/glob.py b/direct/src/stdpy/glob.py
index 3b4f0fefb51..8944548a6c4 100755
--- a/direct/src/stdpy/glob.py
+++ b/direct/src/stdpy/glob.py
@@ -52,7 +52,7 @@ def glob1(dirname, pattern):
if not dirname:
dirname = os.curdir
try:
- names = os.listdir(dirname)
+ names = file.listdir(dirname)
except os.error:
return []
if pattern[0] != '.':
diff --git a/direct/src/task/Task.py b/direct/src/task/Task.py
index 9896b9c5ee0..f879cbd5425 100644
--- a/direct/src/task/Task.py
+++ b/direct/src/task/Task.py
@@ -28,7 +28,7 @@
signal = None
else:
try:
- import _signal as signal # type: ignore[import, no-redef]
+ import _signal as signal # type: ignore[import-not-found, no-redef]
except ImportError:
signal = None
diff --git a/doc/CODING_STYLE.md b/doc/CODING_STYLE.md
index 614057737dd..05814b74e13 100644
--- a/doc/CODING_STYLE.md
+++ b/doc/CODING_STYLE.md
@@ -184,7 +184,7 @@ Try to group logically-similar lines, separating them with a single blank line.
Modern language features
------------------------
-Panda3D is a C++11 project. The use of the following modern language features
+Panda3D is a C++14 project. The use of the following modern language features
is greatly encouraged:
1. `nullptr` over `NULL`
@@ -197,4 +197,4 @@ creating a typedef for the container type instead.
Avoid using `std::function` in cases where a lambda can be accepted directly
(using a template function), since it has extra overhead over lambdas.
-C++14 and C++17 features should be avoided for now.
+C++17 features should be avoided for now.
diff --git a/doc/ReleaseNotes b/doc/ReleaseNotes
index 97a15ddbe8f..e5651145b7d 100644
--- a/doc/ReleaseNotes
+++ b/doc/ReleaseNotes
@@ -1,3 +1,64 @@
+----------------------- RELEASE 1.10.15 -----------------------
+
+This release adds support for Python 3.13, and fixes some significant bugs.
+Upgrading is highly recommended.
+
+Windowing
+* Fix regression related to fullscreen switching on Windows (#1594)
+* Fix issues related to fullscreen switching corner cases on macOS
+* Fix keyUp event being eaten when switching fullscreen modes on macOS
+* Support UTF-8 window titles on X11
+* Fix wrong error message on X11 if xf86dga extension is not found
+
+Rendering
+* Add "Khronos PBR Neutral" tone mapping operator to HDR filter (#1659)
+* OpenGL: Fix offscreen buffer clearing if back buffers are requested
+* DirectX 9: Fix crash on window event after window close
+* DirectX 9: Fix support for r32f and rgba32f textures
+* DirectX 9: Fix crash when copying inverted framebuffer to texture RAM
+* DirectX 9: Fix buffer crash if main window has no depth buffer
+
+Text
+* Fix handling of surrogate pairs in text on Windows (#1629)
+* Fix disabling text-native-antialias setting not working properly
+* Fix small-caps not working with text-use-harfbuzz enabled (#1666)
+* Show error instead of crash if glyph does not fit in page (#1626)
+* Update docstring for set_text_color() (#1621)
+
+GUI
+* Fix crash when PGEntry removes itself with background focus (#1650)
+* Fix `PGEntry::get_cursor_Y()`, which always returned 0.0 (#1633)
+* Now makes copies of mutable default values in DirectGUI constructor (#1587)
+
+Deployment
+* Fix wrong relative paths with bam_model_extensions (#1642)
+* Add bam_embed_textures option to embed textures in .bam files
+* Don't warn about missing ld-linux library on aarch64 Linux
+* build_apps dist hooks no longer import Panda3D (#1624)
+
+Miscellaneous
+* Fix major memory leak on M1/M2/M3 Macs
+* Fix seeking in OpenAL sounds not working on macOS in some cases (#1607)
+* Fix direct.stdpy.glob not finding files in VFS (#1675)
+* Improve printing of floating-point linmath objects (#1671)
+* Fix VFS mount points not being listed as directories (#1244)
+* Fix splits occurring in RopeNode geometry (#1325)
+* Fix DistancePhasedNode exception at module clean-up time
+* Fix magfilter on KW_mipmap in egg-palettize (#1631)
+* Fix creating LerpFunctionInterval from functools.partial (#1623)
+* Fix "no attribute notifier" in FSM.requestNext/Prev (#1644)
+* Fix file_texture_mode property on BamWriter being read-only
+* TransformState getters no longer return references to temporary (#1625)
+
+Build
+* Assorted build fixes for Python 3.13 and 3.13t
+* Fix assorted compiler warnings
+* Build fix for newer FFmpeg versions
+* Add --ignore option to test_wheel.py to allow ignoring tests
+* Update Eigen to 3.2.10 (fixes binder2nd error when building with C++17)
+* Fix non-determinism in Python bindings (#1651)
+* Fix preprocessor issues in interrogate (#1635)
+
----------------------- RELEASE 1.10.14 -----------------------
This release adds support for Python 3.12 and furthermore contains significant
diff --git a/dtool/CMakeLists.txt b/dtool/CMakeLists.txt
index 62308bd9801..36e93a0be36 100644
--- a/dtool/CMakeLists.txt
+++ b/dtool/CMakeLists.txt
@@ -2,11 +2,9 @@
include(LocalSetup.cmake)
# Include dtool source directories
-add_subdirectory(src/cppparser)
add_subdirectory(src/dconfig)
add_subdirectory(src/dtoolbase)
add_subdirectory(src/dtoolutil)
-add_subdirectory(src/interrogate)
add_subdirectory(src/interrogatedb)
add_subdirectory(src/prc)
diff --git a/dtool/CompilerFlags.cmake b/dtool/CompilerFlags.cmake
index 48f931387f4..31d96279e32 100644
--- a/dtool/CompilerFlags.cmake
+++ b/dtool/CompilerFlags.cmake
@@ -51,8 +51,8 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GCC")
endif()
-# Panda3D is now a C++11 project.
-set(CMAKE_CXX_STANDARD 11)
+# Panda3D is now a C++14 project.
+set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Set certain CMake flags we expect
@@ -190,8 +190,8 @@ else()
check_cxx_compiler_flag("-fno-rtti" COMPILER_SUPPORTS_FRTTI)
if(COMPILER_SUPPORTS_FRTTI)
- set(cxx_rtti_on "-frtti")
- set(cxx_rtti_off "-fno-rtti")
+ set(cxx_rtti_on "$<$,$>:-frtti>")
+ set(cxx_rtti_off "$<$,$>:-fno-rtti>")
else()
set(cxx_rtti_on)
diff --git a/dtool/Config.cmake b/dtool/Config.cmake
index d269b62e3ea..67ea64c9ce0 100644
--- a/dtool/Config.cmake
+++ b/dtool/Config.cmake
@@ -221,12 +221,6 @@ mark_as_advanced(DEFAULT_PRC_DIR PRC_DIR_ENVVARS PRC_PATH_ENVVARS
# The following options relate to interrogate, the tool that is
# used to generate bindings for non-C++ languages.
-option(WANT_INTERROGATE
- "Do you want to include Interrogate in the installation? This
-program reads C++ source files and generates bindings for another
-language. If you won't be building interfaces for other languages,
-you don't need the program." ON)
-
cmake_dependent_option(INTERROGATE_PYTHON_INTERFACE
"Do you want to generate a Python-callable interrogate interface?
This is only necessary if you plan to make calls into Panda from a
@@ -249,8 +243,79 @@ option(INTERROGATE_VERBOSE
"Set this if you would like interrogate to generate advanced
debugging information." OFF)
+set(_default_build_interrogate OFF)
+if (INTERROGATE_C_INTERFACE OR INTERROGATE_PYTHON_INTERFACE)
+ set(_default_build_interrogate ON)
+endif()
+
+option(BUILD_INTERROGATE
+ "Do you want to build interrogate from source? This is necessary
+if you wish to build Python or other bindings around Panda3D's C++
+interface. Set this to false if you already have a compatible
+version of interrogate installed." ${_default_build_interrogate})
+
mark_as_advanced(INTERROGATE_OPTIONS)
+if(BUILD_INTERROGATE)
+ include(ExternalProject)
+
+ set(_interrogate_dir "${PROJECT_BINARY_DIR}/interrogate")
+
+ ExternalProject_Add(
+ panda3d-interrogate
+
+ GIT_REPOSITORY https://github.com/panda3d/interrogate.git
+ GIT_TAG d2844d994fcc465a4e22b10001d3ac5c4012b814
+
+ PREFIX ${_interrogate_dir}
+ CMAKE_ARGS
+ -DHAVE_PYTHON=OFF
+ -DBUILD_SHARED_LIBS=OFF
+ -DCMAKE_INSTALL_PREFIX:PATH=
+
+ EXCLUDE_FROM_ALL ON
+ BUILD_BYPRODUCTS "${_interrogate_dir}/bin/interrogate"
+ "${_interrogate_dir}/bin/interrogate_module"
+ )
+
+ add_executable(interrogate IMPORTED GLOBAL)
+ add_dependencies(interrogate panda3d-interrogate)
+ set_target_properties(interrogate PROPERTIES IMPORTED_LOCATION "${_interrogate_dir}/bin/interrogate")
+
+ add_executable(interrogate_module IMPORTED GLOBAL)
+ add_dependencies(interrogate_module panda3d-interrogate)
+ set_target_properties(interrogate_module PROPERTIES IMPORTED_LOCATION "${_interrogate_dir}/bin/interrogate_module")
+
+else()
+ find_program(INTERROGATE_EXECUTABLE interrogate)
+ find_program(INTERROGATE_MODULE_EXECUTABLE interrogate_module)
+
+ add_executable(interrogate IMPORTED GLOBAL)
+ if(INTERROGATE_EXECUTABLE)
+ set_target_properties(interrogate PROPERTIES
+ IMPORTED_LOCATION "${INTERROGATE_EXECUTABLE}")
+
+ elseif(INTERROGATE_PYTHON_INTERFACE OR INTERROGATE_C_INTERFACE)
+ message(FATAL_ERROR
+ "Requested interrogate bindings, but interrogate not found. Set "
+ "BUILD_INTERROGATE to build interrogate from source, or set "
+ "INTERROGATE_EXECUTABLE to the location of this tool.")
+ endif()
+
+ add_executable(interrogate_module IMPORTED GLOBAL)
+ if(INTERROGATE_MODULE_EXECUTABLE)
+ set_target_properties(interrogate_module PROPERTIES
+ IMPORTED_LOCATION "${INTERROGATE_MODULE_EXECUTABLE}")
+
+ elseif(INTERROGATE_PYTHON_INTERFACE)
+ message(FATAL_ERROR
+ "Requested interrogate bindings, but interrogate not found. Set "
+ "BUILD_INTERROGATE to build interrogate from source, or set "
+ "INTERROGATE_MODULE_EXECUTABLE to the location of this tool.")
+ endif()
+
+endif()
+
#
# The following options have to do with optional debugging features.
#
diff --git a/dtool/Package.cmake b/dtool/Package.cmake
index 42758c2702f..dfa6c5772a5 100644
--- a/dtool/Package.cmake
+++ b/dtool/Package.cmake
@@ -1,9 +1,54 @@
-set(_thirdparty_dir_default "${PROJECT_SOURCE_DIR}/thirdparty")
-if(NOT IS_DIRECTORY "${_thirdparty_dir_default}")
- set(_thirdparty_dir_default "")
+set(_thirdparty_platform)
+
+if(APPLE)
+ set(_thirdparty_platform "darwin-libs-a")
+
+elseif(WIN32)
+ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ set(_thirdparty_platform "win-libs-vc14-x64")
+ else()
+ set(_thirdparty_platform "win-libs-vc14")
+ endif()
+
+elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
+ set(_thirdparty_platform "linux-libs-arm64")
+ elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ set(_thirdparty_platform "linux-libs-x64")
+ else()
+ set(_thirdparty_platform "linux-libs-a")
+ endif()
+
+elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
+ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
+ set(_thirdparty_platform "freebsd-libs-arm64")
+ elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ set(_thirdparty_platform "freebsd-libs-x64")
+ else()
+ set(_thirdparty_platform "freebsd-libs-a")
+ endif()
+
+elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
+ set(_thirdparty_platform "android-libs-${CMAKE_ANDROID_ARCH}")
+
+elseif(CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
+ set(_thirdparty_platform "emscripten-libs")
+
+elseif(CMAKE_SYSTEM_NAME STREQUAL "WASI")
+ set(_thirdparty_platform "wasi-libs-${CMAKE_SYSTEM_PROCESSOR}")
+
endif()
-if(CMAKE_SYSTEM_NAME STREQUAL "WASI")
- set(_thirdparty_dir_default "")
+
+set(_thirdparty_dir_default "")
+if(_thirdparty_platform)
+ if(IS_DIRECTORY "${PROJECT_SOURCE_DIR}/thirdparty/${_thirdparty_platform}")
+ set(_thirdparty_dir_default "${PROJECT_SOURCE_DIR}/thirdparty")
+
+ else()
+ message(WARNING
+ "Ignoring thirdparty directory without ${_thirdparty_platform} subdirectory.")
+
+ endif()
endif()
set(THIRDPARTY_DIRECTORY "${_thirdparty_dir_default}" CACHE PATH
@@ -14,6 +59,11 @@ set(THIRDPARTY_DIRECTORY "${_thirdparty_dir_default}" CACHE PATH
set(THIRDPARTY_DLLS)
if(THIRDPARTY_DIRECTORY)
+ if(NOT _thirdparty_platform)
+ message(FATAL_ERROR
+ "You can't use THIRDPARTY_DIRECTORY on this platform. Unset it to continue.")
+ endif()
+
# This policy is necessary for PackageName_ROOT variables to be respected
if(POLICY CMP0074)
cmake_policy(GET CMP0074 _policy_cmp0074)
@@ -24,63 +74,14 @@ if(THIRDPARTY_DIRECTORY)
"Your version of CMake is too old; please upgrade or unset THIRDPARTY_DIRECTORY to continue.")
endif()
- # Dig up the actual "libs" directory
if(APPLE)
- set(_package_dir "${THIRDPARTY_DIRECTORY}/darwin-libs-a")
-
# Make sure thirdparty has the first shot, not system frameworks
set(CMAKE_FIND_FRAMEWORK LAST)
elseif(WIN32)
- if(CMAKE_SIZEOF_VOID_P EQUAL 8)
- set(_package_dir "${THIRDPARTY_DIRECTORY}/win-libs-vc14-x64")
-
- file(GLOB _python_dirs "${THIRDPARTY_DIRECTORY}/win-python*-x64")
- else()
- set(_package_dir "${THIRDPARTY_DIRECTORY}/win-libs-vc14")
-
- file(GLOB _python_dirs "${THIRDPARTY_DIRECTORY}/win-python*")
- endif()
-
- list(REVERSE _python_dirs) # Descending order of version
- if(NOT DEFINED Python_ROOT)
- set(Python_ROOT "${_python_dirs}")
- endif()
-
set(BISON_ROOT "${THIRDPARTY_DIRECTORY}/win-util")
set(FLEX_ROOT "${THIRDPARTY_DIRECTORY}/win-util")
- elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
- if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
- set(_package_dir ${THIRDPARTY_DIRECTORY}/linux-libs-arm64)
- elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
- set(_package_dir ${THIRDPARTY_DIRECTORY}/linux-libs-x64)
- else()
- set(_package_dir ${THIRDPARTY_DIRECTORY}/linux-libs-a)
- endif()
-
- elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
- if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
- set(_package_dir ${THIRDPARTY_DIRECTORY}/freebsd-libs-arm64)
- elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
- set(_package_dir ${THIRDPARTY_DIRECTORY}/freebsd-libs-x64)
- else()
- set(_package_dir ${THIRDPARTY_DIRECTORY}/freebsd-libs-a)
- endif()
-
- elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
- set(_package_dir ${THIRDPARTY_DIRECTORY}/android-libs-${CMAKE_ANDROID_ARCH})
-
- else()
- message(FATAL_ERROR
- "You can't use THIRDPARTY_DIRECTORY on this platform. Unset it to continue.")
-
- endif()
-
- if(NOT EXISTS "${_package_dir}")
- message(FATAL_ERROR
- "Either your THIRDPARTY_DIRECTORY path does not exist, or it is for the wrong platform.")
-
endif()
foreach(_Package
@@ -133,7 +134,7 @@ if(THIRDPARTY_DIRECTORY)
endif()
# Set search path
- set(${_Package}_ROOT "${_package_dir}/${_package}")
+ set(${_Package}_ROOT "${THIRDPARTY_DIRECTORY}/${_thirdparty_platform}/${_package}")
# Set up copying DLLs, if necessary
file(GLOB _dlls "${${_Package}_ROOT}/bin/*.dll")
@@ -200,6 +201,27 @@ if(DEFINED _PREV_WANT_PYTHON_VERSION
endif()
+# Look for Python in the thirdparty directory on Windows.
+if(WIN32 AND THIRDPARTY_DIRECTORY)
+ set(_python_dir_suffix "")
+ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ set(_python_dir_suffix "-x64")
+ endif()
+
+ if(WANT_PYTHON_VERSION)
+ set(Python_ROOT_DIR "${THIRDPARTY_DIRECTORY}/win-python${WANT_PYTHON_VERSION}${_python_dir_suffix}")
+ else()
+ # CMake doesn't support NATURAL sorting until 3.18, so we sort the 3.1x
+ # versions separately from the prior versions.
+ file(GLOB _python_dirs "${THIRDPARTY_DIRECTORY}/win-python3.[0-9][0-9]${_python_dir_suffix}")
+ file(GLOB _python_dirs2 "${THIRDPARTY_DIRECTORY}/win-python3.[0-9]${_python_dir_suffix}")
+ list(SORT _python_dirs COMPARE FILE_BASENAME CASE INSENSITIVE ORDER DESCENDING)
+ list(SORT _python_dirs2 COMPARE FILE_BASENAME CASE INSENSITIVE ORDER DESCENDING)
+ list(APPEND _python_dirs ${_python_dirs2})
+ set(Python_ROOT_DIR "${_python_dirs}")
+ endif()
+endif()
+
if(WANT_PYTHON_VERSION)
# A specific version is requested; ensure we get that specific version
list(APPEND WANT_PYTHON_VERSION "EXACT")
@@ -319,6 +341,104 @@ if(HAVE_PYTHON)
set(PYTHON_EXTENSION_SUFFIX "${_EXT_SUFFIX}" CACHE STRING
"Suffix for Python binary extension modules.")
+ # Determine the platform to use for .whl files.
+ if(WIN32)
+ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ set(_platform "win-amd64")
+ else()
+ set(_platform "win32")
+ endif()
+
+ elseif(APPLE)
+ if(NOT CMAKE_OSX_ARCHITECTURES)
+ set(_arch_tag ${CMAKE_SYSTEM_PROCESSOR})
+
+ elseif("x86_64" IN_LIST CMAKE_OSX_ARCHITECTURES)
+ if("arm64" IN_LIST CMAKE_OSX_ARCHITECTURES)
+ set(_arch_tag "universal2")
+
+ elseif("i386" IN_LIST CMAKE_OSX_ARCHITECTURES AND
+ "ppc64" IN_LIST CMAKE_OSX_ARCHITECTURES AND
+ "ppc" IN_LIST CMAKE_OSX_ARCHITECTURES)
+ set(_arch_tag "universal")
+
+ elseif("i386" IN_LIST CMAKE_OSX_ARCHITECTURES AND
+ "ppc" IN_LIST CMAKE_OSX_ARCHITECTURES)
+ set(_arch_tag "fat32")
+
+ elseif("ppc64" IN_LIST CMAKE_OSX_ARCHITECTURES)
+ set(_arch_tag "fat64")
+
+ elseif("i386" IN_LIST CMAKE_OSX_ARCHITECTURES)
+ set(_arch_tag "intel")
+
+ else()
+ set(_arch_tag "x86_64")
+
+ endif()
+
+ elseif("i386" IN_LIST CMAKE_OSX_ARCHITECTURES AND
+ "ppc" IN_LIST CMAKE_OSX_ARCHITECTURES)
+ set(_arch_tag "fat")
+
+ else()
+ list(GET CMAKE_OSX_ARCHITECTURES 0 _arch_tag)
+
+ endif()
+
+ set(_target "${CMAKE_OSX_DEPLOYMENT_TARGET}")
+
+ if(_arch_tag STREQUAL "arm64" AND _target VERSION_LESS "11.0")
+ set(_target "11.0")
+
+ elseif(PYTHON_VERSION_STRING VERSION_GREATER_EQUAL "3.13" AND _target VERSION_LESS "10.13")
+ set(_target "10.13")
+
+ elseif(PYTHON_VERSION_STRING VERSION_GREATER_EQUAL "3.8" AND _target VERSION_LESS "10.9")
+ set(_target "10.9")
+
+ endif()
+
+ set(_platform "macosx-${_target}-${_arch_tag}")
+
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ set(_platform "linux-${CMAKE_SYSTEM_PROCESSOR}")
+
+ if(IS_DIRECTORY "/opt/python")
+ # Sloppy detection for manylinux.
+ if(EXISTS "/lib64/libc-2.5.so" OR EXISTS "/lib/libc-2.5.so")
+ set(_platform "manylinux1-${CMAKE_SYSTEM_PROCESSOR}")
+
+ elseif(EXISTS "/lib64/libc-2.12.so" OR EXISTS "/lib/libc-2.12.so")
+ set(_platform "manylinux2010-${CMAKE_SYSTEM_PROCESSOR}")
+
+ elseif(EXISTS "/lib64/libc-2.17.so" OR EXISTS "/lib/libc-2.17.so")
+ set(_platform "manylinux2014-${CMAKE_SYSTEM_PROCESSOR}")
+
+ elseif(EXISTS "/lib/x86_64-linux-gnu/libc-2.24.so" OR EXISTS "/lib/i386-linux-gnu/libc-2.24.so")
+ set(_platform "manylinux_2_24-${CMAKE_SYSTEM_PROCESSOR}")
+
+ elseif(EXISTS "/etc/almalinux-release" AND EXISTS "/lib64/libc-2.28.so")
+ set(_platform "manylinux_2_28-${CMAKE_SYSTEM_PROCESSOR}")
+
+ endif()
+ endif()
+
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
+ set(_platform "emscripten-${CMAKE_SYSTEM_PROCESSOR}")
+
+ else()
+ set(_platform "")
+
+ endif()
+
+ # This is being read out of the CMake cache by makewheel.py.
+ if(_platform)
+ set(PYTHON_PLATFORM_TAG "${_platform}" CACHE STRING "" FORCE)
+ else()
+ unset(PYTHON_PLATFORM_TAG CACHE)
+ endif()
+
endif()
if(NOT DEFINED _PREV_PYTHON_VALUES)
diff --git a/dtool/dtool_config.h.in b/dtool/dtool_config.h.in
index f115e022c3f..2c178844071 100644
--- a/dtool/dtool_config.h.in
+++ b/dtool/dtool_config.h.in
@@ -24,9 +24,6 @@
/* Define to use doubles for most numbers, intead of single-precision floats. */
#cmakedefine STDFLOAT_DOUBLE
-/* Define if we have built libRocket available and built with Python support. */
-#cmakedefine HAVE_ROCKET_PYTHON
-
/* Define if we have ARToolKit available. */
#cmakedefine HAVE_ARTOOLKIT
diff --git a/dtool/metalibs/dtoolconfig/pydtool.cxx b/dtool/metalibs/dtoolconfig/pydtool.cxx
deleted file mode 100644
index 38b6e6359a8..00000000000
--- a/dtool/metalibs/dtoolconfig/pydtool.cxx
+++ /dev/null
@@ -1,3112 +0,0 @@
-/*
- * This file was generated by:
- * interrogate -D EXPCL_DTOOLCONFIG= -nodb -python -promiscuous -I../../../built/include -module panda3d.interrogatedb -library interrogatedb -string -true-names -do-module -oc pydtool.cxx ../../src/interrogatedb/interrogate_interface.h ../../src/interrogatedb/interrogate_request.h
- *
- */
-
-#include
-
-#include "../../src/interrogatedb/interrogate_interface.h"
-#include "../../src/interrogatedb/interrogate_request.h"
-#include "dtoolbase.h"
-
-#undef _POSIX_C_SOURCE
-#undef _XOPEN_SOURCE
-#define PY_SSIZE_T_CLEAN 1
-
-#if PYTHON_FRAMEWORK
- #include
-#else
- #include "Python.h"
-#endif
-
-static PyObject *_inP07yttbRf(PyObject *self, PyObject *args);
-static PyObject *_inP07ytda_g(PyObject *self, PyObject *args);
-static PyObject *_inP07yt4RgX(PyObject *self, PyObject *args);
-static PyObject *_inP07yt3Gip(PyObject *self, PyObject *args);
-static PyObject *_inP07ytRKDz(PyObject *self, PyObject *args);
-static PyObject *_inP07ytgZ9N(PyObject *self, PyObject *args);
-static PyObject *_inP07ytFnRZ(PyObject *self, PyObject *args);
-static PyObject *_inP07ytg0Qv(PyObject *self, PyObject *args);
-static PyObject *_inP07yttrqw(PyObject *self, PyObject *args);
-static PyObject *_inP07ytdmpW(PyObject *self, PyObject *args);
-static PyObject *_inP07ytUYgQ(PyObject *self, PyObject *args);
-static PyObject *_inP07yt0k7F(PyObject *self, PyObject *args);
-static PyObject *_inP07ytfIsr(PyObject *self, PyObject *args);
-static PyObject *_inP07ytvysR(PyObject *self, PyObject *args);
-static PyObject *_inP07ytYQ_2(PyObject *self, PyObject *args);
-static PyObject *_inP07yt3kdv(PyObject *self, PyObject *args);
-static PyObject *_inP07ytew01(PyObject *self, PyObject *args);
-static PyObject *_inP07ytQna7(PyObject *self, PyObject *args);
-static PyObject *_inP07ytkg95(PyObject *self, PyObject *args);
-static PyObject *_inP07ytluRc(PyObject *self, PyObject *args);
-static PyObject *_inP07yttHdM(PyObject *self, PyObject *args);
-static PyObject *_inP07ytDId0(PyObject *self, PyObject *args);
-static PyObject *_inP07ytHuAm(PyObject *self, PyObject *args);
-static PyObject *_inP07yt_xr0(PyObject *self, PyObject *args);
-static PyObject *_inP07ytH5qp(PyObject *self, PyObject *args);
-static PyObject *_inP07ytLfJw(PyObject *self, PyObject *args);
-static PyObject *_inP07yt_Atg(PyObject *self, PyObject *args);
-static PyObject *_inP07ytlBqc(PyObject *self, PyObject *args);
-static PyObject *_inP07ytNdUp(PyObject *self, PyObject *args);
-static PyObject *_inP07ytlS0p(PyObject *self, PyObject *args);
-static PyObject *_inP07ytZZe7(PyObject *self, PyObject *args);
-static PyObject *_inP07ytV5S_(PyObject *self, PyObject *args);
-static PyObject *_inP07yto9vD(PyObject *self, PyObject *args);
-static PyObject *_inP07ytv7tF(PyObject *self, PyObject *args);
-static PyObject *_inP07ythOg6(PyObject *self, PyObject *args);
-static PyObject *_inP07ytoZUn(PyObject *self, PyObject *args);
-static PyObject *_inP07ytq45U(PyObject *self, PyObject *args);
-static PyObject *_inP07yt6IPa(PyObject *self, PyObject *args);
-static PyObject *_inP07ytU2_B(PyObject *self, PyObject *args);
-static PyObject *_inP07ytHFO2(PyObject *self, PyObject *args);
-static PyObject *_inP07ytcfjm(PyObject *self, PyObject *args);
-static PyObject *_inP07yt3Sjw(PyObject *self, PyObject *args);
-static PyObject *_inP07ytgJcX(PyObject *self, PyObject *args);
-static PyObject *_inP07ytYlw6(PyObject *self, PyObject *args);
-static PyObject *_inP07ytsmnz(PyObject *self, PyObject *args);
-static PyObject *_inP07ytxQ10(PyObject *self, PyObject *args);
-static PyObject *_inP07yt6gPB(PyObject *self, PyObject *args);
-static PyObject *_inP07ytISgV(PyObject *self, PyObject *args);
-static PyObject *_inP07ytH3bx(PyObject *self, PyObject *args);
-static PyObject *_inP07ytzeUk(PyObject *self, PyObject *args);
-static PyObject *_inP07ytUeI5(PyObject *self, PyObject *args);
-static PyObject *_inP07ytbmxJ(PyObject *self, PyObject *args);
-static PyObject *_inP07ytY8Lc(PyObject *self, PyObject *args);
-static PyObject *_inP07ytJAAI(PyObject *self, PyObject *args);
-static PyObject *_inP07yt0UXw(PyObject *self, PyObject *args);
-static PyObject *_inP07ytuSvx(PyObject *self, PyObject *args);
-static PyObject *_inP07ytwpYd(PyObject *self, PyObject *args);
-static PyObject *_inP07ytOfNh(PyObject *self, PyObject *args);
-static PyObject *_inP07ytf5_U(PyObject *self, PyObject *args);
-static PyObject *_inP07ytL3ZB(PyObject *self, PyObject *args);
-static PyObject *_inP07ytXw0I(PyObject *self, PyObject *args);
-static PyObject *_inP07yt3zru(PyObject *self, PyObject *args);
-static PyObject *_inP07ytRrg2(PyObject *self, PyObject *args);
-static PyObject *_inP07ytEJCx(PyObject *self, PyObject *args);
-static PyObject *_inP07ytWAZr(PyObject *self, PyObject *args);
-static PyObject *_inP07ytHQi6(PyObject *self, PyObject *args);
-static PyObject *_inP07ytrD_M(PyObject *self, PyObject *args);
-static PyObject *_inP07ytYaah(PyObject *self, PyObject *args);
-static PyObject *_inP07yt2otr(PyObject *self, PyObject *args);
-static PyObject *_inP07ytNP_b(PyObject *self, PyObject *args);
-static PyObject *_inP07ytrrrN(PyObject *self, PyObject *args);
-static PyObject *_inP07ytjolz(PyObject *self, PyObject *args);
-static PyObject *_inP07ytt_JD(PyObject *self, PyObject *args);
-static PyObject *_inP07ytwEts(PyObject *self, PyObject *args);
-static PyObject *_inP07ytrJWs(PyObject *self, PyObject *args);
-static PyObject *_inP07ytpmFD(PyObject *self, PyObject *args);
-static PyObject *_inP07ytyYUX(PyObject *self, PyObject *args);
-static PyObject *_inP07yt54dn(PyObject *self, PyObject *args);
-static PyObject *_inP07ytGMpW(PyObject *self, PyObject *args);
-static PyObject *_inP07ytNuBV(PyObject *self, PyObject *args);
-static PyObject *_inP07yt9UwA(PyObject *self, PyObject *args);
-static PyObject *_inP07yt3FDt(PyObject *self, PyObject *args);
-static PyObject *_inP07ytDgOY(PyObject *self, PyObject *args);
-static PyObject *_inP07ytf513(PyObject *self, PyObject *args);
-static PyObject *_inP07ytsqGH(PyObject *self, PyObject *args);
-static PyObject *_inP07yt7shV(PyObject *self, PyObject *args);
-static PyObject *_inP07ytA1eF(PyObject *self, PyObject *args);
-static PyObject *_inP07yt776V(PyObject *self, PyObject *args);
-static PyObject *_inP07ytryup(PyObject *self, PyObject *args);
-static PyObject *_inP07ytiytI(PyObject *self, PyObject *args);
-static PyObject *_inP07ytZc07(PyObject *self, PyObject *args);
-static PyObject *_inP07ytfaH0(PyObject *self, PyObject *args);
-static PyObject *_inP07ytGB9D(PyObject *self, PyObject *args);
-static PyObject *_inP07ytrppS(PyObject *self, PyObject *args);
-static PyObject *_inP07ytO50x(PyObject *self, PyObject *args);
-static PyObject *_inP07ytsxxs(PyObject *self, PyObject *args);
-static PyObject *_inP07ytMT0z(PyObject *self, PyObject *args);
-static PyObject *_inP07ytiW3v(PyObject *self, PyObject *args);
-static PyObject *_inP07yt4Px8(PyObject *self, PyObject *args);
-static PyObject *_inP07ytNHcs(PyObject *self, PyObject *args);
-static PyObject *_inP07ytqHrb(PyObject *self, PyObject *args);
-static PyObject *_inP07ytaOqq(PyObject *self, PyObject *args);
-static PyObject *_inP07ytpTBb(PyObject *self, PyObject *args);
-static PyObject *_inP07ytZUkn(PyObject *self, PyObject *args);
-static PyObject *_inP07ytqWOw(PyObject *self, PyObject *args);
-static PyObject *_inP07ytHu7x(PyObject *self, PyObject *args);
-static PyObject *_inP07ytwGnA(PyObject *self, PyObject *args);
-static PyObject *_inP07ytXGxx(PyObject *self, PyObject *args);
-static PyObject *_inP07ytj04Z(PyObject *self, PyObject *args);
-static PyObject *_inP07ytEOv4(PyObject *self, PyObject *args);
-static PyObject *_inP07ytpCqJ(PyObject *self, PyObject *args);
-static PyObject *_inP07yt_Pz3(PyObject *self, PyObject *args);
-static PyObject *_inP07ytt_06(PyObject *self, PyObject *args);
-static PyObject *_inP07ytmuPs(PyObject *self, PyObject *args);
-static PyObject *_inP07ytvM8B(PyObject *self, PyObject *args);
-static PyObject *_inP07ytap97(PyObject *self, PyObject *args);
-static PyObject *_inP07yt0o8D(PyObject *self, PyObject *args);
-static PyObject *_inP07ytOoQ2(PyObject *self, PyObject *args);
-static PyObject *_inP07ytKuFh(PyObject *self, PyObject *args);
-static PyObject *_inP07yto5L6(PyObject *self, PyObject *args);
-static PyObject *_inP07ytzgKK(PyObject *self, PyObject *args);
-static PyObject *_inP07yt0FIF(PyObject *self, PyObject *args);
-static PyObject *_inP07ytZqvD(PyObject *self, PyObject *args);
-static PyObject *_inP07ytDyRd(PyObject *self, PyObject *args);
-static PyObject *_inP07ytMnKa(PyObject *self, PyObject *args);
-static PyObject *_inP07ytRtji(PyObject *self, PyObject *args);
-static PyObject *_inP07ytCnbQ(PyObject *self, PyObject *args);
-static PyObject *_inP07ytoxqc(PyObject *self, PyObject *args);
-static PyObject *_inP07ytZQIS(PyObject *self, PyObject *args);
-static PyObject *_inP07ytdUVN(PyObject *self, PyObject *args);
-static PyObject *_inP07ytZtNk(PyObject *self, PyObject *args);
-static PyObject *_inP07ytihbt(PyObject *self, PyObject *args);
-static PyObject *_inP07ytbyPY(PyObject *self, PyObject *args);
-static PyObject *_inP07ytAaT6(PyObject *self, PyObject *args);
-static PyObject *_inP07ytgL9q(PyObject *self, PyObject *args);
-static PyObject *_inP07ytWB97(PyObject *self, PyObject *args);
-static PyObject *_inP07ytDUAl(PyObject *self, PyObject *args);
-static PyObject *_inP07yt1_Kf(PyObject *self, PyObject *args);
-static PyObject *_inP07yt98lD(PyObject *self, PyObject *args);
-static PyObject *_inP07yt9SHr(PyObject *self, PyObject *args);
-static PyObject *_inP07ytdiZP(PyObject *self, PyObject *args);
-static PyObject *_inP07ytTdER(PyObject *self, PyObject *args);
-static PyObject *_inP07ytYO56(PyObject *self, PyObject *args);
-static PyObject *_inP07ytxtCG(PyObject *self, PyObject *args);
-static PyObject *_inP07yt_EB2(PyObject *self, PyObject *args);
-static PyObject *_inP07ytEG1l(PyObject *self, PyObject *args);
-static PyObject *_inP07yt7tUq(PyObject *self, PyObject *args);
-static PyObject *_inP07ytyStU(PyObject *self, PyObject *args);
-static PyObject *_inP07ytdM85(PyObject *self, PyObject *args);
-static PyObject *_inP07ytk_GN(PyObject *self, PyObject *args);
-static PyObject *_inP07yt8QjG(PyObject *self, PyObject *args);
-static PyObject *_inP07ytyMtj(PyObject *self, PyObject *args);
-static PyObject *_inP07ytHDtN(PyObject *self, PyObject *args);
-static PyObject *_inP07ytHFjA(PyObject *self, PyObject *args);
-static PyObject *_inP07yt_NPR(PyObject *self, PyObject *args);
-static PyObject *_inP07ytcTOH(PyObject *self, PyObject *args);
-static PyObject *_inP07ytC5Uk(PyObject *self, PyObject *args);
-static PyObject *_inP07ythdU7(PyObject *self, PyObject *args);
-static PyObject *_inP07ytQPxU(PyObject *self, PyObject *args);
-static PyObject *_inP07ytO7Pz(PyObject *self, PyObject *args);
-static PyObject *_inP07ytvu_E(PyObject *self, PyObject *args);
-static PyObject *_inP07ytxGUt(PyObject *self, PyObject *args);
-static PyObject *_inP07ytzM1P(PyObject *self, PyObject *args);
-static PyObject *_inP07ytoY5L(PyObject *self, PyObject *args);
-static PyObject *_inP07yte_7S(PyObject *self, PyObject *args);
-static PyObject *_inP07ytw_15(PyObject *self, PyObject *args);
-
-
-/*
- * Python simple wrapper for
- * void interrogate_add_search_directory(char const *dirname)
- */
-static PyObject *
-_inP07yttbRf(PyObject *, PyObject *args) {
- char *param0;
- if (PyArg_ParseTuple(args, "s", ¶m0)) {
- (::interrogate_add_search_directory)((char const *)param0);
- return Py_BuildValue("");
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * void interrogate_add_search_path(char const *pathstring)
- */
-static PyObject *
-_inP07ytda_g(PyObject *, PyObject *args) {
- char *param0;
- if (PyArg_ParseTuple(args, "s", ¶m0)) {
- (::interrogate_add_search_path)((char const *)param0);
- return Py_BuildValue("");
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_error_flag(void)
- */
-static PyObject *
-_inP07yt4RgX(PyObject *, PyObject *args) {
- if (PyArg_ParseTuple(args, "")) {
- bool return_value = (::interrogate_error_flag)();
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * int interrogate_number_of_manifests(void)
- */
-static PyObject *
-_inP07yt3Gip(PyObject *, PyObject *args) {
- if (PyArg_ParseTuple(args, "")) {
- int return_value = (::interrogate_number_of_manifests)();
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * ManifestIndex interrogate_get_manifest(int n)
- */
-static PyObject *
-_inP07ytRKDz(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- ManifestIndex return_value = (::interrogate_get_manifest)((int)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * ManifestIndex interrogate_get_manifest_by_name(char const *manifest_name)
- */
-static PyObject *
-_inP07ytgZ9N(PyObject *, PyObject *args) {
- char *param0;
- if (PyArg_ParseTuple(args, "s", ¶m0)) {
- ManifestIndex return_value = (::interrogate_get_manifest_by_name)((char const *)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * char const *interrogate_manifest_name(ManifestIndex manifest)
- */
-static PyObject *
-_inP07ytFnRZ(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- char const *return_value = (::interrogate_manifest_name)((ManifestIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyUnicode_FromString(return_value);
-#else
- return PyString_FromString(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * char const *interrogate_manifest_definition(ManifestIndex manifest)
- */
-static PyObject *
-_inP07ytg0Qv(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- char const *return_value = (::interrogate_manifest_definition)((ManifestIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyUnicode_FromString(return_value);
-#else
- return PyString_FromString(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_manifest_has_type(ManifestIndex manifest)
- */
-static PyObject *
-_inP07yttrqw(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_manifest_has_type)((ManifestIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * TypeIndex interrogate_manifest_get_type(ManifestIndex manifest)
- */
-static PyObject *
-_inP07ytdmpW(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- TypeIndex return_value = (::interrogate_manifest_get_type)((ManifestIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_manifest_has_getter(ManifestIndex manifest)
- */
-static PyObject *
-_inP07ytUYgQ(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_manifest_has_getter)((ManifestIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * FunctionIndex interrogate_manifest_getter(ManifestIndex manifest)
- */
-static PyObject *
-_inP07yt0k7F(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- FunctionIndex return_value = (::interrogate_manifest_getter)((ManifestIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_manifest_has_int_value(ManifestIndex manifest)
- */
-static PyObject *
-_inP07ytfIsr(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_manifest_has_int_value)((ManifestIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * int interrogate_manifest_get_int_value(ManifestIndex manifest)
- */
-static PyObject *
-_inP07ytvysR(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- int return_value = (::interrogate_manifest_get_int_value)((ManifestIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * char const *interrogate_element_name(ElementIndex element)
- */
-static PyObject *
-_inP07ytYQ_2(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- char const *return_value = (::interrogate_element_name)((ElementIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyUnicode_FromString(return_value);
-#else
- return PyString_FromString(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * char const *interrogate_element_scoped_name(ElementIndex element)
- */
-static PyObject *
-_inP07yt3kdv(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- char const *return_value = (::interrogate_element_scoped_name)((ElementIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyUnicode_FromString(return_value);
-#else
- return PyString_FromString(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_element_has_comment(ElementIndex element)
- */
-static PyObject *
-_inP07ytew01(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_element_has_comment)((ElementIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * char const *interrogate_element_comment(ElementIndex element)
- */
-static PyObject *
-_inP07ytQna7(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- char const *return_value = (::interrogate_element_comment)((ElementIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyUnicode_FromString(return_value);
-#else
- return PyString_FromString(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * ElementIndex interrogate_get_element_by_name(char const *element_name)
- */
-static PyObject *
-_inP07ytkg95(PyObject *, PyObject *args) {
- char *param0;
- if (PyArg_ParseTuple(args, "s", ¶m0)) {
- ElementIndex return_value = (::interrogate_get_element_by_name)((char const *)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * ElementIndex interrogate_get_element_by_scoped_name(char const *element_name)
- */
-static PyObject *
-_inP07ytluRc(PyObject *, PyObject *args) {
- char *param0;
- if (PyArg_ParseTuple(args, "s", ¶m0)) {
- ElementIndex return_value = (::interrogate_get_element_by_scoped_name)((char const *)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * TypeIndex interrogate_element_type(ElementIndex element)
- */
-static PyObject *
-_inP07yttHdM(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- TypeIndex return_value = (::interrogate_element_type)((ElementIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_element_has_getter(ElementIndex element)
- */
-static PyObject *
-_inP07ytDId0(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_element_has_getter)((ElementIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * FunctionIndex interrogate_element_getter(ElementIndex element)
- */
-static PyObject *
-_inP07ytHuAm(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- FunctionIndex return_value = (::interrogate_element_getter)((ElementIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_element_has_setter(ElementIndex element)
- */
-static PyObject *
-_inP07yt_xr0(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_element_has_setter)((ElementIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * FunctionIndex interrogate_element_setter(ElementIndex element)
- */
-static PyObject *
-_inP07ytH5qp(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- FunctionIndex return_value = (::interrogate_element_setter)((ElementIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_element_has_has_function(ElementIndex element)
- */
-static PyObject *
-_inP07ytLfJw(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_element_has_has_function)((ElementIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * FunctionIndex interrogate_element_has_function(ElementIndex element)
- */
-static PyObject *
-_inP07yt_Atg(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- FunctionIndex return_value = (::interrogate_element_has_function)((ElementIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_element_has_clear_function(ElementIndex element)
- */
-static PyObject *
-_inP07ytlBqc(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_element_has_clear_function)((ElementIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * FunctionIndex interrogate_element_clear_function(ElementIndex element)
- */
-static PyObject *
-_inP07ytNdUp(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- FunctionIndex return_value = (::interrogate_element_clear_function)((ElementIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_element_has_del_function(ElementIndex element)
- */
-static PyObject *
-_inP07ytlS0p(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_element_has_del_function)((ElementIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * FunctionIndex interrogate_element_del_function(ElementIndex element)
- */
-static PyObject *
-_inP07ytZZe7(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- FunctionIndex return_value = (::interrogate_element_del_function)((ElementIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_element_has_insert_function(ElementIndex element)
- */
-static PyObject *
-_inP07ytV5S_(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_element_has_insert_function)((ElementIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * FunctionIndex interrogate_element_insert_function(ElementIndex element)
- */
-static PyObject *
-_inP07yto9vD(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- FunctionIndex return_value = (::interrogate_element_insert_function)((ElementIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_element_has_getkey_function(ElementIndex element)
- */
-static PyObject *
-_inP07ytv7tF(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_element_has_getkey_function)((ElementIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * FunctionIndex interrogate_element_getkey_function(ElementIndex element)
- */
-static PyObject *
-_inP07ythOg6(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- FunctionIndex return_value = (::interrogate_element_getkey_function)((ElementIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * FunctionIndex interrogate_element_length_function(ElementIndex element)
- */
-static PyObject *
-_inP07ytoZUn(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- FunctionIndex return_value = (::interrogate_element_length_function)((ElementIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_element_is_sequence(ElementIndex element)
- */
-static PyObject *
-_inP07ytq45U(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_element_is_sequence)((ElementIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_element_is_mapping(ElementIndex element)
- */
-static PyObject *
-_inP07yt6IPa(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_element_is_mapping)((ElementIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * int interrogate_number_of_globals(void)
- */
-static PyObject *
-_inP07ytU2_B(PyObject *, PyObject *args) {
- if (PyArg_ParseTuple(args, "")) {
- int return_value = (::interrogate_number_of_globals)();
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * ElementIndex interrogate_get_global(int n)
- */
-static PyObject *
-_inP07ytHFO2(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- ElementIndex return_value = (::interrogate_get_global)((int)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * int interrogate_number_of_global_functions(void)
- */
-static PyObject *
-_inP07ytcfjm(PyObject *, PyObject *args) {
- if (PyArg_ParseTuple(args, "")) {
- int return_value = (::interrogate_number_of_global_functions)();
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * FunctionIndex interrogate_get_global_function(int n)
- */
-static PyObject *
-_inP07yt3Sjw(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- FunctionIndex return_value = (::interrogate_get_global_function)((int)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * int interrogate_number_of_functions(void)
- */
-static PyObject *
-_inP07ytgJcX(PyObject *, PyObject *args) {
- if (PyArg_ParseTuple(args, "")) {
- int return_value = (::interrogate_number_of_functions)();
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * FunctionIndex interrogate_get_function(int n)
- */
-static PyObject *
-_inP07ytYlw6(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- FunctionIndex return_value = (::interrogate_get_function)((int)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * char const *interrogate_function_name(FunctionIndex function)
- */
-static PyObject *
-_inP07ytsmnz(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- char const *return_value = (::interrogate_function_name)((FunctionIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyUnicode_FromString(return_value);
-#else
- return PyString_FromString(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * char const *interrogate_function_scoped_name(FunctionIndex function)
- */
-static PyObject *
-_inP07ytxQ10(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- char const *return_value = (::interrogate_function_scoped_name)((FunctionIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyUnicode_FromString(return_value);
-#else
- return PyString_FromString(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_function_has_comment(FunctionIndex function)
- */
-static PyObject *
-_inP07yt6gPB(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_function_has_comment)((FunctionIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * char const *interrogate_function_comment(FunctionIndex function)
- */
-static PyObject *
-_inP07ytISgV(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- char const *return_value = (::interrogate_function_comment)((FunctionIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyUnicode_FromString(return_value);
-#else
- return PyString_FromString(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * char const *interrogate_function_prototype(FunctionIndex function)
- */
-static PyObject *
-_inP07ytH3bx(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- char const *return_value = (::interrogate_function_prototype)((FunctionIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyUnicode_FromString(return_value);
-#else
- return PyString_FromString(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_function_is_method(FunctionIndex function)
- */
-static PyObject *
-_inP07ytzeUk(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_function_is_method)((FunctionIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * TypeIndex interrogate_function_class(FunctionIndex function)
- */
-static PyObject *
-_inP07ytUeI5(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- TypeIndex return_value = (::interrogate_function_class)((FunctionIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_function_is_unary_op(FunctionIndex function)
- */
-static PyObject *
-_inP07ytbmxJ(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_function_is_unary_op)((FunctionIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_function_is_operator_typecast(FunctionIndex function)
- */
-static PyObject *
-_inP07ytY8Lc(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_function_is_operator_typecast)((FunctionIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_function_is_constructor(FunctionIndex function)
- */
-static PyObject *
-_inP07ytJAAI(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_function_is_constructor)((FunctionIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_function_is_destructor(FunctionIndex function)
- */
-static PyObject *
-_inP07yt0UXw(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_function_is_destructor)((FunctionIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_function_has_module_name(FunctionIndex function)
- */
-static PyObject *
-_inP07ytuSvx(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_function_has_module_name)((FunctionIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * char const *interrogate_function_module_name(FunctionIndex function)
- */
-static PyObject *
-_inP07ytwpYd(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- char const *return_value = (::interrogate_function_module_name)((FunctionIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyUnicode_FromString(return_value);
-#else
- return PyString_FromString(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_function_has_library_name(FunctionIndex function)
- */
-static PyObject *
-_inP07ytOfNh(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_function_has_library_name)((FunctionIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * char const *interrogate_function_library_name(FunctionIndex function)
- */
-static PyObject *
-_inP07ytf5_U(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- char const *return_value = (::interrogate_function_library_name)((FunctionIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyUnicode_FromString(return_value);
-#else
- return PyString_FromString(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_function_is_virtual(FunctionIndex function)
- */
-static PyObject *
-_inP07ytL3ZB(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_function_is_virtual)((FunctionIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * int interrogate_function_number_of_c_wrappers(FunctionIndex function)
- */
-static PyObject *
-_inP07ytXw0I(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- int return_value = (::interrogate_function_number_of_c_wrappers)((FunctionIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * FunctionWrapperIndex interrogate_function_c_wrapper(FunctionIndex function, int n)
- */
-static PyObject *
-_inP07yt3zru(PyObject *, PyObject *args) {
- int param0;
- int param1;
- if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) {
- FunctionWrapperIndex return_value = (::interrogate_function_c_wrapper)((FunctionIndex)param0, (int)param1);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * int interrogate_function_number_of_python_wrappers(FunctionIndex function)
- */
-static PyObject *
-_inP07ytRrg2(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- int return_value = (::interrogate_function_number_of_python_wrappers)((FunctionIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * FunctionWrapperIndex interrogate_function_python_wrapper(FunctionIndex function, int n)
- */
-static PyObject *
-_inP07ytEJCx(PyObject *, PyObject *args) {
- int param0;
- int param1;
- if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) {
- FunctionWrapperIndex return_value = (::interrogate_function_python_wrapper)((FunctionIndex)param0, (int)param1);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * char const *interrogate_wrapper_name(FunctionWrapperIndex wrapper)
- */
-static PyObject *
-_inP07ytWAZr(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- char const *return_value = (::interrogate_wrapper_name)((FunctionWrapperIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyUnicode_FromString(return_value);
-#else
- return PyString_FromString(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * FunctionIndex interrogate_wrapper_function(FunctionWrapperIndex wrapper)
- */
-static PyObject *
-_inP07ytHQi6(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- FunctionIndex return_value = (::interrogate_wrapper_function)((FunctionWrapperIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_wrapper_is_callable_by_name(FunctionWrapperIndex wrapper)
- */
-static PyObject *
-_inP07ytrD_M(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_wrapper_is_callable_by_name)((FunctionWrapperIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_wrapper_is_copy_constructor(FunctionWrapperIndex wrapper)
- */
-static PyObject *
-_inP07ytYaah(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_wrapper_is_copy_constructor)((FunctionWrapperIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_wrapper_is_coerce_constructor(FunctionWrapperIndex wrapper)
- */
-static PyObject *
-_inP07yt2otr(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_wrapper_is_coerce_constructor)((FunctionWrapperIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_wrapper_is_extension(FunctionWrapperIndex wrapper)
- */
-static PyObject *
-_inP07ytNP_b(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_wrapper_is_extension)((FunctionWrapperIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_wrapper_is_deprecated(FunctionWrapperIndex wrapper)
- */
-static PyObject *
-_inP07ytrrrN(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_wrapper_is_deprecated)((FunctionWrapperIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_wrapper_has_comment(FunctionWrapperIndex wrapper)
- */
-static PyObject *
-_inP07ytjolz(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_wrapper_has_comment)((FunctionWrapperIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * char const *interrogate_wrapper_comment(FunctionWrapperIndex wrapper)
- */
-static PyObject *
-_inP07ytt_JD(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- char const *return_value = (::interrogate_wrapper_comment)((FunctionWrapperIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyUnicode_FromString(return_value);
-#else
- return PyString_FromString(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_wrapper_has_return_value(FunctionWrapperIndex wrapper)
- */
-static PyObject *
-_inP07ytwEts(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_wrapper_has_return_value)((FunctionWrapperIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * TypeIndex interrogate_wrapper_return_type(FunctionWrapperIndex wrapper)
- */
-static PyObject *
-_inP07ytrJWs(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- TypeIndex return_value = (::interrogate_wrapper_return_type)((FunctionWrapperIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_wrapper_caller_manages_return_value(FunctionWrapperIndex wrapper)
- */
-static PyObject *
-_inP07ytpmFD(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_wrapper_caller_manages_return_value)((FunctionWrapperIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * FunctionIndex interrogate_wrapper_return_value_destructor(FunctionWrapperIndex wrapper)
- */
-static PyObject *
-_inP07ytyYUX(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- FunctionIndex return_value = (::interrogate_wrapper_return_value_destructor)((FunctionWrapperIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * int interrogate_wrapper_number_of_parameters(FunctionWrapperIndex wrapper)
- */
-static PyObject *
-_inP07yt54dn(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- int return_value = (::interrogate_wrapper_number_of_parameters)((FunctionWrapperIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * TypeIndex interrogate_wrapper_parameter_type(FunctionWrapperIndex wrapper, int n)
- */
-static PyObject *
-_inP07ytGMpW(PyObject *, PyObject *args) {
- int param0;
- int param1;
- if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) {
- TypeIndex return_value = (::interrogate_wrapper_parameter_type)((FunctionWrapperIndex)param0, (int)param1);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_wrapper_parameter_has_name(FunctionWrapperIndex wrapper, int n)
- */
-static PyObject *
-_inP07ytNuBV(PyObject *, PyObject *args) {
- int param0;
- int param1;
- if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) {
- bool return_value = (::interrogate_wrapper_parameter_has_name)((FunctionWrapperIndex)param0, (int)param1);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * char const *interrogate_wrapper_parameter_name(FunctionWrapperIndex wrapper, int n)
- */
-static PyObject *
-_inP07yt9UwA(PyObject *, PyObject *args) {
- int param0;
- int param1;
- if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) {
- char const *return_value = (::interrogate_wrapper_parameter_name)((FunctionWrapperIndex)param0, (int)param1);
-#if PY_MAJOR_VERSION >= 3
- return PyUnicode_FromString(return_value);
-#else
- return PyString_FromString(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_wrapper_parameter_is_this(FunctionWrapperIndex wrapper, int n)
- */
-static PyObject *
-_inP07yt3FDt(PyObject *, PyObject *args) {
- int param0;
- int param1;
- if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) {
- bool return_value = (::interrogate_wrapper_parameter_is_this)((FunctionWrapperIndex)param0, (int)param1);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_wrapper_parameter_is_optional(FunctionWrapperIndex wrapper, int n)
- */
-static PyObject *
-_inP07ytDgOY(PyObject *, PyObject *args) {
- int param0;
- int param1;
- if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) {
- bool return_value = (::interrogate_wrapper_parameter_is_optional)((FunctionWrapperIndex)param0, (int)param1);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_wrapper_has_pointer(FunctionWrapperIndex wrapper)
- */
-static PyObject *
-_inP07ytf513(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_wrapper_has_pointer)((FunctionWrapperIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * void *interrogate_wrapper_pointer(FunctionWrapperIndex wrapper)
- */
-static PyObject *
-_inP07ytsqGH(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- (::interrogate_wrapper_pointer)((FunctionWrapperIndex)param0);
- return Py_BuildValue("");
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * char const *interrogate_wrapper_unique_name(FunctionWrapperIndex wrapper)
- */
-static PyObject *
-_inP07yt7shV(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- char const *return_value = (::interrogate_wrapper_unique_name)((FunctionWrapperIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyUnicode_FromString(return_value);
-#else
- return PyString_FromString(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * FunctionWrapperIndex interrogate_get_wrapper_by_unique_name(char const *unique_name)
- */
-static PyObject *
-_inP07ytA1eF(PyObject *, PyObject *args) {
- char *param0;
- if (PyArg_ParseTuple(args, "s", ¶m0)) {
- FunctionWrapperIndex return_value = (::interrogate_get_wrapper_by_unique_name)((char const *)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * char const *interrogate_make_seq_seq_name(MakeSeqIndex make_seq)
- */
-static PyObject *
-_inP07yt776V(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- char const *return_value = (::interrogate_make_seq_seq_name)((MakeSeqIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyUnicode_FromString(return_value);
-#else
- return PyString_FromString(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * char const *interrogate_make_seq_scoped_name(MakeSeqIndex make_seq)
- */
-static PyObject *
-_inP07ytryup(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- char const *return_value = (::interrogate_make_seq_scoped_name)((MakeSeqIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyUnicode_FromString(return_value);
-#else
- return PyString_FromString(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_make_seq_has_comment(ElementIndex element)
- */
-static PyObject *
-_inP07ytiytI(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_make_seq_has_comment)((ElementIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * char const *interrogate_make_seq_comment(ElementIndex element)
- */
-static PyObject *
-_inP07ytZc07(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- char const *return_value = (::interrogate_make_seq_comment)((ElementIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyUnicode_FromString(return_value);
-#else
- return PyString_FromString(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * char const *interrogate_make_seq_num_name(MakeSeqIndex make_seq)
- */
-static PyObject *
-_inP07ytfaH0(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- char const *return_value = (::interrogate_make_seq_num_name)((MakeSeqIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyUnicode_FromString(return_value);
-#else
- return PyString_FromString(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * char const *interrogate_make_seq_element_name(MakeSeqIndex make_seq)
- */
-static PyObject *
-_inP07ytGB9D(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- char const *return_value = (::interrogate_make_seq_element_name)((MakeSeqIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyUnicode_FromString(return_value);
-#else
- return PyString_FromString(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * FunctionIndex interrogate_make_seq_num_getter(MakeSeqIndex make_seq)
- */
-static PyObject *
-_inP07ytrppS(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- FunctionIndex return_value = (::interrogate_make_seq_num_getter)((MakeSeqIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * FunctionIndex interrogate_make_seq_element_getter(MakeSeqIndex make_seq)
- */
-static PyObject *
-_inP07ytO50x(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- FunctionIndex return_value = (::interrogate_make_seq_element_getter)((MakeSeqIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * int interrogate_number_of_global_types(void)
- */
-static PyObject *
-_inP07ytsxxs(PyObject *, PyObject *args) {
- if (PyArg_ParseTuple(args, "")) {
- int return_value = (::interrogate_number_of_global_types)();
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * TypeIndex interrogate_get_global_type(int n)
- */
-static PyObject *
-_inP07ytMT0z(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- TypeIndex return_value = (::interrogate_get_global_type)((int)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * int interrogate_number_of_types(void)
- */
-static PyObject *
-_inP07ytiW3v(PyObject *, PyObject *args) {
- if (PyArg_ParseTuple(args, "")) {
- int return_value = (::interrogate_number_of_types)();
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * TypeIndex interrogate_get_type(int n)
- */
-static PyObject *
-_inP07yt4Px8(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- TypeIndex return_value = (::interrogate_get_type)((int)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * TypeIndex interrogate_get_type_by_name(char const *type_name)
- */
-static PyObject *
-_inP07ytNHcs(PyObject *, PyObject *args) {
- char *param0;
- if (PyArg_ParseTuple(args, "s", ¶m0)) {
- TypeIndex return_value = (::interrogate_get_type_by_name)((char const *)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * TypeIndex interrogate_get_type_by_scoped_name(char const *type_name)
- */
-static PyObject *
-_inP07ytqHrb(PyObject *, PyObject *args) {
- char *param0;
- if (PyArg_ParseTuple(args, "s", ¶m0)) {
- TypeIndex return_value = (::interrogate_get_type_by_scoped_name)((char const *)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * TypeIndex interrogate_get_type_by_true_name(char const *type_name)
- */
-static PyObject *
-_inP07ytaOqq(PyObject *, PyObject *args) {
- char *param0;
- if (PyArg_ParseTuple(args, "s", ¶m0)) {
- TypeIndex return_value = (::interrogate_get_type_by_true_name)((char const *)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_type_is_global(TypeIndex type)
- */
-static PyObject *
-_inP07ytpTBb(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_type_is_global)((TypeIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_type_is_deprecated(TypeIndex type)
- */
-static PyObject *
-_inP07ytZUkn(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_type_is_deprecated)((TypeIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * char const *interrogate_type_name(TypeIndex type)
- */
-static PyObject *
-_inP07ytqWOw(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- char const *return_value = (::interrogate_type_name)((TypeIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyUnicode_FromString(return_value);
-#else
- return PyString_FromString(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * char const *interrogate_type_scoped_name(TypeIndex type)
- */
-static PyObject *
-_inP07ytHu7x(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- char const *return_value = (::interrogate_type_scoped_name)((TypeIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyUnicode_FromString(return_value);
-#else
- return PyString_FromString(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * char const *interrogate_type_true_name(TypeIndex type)
- */
-static PyObject *
-_inP07ytwGnA(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- char const *return_value = (::interrogate_type_true_name)((TypeIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyUnicode_FromString(return_value);
-#else
- return PyString_FromString(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_type_is_nested(TypeIndex type)
- */
-static PyObject *
-_inP07ytXGxx(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_type_is_nested)((TypeIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * TypeIndex interrogate_type_outer_class(TypeIndex type)
- */
-static PyObject *
-_inP07ytj04Z(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- TypeIndex return_value = (::interrogate_type_outer_class)((TypeIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_type_has_comment(TypeIndex type)
- */
-static PyObject *
-_inP07ytEOv4(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_type_has_comment)((TypeIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * char const *interrogate_type_comment(TypeIndex type)
- */
-static PyObject *
-_inP07ytpCqJ(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- char const *return_value = (::interrogate_type_comment)((TypeIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyUnicode_FromString(return_value);
-#else
- return PyString_FromString(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_type_has_module_name(TypeIndex type)
- */
-static PyObject *
-_inP07yt_Pz3(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_type_has_module_name)((TypeIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * char const *interrogate_type_module_name(TypeIndex type)
- */
-static PyObject *
-_inP07ytt_06(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- char const *return_value = (::interrogate_type_module_name)((TypeIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyUnicode_FromString(return_value);
-#else
- return PyString_FromString(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_type_has_library_name(TypeIndex type)
- */
-static PyObject *
-_inP07ytmuPs(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_type_has_library_name)((TypeIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * char const *interrogate_type_library_name(TypeIndex type)
- */
-static PyObject *
-_inP07ytvM8B(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- char const *return_value = (::interrogate_type_library_name)((TypeIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyUnicode_FromString(return_value);
-#else
- return PyString_FromString(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_type_is_atomic(TypeIndex type)
- */
-static PyObject *
-_inP07ytap97(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_type_is_atomic)((TypeIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * AtomicToken interrogate_type_atomic_token(TypeIndex type)
- */
-static PyObject *
-_inP07yt0o8D(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- AtomicToken return_value = (::interrogate_type_atomic_token)((TypeIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_type_is_unsigned(TypeIndex type)
- */
-static PyObject *
-_inP07ytOoQ2(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_type_is_unsigned)((TypeIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_type_is_signed(TypeIndex type)
- */
-static PyObject *
-_inP07ytKuFh(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_type_is_signed)((TypeIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_type_is_long(TypeIndex type)
- */
-static PyObject *
-_inP07yto5L6(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_type_is_long)((TypeIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_type_is_longlong(TypeIndex type)
- */
-static PyObject *
-_inP07ytzgKK(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_type_is_longlong)((TypeIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_type_is_short(TypeIndex type)
- */
-static PyObject *
-_inP07yt0FIF(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_type_is_short)((TypeIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_type_is_wrapped(TypeIndex type)
- */
-static PyObject *
-_inP07ytZqvD(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_type_is_wrapped)((TypeIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_type_is_pointer(TypeIndex type)
- */
-static PyObject *
-_inP07ytDyRd(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_type_is_pointer)((TypeIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_type_is_const(TypeIndex type)
- */
-static PyObject *
-_inP07ytMnKa(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_type_is_const)((TypeIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_type_is_typedef(TypeIndex type)
- */
-static PyObject *
-_inP07ytRtji(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_type_is_typedef)((TypeIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * TypeIndex interrogate_type_wrapped_type(TypeIndex type)
- */
-static PyObject *
-_inP07ytCnbQ(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- TypeIndex return_value = (::interrogate_type_wrapped_type)((TypeIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_type_is_array(TypeIndex type)
- */
-static PyObject *
-_inP07ytoxqc(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_type_is_array)((TypeIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * int interrogate_type_array_size(TypeIndex type)
- */
-static PyObject *
-_inP07ytZQIS(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- int return_value = (::interrogate_type_array_size)((TypeIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_type_is_enum(TypeIndex type)
- */
-static PyObject *
-_inP07ytdUVN(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_type_is_enum)((TypeIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_type_is_scoped_enum(TypeIndex type)
- */
-static PyObject *
-_inP07ytZtNk(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_type_is_scoped_enum)((TypeIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * int interrogate_type_number_of_enum_values(TypeIndex type)
- */
-static PyObject *
-_inP07ytihbt(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- int return_value = (::interrogate_type_number_of_enum_values)((TypeIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * char const *interrogate_type_enum_value_name(TypeIndex type, int n)
- */
-static PyObject *
-_inP07ytbyPY(PyObject *, PyObject *args) {
- int param0;
- int param1;
- if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) {
- char const *return_value = (::interrogate_type_enum_value_name)((TypeIndex)param0, (int)param1);
-#if PY_MAJOR_VERSION >= 3
- return PyUnicode_FromString(return_value);
-#else
- return PyString_FromString(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * char const *interrogate_type_enum_value_scoped_name(TypeIndex type, int n)
- */
-static PyObject *
-_inP07ytAaT6(PyObject *, PyObject *args) {
- int param0;
- int param1;
- if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) {
- char const *return_value = (::interrogate_type_enum_value_scoped_name)((TypeIndex)param0, (int)param1);
-#if PY_MAJOR_VERSION >= 3
- return PyUnicode_FromString(return_value);
-#else
- return PyString_FromString(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * char const *interrogate_type_enum_value_comment(TypeIndex type, int n)
- */
-static PyObject *
-_inP07ytgL9q(PyObject *, PyObject *args) {
- int param0;
- int param1;
- if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) {
- char const *return_value = (::interrogate_type_enum_value_comment)((TypeIndex)param0, (int)param1);
-#if PY_MAJOR_VERSION >= 3
- return PyUnicode_FromString(return_value);
-#else
- return PyString_FromString(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * int interrogate_type_enum_value(TypeIndex type, int n)
- */
-static PyObject *
-_inP07ytWB97(PyObject *, PyObject *args) {
- int param0;
- int param1;
- if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) {
- int return_value = (::interrogate_type_enum_value)((TypeIndex)param0, (int)param1);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_type_is_struct(TypeIndex type)
- */
-static PyObject *
-_inP07ytDUAl(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_type_is_struct)((TypeIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_type_is_class(TypeIndex type)
- */
-static PyObject *
-_inP07yt1_Kf(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_type_is_class)((TypeIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_type_is_union(TypeIndex type)
- */
-static PyObject *
-_inP07yt98lD(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_type_is_union)((TypeIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_type_is_fully_defined(TypeIndex type)
- */
-static PyObject *
-_inP07yt9SHr(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_type_is_fully_defined)((TypeIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_type_is_unpublished(TypeIndex type)
- */
-static PyObject *
-_inP07ytdiZP(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_type_is_unpublished)((TypeIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * int interrogate_type_number_of_constructors(TypeIndex type)
- */
-static PyObject *
-_inP07ytTdER(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- int return_value = (::interrogate_type_number_of_constructors)((TypeIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * FunctionIndex interrogate_type_get_constructor(TypeIndex type, int n)
- */
-static PyObject *
-_inP07ytYO56(PyObject *, PyObject *args) {
- int param0;
- int param1;
- if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) {
- FunctionIndex return_value = (::interrogate_type_get_constructor)((TypeIndex)param0, (int)param1);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_type_has_destructor(TypeIndex type)
- */
-static PyObject *
-_inP07ytxtCG(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_type_has_destructor)((TypeIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_type_destructor_is_inherited(TypeIndex type)
- */
-static PyObject *
-_inP07yt_EB2(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_type_destructor_is_inherited)((TypeIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * FunctionIndex interrogate_type_get_destructor(TypeIndex type)
- */
-static PyObject *
-_inP07ytEG1l(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- FunctionIndex return_value = (::interrogate_type_get_destructor)((TypeIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * int interrogate_type_number_of_elements(TypeIndex type)
- */
-static PyObject *
-_inP07yt7tUq(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- int return_value = (::interrogate_type_number_of_elements)((TypeIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * ElementIndex interrogate_type_get_element(TypeIndex type, int n)
- */
-static PyObject *
-_inP07ytyStU(PyObject *, PyObject *args) {
- int param0;
- int param1;
- if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) {
- ElementIndex return_value = (::interrogate_type_get_element)((TypeIndex)param0, (int)param1);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * int interrogate_type_number_of_methods(TypeIndex type)
- */
-static PyObject *
-_inP07ytdM85(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- int return_value = (::interrogate_type_number_of_methods)((TypeIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * FunctionIndex interrogate_type_get_method(TypeIndex type, int n)
- */
-static PyObject *
-_inP07ytk_GN(PyObject *, PyObject *args) {
- int param0;
- int param1;
- if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) {
- FunctionIndex return_value = (::interrogate_type_get_method)((TypeIndex)param0, (int)param1);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * int interrogate_type_number_of_make_seqs(TypeIndex type)
- */
-static PyObject *
-_inP07yt8QjG(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- int return_value = (::interrogate_type_number_of_make_seqs)((TypeIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * MakeSeqIndex interrogate_type_get_make_seq(TypeIndex type, int n)
- */
-static PyObject *
-_inP07ytyMtj(PyObject *, PyObject *args) {
- int param0;
- int param1;
- if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) {
- MakeSeqIndex return_value = (::interrogate_type_get_make_seq)((TypeIndex)param0, (int)param1);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * int interrogate_type_number_of_casts(TypeIndex type)
- */
-static PyObject *
-_inP07ytHDtN(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- int return_value = (::interrogate_type_number_of_casts)((TypeIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * FunctionIndex interrogate_type_get_cast(TypeIndex type, int n)
- */
-static PyObject *
-_inP07ytHFjA(PyObject *, PyObject *args) {
- int param0;
- int param1;
- if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) {
- FunctionIndex return_value = (::interrogate_type_get_cast)((TypeIndex)param0, (int)param1);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * int interrogate_type_number_of_derivations(TypeIndex type)
- */
-static PyObject *
-_inP07yt_NPR(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- int return_value = (::interrogate_type_number_of_derivations)((TypeIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * TypeIndex interrogate_type_get_derivation(TypeIndex type, int n)
- */
-static PyObject *
-_inP07ytcTOH(PyObject *, PyObject *args) {
- int param0;
- int param1;
- if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) {
- TypeIndex return_value = (::interrogate_type_get_derivation)((TypeIndex)param0, (int)param1);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_type_is_final(TypeIndex type)
- */
-static PyObject *
-_inP07ytC5Uk(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- bool return_value = (::interrogate_type_is_final)((TypeIndex)param0);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_type_derivation_has_upcast(TypeIndex type, int n)
- */
-static PyObject *
-_inP07ythdU7(PyObject *, PyObject *args) {
- int param0;
- int param1;
- if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) {
- bool return_value = (::interrogate_type_derivation_has_upcast)((TypeIndex)param0, (int)param1);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * FunctionIndex interrogate_type_get_upcast(TypeIndex type, int n)
- */
-static PyObject *
-_inP07ytQPxU(PyObject *, PyObject *args) {
- int param0;
- int param1;
- if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) {
- FunctionIndex return_value = (::interrogate_type_get_upcast)((TypeIndex)param0, (int)param1);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_type_derivation_downcast_is_impossible(TypeIndex type, int n)
- */
-static PyObject *
-_inP07ytO7Pz(PyObject *, PyObject *args) {
- int param0;
- int param1;
- if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) {
- bool return_value = (::interrogate_type_derivation_downcast_is_impossible)((TypeIndex)param0, (int)param1);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * bool interrogate_type_derivation_has_downcast(TypeIndex type, int n)
- */
-static PyObject *
-_inP07ytvu_E(PyObject *, PyObject *args) {
- int param0;
- int param1;
- if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) {
- bool return_value = (::interrogate_type_derivation_has_downcast)((TypeIndex)param0, (int)param1);
- return PyBool_FromLong(return_value);
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * FunctionIndex interrogate_type_get_downcast(TypeIndex type, int n)
- */
-static PyObject *
-_inP07ytxGUt(PyObject *, PyObject *args) {
- int param0;
- int param1;
- if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) {
- FunctionIndex return_value = (::interrogate_type_get_downcast)((TypeIndex)param0, (int)param1);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * int interrogate_type_number_of_nested_types(TypeIndex type)
- */
-static PyObject *
-_inP07ytzM1P(PyObject *, PyObject *args) {
- int param0;
- if (PyArg_ParseTuple(args, "i", ¶m0)) {
- int return_value = (::interrogate_type_number_of_nested_types)((TypeIndex)param0);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * TypeIndex interrogate_type_get_nested_type(TypeIndex type, int n)
- */
-static PyObject *
-_inP07ytoY5L(PyObject *, PyObject *args) {
- int param0;
- int param1;
- if (PyArg_ParseTuple(args, "ii", ¶m0, ¶m1)) {
- TypeIndex return_value = (::interrogate_type_get_nested_type)((TypeIndex)param0, (int)param1);
-#if PY_MAJOR_VERSION >= 3
- return PyLong_FromLong(return_value);
-#else
- return PyInt_FromLong(return_value);
-#endif
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * void interrogate_request_database(char const *database_filename)
- */
-static PyObject *
-_inP07yte_7S(PyObject *, PyObject *args) {
- char *param0;
- if (PyArg_ParseTuple(args, "s", ¶m0)) {
- (::interrogate_request_database)((char const *)param0);
- return Py_BuildValue("");
- }
- return nullptr;
-}
-
-/*
- * Python simple wrapper for
- * void interrogate_request_module(InterrogateModuleDef *def)
- */
-static PyObject *
-_inP07ytw_15(PyObject *, PyObject *args) {
- Py_ssize_t param0;
- if (PyArg_ParseTuple(args, "n", ¶m0)) {
- (::interrogate_request_module)((InterrogateModuleDef *)param0);
- return Py_BuildValue("");
- }
- return nullptr;
-}
-
-
-static PyMethodDef python_simple_funcs[] = {
- { "interrogate_add_search_directory", &_inP07yttbRf, METH_VARARGS, nullptr },
- { "interrogate_add_search_path", &_inP07ytda_g, METH_VARARGS, nullptr },
- { "interrogate_error_flag", &_inP07yt4RgX, METH_VARARGS, nullptr },
- { "interrogate_number_of_manifests", &_inP07yt3Gip, METH_VARARGS, nullptr },
- { "interrogate_get_manifest", &_inP07ytRKDz, METH_VARARGS, nullptr },
- { "interrogate_get_manifest_by_name", &_inP07ytgZ9N, METH_VARARGS, nullptr },
- { "interrogate_manifest_name", &_inP07ytFnRZ, METH_VARARGS, nullptr },
- { "interrogate_manifest_definition", &_inP07ytg0Qv, METH_VARARGS, nullptr },
- { "interrogate_manifest_has_type", &_inP07yttrqw, METH_VARARGS, nullptr },
- { "interrogate_manifest_get_type", &_inP07ytdmpW, METH_VARARGS, nullptr },
- { "interrogate_manifest_has_getter", &_inP07ytUYgQ, METH_VARARGS, nullptr },
- { "interrogate_manifest_getter", &_inP07yt0k7F, METH_VARARGS, nullptr },
- { "interrogate_manifest_has_int_value", &_inP07ytfIsr, METH_VARARGS, nullptr },
- { "interrogate_manifest_get_int_value", &_inP07ytvysR, METH_VARARGS, nullptr },
- { "interrogate_element_name", &_inP07ytYQ_2, METH_VARARGS, nullptr },
- { "interrogate_element_scoped_name", &_inP07yt3kdv, METH_VARARGS, nullptr },
- { "interrogate_element_has_comment", &_inP07ytew01, METH_VARARGS, nullptr },
- { "interrogate_element_comment", &_inP07ytQna7, METH_VARARGS, nullptr },
- { "interrogate_get_element_by_name", &_inP07ytkg95, METH_VARARGS, nullptr },
- { "interrogate_get_element_by_scoped_name", &_inP07ytluRc, METH_VARARGS, nullptr },
- { "interrogate_element_type", &_inP07yttHdM, METH_VARARGS, nullptr },
- { "interrogate_element_has_getter", &_inP07ytDId0, METH_VARARGS, nullptr },
- { "interrogate_element_getter", &_inP07ytHuAm, METH_VARARGS, nullptr },
- { "interrogate_element_has_setter", &_inP07yt_xr0, METH_VARARGS, nullptr },
- { "interrogate_element_setter", &_inP07ytH5qp, METH_VARARGS, nullptr },
- { "interrogate_element_has_has_function", &_inP07ytLfJw, METH_VARARGS, nullptr },
- { "interrogate_element_has_function", &_inP07yt_Atg, METH_VARARGS, nullptr },
- { "interrogate_element_has_clear_function", &_inP07ytlBqc, METH_VARARGS, nullptr },
- { "interrogate_element_clear_function", &_inP07ytNdUp, METH_VARARGS, nullptr },
- { "interrogate_element_has_del_function", &_inP07ytlS0p, METH_VARARGS, nullptr },
- { "interrogate_element_del_function", &_inP07ytZZe7, METH_VARARGS, nullptr },
- { "interrogate_element_has_insert_function", &_inP07ytV5S_, METH_VARARGS, nullptr },
- { "interrogate_element_insert_function", &_inP07yto9vD, METH_VARARGS, nullptr },
- { "interrogate_element_has_getkey_function", &_inP07ytv7tF, METH_VARARGS, nullptr },
- { "interrogate_element_getkey_function", &_inP07ythOg6, METH_VARARGS, nullptr },
- { "interrogate_element_length_function", &_inP07ytoZUn, METH_VARARGS, nullptr },
- { "interrogate_element_is_sequence", &_inP07ytq45U, METH_VARARGS, nullptr },
- { "interrogate_element_is_mapping", &_inP07yt6IPa, METH_VARARGS, nullptr },
- { "interrogate_number_of_globals", &_inP07ytU2_B, METH_VARARGS, nullptr },
- { "interrogate_get_global", &_inP07ytHFO2, METH_VARARGS, nullptr },
- { "interrogate_number_of_global_functions", &_inP07ytcfjm, METH_VARARGS, nullptr },
- { "interrogate_get_global_function", &_inP07yt3Sjw, METH_VARARGS, nullptr },
- { "interrogate_number_of_functions", &_inP07ytgJcX, METH_VARARGS, nullptr },
- { "interrogate_get_function", &_inP07ytYlw6, METH_VARARGS, nullptr },
- { "interrogate_function_name", &_inP07ytsmnz, METH_VARARGS, nullptr },
- { "interrogate_function_scoped_name", &_inP07ytxQ10, METH_VARARGS, nullptr },
- { "interrogate_function_has_comment", &_inP07yt6gPB, METH_VARARGS, nullptr },
- { "interrogate_function_comment", &_inP07ytISgV, METH_VARARGS, nullptr },
- { "interrogate_function_prototype", &_inP07ytH3bx, METH_VARARGS, nullptr },
- { "interrogate_function_is_method", &_inP07ytzeUk, METH_VARARGS, nullptr },
- { "interrogate_function_class", &_inP07ytUeI5, METH_VARARGS, nullptr },
- { "interrogate_function_is_unary_op", &_inP07ytbmxJ, METH_VARARGS, nullptr },
- { "interrogate_function_is_operator_typecast", &_inP07ytY8Lc, METH_VARARGS, nullptr },
- { "interrogate_function_is_constructor", &_inP07ytJAAI, METH_VARARGS, nullptr },
- { "interrogate_function_is_destructor", &_inP07yt0UXw, METH_VARARGS, nullptr },
- { "interrogate_function_has_module_name", &_inP07ytuSvx, METH_VARARGS, nullptr },
- { "interrogate_function_module_name", &_inP07ytwpYd, METH_VARARGS, nullptr },
- { "interrogate_function_has_library_name", &_inP07ytOfNh, METH_VARARGS, nullptr },
- { "interrogate_function_library_name", &_inP07ytf5_U, METH_VARARGS, nullptr },
- { "interrogate_function_is_virtual", &_inP07ytL3ZB, METH_VARARGS, nullptr },
- { "interrogate_function_number_of_c_wrappers", &_inP07ytXw0I, METH_VARARGS, nullptr },
- { "interrogate_function_c_wrapper", &_inP07yt3zru, METH_VARARGS, nullptr },
- { "interrogate_function_number_of_python_wrappers", &_inP07ytRrg2, METH_VARARGS, nullptr },
- { "interrogate_function_python_wrapper", &_inP07ytEJCx, METH_VARARGS, nullptr },
- { "interrogate_wrapper_name", &_inP07ytWAZr, METH_VARARGS, nullptr },
- { "interrogate_wrapper_function", &_inP07ytHQi6, METH_VARARGS, nullptr },
- { "interrogate_wrapper_is_callable_by_name", &_inP07ytrD_M, METH_VARARGS, nullptr },
- { "interrogate_wrapper_is_copy_constructor", &_inP07ytYaah, METH_VARARGS, nullptr },
- { "interrogate_wrapper_is_coerce_constructor", &_inP07yt2otr, METH_VARARGS, nullptr },
- { "interrogate_wrapper_is_extension", &_inP07ytNP_b, METH_VARARGS, nullptr },
- { "interrogate_wrapper_is_deprecated", &_inP07ytrrrN, METH_VARARGS, nullptr },
- { "interrogate_wrapper_has_comment", &_inP07ytjolz, METH_VARARGS, nullptr },
- { "interrogate_wrapper_comment", &_inP07ytt_JD, METH_VARARGS, nullptr },
- { "interrogate_wrapper_has_return_value", &_inP07ytwEts, METH_VARARGS, nullptr },
- { "interrogate_wrapper_return_type", &_inP07ytrJWs, METH_VARARGS, nullptr },
- { "interrogate_wrapper_caller_manages_return_value", &_inP07ytpmFD, METH_VARARGS, nullptr },
- { "interrogate_wrapper_return_value_destructor", &_inP07ytyYUX, METH_VARARGS, nullptr },
- { "interrogate_wrapper_number_of_parameters", &_inP07yt54dn, METH_VARARGS, nullptr },
- { "interrogate_wrapper_parameter_type", &_inP07ytGMpW, METH_VARARGS, nullptr },
- { "interrogate_wrapper_parameter_has_name", &_inP07ytNuBV, METH_VARARGS, nullptr },
- { "interrogate_wrapper_parameter_name", &_inP07yt9UwA, METH_VARARGS, nullptr },
- { "interrogate_wrapper_parameter_is_this", &_inP07yt3FDt, METH_VARARGS, nullptr },
- { "interrogate_wrapper_parameter_is_optional", &_inP07ytDgOY, METH_VARARGS, nullptr },
- { "interrogate_wrapper_has_pointer", &_inP07ytf513, METH_VARARGS, nullptr },
- { "interrogate_wrapper_pointer", &_inP07ytsqGH, METH_VARARGS, nullptr },
- { "interrogate_wrapper_unique_name", &_inP07yt7shV, METH_VARARGS, nullptr },
- { "interrogate_get_wrapper_by_unique_name", &_inP07ytA1eF, METH_VARARGS, nullptr },
- { "interrogate_make_seq_seq_name", &_inP07yt776V, METH_VARARGS, nullptr },
- { "interrogate_make_seq_scoped_name", &_inP07ytryup, METH_VARARGS, nullptr },
- { "interrogate_make_seq_has_comment", &_inP07ytiytI, METH_VARARGS, nullptr },
- { "interrogate_make_seq_comment", &_inP07ytZc07, METH_VARARGS, nullptr },
- { "interrogate_make_seq_num_name", &_inP07ytfaH0, METH_VARARGS, nullptr },
- { "interrogate_make_seq_element_name", &_inP07ytGB9D, METH_VARARGS, nullptr },
- { "interrogate_make_seq_num_getter", &_inP07ytrppS, METH_VARARGS, nullptr },
- { "interrogate_make_seq_element_getter", &_inP07ytO50x, METH_VARARGS, nullptr },
- { "interrogate_number_of_global_types", &_inP07ytsxxs, METH_VARARGS, nullptr },
- { "interrogate_get_global_type", &_inP07ytMT0z, METH_VARARGS, nullptr },
- { "interrogate_number_of_types", &_inP07ytiW3v, METH_VARARGS, nullptr },
- { "interrogate_get_type", &_inP07yt4Px8, METH_VARARGS, nullptr },
- { "interrogate_get_type_by_name", &_inP07ytNHcs, METH_VARARGS, nullptr },
- { "interrogate_get_type_by_scoped_name", &_inP07ytqHrb, METH_VARARGS, nullptr },
- { "interrogate_get_type_by_true_name", &_inP07ytaOqq, METH_VARARGS, nullptr },
- { "interrogate_type_is_global", &_inP07ytpTBb, METH_VARARGS, nullptr },
- { "interrogate_type_is_deprecated", &_inP07ytZUkn, METH_VARARGS, nullptr },
- { "interrogate_type_name", &_inP07ytqWOw, METH_VARARGS, nullptr },
- { "interrogate_type_scoped_name", &_inP07ytHu7x, METH_VARARGS, nullptr },
- { "interrogate_type_true_name", &_inP07ytwGnA, METH_VARARGS, nullptr },
- { "interrogate_type_is_nested", &_inP07ytXGxx, METH_VARARGS, nullptr },
- { "interrogate_type_outer_class", &_inP07ytj04Z, METH_VARARGS, nullptr },
- { "interrogate_type_has_comment", &_inP07ytEOv4, METH_VARARGS, nullptr },
- { "interrogate_type_comment", &_inP07ytpCqJ, METH_VARARGS, nullptr },
- { "interrogate_type_has_module_name", &_inP07yt_Pz3, METH_VARARGS, nullptr },
- { "interrogate_type_module_name", &_inP07ytt_06, METH_VARARGS, nullptr },
- { "interrogate_type_has_library_name", &_inP07ytmuPs, METH_VARARGS, nullptr },
- { "interrogate_type_library_name", &_inP07ytvM8B, METH_VARARGS, nullptr },
- { "interrogate_type_is_atomic", &_inP07ytap97, METH_VARARGS, nullptr },
- { "interrogate_type_atomic_token", &_inP07yt0o8D, METH_VARARGS, nullptr },
- { "interrogate_type_is_unsigned", &_inP07ytOoQ2, METH_VARARGS, nullptr },
- { "interrogate_type_is_signed", &_inP07ytKuFh, METH_VARARGS, nullptr },
- { "interrogate_type_is_long", &_inP07yto5L6, METH_VARARGS, nullptr },
- { "interrogate_type_is_longlong", &_inP07ytzgKK, METH_VARARGS, nullptr },
- { "interrogate_type_is_short", &_inP07yt0FIF, METH_VARARGS, nullptr },
- { "interrogate_type_is_wrapped", &_inP07ytZqvD, METH_VARARGS, nullptr },
- { "interrogate_type_is_pointer", &_inP07ytDyRd, METH_VARARGS, nullptr },
- { "interrogate_type_is_const", &_inP07ytMnKa, METH_VARARGS, nullptr },
- { "interrogate_type_is_typedef", &_inP07ytRtji, METH_VARARGS, nullptr },
- { "interrogate_type_wrapped_type", &_inP07ytCnbQ, METH_VARARGS, nullptr },
- { "interrogate_type_is_array", &_inP07ytoxqc, METH_VARARGS, nullptr },
- { "interrogate_type_array_size", &_inP07ytZQIS, METH_VARARGS, nullptr },
- { "interrogate_type_is_enum", &_inP07ytdUVN, METH_VARARGS, nullptr },
- { "interrogate_type_is_scoped_enum", &_inP07ytZtNk, METH_VARARGS, nullptr },
- { "interrogate_type_number_of_enum_values", &_inP07ytihbt, METH_VARARGS, nullptr },
- { "interrogate_type_enum_value_name", &_inP07ytbyPY, METH_VARARGS, nullptr },
- { "interrogate_type_enum_value_scoped_name", &_inP07ytAaT6, METH_VARARGS, nullptr },
- { "interrogate_type_enum_value_comment", &_inP07ytgL9q, METH_VARARGS, nullptr },
- { "interrogate_type_enum_value", &_inP07ytWB97, METH_VARARGS, nullptr },
- { "interrogate_type_is_struct", &_inP07ytDUAl, METH_VARARGS, nullptr },
- { "interrogate_type_is_class", &_inP07yt1_Kf, METH_VARARGS, nullptr },
- { "interrogate_type_is_union", &_inP07yt98lD, METH_VARARGS, nullptr },
- { "interrogate_type_is_fully_defined", &_inP07yt9SHr, METH_VARARGS, nullptr },
- { "interrogate_type_is_unpublished", &_inP07ytdiZP, METH_VARARGS, nullptr },
- { "interrogate_type_number_of_constructors", &_inP07ytTdER, METH_VARARGS, nullptr },
- { "interrogate_type_get_constructor", &_inP07ytYO56, METH_VARARGS, nullptr },
- { "interrogate_type_has_destructor", &_inP07ytxtCG, METH_VARARGS, nullptr },
- { "interrogate_type_destructor_is_inherited", &_inP07yt_EB2, METH_VARARGS, nullptr },
- { "interrogate_type_get_destructor", &_inP07ytEG1l, METH_VARARGS, nullptr },
- { "interrogate_type_number_of_elements", &_inP07yt7tUq, METH_VARARGS, nullptr },
- { "interrogate_type_get_element", &_inP07ytyStU, METH_VARARGS, nullptr },
- { "interrogate_type_number_of_methods", &_inP07ytdM85, METH_VARARGS, nullptr },
- { "interrogate_type_get_method", &_inP07ytk_GN, METH_VARARGS, nullptr },
- { "interrogate_type_number_of_make_seqs", &_inP07yt8QjG, METH_VARARGS, nullptr },
- { "interrogate_type_get_make_seq", &_inP07ytyMtj, METH_VARARGS, nullptr },
- { "interrogate_type_number_of_casts", &_inP07ytHDtN, METH_VARARGS, nullptr },
- { "interrogate_type_get_cast", &_inP07ytHFjA, METH_VARARGS, nullptr },
- { "interrogate_type_number_of_derivations", &_inP07yt_NPR, METH_VARARGS, nullptr },
- { "interrogate_type_get_derivation", &_inP07ytcTOH, METH_VARARGS, nullptr },
- { "interrogate_type_is_final", &_inP07ytC5Uk, METH_VARARGS, nullptr },
- { "interrogate_type_derivation_has_upcast", &_inP07ythdU7, METH_VARARGS, nullptr },
- { "interrogate_type_get_upcast", &_inP07ytQPxU, METH_VARARGS, nullptr },
- { "interrogate_type_derivation_downcast_is_impossible", &_inP07ytO7Pz, METH_VARARGS, nullptr },
- { "interrogate_type_derivation_has_downcast", &_inP07ytvu_E, METH_VARARGS, nullptr },
- { "interrogate_type_get_downcast", &_inP07ytxGUt, METH_VARARGS, nullptr },
- { "interrogate_type_number_of_nested_types", &_inP07ytzM1P, METH_VARARGS, nullptr },
- { "interrogate_type_get_nested_type", &_inP07ytoY5L, METH_VARARGS, nullptr },
- { "interrogate_request_database", &_inP07yte_7S, METH_VARARGS, nullptr },
- { "interrogate_request_module", &_inP07ytw_15, METH_VARARGS, nullptr },
- { nullptr, nullptr, 0, nullptr }
-};
-
-#if PY_MAJOR_VERSION >= 3
-static struct PyModuleDef python_simple_module = {
- PyModuleDef_HEAD_INIT,
- "panda3d.interrogatedb",
- nullptr,
- -1,
- python_simple_funcs,
- nullptr, nullptr, nullptr, nullptr
-};
-
-#define INIT_FUNC PyObject *PyInit_interrogatedb
-#else
-#define INIT_FUNC void initinterrogatedb
-#endif
-
-#ifdef _WIN32
-extern "C" __declspec(dllexport) INIT_FUNC();
-#elif __GNUC__ >= 4
-extern "C" __attribute__((visibility("default"))) INIT_FUNC();
-#else
-extern "C" INIT_FUNC();
-#endif
-
-INIT_FUNC() {
-#if PY_MAJOR_VERSION >= 3
- return PyModule_Create(&python_simple_module);
-#else
- Py_InitModule("interrogatedb", python_simple_funcs);
-#endif
-}
-
diff --git a/dtool/src/cppparser/CMakeLists.txt b/dtool/src/cppparser/CMakeLists.txt
deleted file mode 100644
index 08563df5086..00000000000
--- a/dtool/src/cppparser/CMakeLists.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-set(P3CPPPARSER_HEADERS
- cppAttributeList.h
- cppArrayType.h cppBison.yxx cppBisonDefs.h
- cppClassTemplateParameter.h cppCommentBlock.h
- cppClosureType.h cppConstType.h
- cppDeclaration.h cppEnumType.h cppExpression.h
- cppExpressionParser.h cppExtensionType.h cppFile.h
- cppFunctionGroup.h cppFunctionType.h cppGlobals.h
- cppIdentifier.h cppInstance.h cppInstanceIdentifier.h
- cppMakeProperty.h cppMakeSeq.h cppManifest.h
- cppNameComponent.h cppNamespace.h
- cppParameterList.h cppParser.h cppPointerType.h
- cppPreprocessor.h cppReferenceType.h cppScope.h
- cppSimpleType.h cppStructType.h cppTBDType.h
- cppTemplateParameterList.h cppTemplateScope.h cppToken.h
- cppType.h cppTypeDeclaration.h cppTypeParser.h
- cppTypeProxy.h cppTypedefType.h cppUsing.h cppVisibility.h
-)
-
-set(P3CPPPARSER_SOURCES
- cppAttributeList.cxx
- cppArrayType.cxx ${CMAKE_CURRENT_BINARY_DIR}/cppBison.cxx
- cppClassTemplateParameter.cxx
- cppCommentBlock.cxx cppClosureType.cxx cppConstType.cxx cppDeclaration.cxx
- cppEnumType.cxx cppExpression.cxx cppExpressionParser.cxx
- cppExtensionType.cxx cppFile.cxx cppFunctionGroup.cxx
- cppFunctionType.cxx cppGlobals.cxx cppIdentifier.cxx
- cppInstance.cxx cppInstanceIdentifier.cxx
- cppMakeProperty.cxx cppMakeSeq.cxx cppManifest.cxx
- cppNameComponent.cxx cppNamespace.cxx cppParameterList.cxx
- cppParser.cxx cppPointerType.cxx cppPreprocessor.cxx
- cppReferenceType.cxx cppScope.cxx cppSimpleType.cxx
- cppStructType.cxx cppTBDType.cxx
- cppTemplateParameterList.cxx cppTemplateScope.cxx
- cppToken.cxx cppType.cxx cppTypeDeclaration.cxx
- cppTypeParser.cxx cppTypeProxy.cxx cppTypedefType.cxx
- cppUsing.cxx cppVisibility.cxx
-)
-
-add_bison_target(cppBison.cxx cppBison.yxx DEFINES cppBison.h PREFIX cppyy)
-
-composite_sources(p3cppParser P3CPPPARSER_SOURCES)
-add_library(p3cppParser STATIC ${P3CPPPARSER_HEADERS} ${P3CPPPARSER_SOURCES})
-target_link_libraries(p3cppParser p3dtool)
-
-install(TARGETS p3cppParser EXPORT Core COMPONENT CoreDevel DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/dtool/src/cppparser/cppArrayType.cxx b/dtool/src/cppparser/cppArrayType.cxx
deleted file mode 100644
index efd06f17b67..00000000000
--- a/dtool/src/cppparser/cppArrayType.cxx
+++ /dev/null
@@ -1,269 +0,0 @@
-/**
- * PANDA 3D SOFTWARE
- * Copyright (c) Carnegie Mellon University. All rights reserved.
- *
- * All use of this software is subject to the terms of the revised BSD
- * license. You should have received a copy of this license along
- * with this source code in a file named "LICENSE."
- *
- * @file cppArrayType.cxx
- * @author drose
- * @date 1999-10-19
- */
-
-#include "cppArrayType.h"
-#include "cppExpression.h"
-#include "cppPointerType.h"
-
-/**
- *
- */
-CPPArrayType::
-CPPArrayType(CPPType *element_type, CPPExpression *bounds) :
- CPPType(CPPFile()),
- _element_type(element_type),
- _bounds(bounds)
-{
-}
-
-/**
- * Returns true if this declaration is an actual, factual declaration, or
- * false if some part of the declaration depends on a template parameter which
- * has not yet been instantiated.
- */
-bool CPPArrayType::
-is_fully_specified() const {
- return CPPType::is_fully_specified() &&
- _element_type->is_fully_specified();
-}
-
-/**
- * If this CPPType object is a forward reference or other nonspecified
- * reference to a type that might now be known a real type, returns the real
- * type. Otherwise returns the type itself.
- */
-CPPType *CPPArrayType::
-resolve_type(CPPScope *current_scope, CPPScope *global_scope) {
- CPPType *ptype = _element_type->resolve_type(current_scope, global_scope);
-
- if (ptype != _element_type) {
- CPPArrayType *rep = new CPPArrayType(*this);
- rep->_element_type = ptype;
- return CPPType::new_type(rep);
- }
- return this;
-}
-
-/**
- * Returns true if the type, or any nested type within the type, is a
- * CPPTBDType and thus isn't fully determined right now. In this case,
- * calling resolve_type() may or may not resolve the type.
- */
-bool CPPArrayType::
-is_tbd() const {
- return _element_type->is_tbd();
-}
-
-/**
- * Returns true if the type is considered a standard layout type.
- */
-bool CPPArrayType::
-is_standard_layout() const {
- return _element_type->is_standard_layout();
-}
-
-/**
- * Returns true if the type is considered a Plain Old Data (POD) type.
- */
-bool CPPArrayType::
-is_trivial() const {
- return _element_type->is_trivial();
-}
-
-/**
- * Returns true if the type can be safely copied by memcpy or memmove.
- */
-bool CPPArrayType::
-is_trivially_copyable() const {
- return _element_type->is_trivially_copyable();
-}
-
-/**
- * Returns true if the type is default-constructible.
- */
-bool CPPArrayType::
-is_default_constructible() const {
- return _bounds != nullptr && _element_type->is_default_constructible();
-}
-
-/**
- * Returns true if the type is copy-constructible.
- */
-bool CPPArrayType::
-is_copy_constructible() const {
- // This is technically not exactly true, but array data members do not
- // prevent C++ implicit copy constructor generation rules, so we need to
- // return true here.
- // If this is a problem, we will need to create a separate method for the
- // purpose of checking copyability as a data member.
- return true;
-}
-
-/**
- * Returns true if the type is copy-assignable.
- */
-bool CPPArrayType::
-is_copy_assignable() const {
- // Same story as is_copy_constructible.
- return true;
-}
-
-/**
- * This is a little more forgiving than is_equal(): it returns true if the
- * types appear to be referring to the same thing, even if they may have
- * different pointers or somewhat different definitions. It's useful for
- * parameter matching, etc.
- */
-bool CPPArrayType::
-is_equivalent(const CPPType &other) const {
- const CPPArrayType *ot = ((CPPType *)&other)->as_array_type();
- if (ot == nullptr) {
- return CPPType::is_equivalent(other);
- }
-
- return _element_type->is_equivalent(*ot->_element_type);
-}
-
-/**
- *
- */
-CPPDeclaration *CPPArrayType::
-substitute_decl(CPPDeclaration::SubstDecl &subst,
- CPPScope *current_scope, CPPScope *global_scope) {
- SubstDecl::const_iterator si = subst.find(this);
- if (si != subst.end()) {
- return (*si).second;
- }
-
- CPPArrayType *rep = new CPPArrayType(*this);
- rep->_element_type =
- _element_type->substitute_decl(subst, current_scope, global_scope)
- ->as_type();
-
- if (_bounds != nullptr) {
- rep->_bounds =
- _bounds->substitute_decl(subst, current_scope, global_scope)
- ->as_expression();
- }
-
- if (rep->_element_type == _element_type &&
- rep->_bounds == _bounds) {
- delete rep;
- rep = this;
- }
- rep = CPPType::new_type(rep)->as_array_type();
- subst.insert(SubstDecl::value_type(this, rep));
- return rep;
-}
-
-/**
- *
- */
-void CPPArrayType::
-output(std::ostream &out, int indent_level, CPPScope *scope, bool complete) const {
- /*
- _element_type->output(out, indent_level, scope, complete);
- out << "[";
- if (_bounds != NULL) {
- out << *_bounds;
- }
- out << "]";
- */
- output_instance(out, indent_level, scope, complete, "", "");
-}
-
-/**
- * Formats a C++-looking line that defines an instance of the given type, with
- * the indicated name. In most cases this will be "type name", but some types
- * have special exceptions.
- */
-void CPPArrayType::
-output_instance(std::ostream &out, int indent_level, CPPScope *scope,
- bool complete, const std::string &prename,
- const std::string &name) const {
- std::ostringstream brackets;
- brackets << "[";
- if (_bounds != nullptr) {
- brackets << *_bounds;
- }
- brackets << "]";
-
- if (!_attributes.is_empty()) {
- brackets << " " << _attributes;
- }
-
- std::string bracketsstr = brackets.str();
-
- _element_type->output_instance(out, indent_level, scope, complete,
- prename, name + bracketsstr);
-}
-
-/**
- *
- */
-CPPDeclaration::SubType CPPArrayType::
-get_subtype() const {
- return ST_array;
-}
-
-/**
- *
- */
-CPPArrayType *CPPArrayType::
-as_array_type() {
- return this;
-}
-
-/**
- * Called by CPPDeclaration() to determine whether this type is equivalent to
- * another type of the same type.
- */
-bool CPPArrayType::
-is_equal(const CPPDeclaration *other) const {
- const CPPArrayType *ot = ((CPPDeclaration *)other)->as_array_type();
- assert(ot != nullptr);
-
- if (_bounds != nullptr && ot->_bounds != nullptr) {
- if (*_bounds != *ot->_bounds) {
- return false;
- }
- } else if ((_bounds == nullptr) != (ot->_bounds == nullptr)) {
- return false;
- }
-
- return *_element_type == *ot->_element_type;
-}
-
-
-/**
- * Called by CPPDeclaration() to determine whether this type should be ordered
- * before another type of the same type, in an arbitrary but fixed ordering.
- */
-bool CPPArrayType::
-is_less(const CPPDeclaration *other) const {
- const CPPArrayType *ot = ((CPPDeclaration *)other)->as_array_type();
- assert(ot != nullptr);
-
- if (_bounds != nullptr && ot->_bounds != nullptr) {
- if (*_bounds != *ot->_bounds) {
- return *_bounds < *ot->_bounds;
- }
- } else if ((_bounds == nullptr) != (ot->_bounds == nullptr)) {
- return _bounds < ot->_bounds;
- }
-
- if (*_element_type != *ot->_element_type) {
- return *_element_type < *ot->_element_type;
- }
- return false;
-}
diff --git a/dtool/src/cppparser/cppArrayType.h b/dtool/src/cppparser/cppArrayType.h
deleted file mode 100644
index 56afed1cbf2..00000000000
--- a/dtool/src/cppparser/cppArrayType.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * PANDA 3D SOFTWARE
- * Copyright (c) Carnegie Mellon University. All rights reserved.
- *
- * All use of this software is subject to the terms of the revised BSD
- * license. You should have received a copy of this license along
- * with this source code in a file named "LICENSE."
- *
- * @file cppArrayType.h
- * @author drose
- * @date 1999-10-19
- */
-
-#ifndef CPPARRAYTYPE_H
-#define CPPARRAYTYPE_H
-
-#include "dtoolbase.h"
-
-#include "cppType.h"
-
-class CPPExpression;
-
-/**
- *
- */
-class CPPArrayType : public CPPType {
-public:
- CPPArrayType(CPPType *element_type, CPPExpression *bounds);
-
- CPPType *_element_type;
- CPPExpression *_bounds;
-
- virtual bool is_fully_specified() const;
- virtual CPPDeclaration *substitute_decl(SubstDecl &subst,
- CPPScope *current_scope,
- CPPScope *global_scope);
-
- virtual CPPType *resolve_type(CPPScope *current_scope,
- CPPScope *global_scope);
- virtual bool is_tbd() const;
- virtual bool is_standard_layout() const;
- virtual bool is_trivial() const;
- virtual bool is_trivially_copyable() const;
- virtual bool is_default_constructible() const;
- virtual bool is_copy_constructible() const;
- virtual bool is_copy_assignable() const;
- virtual bool is_equivalent(const CPPType &other) const;
-
- virtual void output(std::ostream &out, int indent_level, CPPScope *scope,
- bool complete) const;
- virtual void output_instance(std::ostream &out, int indent_level,
- CPPScope *scope,
- bool complete, const std::string &prename,
- const std::string &name) const;
-
- virtual SubType get_subtype() const;
-
- virtual CPPArrayType *as_array_type();
-
-protected:
- virtual bool is_equal(const CPPDeclaration *other) const;
- virtual bool is_less(const CPPDeclaration *other) const;
-};
-
-#endif
diff --git a/dtool/src/cppparser/cppAttributeList.cxx b/dtool/src/cppparser/cppAttributeList.cxx
deleted file mode 100644
index 6a280d3cd74..00000000000
--- a/dtool/src/cppparser/cppAttributeList.cxx
+++ /dev/null
@@ -1,196 +0,0 @@
-/**
- * PANDA 3D SOFTWARE
- * Copyright (c) Carnegie Mellon University. All rights reserved.
- *
- * All use of this software is subject to the terms of the revised BSD
- * license. You should have received a copy of this license along
- * with this source code in a file named "LICENSE."
- *
- * @file cppAttributeList.cxx
- * @author rdb
- * @date 2022-10-23
- */
-
-#include "cppAttributeList.h"
-#include "cppExpression.h"
-#include "cppIdentifier.h"
-#include "cppType.h"
-
-/**
- * Returns true if no attributes have been defined.
- */
-bool CPPAttributeList::
-is_empty() const {
- return _attributes.empty() && _alignas == nullptr;
-}
-
-/**
- * Returns true if the attribute list has an attribute with the given name.
- */
-bool CPPAttributeList::
-has_attribute(const std::string &name) const {
- for (const Attribute &attr : _attributes) {
- if (attr._ident->get_fully_scoped_name() == name) {
- return true;
- }
- }
- return false;
-}
-
-/**
- *
- */
-bool CPPAttributeList::
-operator == (const CPPAttributeList &other) const {
- if (_attributes.size() != other._attributes.size()) {
- return false;
- }
- if ((_alignas != nullptr) != (other._alignas != nullptr)) {
- return false;
- }
- if (_alignas != nullptr && *_alignas != *other._alignas) {
- return false;
- }
- for (size_t i = 0; i < _attributes.size(); ++i) {
- if (_attributes[i]._ident != other._attributes[i]._ident) {
- return false;
- }
- if (_attributes[i]._reason != other._attributes[i]._reason) {
- return false;
- }
- }
- return true;
-}
-
-/**
- *
- */
-bool CPPAttributeList::
-operator != (const CPPAttributeList &other) const {
- return !(*this == other);
-}
-
-/**
- *
- */
-bool CPPAttributeList::
-operator < (const CPPAttributeList &other) const {
- if (_attributes.size() != other._attributes.size()) {
- return _attributes.size() < other._attributes.size();
- }
- if ((_alignas != nullptr) != (other._alignas != nullptr)) {
- return _alignas == nullptr;
- }
- if (_alignas != nullptr && *_alignas != *other._alignas) {
- return *_alignas < *other._alignas;
- }
- for (size_t i = 0; i < _attributes.size(); ++i) {
- if (_attributes[i]._ident != other._attributes[i]._ident) {
- return _attributes[i]._ident < other._attributes[i]._ident;
- }
- if (_attributes[i]._reason != other._attributes[i]._reason) {
- return _attributes[i]._reason < other._attributes[i]._reason;
- }
- }
- return false;
-}
-
-/**
- * Adds an attribute.
- */
-void CPPAttributeList::
-add_attribute(CPPIdentifier *ident) {
- _attributes.push_back({ident});
-}
-
-/**
- * Adds an attribute.
- */
-void CPPAttributeList::
-add_attribute(CPPIdentifier *ident, std::string reason) {
- _attributes.push_back({ident, std::move(reason)});
-}
-
-/**
- * Adds an alignas specifier.
- */
-void CPPAttributeList::
-add_alignas(int size) {
- if (_alignas == nullptr || size >= _alignas->evaluate().as_integer()) {
- _alignas = new CPPExpression(size);
- }
-}
-
-/**
- * Adds an alignas specifier.
- */
-void CPPAttributeList::
-add_alignas(CPPType *type) {
- CPPExpression expr = CPPExpression::alignof_func(type);
- if (_alignas == nullptr || expr.evaluate().as_integer() > _alignas->evaluate().as_integer()) {
- _alignas = new CPPExpression(expr);
- }
-}
-
-/**
- * Adds an alignas specifier.
- */
-void CPPAttributeList::
-add_alignas(CPPExpression *expr) {
- if (_alignas == nullptr || expr->evaluate().as_integer() > _alignas->evaluate().as_integer()) {
- _alignas = expr;
- }
-}
-
-/**
- * Merges the other list into this one.
- */
-void CPPAttributeList::
-add_attributes_from(const CPPAttributeList &other) {
- for (const Attribute &attr : other._attributes) {
- _attributes.push_back(attr);
- }
-
- if (other._alignas != nullptr) {
- add_alignas(other._alignas);
- }
-}
-
-/**
- *
- */
-void CPPAttributeList::
-output(std::ostream &out, CPPScope *scope) const {
- Attributes::const_iterator it = _attributes.begin();
- if (it != _attributes.end()) {
- out << "[[";
- (*it)._ident->output(out, scope);
- if (!(*it)._reason.empty()) {
- out << "(" << (*it)._reason << ")";
- }
-
- for (++it; it != _attributes.end(); ++it) {
- out << ", ";
- (*it)._ident->output(out, scope);
- if (!(*it)._reason.empty()) {
- out << "(" << (*it)._reason << ")";
- }
- }
-
- out << "]]";
-
- if (_alignas != nullptr) {
- out << " ";
- }
- }
-
- if (_alignas != nullptr) {
- out << "alignas(";
- if (_alignas->_type == CPPExpression::T_alignof) {
- _alignas->_u._typecast._to->output(out, 0, scope, false);
- } else {
- _alignas->output(out, 0, scope, false);
- }
- out << ")";
- }
-}
diff --git a/dtool/src/cppparser/cppAttributeList.h b/dtool/src/cppparser/cppAttributeList.h
deleted file mode 100644
index 9463b2b65c8..00000000000
--- a/dtool/src/cppparser/cppAttributeList.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * PANDA 3D SOFTWARE
- * Copyright (c) Carnegie Mellon University. All rights reserved.
- *
- * All use of this software is subject to the terms of the revised BSD
- * license. You should have received a copy of this license along
- * with this source code in a file named "LICENSE."
- *
- * @file cppAttributeList.h
- * @author rdb
- * @date 2022-10-23
- */
-
-#ifndef CPPATTRIBUTELIST_H
-#define CPPATTRIBUTELIST_H
-
-#include "dtoolbase.h"
-
-#include
-
-class CPPExpression;
-class CPPIdentifier;
-class CPPScope;
-class CPPType;
-
-/**
- * A list of square-bracket attributes and/or alignas specifiers.
- */
-class CPPAttributeList {
-public:
- bool is_empty() const;
- bool has_attribute(const std::string &name) const;
-
- bool operator == (const CPPAttributeList &other) const;
- bool operator != (const CPPAttributeList &other) const;
- bool operator < (const CPPAttributeList &other) const;
-
- void add_attribute(CPPIdentifier *ident);
- void add_attribute(CPPIdentifier *ident, std::string reason);
-
- void add_alignas(int size);
- void add_alignas(CPPType *type);
- void add_alignas(CPPExpression *expr);
-
- void add_attributes_from(const CPPAttributeList &other);
-
- struct Attribute {
- CPPIdentifier *_ident;
- std::string _reason;
- };
-
- typedef std::vector Attributes;
- Attributes _attributes;
- CPPExpression *_alignas = nullptr;
-
- void output(std::ostream &out, CPPScope *scope) const;
-};
-
-inline std::ostream &
-operator << (std::ostream &out, const CPPAttributeList &alist) {
- alist.output(out, nullptr);
- return out;
-}
-
-#endif
diff --git a/dtool/src/cppparser/cppBison.cxx.prebuilt b/dtool/src/cppparser/cppBison.cxx.prebuilt
deleted file mode 100644
index 0d94f44c79a..00000000000
--- a/dtool/src/cppparser/cppBison.cxx.prebuilt
+++ /dev/null
@@ -1,10080 +0,0 @@
-/* A Bison parser, made by GNU Bison 3.8.2. */
-
-/* Bison implementation for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-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. */
-
-/* C LALR(1) parser skeleton written by Richard Stallman, by
- simplifying the original so-called "semantic" parser. */
-
-/* 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. */
-
-/* All symbols defined below should begin with yy or YY, to avoid
- infringing on user name space. This should be done even for local
- variables, as they might otherwise be expanded by user macros.
- There are some unavoidable exceptions within include files to
- define necessary library symbols; they are noted "INFRINGES ON
- USER NAME SPACE" below. */
-
-/* Identify Bison output, and Bison version. */
-#define YYBISON 30802
-
-/* Bison version string. */
-#define YYBISON_VERSION "3.8.2"
-
-/* Skeleton name. */
-#define YYSKELETON_NAME "yacc.c"
-
-/* Pure parsers. */
-#define YYPURE 2
-
-/* Push parsers. */
-#define YYPUSH 0
-
-/* Pull parsers. */
-#define YYPULL 1
-
-
-/* Substitute the variable and function names. */
-#define yyparse cppyyparse
-#define yylex cppyylex
-#define yyerror cppyyerror
-#define yydebug cppyydebug
-#define yynerrs cppyynerrs
-
-/* First part of user prologue. */
-#line 7 "dtool/src/cppparser/cppBison.yxx"
-
-
-#include "cppBisonDefs.h"
-#include "cppParser.h"
-#include "cppClosureType.h"
-#include "cppExpression.h"
-#include "cppSimpleType.h"
-#include "cppExtensionType.h"
-#include "cppStructType.h"
-#include "cppEnumType.h"
-#include "cppFunctionType.h"
-#include "cppTBDType.h"
-#include "cppMakeProperty.h"
-#include "cppMakeSeq.h"
-#include "cppParameterList.h"
-#include "cppInstance.h"
-#include "cppClassTemplateParameter.h"
-#include "cppTemplateParameterList.h"
-#include "cppInstanceIdentifier.h"
-#include "cppTypedefType.h"
-#include "cppTypeDeclaration.h"
-#include "cppVisibility.h"
-#include "cppIdentifier.h"
-#include "cppScope.h"
-#include "cppTemplateScope.h"
-#include "cppNamespace.h"
-#include "cppUsing.h"
-
-using std::stringstream;
-using std::string;
-
-////////////////////////////////////////////////////////////////////
-// Defining the interface to the parser.
-////////////////////////////////////////////////////////////////////
-
-CPPScope *current_scope = nullptr;
-CPPScope *global_scope = nullptr;
-CPPPreprocessor *current_lexer = nullptr;
-
-static CPPStructType *current_struct = nullptr;
-static CPPEnumType *current_enum = nullptr;
-static int current_storage_class = 0;
-static CPPType *current_type = nullptr;
-static CPPExpression *current_expr = nullptr;
-static CPPAttributeList current_attributes;
-static int publish_nest_level = 0;
-static CPPVisibility publish_previous;
-static YYLTYPE publish_loc;
-
-static std::vector last_scopes;
-static std::vector last_storage_classes;
-static std::vector last_structs;
-
-int yyparse();
-
-#define YYERROR_VERBOSE
-
-static void
-yyerror(const string &msg) {
- current_lexer->error(msg, current_lexer->_last_token_loc);
-}
-
-static void
-yyerror(YYLTYPE *loc, const string &msg) {
- current_lexer->error(msg, *loc);
-}
-
-static void
-yyerror(const string &msg, YYLTYPE &loc) {
- current_lexer->error(msg, loc);
-}
-
-static void
-yywarning(const string &msg, YYLTYPE &loc) {
- current_lexer->warning(msg, loc);
-}
-
-static int
-yylex(YYSTYPE *lval, YYLTYPE *lloc) {
- CPPToken token = current_lexer->get_next_token();
- *lval = token._lval;
- *lloc = token._lloc;
- return token._token;
-}
-
-void
-parse_cpp(CPPParser *cp) {
- CPPScope *old_scope = current_scope;
- CPPScope *old_global_scope = global_scope;
- CPPPreprocessor *old_lexer = current_lexer;
-
- current_scope = cp;
- global_scope = cp;
- current_lexer = cp;
- publish_nest_level = 0;
- yyparse();
-
- if (publish_nest_level != 0) {
- yyerror("Unclosed __begin_publish", publish_loc);
- publish_nest_level = 0;
- }
-
- current_scope = old_scope;
- global_scope = old_global_scope;
- current_lexer = old_lexer;
-
-}
-
-CPPExpression *
-parse_const_expr(CPPPreprocessor *pp, CPPScope *new_current_scope,
- CPPScope *new_global_scope) {
- CPPScope *old_scope = current_scope;
- CPPScope *old_global_scope = global_scope;
- CPPPreprocessor *old_lexer = current_lexer;
- CPPExpression *old_expr = current_expr;
-
- current_scope = new_current_scope;
- global_scope = new_global_scope;
- current_expr = nullptr;
- current_lexer = pp;
- yyparse();
-
- CPPExpression *result = current_expr;
-
- current_scope = old_scope;
- global_scope = old_global_scope;
- current_lexer = old_lexer;
- current_expr = old_expr;
-
- return result;
-}
-
-CPPType *
-parse_type(CPPPreprocessor *pp, CPPScope *new_current_scope,
- CPPScope *new_global_scope) {
- CPPScope *old_scope = current_scope;
- CPPScope *old_global_scope = global_scope;
- CPPPreprocessor *old_lexer = current_lexer;
- CPPType *old_type = current_type;
-
- current_scope = new_current_scope;
- global_scope = new_global_scope;
- current_type = nullptr;
- current_lexer = pp;
- yyparse();
-
- CPPType *result = current_type;
-
- current_scope = old_scope;
- global_scope = old_global_scope;
- current_lexer = old_lexer;
- current_type = old_type;
-
- return result;
-}
-
-static void
-push_scope(CPPScope *new_scope) {
- last_scopes.push_back(current_scope);
- if (new_scope != nullptr) {
- current_scope = new_scope;
- }
-}
-
-static void
-pop_scope() {
- assert(!last_scopes.empty());
- current_scope = last_scopes.back();
- last_scopes.pop_back();
-}
-
-static void
-push_storage_class(int new_storage_class) {
- last_storage_classes.push_back(current_storage_class);
- current_storage_class = new_storage_class;
-}
-
-static void
-pop_storage_class() {
- assert(!last_storage_classes.empty());
- current_storage_class = last_storage_classes.back();
- last_storage_classes.pop_back();
-}
-
-static void
-push_struct(CPPStructType *new_struct) {
- last_structs.push_back(current_struct);
- current_struct = new_struct;
-}
-
-static void
-pop_struct() {
- assert(!last_structs.empty());
- current_struct = last_structs.back();
- last_structs.pop_back();
-}
-
-
-#line 275 "built/tmp/cppBison.yxx.c"
-
-# 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
-
-#include "cppBison.yxx.h"
-/* Symbol kind. */
-enum yysymbol_kind_t
-{
- YYSYMBOL_YYEMPTY = -2,
- YYSYMBOL_YYEOF = 0, /* "end of file" */
- YYSYMBOL_YYerror = 1, /* error */
- YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
- YYSYMBOL_REAL = 3, /* REAL */
- YYSYMBOL_INTEGER = 4, /* INTEGER */
- YYSYMBOL_CHAR_TOK = 5, /* CHAR_TOK */
- YYSYMBOL_SIMPLE_STRING = 6, /* SIMPLE_STRING */
- YYSYMBOL_SIMPLE_IDENTIFIER = 7, /* SIMPLE_IDENTIFIER */
- YYSYMBOL_STRING_LITERAL = 8, /* STRING_LITERAL */
- YYSYMBOL_CUSTOM_LITERAL = 9, /* CUSTOM_LITERAL */
- YYSYMBOL_IDENTIFIER = 10, /* IDENTIFIER */
- YYSYMBOL_TYPENAME_IDENTIFIER = 11, /* TYPENAME_IDENTIFIER */
- YYSYMBOL_TYPEPACK_IDENTIFIER = 12, /* TYPEPACK_IDENTIFIER */
- YYSYMBOL_SCOPING = 13, /* SCOPING */
- YYSYMBOL_TYPEDEFNAME = 14, /* TYPEDEFNAME */
- YYSYMBOL_ELLIPSIS = 15, /* ELLIPSIS */
- YYSYMBOL_OROR = 16, /* OROR */
- YYSYMBOL_ANDAND = 17, /* ANDAND */
- YYSYMBOL_EQCOMPARE = 18, /* EQCOMPARE */
- YYSYMBOL_NECOMPARE = 19, /* NECOMPARE */
- YYSYMBOL_LECOMPARE = 20, /* LECOMPARE */
- YYSYMBOL_GECOMPARE = 21, /* GECOMPARE */
- YYSYMBOL_SPACESHIP = 22, /* SPACESHIP */
- YYSYMBOL_LSHIFT = 23, /* LSHIFT */
- YYSYMBOL_RSHIFT = 24, /* RSHIFT */
- YYSYMBOL_POINTSAT_STAR = 25, /* POINTSAT_STAR */
- YYSYMBOL_DOT_STAR = 26, /* DOT_STAR */
- YYSYMBOL_UNARY = 27, /* UNARY */
- YYSYMBOL_UNARY_NOT = 28, /* UNARY_NOT */
- YYSYMBOL_UNARY_NEGATE = 29, /* UNARY_NEGATE */
- YYSYMBOL_UNARY_MINUS = 30, /* UNARY_MINUS */
- YYSYMBOL_UNARY_PLUS = 31, /* UNARY_PLUS */
- YYSYMBOL_UNARY_STAR = 32, /* UNARY_STAR */
- YYSYMBOL_UNARY_REF = 33, /* UNARY_REF */
- YYSYMBOL_POINTSAT = 34, /* POINTSAT */
- YYSYMBOL_SCOPE = 35, /* SCOPE */
- YYSYMBOL_PLUSPLUS = 36, /* PLUSPLUS */
- YYSYMBOL_MINUSMINUS = 37, /* MINUSMINUS */
- YYSYMBOL_TIMESEQUAL = 38, /* TIMESEQUAL */
- YYSYMBOL_DIVIDEEQUAL = 39, /* DIVIDEEQUAL */
- YYSYMBOL_MODEQUAL = 40, /* MODEQUAL */
- YYSYMBOL_PLUSEQUAL = 41, /* PLUSEQUAL */
- YYSYMBOL_MINUSEQUAL = 42, /* MINUSEQUAL */
- YYSYMBOL_OREQUAL = 43, /* OREQUAL */
- YYSYMBOL_ANDEQUAL = 44, /* ANDEQUAL */
- YYSYMBOL_XOREQUAL = 45, /* XOREQUAL */
- YYSYMBOL_LSHIFTEQUAL = 46, /* LSHIFTEQUAL */
- YYSYMBOL_RSHIFTEQUAL = 47, /* RSHIFTEQUAL */
- YYSYMBOL_ATTR_LEFT = 48, /* ATTR_LEFT */
- YYSYMBOL_ATTR_RIGHT = 49, /* ATTR_RIGHT */
- YYSYMBOL_KW_ALIGNAS = 50, /* KW_ALIGNAS */
- YYSYMBOL_KW_ALIGNOF = 51, /* KW_ALIGNOF */
- YYSYMBOL_KW_AUTO = 52, /* KW_AUTO */
- YYSYMBOL_KW_BEGIN_PUBLISH = 53, /* KW_BEGIN_PUBLISH */
- YYSYMBOL_KW_BLOCKING = 54, /* KW_BLOCKING */
- YYSYMBOL_KW_BOOL = 55, /* KW_BOOL */
- YYSYMBOL_KW_BUILTIN_VA_LIST = 56, /* KW_BUILTIN_VA_LIST */
- YYSYMBOL_KW_CATCH = 57, /* KW_CATCH */
- YYSYMBOL_KW_CHAR = 58, /* KW_CHAR */
- YYSYMBOL_KW_CHAR8_T = 59, /* KW_CHAR8_T */
- YYSYMBOL_KW_CHAR16_T = 60, /* KW_CHAR16_T */
- YYSYMBOL_KW_CHAR32_T = 61, /* KW_CHAR32_T */
- YYSYMBOL_KW_CLASS = 62, /* KW_CLASS */
- YYSYMBOL_KW_CONST = 63, /* KW_CONST */
- YYSYMBOL_KW_CONSTEVAL = 64, /* KW_CONSTEVAL */
- YYSYMBOL_KW_CONSTEXPR = 65, /* KW_CONSTEXPR */
- YYSYMBOL_KW_CONSTINIT = 66, /* KW_CONSTINIT */
- YYSYMBOL_KW_CONST_CAST = 67, /* KW_CONST_CAST */
- YYSYMBOL_KW_DECLTYPE = 68, /* KW_DECLTYPE */
- YYSYMBOL_KW_DEFAULT = 69, /* KW_DEFAULT */
- YYSYMBOL_KW_DELETE = 70, /* KW_DELETE */
- YYSYMBOL_KW_DOUBLE = 71, /* KW_DOUBLE */
- YYSYMBOL_KW_DYNAMIC_CAST = 72, /* KW_DYNAMIC_CAST */
- YYSYMBOL_KW_ELSE = 73, /* KW_ELSE */
- YYSYMBOL_KW_END_PUBLISH = 74, /* KW_END_PUBLISH */
- YYSYMBOL_KW_ENUM = 75, /* KW_ENUM */
- YYSYMBOL_KW_EXTENSION = 76, /* KW_EXTENSION */
- YYSYMBOL_KW_EXTERN = 77, /* KW_EXTERN */
- YYSYMBOL_KW_EXPLICIT = 78, /* KW_EXPLICIT */
- YYSYMBOL_KW_EXPLICIT_LPAREN = 79, /* KW_EXPLICIT_LPAREN */
- YYSYMBOL_KW_PUBLISHED = 80, /* KW_PUBLISHED */
- YYSYMBOL_KW_FALSE = 81, /* KW_FALSE */
- YYSYMBOL_KW_FINAL = 82, /* KW_FINAL */
- YYSYMBOL_KW_FLOAT = 83, /* KW_FLOAT */
- YYSYMBOL_KW_FRIEND = 84, /* KW_FRIEND */
- YYSYMBOL_KW_FOR = 85, /* KW_FOR */
- YYSYMBOL_KW_GOTO = 86, /* KW_GOTO */
- YYSYMBOL_KW_HAS_VIRTUAL_DESTRUCTOR = 87, /* KW_HAS_VIRTUAL_DESTRUCTOR */
- YYSYMBOL_KW_IF = 88, /* KW_IF */
- YYSYMBOL_KW_INLINE = 89, /* KW_INLINE */
- YYSYMBOL_KW_INT = 90, /* KW_INT */
- YYSYMBOL_KW_IS_ABSTRACT = 91, /* KW_IS_ABSTRACT */
- YYSYMBOL_KW_IS_BASE_OF = 92, /* KW_IS_BASE_OF */
- YYSYMBOL_KW_IS_CLASS = 93, /* KW_IS_CLASS */
- YYSYMBOL_KW_IS_CONSTRUCTIBLE = 94, /* KW_IS_CONSTRUCTIBLE */
- YYSYMBOL_KW_IS_CONVERTIBLE_TO = 95, /* KW_IS_CONVERTIBLE_TO */
- YYSYMBOL_KW_IS_DESTRUCTIBLE = 96, /* KW_IS_DESTRUCTIBLE */
- YYSYMBOL_KW_IS_EMPTY = 97, /* KW_IS_EMPTY */
- YYSYMBOL_KW_IS_ENUM = 98, /* KW_IS_ENUM */
- YYSYMBOL_KW_IS_FINAL = 99, /* KW_IS_FINAL */
- YYSYMBOL_KW_IS_FUNDAMENTAL = 100, /* KW_IS_FUNDAMENTAL */
- YYSYMBOL_KW_IS_POD = 101, /* KW_IS_POD */
- YYSYMBOL_KW_IS_POLYMORPHIC = 102, /* KW_IS_POLYMORPHIC */
- YYSYMBOL_KW_IS_STANDARD_LAYOUT = 103, /* KW_IS_STANDARD_LAYOUT */
- YYSYMBOL_KW_IS_TRIVIAL = 104, /* KW_IS_TRIVIAL */
- YYSYMBOL_KW_IS_TRIVIALLY_COPYABLE = 105, /* KW_IS_TRIVIALLY_COPYABLE */
- YYSYMBOL_KW_IS_UNION = 106, /* KW_IS_UNION */
- YYSYMBOL_KW_LONG = 107, /* KW_LONG */
- YYSYMBOL_KW_MAKE_MAP_KEYS_SEQ = 108, /* KW_MAKE_MAP_KEYS_SEQ */
- YYSYMBOL_KW_MAKE_MAP_PROPERTY = 109, /* KW_MAKE_MAP_PROPERTY */
- YYSYMBOL_KW_MAKE_PROPERTY = 110, /* KW_MAKE_PROPERTY */
- YYSYMBOL_KW_MAKE_PROPERTY2 = 111, /* KW_MAKE_PROPERTY2 */
- YYSYMBOL_KW_MAKE_SEQ = 112, /* KW_MAKE_SEQ */
- YYSYMBOL_KW_MAKE_SEQ_PROPERTY = 113, /* KW_MAKE_SEQ_PROPERTY */
- YYSYMBOL_KW_MUTABLE = 114, /* KW_MUTABLE */
- YYSYMBOL_KW_NAMESPACE = 115, /* KW_NAMESPACE */
- YYSYMBOL_KW_NEW = 116, /* KW_NEW */
- YYSYMBOL_KW_NOEXCEPT = 117, /* KW_NOEXCEPT */
- YYSYMBOL_KW_NOEXCEPT_LPAREN = 118, /* KW_NOEXCEPT_LPAREN */
- YYSYMBOL_KW_NULLPTR = 119, /* KW_NULLPTR */
- YYSYMBOL_KW_OPERATOR = 120, /* KW_OPERATOR */
- YYSYMBOL_KW_OVERRIDE = 121, /* KW_OVERRIDE */
- YYSYMBOL_KW_PRIVATE = 122, /* KW_PRIVATE */
- YYSYMBOL_KW_PROTECTED = 123, /* KW_PROTECTED */
- YYSYMBOL_KW_PUBLIC = 124, /* KW_PUBLIC */
- YYSYMBOL_KW_REGISTER = 125, /* KW_REGISTER */
- YYSYMBOL_KW_REINTERPRET_CAST = 126, /* KW_REINTERPRET_CAST */
- YYSYMBOL_KW_RESTRICT = 127, /* KW_RESTRICT */
- YYSYMBOL_KW_RETURN = 128, /* KW_RETURN */
- YYSYMBOL_KW_SHORT = 129, /* KW_SHORT */
- YYSYMBOL_KW_SIGNED = 130, /* KW_SIGNED */
- YYSYMBOL_KW_SIZEOF = 131, /* KW_SIZEOF */
- YYSYMBOL_KW_STATIC = 132, /* KW_STATIC */
- YYSYMBOL_KW_STATIC_ASSERT = 133, /* KW_STATIC_ASSERT */
- YYSYMBOL_KW_STATIC_CAST = 134, /* KW_STATIC_CAST */
- YYSYMBOL_KW_STRUCT = 135, /* KW_STRUCT */
- YYSYMBOL_KW_TEMPLATE = 136, /* KW_TEMPLATE */
- YYSYMBOL_KW_THREAD_LOCAL = 137, /* KW_THREAD_LOCAL */
- YYSYMBOL_KW_THROW = 138, /* KW_THROW */
- YYSYMBOL_KW_TRUE = 139, /* KW_TRUE */
- YYSYMBOL_KW_TRY = 140, /* KW_TRY */
- YYSYMBOL_KW_TYPEDEF = 141, /* KW_TYPEDEF */
- YYSYMBOL_KW_TYPEID = 142, /* KW_TYPEID */
- YYSYMBOL_KW_TYPENAME = 143, /* KW_TYPENAME */
- YYSYMBOL_KW_UNDERLYING_TYPE = 144, /* KW_UNDERLYING_TYPE */
- YYSYMBOL_KW_UNION = 145, /* KW_UNION */
- YYSYMBOL_KW_UNSIGNED = 146, /* KW_UNSIGNED */
- YYSYMBOL_KW_USING = 147, /* KW_USING */
- YYSYMBOL_KW_VIRTUAL = 148, /* KW_VIRTUAL */
- YYSYMBOL_KW_VOID = 149, /* KW_VOID */
- YYSYMBOL_KW_VOLATILE = 150, /* KW_VOLATILE */
- YYSYMBOL_KW_WCHAR_T = 151, /* KW_WCHAR_T */
- YYSYMBOL_KW_WHILE = 152, /* KW_WHILE */
- YYSYMBOL_START_CPP = 153, /* START_CPP */
- YYSYMBOL_START_CONST_EXPR = 154, /* START_CONST_EXPR */
- YYSYMBOL_START_TYPE = 155, /* START_TYPE */
- YYSYMBOL_156_ = 156, /* '{' */
- YYSYMBOL_157_ = 157, /* ',' */
- YYSYMBOL_158_ = 158, /* ';' */
- YYSYMBOL_159_ = 159, /* ':' */
- YYSYMBOL_160_ = 160, /* '=' */
- YYSYMBOL_161_ = 161, /* '?' */
- YYSYMBOL_162_ = 162, /* '|' */
- YYSYMBOL_163_ = 163, /* '^' */
- YYSYMBOL_164_ = 164, /* '&' */
- YYSYMBOL_165_ = 165, /* '<' */
- YYSYMBOL_166_ = 166, /* '>' */
- YYSYMBOL_167_ = 167, /* '+' */
- YYSYMBOL_168_ = 168, /* '-' */
- YYSYMBOL_169_ = 169, /* '*' */
- YYSYMBOL_170_ = 170, /* '/' */
- YYSYMBOL_171_ = 171, /* '%' */
- YYSYMBOL_172_ = 172, /* '~' */
- YYSYMBOL_173_ = 173, /* '.' */
- YYSYMBOL_174_ = 174, /* '(' */
- YYSYMBOL_175_ = 175, /* '[' */
- YYSYMBOL_176_ = 176, /* ')' */
- YYSYMBOL_177_ = 177, /* '}' */
- YYSYMBOL_178_ = 178, /* '!' */
- YYSYMBOL_179_ = 179, /* ']' */
- YYSYMBOL_YYACCEPT = 180, /* $accept */
- YYSYMBOL_grammar = 181, /* grammar */
- YYSYMBOL_cpp = 182, /* cpp */
- YYSYMBOL_183_1 = 183, /* $@1 */
- YYSYMBOL_constructor_inits = 184, /* constructor_inits */
- YYSYMBOL_constructor_init = 185, /* constructor_init */
- YYSYMBOL_extern_c = 186, /* extern_c */
- YYSYMBOL_187_2 = 187, /* $@2 */
- YYSYMBOL_declaration = 188, /* declaration */
- YYSYMBOL_friend_declaration = 189, /* friend_declaration */
- YYSYMBOL_190_3 = 190, /* $@3 */
- YYSYMBOL_storage_class = 191, /* storage_class */
- YYSYMBOL_optional_attributes = 192, /* optional_attributes */
- YYSYMBOL_attribute_specifiers = 193, /* attribute_specifiers */
- YYSYMBOL_attribute_specifier = 194, /* attribute_specifier */
- YYSYMBOL_type_like_declaration = 195, /* type_like_declaration */
- YYSYMBOL_196_4 = 196, /* $@4 */
- YYSYMBOL_197_5 = 197, /* $@5 */
- YYSYMBOL_multiple_instance_identifiers = 198, /* multiple_instance_identifiers */
- YYSYMBOL_typedef_declaration = 199, /* typedef_declaration */
- YYSYMBOL_200_6 = 200, /* $@6 */
- YYSYMBOL_typedef_instance_identifiers = 201, /* typedef_instance_identifiers */
- YYSYMBOL_constructor_prototype = 202, /* constructor_prototype */
- YYSYMBOL_203_7 = 203, /* $@7 */
- YYSYMBOL_204_8 = 204, /* $@8 */
- YYSYMBOL_205_9 = 205, /* $@9 */
- YYSYMBOL_function_prototype = 206, /* function_prototype */
- YYSYMBOL_207_10 = 207, /* $@10 */
- YYSYMBOL_208_11 = 208, /* $@11 */
- YYSYMBOL_209_12 = 209, /* $@12 */
- YYSYMBOL_210_13 = 210, /* $@13 */
- YYSYMBOL_211_14 = 211, /* $@14 */
- YYSYMBOL_function_post = 212, /* function_post */
- YYSYMBOL_function_operator = 213, /* function_operator */
- YYSYMBOL_more_template_declaration = 214, /* more_template_declaration */
- YYSYMBOL_template_declaration = 215, /* template_declaration */
- YYSYMBOL_216_15 = 216, /* $@15 */
- YYSYMBOL_template_formal_parameters = 217, /* template_formal_parameters */
- YYSYMBOL_template_nonempty_formal_parameters = 218, /* template_nonempty_formal_parameters */
- YYSYMBOL_typename_keyword = 219, /* typename_keyword */
- YYSYMBOL_template_formal_parameter = 220, /* template_formal_parameter */
- YYSYMBOL_template_formal_parameter_type = 221, /* template_formal_parameter_type */
- YYSYMBOL_instance_identifier = 222, /* instance_identifier */
- YYSYMBOL_223_16 = 223, /* $@16 */
- YYSYMBOL_instance_identifier_and_maybe_trailing_return_type = 224, /* instance_identifier_and_maybe_trailing_return_type */
- YYSYMBOL_maybe_trailing_return_type = 225, /* maybe_trailing_return_type */
- YYSYMBOL_maybe_comma_identifier = 226, /* maybe_comma_identifier */
- YYSYMBOL_function_parameter_list = 227, /* function_parameter_list */
- YYSYMBOL_function_parameters = 228, /* function_parameters */
- YYSYMBOL_formal_parameter_list = 229, /* formal_parameter_list */
- YYSYMBOL_formal_parameters = 230, /* formal_parameters */
- YYSYMBOL_template_parameter_maybe_initialize = 231, /* template_parameter_maybe_initialize */
- YYSYMBOL_maybe_initialize = 232, /* maybe_initialize */
- YYSYMBOL_maybe_initialize_or_constructor_body = 233, /* maybe_initialize_or_constructor_body */
- YYSYMBOL_maybe_initialize_or_function_body = 234, /* maybe_initialize_or_function_body */
- YYSYMBOL_structure_init = 235, /* structure_init */
- YYSYMBOL_structure_init_body = 236, /* structure_init_body */
- YYSYMBOL_function_parameter = 237, /* function_parameter */
- YYSYMBOL_formal_parameter = 238, /* formal_parameter */
- YYSYMBOL_not_paren_formal_parameter_identifier = 239, /* not_paren_formal_parameter_identifier */
- YYSYMBOL_formal_parameter_identifier = 240, /* formal_parameter_identifier */
- YYSYMBOL_parameter_pack_identifier = 241, /* parameter_pack_identifier */
- YYSYMBOL_not_paren_empty_instance_identifier = 242, /* not_paren_empty_instance_identifier */
- YYSYMBOL_empty_instance_identifier = 243, /* empty_instance_identifier */
- YYSYMBOL_type = 244, /* type */
- YYSYMBOL_type_pack = 245, /* type_pack */
- YYSYMBOL_type_decl = 246, /* type_decl */
- YYSYMBOL_predefined_type = 247, /* predefined_type */
- YYSYMBOL_var_type_decl = 248, /* var_type_decl */
- YYSYMBOL_full_type = 249, /* full_type */
- YYSYMBOL_anonymous_struct = 250, /* anonymous_struct */
- YYSYMBOL_251_17 = 251, /* $@17 */
- YYSYMBOL_named_struct = 252, /* named_struct */
- YYSYMBOL_253_18 = 253, /* $@18 */
- YYSYMBOL_maybe_final = 254, /* maybe_final */
- YYSYMBOL_maybe_class_derivation = 255, /* maybe_class_derivation */
- YYSYMBOL_class_derivation = 256, /* class_derivation */
- YYSYMBOL_base_specification = 257, /* base_specification */
- YYSYMBOL_enum = 258, /* enum */
- YYSYMBOL_259_19 = 259, /* $@19 */
- YYSYMBOL_enum_decl = 260, /* enum_decl */
- YYSYMBOL_enum_element_type = 261, /* enum_element_type */
- YYSYMBOL_enum_body_trailing_comma = 262, /* enum_body_trailing_comma */
- YYSYMBOL_enum_body = 263, /* enum_body */
- YYSYMBOL_enum_keyword = 264, /* enum_keyword */
- YYSYMBOL_struct_keyword = 265, /* struct_keyword */
- YYSYMBOL_namespace_declaration = 266, /* namespace_declaration */
- YYSYMBOL_267_20 = 267, /* $@20 */
- YYSYMBOL_268_21 = 268, /* $@21 */
- YYSYMBOL_using_declaration = 269, /* using_declaration */
- YYSYMBOL_simple_type = 270, /* simple_type */
- YYSYMBOL_simple_int_type = 271, /* simple_int_type */
- YYSYMBOL_simple_float_type = 272, /* simple_float_type */
- YYSYMBOL_simple_void_type = 273, /* simple_void_type */
- YYSYMBOL_code = 274, /* code */
- YYSYMBOL_275_22 = 275, /* $@22 */
- YYSYMBOL_code_block = 276, /* code_block */
- YYSYMBOL_element = 277, /* element */
- YYSYMBOL_optional_const_expr = 278, /* optional_const_expr */
- YYSYMBOL_optional_const_expr_comma = 279, /* optional_const_expr_comma */
- YYSYMBOL_const_expr_comma = 280, /* const_expr_comma */
- YYSYMBOL_no_angle_bracket_const_expr = 281, /* no_angle_bracket_const_expr */
- YYSYMBOL_const_expr = 282, /* const_expr */
- YYSYMBOL_const_operand = 283, /* const_operand */
- YYSYMBOL_formal_const_expr = 284, /* formal_const_expr */
- YYSYMBOL_formal_const_operand = 285, /* formal_const_operand */
- YYSYMBOL_capture_list = 286, /* capture_list */
- YYSYMBOL_capture = 287, /* capture */
- YYSYMBOL_class_derivation_name = 288, /* class_derivation_name */
- YYSYMBOL_name = 289, /* name */
- YYSYMBOL_name_no_final = 290, /* name_no_final */
- YYSYMBOL_string_literal = 291, /* string_literal */
- YYSYMBOL_empty = 292 /* empty */
-};
-typedef enum yysymbol_kind_t yysymbol_kind_t;
-
-
-
-
-#ifdef short
-# undef short
-#endif
-
-/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
- and (if available) are included
- so that the code can choose integer types of a good width. */
-
-#ifndef __PTRDIFF_MAX__
-# include /* INFRINGES ON USER NAME SPACE */
-# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
-# include /* INFRINGES ON USER NAME SPACE */
-# define YY_STDINT_H
-# endif
-#endif
-
-/* Narrow types that promote to a signed type and that can represent a
- signed or unsigned integer of at least N bits. In tables they can
- save space and decrease cache pressure. Promoting to a signed type
- helps avoid bugs in integer arithmetic. */
-
-#ifdef __INT_LEAST8_MAX__
-typedef __INT_LEAST8_TYPE__ yytype_int8;
-#elif defined YY_STDINT_H
-typedef int_least8_t yytype_int8;
-#else
-typedef signed char yytype_int8;
-#endif
-
-#ifdef __INT_LEAST16_MAX__
-typedef __INT_LEAST16_TYPE__ yytype_int16;
-#elif defined YY_STDINT_H
-typedef int_least16_t yytype_int16;
-#else
-typedef short yytype_int16;
-#endif
-
-/* Work around bug in HP-UX 11.23, which defines these macros
- incorrectly for preprocessor constants. This workaround can likely
- be removed in 2023, as HPE has promised support for HP-UX 11.23
- (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
- . */
-#ifdef __hpux
-# undef UINT_LEAST8_MAX
-# undef UINT_LEAST16_MAX
-# define UINT_LEAST8_MAX 255
-# define UINT_LEAST16_MAX 65535
-#endif
-
-#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
-typedef __UINT_LEAST8_TYPE__ yytype_uint8;
-#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
- && UINT_LEAST8_MAX <= INT_MAX)
-typedef uint_least8_t yytype_uint8;
-#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
-typedef unsigned char yytype_uint8;
-#else
-typedef short yytype_uint8;
-#endif
-
-#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
-typedef __UINT_LEAST16_TYPE__ yytype_uint16;
-#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
- && UINT_LEAST16_MAX <= INT_MAX)
-typedef uint_least16_t yytype_uint16;
-#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
-typedef unsigned short yytype_uint16;
-#else
-typedef int yytype_uint16;
-#endif
-
-#ifndef YYPTRDIFF_T
-# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
-# define YYPTRDIFF_T __PTRDIFF_TYPE__
-# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
-# elif defined PTRDIFF_MAX
-# ifndef ptrdiff_t
-# include /* INFRINGES ON USER NAME SPACE */
-# endif
-# define YYPTRDIFF_T ptrdiff_t
-# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
-# else
-# define YYPTRDIFF_T long
-# define YYPTRDIFF_MAXIMUM LONG_MAX
-# endif
-#endif
-
-#ifndef YYSIZE_T
-# ifdef __SIZE_TYPE__
-# define YYSIZE_T __SIZE_TYPE__
-# elif defined size_t
-# define YYSIZE_T size_t
-# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
-# include /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
-# else
-# define YYSIZE_T unsigned
-# endif
-#endif
-
-#define YYSIZE_MAXIMUM \
- YY_CAST (YYPTRDIFF_T, \
- (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
- ? YYPTRDIFF_MAXIMUM \
- : YY_CAST (YYSIZE_T, -1)))
-
-#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
-
-
-/* Stored state numbers (used for stacks). */
-typedef yytype_int16 yy_state_t;
-
-/* State numbers in computations. */
-typedef int yy_state_fast_t;
-
-#ifndef YY_
-# if defined YYENABLE_NLS && YYENABLE_NLS
-# if ENABLE_NLS
-# include /* INFRINGES ON USER NAME SPACE */
-# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
-# endif
-# endif
-# ifndef YY_
-# define YY_(Msgid) Msgid
-# endif
-#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
-
-
-#define YY_ASSERT(E) ((void) (0 && (E)))
-
-#if !defined yyoverflow
-
-/* The parser invokes alloca or malloc; define the necessary symbols. */
-
-# ifdef YYSTACK_USE_ALLOCA
-# if YYSTACK_USE_ALLOCA
-# ifdef __GNUC__
-# define YYSTACK_ALLOC __builtin_alloca
-# elif defined __BUILTIN_VA_ARG_INCR
-# include /* INFRINGES ON USER NAME SPACE */
-# elif defined _AIX
-# define YYSTACK_ALLOC __alloca
-# elif defined _MSC_VER
-# include /* INFRINGES ON USER NAME SPACE */
-# define alloca _alloca
-# else
-# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
-# include /* INFRINGES ON USER NAME SPACE */
- /* Use EXIT_SUCCESS as a witness for stdlib.h. */
-# ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
-# endif
-# endif
-# endif
-# endif
-# endif
-
-# ifdef YYSTACK_ALLOC
- /* Pacify GCC's 'empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
-# ifndef YYSTACK_ALLOC_MAXIMUM
- /* The OS might guarantee only one guard page at the bottom of the stack,
- and a page size can be as small as 4096 bytes. So we cannot safely
- invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
- to allow for a few compiler-allocated temporary stack slots. */
-# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
-# endif
-# else
-# define YYSTACK_ALLOC YYMALLOC
-# define YYSTACK_FREE YYFREE
-# ifndef YYSTACK_ALLOC_MAXIMUM
-# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
-# endif
-# if (defined __cplusplus && ! defined EXIT_SUCCESS \
- && ! ((defined YYMALLOC || defined malloc) \
- && (defined YYFREE || defined free)))
-# include /* INFRINGES ON USER NAME SPACE */
-# ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
-# endif
-# endif
-# ifndef YYMALLOC
-# define YYMALLOC malloc
-# if ! defined malloc && ! defined EXIT_SUCCESS
-void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
-# endif
-# endif
-# ifndef YYFREE
-# define YYFREE free
-# if ! defined free && ! defined EXIT_SUCCESS
-void free (void *); /* INFRINGES ON USER NAME SPACE */
-# endif
-# endif
-# endif
-#endif /* !defined yyoverflow */
-
-#if (! defined yyoverflow \
- && (! defined __cplusplus \
- || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
- && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
-
-/* A type that is properly aligned for any stack member. */
-union yyalloc
-{
- yy_state_t yyss_alloc;
- YYSTYPE yyvs_alloc;
- YYLTYPE yyls_alloc;
-};
-
-/* The size of the maximum gap between one aligned stack and the next. */
-# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
-
-/* The size of an array large to enough to hold all stacks, each with
- N elements. */
-# define YYSTACK_BYTES(N) \
- ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \
- + YYSIZEOF (YYLTYPE)) \
- + 2 * YYSTACK_GAP_MAXIMUM)
-
-# define YYCOPY_NEEDED 1
-
-/* Relocate STACK from its old location to the new one. The
- local variables YYSIZE and YYSTACKSIZE give the old and new number of
- elements in the stack, and YYPTR gives the new location of the
- stack. Advance YYPTR to a properly aligned location for the next
- stack. */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
- do \
- { \
- YYPTRDIFF_T yynewbytes; \
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- Stack = &yyptr->Stack_alloc; \
- yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / YYSIZEOF (*yyptr); \
- } \
- while (0)
-
-#endif
-
-#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
-/* Copy COUNT objects from SRC to DST. The source and destination do
- not overlap. */
-# ifndef YYCOPY
-# if defined __GNUC__ && 1 < __GNUC__
-# define YYCOPY(Dst, Src, Count) \
- __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
-# else
-# define YYCOPY(Dst, Src, Count) \
- do \
- { \
- YYPTRDIFF_T yyi; \
- for (yyi = 0; yyi < (Count); yyi++) \
- (Dst)[yyi] = (Src)[yyi]; \
- } \
- while (0)
-# endif
-# endif
-#endif /* !YYCOPY_NEEDED */
-
-/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 109
-/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 6863
-
-/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 180
-/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 113
-/* YYNRULES -- Number of rules. */
-#define YYNRULES 789
-/* YYNSTATES -- Number of states. */
-#define YYNSTATES 1678
-
-/* YYMAXUTOK -- Last valid token kind. */
-#define YYMAXUTOK 410
-
-
-/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
- as returned by yylex, with out-of-bounds checking. */
-#define YYTRANSLATE(YYX) \
- (0 <= (YYX) && (YYX) <= YYMAXUTOK \
- ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
- : YYSYMBOL_YYUNDEF)
-
-/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
- as returned by yylex. */
-static const yytype_uint8 yytranslate[] =
-{
- 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, 178, 2, 2, 2, 171, 164, 2,
- 174, 176, 169, 167, 157, 168, 173, 170, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 159, 158,
- 165, 160, 166, 161, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 175, 2, 179, 163, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 156, 162, 177, 172, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 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
-};
-
-#if YYDEBUG
-/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
-static const yytype_int16 yyrline[] =
-{
- 0, 466, 466, 467, 471, 478, 479, 486, 485, 496,
- 497, 501, 505, 509, 522, 521, 533, 534, 535, 536,
- 537, 538, 539, 552, 561, 565, 573, 577, 581, 602,
- 629, 650, 679, 715, 758, 770, 791, 827, 861, 883,
- 919, 941, 952, 966, 965, 980, 984, 989, 993, 1004,
- 1008, 1012, 1016, 1020, 1029, 1033, 1037, 1041, 1045, 1049,
- 1053, 1057, 1061, 1068, 1072, 1077, 1085, 1090, 1098, 1102,
- 1110, 1115, 1124, 1123, 1139, 1149, 1148, 1165, 1173, 1181,
- 1193, 1210, 1209, 1224, 1239, 1249, 1265, 1264, 1307, 1306,
- 1335, 1334, 1372, 1371, 1403, 1402, 1422, 1421, 1443, 1442,
- 1475, 1474, 1501, 1514, 1518, 1522, 1526, 1530, 1539, 1543,
- 1547, 1551, 1555, 1560, 1565, 1569, 1573, 1580, 1584, 1588,
- 1592, 1596, 1600, 1604, 1608, 1612, 1616, 1620, 1624, 1628,
- 1632, 1636, 1640, 1644, 1648, 1652, 1656, 1660, 1664, 1668,
- 1672, 1676, 1680, 1684, 1688, 1692, 1696, 1700, 1704, 1708,
- 1712, 1716, 1720, 1724, 1728, 1732, 1736, 1743, 1744, 1745,
- 1749, 1751, 1750, 1758, 1759, 1763, 1764, 1768, 1774, 1783,
- 1784, 1788, 1792, 1796, 1800, 1806, 1812, 1818, 1825, 1830,
- 1836, 1843, 1852, 1856, 1861, 1869, 1881, 1885, 1899, 1914,
- 1919, 1924, 1929, 1934, 1939, 1944, 1949, 1955, 1954, 1985,
- 1995, 2005, 2009, 2013, 2022, 2026, 2034, 2038, 2043, 2047,
- 2052, 2060, 2065, 2073, 2077, 2082, 2086, 2091, 2099, 2104,
- 2112, 2116, 2123, 2127, 2134, 2138, 2142, 2146, 2150, 2157,
- 2161, 2165, 2169, 2173, 2177, 2184, 2185, 2186, 2190, 2193,
- 2194, 2195, 2199, 2211, 2230, 2234, 2244, 2248, 2252, 2257,
- 2262, 2267, 2272, 2277, 2282, 2287, 2295, 2299, 2303, 2308,
- 2313, 2318, 2323, 2328, 2333, 2338, 2343, 2349, 2357, 2362,
- 2367, 2372, 2377, 2382, 2387, 2392, 2397, 2402, 2407, 2413,
- 2421, 2425, 2430, 2435, 2440, 2445, 2450, 2455, 2460, 2465,
- 2470, 2478, 2482, 2487, 2492, 2497, 2502, 2507, 2512, 2517,
- 2522, 2527, 2532, 2538, 2545, 2552, 2562, 2566, 2574, 2578,
- 2582, 2586, 2590, 2606, 2622, 2631, 2635, 2645, 2649, 2656,
- 2667, 2671, 2679, 2683, 2687, 2691, 2695, 2711, 2727, 2745,
- 2754, 2758, 2768, 2772, 2779, 2783, 2791, 2795, 2811, 2827,
- 2836, 2846, 2850, 2857, 2861, 2869, 2873, 2878, 2882, 2891,
- 2890, 2915, 2914, 2944, 2945, 2952, 2953, 2957, 2958, 2962,
- 2966, 2970, 2974, 2978, 2982, 2986, 2990, 2994, 2998, 3006,
- 3005, 3022, 3026, 3030, 3035, 3043, 3047, 3054, 3055, 3060,
- 3067, 3068, 3073, 3081, 3085, 3089, 3096, 3100, 3104, 3112,
- 3111, 3134, 3133, 3156, 3157, 3161, 3167, 3174, 3180, 3189,
- 3190, 3191, 3195, 3199, 3203, 3207, 3211, 3215, 3219, 3224,
- 3229, 3234, 3239, 3243, 3248, 3257, 3262, 3270, 3274, 3278,
- 3286, 3296, 3296, 3306, 3307, 3311, 3312, 3313, 3314, 3315,
- 3316, 3317, 3318, 3319, 3320, 3321, 3322, 3322, 3322, 3323,
- 3323, 3323, 3323, 3323, 3324, 3324, 3324, 3324, 3324, 3325,
- 3325, 3325, 3326, 3326, 3326, 3326, 3326, 3327, 3327, 3327,
- 3327, 3327, 3328, 3328, 3329, 3329, 3329, 3329, 3329, 3330,
- 3330, 3330, 3330, 3330, 3330, 3331, 3331, 3331, 3331, 3331,
- 3332, 3332, 3332, 3332, 3332, 3333, 3333, 3333, 3333, 3333,
- 3334, 3334, 3334, 3334, 3334, 3335, 3335, 3335, 3335, 3335,
- 3335, 3336, 3336, 3336, 3336, 3336, 3337, 3337, 3337, 3337,
- 3338, 3338, 3338, 3338, 3339, 3339, 3339, 3339, 3339, 3339,
- 3340, 3340, 3340, 3340, 3341, 3341, 3341, 3341, 3341, 3342,
- 3342, 3342, 3342, 3343, 3343, 3343, 3343, 3343, 3344, 3344,
- 3347, 3347, 3347, 3347, 3347, 3347, 3347, 3347, 3347, 3347,
- 3347, 3348, 3348, 3348, 3348, 3348, 3348, 3348, 3348, 3348,
- 3348, 3349, 3349, 3353, 3357, 3364, 3368, 3375, 3379, 3386,
- 3390, 3394, 3398, 3402, 3406, 3410, 3414, 3418, 3422, 3426,
- 3430, 3434, 3438, 3442, 3446, 3450, 3454, 3458, 3462, 3466,
- 3470, 3474, 3478, 3482, 3486, 3490, 3494, 3498, 3502, 3506,
- 3510, 3514, 3518, 3522, 3526, 3530, 3534, 3538, 3542, 3550,
- 3554, 3558, 3562, 3566, 3570, 3574, 3584, 3594, 3600, 3606,
- 3612, 3618, 3624, 3630, 3636, 3643, 3650, 3657, 3664, 3670,
- 3676, 3680, 3684, 3688, 3692, 3696, 3700, 3711, 3722, 3726,
- 3730, 3734, 3738, 3742, 3746, 3750, 3754, 3758, 3762, 3766,
- 3770, 3774, 3778, 3782, 3786, 3790, 3794, 3798, 3802, 3806,
- 3810, 3814, 3818, 3822, 3826, 3830, 3834, 3838, 3842, 3846,
- 3850, 3857, 3861, 3865, 3869, 3873, 3877, 3881, 3885, 3889,
- 3895, 3901, 3905, 3912, 3920, 3924, 3928, 3932, 3936, 3940,
- 3944, 3948, 3952, 3956, 3960, 3964, 3968, 3972, 3976, 3980,
- 3984, 3988, 4002, 4006, 4010, 4014, 4018, 4022, 4026, 4030,
- 4034, 4038, 4042, 4046, 4050, 4061, 4072, 4076, 4080, 4084,
- 4088, 4092, 4096, 4100, 4104, 4108, 4112, 4116, 4120, 4124,
- 4128, 4132, 4136, 4140, 4144, 4148, 4152, 4156, 4160, 4164,
- 4168, 4172, 4176, 4180, 4184, 4188, 4192, 4199, 4203, 4207,
- 4211, 4215, 4219, 4223, 4227, 4231, 4237, 4243, 4251, 4255,
- 4259, 4263, 4270, 4280, 4286, 4292, 4302, 4314, 4322, 4326,
- 4356, 4360, 4364, 4368, 4372, 4376, 4382, 4386, 4390, 4394,
- 4398, 4409, 4413, 4417, 4421, 4429, 4433, 4437, 4443, 4454
-};
-#endif
-
-/** Accessing symbol of state STATE. */
-#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
-
-#if YYDEBUG || 0
-/* The user-facing name of the symbol whose (internal) number is
- YYSYMBOL. No bounds checking. */
-static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
-
-/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
- First, the terminals, then, starting at YYNTOKENS, nonterminals. */
-static const char *const yytname[] =
-{
- "\"end of file\"", "error", "\"invalid token\"", "REAL", "INTEGER",
- "CHAR_TOK", "SIMPLE_STRING", "SIMPLE_IDENTIFIER", "STRING_LITERAL",
- "CUSTOM_LITERAL", "IDENTIFIER", "TYPENAME_IDENTIFIER",
- "TYPEPACK_IDENTIFIER", "SCOPING", "TYPEDEFNAME", "ELLIPSIS", "OROR",
- "ANDAND", "EQCOMPARE", "NECOMPARE", "LECOMPARE", "GECOMPARE",
- "SPACESHIP", "LSHIFT", "RSHIFT", "POINTSAT_STAR", "DOT_STAR", "UNARY",
- "UNARY_NOT", "UNARY_NEGATE", "UNARY_MINUS", "UNARY_PLUS", "UNARY_STAR",
- "UNARY_REF", "POINTSAT", "SCOPE", "PLUSPLUS", "MINUSMINUS", "TIMESEQUAL",
- "DIVIDEEQUAL", "MODEQUAL", "PLUSEQUAL", "MINUSEQUAL", "OREQUAL",
- "ANDEQUAL", "XOREQUAL", "LSHIFTEQUAL", "RSHIFTEQUAL", "ATTR_LEFT",
- "ATTR_RIGHT", "KW_ALIGNAS", "KW_ALIGNOF", "KW_AUTO", "KW_BEGIN_PUBLISH",
- "KW_BLOCKING", "KW_BOOL", "KW_BUILTIN_VA_LIST", "KW_CATCH", "KW_CHAR",
- "KW_CHAR8_T", "KW_CHAR16_T", "KW_CHAR32_T", "KW_CLASS", "KW_CONST",
- "KW_CONSTEVAL", "KW_CONSTEXPR", "KW_CONSTINIT", "KW_CONST_CAST",
- "KW_DECLTYPE", "KW_DEFAULT", "KW_DELETE", "KW_DOUBLE", "KW_DYNAMIC_CAST",
- "KW_ELSE", "KW_END_PUBLISH", "KW_ENUM", "KW_EXTENSION", "KW_EXTERN",
- "KW_EXPLICIT", "KW_EXPLICIT_LPAREN", "KW_PUBLISHED", "KW_FALSE",
- "KW_FINAL", "KW_FLOAT", "KW_FRIEND", "KW_FOR", "KW_GOTO",
- "KW_HAS_VIRTUAL_DESTRUCTOR", "KW_IF", "KW_INLINE", "KW_INT",
- "KW_IS_ABSTRACT", "KW_IS_BASE_OF", "KW_IS_CLASS", "KW_IS_CONSTRUCTIBLE",
- "KW_IS_CONVERTIBLE_TO", "KW_IS_DESTRUCTIBLE", "KW_IS_EMPTY",
- "KW_IS_ENUM", "KW_IS_FINAL", "KW_IS_FUNDAMENTAL", "KW_IS_POD",
- "KW_IS_POLYMORPHIC", "KW_IS_STANDARD_LAYOUT", "KW_IS_TRIVIAL",
- "KW_IS_TRIVIALLY_COPYABLE", "KW_IS_UNION", "KW_LONG",
- "KW_MAKE_MAP_KEYS_SEQ", "KW_MAKE_MAP_PROPERTY", "KW_MAKE_PROPERTY",
- "KW_MAKE_PROPERTY2", "KW_MAKE_SEQ", "KW_MAKE_SEQ_PROPERTY", "KW_MUTABLE",
- "KW_NAMESPACE", "KW_NEW", "KW_NOEXCEPT", "KW_NOEXCEPT_LPAREN",
- "KW_NULLPTR", "KW_OPERATOR", "KW_OVERRIDE", "KW_PRIVATE", "KW_PROTECTED",
- "KW_PUBLIC", "KW_REGISTER", "KW_REINTERPRET_CAST", "KW_RESTRICT",
- "KW_RETURN", "KW_SHORT", "KW_SIGNED", "KW_SIZEOF", "KW_STATIC",
- "KW_STATIC_ASSERT", "KW_STATIC_CAST", "KW_STRUCT", "KW_TEMPLATE",
- "KW_THREAD_LOCAL", "KW_THROW", "KW_TRUE", "KW_TRY", "KW_TYPEDEF",
- "KW_TYPEID", "KW_TYPENAME", "KW_UNDERLYING_TYPE", "KW_UNION",
- "KW_UNSIGNED", "KW_USING", "KW_VIRTUAL", "KW_VOID", "KW_VOLATILE",
- "KW_WCHAR_T", "KW_WHILE", "START_CPP", "START_CONST_EXPR", "START_TYPE",
- "'{'", "','", "';'", "':'", "'='", "'?'", "'|'", "'^'", "'&'", "'<'",
- "'>'", "'+'", "'-'", "'*'", "'/'", "'%'", "'~'", "'.'", "'('", "'['",
- "')'", "'}'", "'!'", "']'", "$accept", "grammar", "cpp", "$@1",
- "constructor_inits", "constructor_init", "extern_c", "$@2",
- "declaration", "friend_declaration", "$@3", "storage_class",
- "optional_attributes", "attribute_specifiers", "attribute_specifier",
- "type_like_declaration", "$@4", "$@5", "multiple_instance_identifiers",
- "typedef_declaration", "$@6", "typedef_instance_identifiers",
- "constructor_prototype", "$@7", "$@8", "$@9", "function_prototype",
- "$@10", "$@11", "$@12", "$@13", "$@14", "function_post",
- "function_operator", "more_template_declaration", "template_declaration",
- "$@15", "template_formal_parameters",
- "template_nonempty_formal_parameters", "typename_keyword",
- "template_formal_parameter", "template_formal_parameter_type",
- "instance_identifier", "$@16",
- "instance_identifier_and_maybe_trailing_return_type",
- "maybe_trailing_return_type", "maybe_comma_identifier",
- "function_parameter_list", "function_parameters",
- "formal_parameter_list", "formal_parameters",
- "template_parameter_maybe_initialize", "maybe_initialize",
- "maybe_initialize_or_constructor_body",
- "maybe_initialize_or_function_body", "structure_init",
- "structure_init_body", "function_parameter", "formal_parameter",
- "not_paren_formal_parameter_identifier", "formal_parameter_identifier",
- "parameter_pack_identifier", "not_paren_empty_instance_identifier",
- "empty_instance_identifier", "type", "type_pack", "type_decl",
- "predefined_type", "var_type_decl", "full_type", "anonymous_struct",
- "$@17", "named_struct", "$@18", "maybe_final", "maybe_class_derivation",
- "class_derivation", "base_specification", "enum", "$@19", "enum_decl",
- "enum_element_type", "enum_body_trailing_comma", "enum_body",
- "enum_keyword", "struct_keyword", "namespace_declaration", "$@20",
- "$@21", "using_declaration", "simple_type", "simple_int_type",
- "simple_float_type", "simple_void_type", "code", "$@22", "code_block",
- "element", "optional_const_expr", "optional_const_expr_comma",
- "const_expr_comma", "no_angle_bracket_const_expr", "const_expr",
- "const_operand", "formal_const_expr", "formal_const_operand",
- "capture_list", "capture", "class_derivation_name", "name",
- "name_no_final", "string_literal", "empty", YY_NULLPTR
-};
-
-static const char *
-yysymbol_name (yysymbol_kind_t yysymbol)
-{
- return yytname[yysymbol];
-}
-#endif
-
-#define YYPACT_NINF (-1062)
-
-#define yypact_value_is_default(Yyn) \
- ((Yyn) == YYPACT_NINF)
-
-#define YYTABLE_NINF (-785)
-
-#define yytable_value_is_error(Yyn) \
- 0
-
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
- STATE-NUM. */
-static const yytype_int16 yypact[] =
-{
- 188, -1062, 4339, 6032, 93, 349, -1062, -1062, -1062, -1062,
- -1062, -1062, -1062, -1062, 81, -70, -59, -43, -23, -2,
- 24, 44, 60, 91, -1062, -1062, 92, 100, 109, 143,
- 146, 154, 177, 180, 192, 200, 243, 251, 255, 264,
- 272, 275, 279, 283, 290, 317, 6228, 4339, -1062, -1062,
- 216, 324, 346, 3187, 221, -1062, 351, 368, 387, 4339,
- 4339, 4339, 4339, 4339, 2888, 581, 4339, 4754, -1062, 119,
- -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062,
- 6097, 389, -1062, 6, -1062, -1062, 1578, 2508, 2508, -1062,
- 5064, 414, -1062, 2508, -1062, -1062, 833, 833, -1062, -1062,
- -1062, -1062, -1062, 223, 223, -1062, -1062, -1062, -1062, -1062,
- 2565, 416, 274, -1062, 4339, 4339, 6032, 4339, 4339, 4339,
- 4339, 4339, 6032, 4339, 6032, 4339, 6032, 4339, 6032, 6032,
- 6032, 6032, 6032, 6032, 6032, 6032, 6032, 6032, 6032, 6032,
- 6032, 6032, 6032, 6032, 4339, -1062, -1062, -1062, 421, 5064,
- 423, 433, 223, 223, -1062, 5284, 6032, 4339, 4339, 453,
- 2888, 68, 6032, 2888, 4339, 4339, 68, 68, 68, 68,
- 68, 81, -59, -43, -23, -2, 24, 60, 92, 109,
- 5288, 6413, 6437, 6513, 387, 376, -36, 4754, -1062, -1062,
- -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062,
- 5064, 5064, -104, 397, -1062, -1062, 68, 4339, 4339, 4339,
- 4339, 4339, 4339, 4339, 4339, 4339, 4339, 4339, 4339, 4339,
- 4339, 4339, 4339, 4339, 4339, 4339, 4339, 4339, 5064, 3331,
- 4339, -1062, -1062, 833, 833, 3475, -1062, -1062, -1062, 2508,
- -1062, -1062, -1062, -1062, 6032, -1062, 432, 564, 223, 833,
- 833, 833, 223, 223, 59, 462, -1062, 463, -1062, 473,
- 87, 2050, 5064, 583, 487, 474, 3037, -1062, 6616, 465,
- 500, -1062, 494, 496, 506, 511, 516, 525, 528, 483,
- 530, 495, 531, 532, 533, 534, 536, 543, -15, 563,
- 551, 556, 562, 566, 567, 568, 572, 573, 576, 582,
- 584, 587, 4339, -1062, 6032, 4339, 5064, 5064, -1062, 546,
- 589, 590, 5064, 592, 574, 593, 5303, 596, 597, 4339,
- 4339, -1062, 732, -1062, 1631, 600, 4339, -1062, -1062, 1881,
- 4935, 5120, 5120, 555, 555, 485, 298, 298, -1062, 3642,
- 5661, 1606, 1809, 555, 555, 132, 132, 68, 68, 68,
- -1062, -1062, 28, 2457, -1062, -1062, 604, 5345, 613, 223,
- 223, 1104, 462, -1062, 462, -1062, 462, -1062, 1104, 1104,
- -1062, 223, 223, 223, 6713, 621, 30, -1062, 622, 4339,
- -1062, -1062, -1062, -1062, -1062, 2131, 634, 3, 41, 57,
- 106, -1062, -1062, -1062, 640, 223, 5064, 2062, 81, -1062,
- -1062, 628, 5064, 632, 638, -1062, -1062, -1062, 223, 223,
- -1062, 5366, -1062, 6713, 6713, 6713, 6713, 6713, -1062, 6713,
- 5814, 6713, 4339, 656, -1062, 6656, 644, 645, 646, 647,
- 648, 649, 6713, 62, 667, 669, 673, 6713, 6713, 660,
- 6551, 6713, 6713, 4685, 6713, 6713, -1062, -1062, -1062, 2526,
- -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062,
- -1062, -1062, -1062, 663, -1062, 664, -1062, -1062, -1062, -1062,
- 6032, -1062, 6032, -1062, 6032, -1062, -1062, -1062, -1062, -1062,
- -1062, -1062, -1062, -1062, -1062, -1062, -1062, 5385, 665, 671,
- -1062, -1062, 666, -1062, -1062, 675, 4483, 678, -1062, -1062,
- -1062, -1062, 68, 4754, -1062, 5064, 397, 55, 5806, -1062,
- 4754, 4339, -1062, -1062, -1062, -1062, -1062, 1104, 668, 670,
- 5064, 223, 1104, 1104, 1104, 223, 223, 674, -1062, 674,
- 674, 1104, 1104, 1104, 5889, 6713, 6097, -1062, -1062, 117,
- 679, 4754, -1062, 5064, 676, -1062, -1062, -1062, -1062, 2131,
- -1062, 763, 5064, -1062, -1062, -1062, -1062, -1062, -1062, -1062,
- -1062, 686, 697, 701, -1062, -1062, 6228, -1062, -1062, 702,
- 4880, 710, -1062, 695, 4339, 4339, 4339, 4339, 2888, 4339,
- 700, 42, -1062, -1062, 5644, -1062, 119, 703, 3619, -1062,
- 6032, 223, 2581, 2050, 223, -1062, -1062, -1062, -1062, -1062,
- -1062, 6713, -1062, -1062, -1062, 5404, -1062, 6616, 3389, -1062,
- 5064, 5064, 5064, 5064, 5064, 5064, -1062, -1062, 5064, -1062,
- -1062, -1062, -1062, -1062, 4339, -1062, 5109, -1062, 712, -1062,
- 5209, -1062, 5064, 5064, 2, -1062, -1062, 457, 706, 6130,
- -1062, 5064, -1062, 224, 723, -1062, 4339, 4339, 709, 711,
- 713, -1062, -1062, -1062, 4339, -1062, 4339, -1062, 715, -1062,
- -1062, -1062, -1062, -1062, -1062, 4339, -1062, 708, -1062, -1062,
- 852, 4754, 674, 223, 223, 1104, 674, 674, 674, 1104,
- 1104, 4339, -103, 85, 133, 977, 946, 5806, -1062, -1062,
- 223, 223, -1062, 736, 58, -1062, 729, -1062, 844, 6032,
- 6032, 6032, 721, 6032, 725, 2888, 95, 6032, 2888, 68,
- 68, 68, 68, 726, 101, 68, -1062, -1062, 4863, 4339,
- 4339, 4339, 4339, 4339, 4339, 4339, 4339, 4339, 4339, 4339,
- 4339, 4339, 4339, 4339, 4339, 4339, 4339, 4339, 4339, 4339,
- 5064, 3763, 4339, 727, 5464, 731, -1062, -1062, 746, -1062,
- -1062, -1062, 6713, -1062, -1062, 753, 757, 759, 760, 764,
- 769, 770, 80, 772, 4506, 5921, 395, 755, 224, -1062,
- -1062, 773, 774, -1062, 775, -1062, 22, 6293, 1248, -1062,
- 756, 517, -1062, -1062, 2204, -1062, -1062, 704, 124, 183,
- -1062, -1062, -1062, 189, 196, -1062, 5565, 365, 6195, 777,
- -1062, 1104, -1062, 674, 674, 674, 762, 778, 784, 788,
- 765, 223, 977, 977, 977, 223, 223, 977, -81, 223,
- -1062, 767, 5064, 223, 946, 946, 946, 223, 223, 946,
- 8, 852, 771, 36, -1062, 6311, 791, 794, -1062, 223,
- 790, 782, 798, 4339, 801, 5064, 792, 809, 800, 5584,
- 4339, -1062, -1062, -1062, 1881, 4935, 5120, 5120, 555, 555,
- 485, 298, 298, -1062, 3930, 5661, 1606, 1809, 555, 555,
- 132, 132, 68, 68, 68, -1062, -1062, 207, 2907, -1062,
- -1062, -1062, 2131, -1062, 98, -1062, 969, 971, 972, 974,
- 975, 976, -1062, -1062, 427, 835, -1062, -1062, -1062, -1062,
- 5975, -1062, 5975, 825, 838, 6470, -1062, 744, -1062, -1062,
- 20, -1062, 704, -1062, -1062, 6032, 55, 820, 829, 704,
- 55, 1248, 830, 223, 1248, 1248, 1248, 223, 223, 56,
- 223, -1062, 99, -1062, -1062, -1062, 5064, 405, -1062, 826,
- -1062, 848, 850, 3907, 4214, 842, 223, 704, 5043, 704,
- 223, 223, 704, -1062, 77, 454, 223, -1062, -1062, -1062,
- -1062, 5806, -1062, -1062, 14, 6228, 833, -1062, 674, 223,
- 55, 55, 55, 223, 977, 837, 837, 837, 977, 977,
- 328, 4339, -1062, -1062, 223, 223, 946, 840, 840, 840,
- 946, 946, 336, 4339, -1062, -1062, -1062, 4339, 6378, 6393,
- 6408, 5064, 498, -1062, -1062, 998, -1062, 6311, -1062, -1062,
- 843, 849, 846, 854, 856, 4483, 865, -1062, -1062, 68,
- 4339, -1062, -1062, 736, -1062, -1062, 861, 212, 873, 884,
- 889, 895, -1062, 43, -1062, 744, 744, 6696, 5921, 5064,
- 885, 897, 223, 744, 744, 744, 223, 223, 744, 65,
- 840, -1062, 454, 910, 893, 898, 704, 492, 899, 410,
- 223, 1248, 901, 901, 901, 1248, 1248, -1062, 4339, -1062,
- -1062, 55, 900, 468, -1062, 89, 916, 920, -1062, 2711,
- -1062, -1062, -1062, 3907, 902, 923, 4754, -1062, -1062, 223,
- 704, 460, 1071, -1062, -1062, -1062, -1062, -1062, -1062, -1062,
- -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062,
- -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062,
- -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062,
- 909, 907, -1062, 223, 460, 704, 704, 515, 4339, -1062,
- 4339, -1062, 2204, 931, -1062, -1062, 852, 913, -1062, 833,
- -1062, 914, -1062, 917, 919, 924, 977, 837, 837, 837,
- 918, 911, 946, -1062, 840, 840, 840, 925, 922, 5625,
- 1336, -1062, 1336, -1062, 1336, -1062, -1062, 1336, 1336, 1336,
- -1062, 102, -1062, 4339, 4339, -1062, 4339, -1062, 4339, 4754,
- 134, 1092, 1093, 948, 1097, 932, -1062, 1099, 1106, 1108,
- 157, 956, 65, 840, 65, 840, -1062, -1062, -1062, -1062,
- -1062, -1062, 6032, 223, 744, 744, 744, 1788, -1062, -1062,
- 965, -1062, -1062, -1062, -1062, 523, 951, -1062, -1062, 1248,
- 901, 901, 901, 55, 952, 958, -1062, -1062, 5064, 4339,
- 4339, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062,
- -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062,
- -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062,
- -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062,
- -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062,
- -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062,
- -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062,
- -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062,
- -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062,
- -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062,
- -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062,
- -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062,
- -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062,
- -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062,
- -1062, -1062, 955, -1062, 4051, 704, 460, 223, -1062, -1062,
- -1062, 460, 460, -1062, 4754, 2062, 964, 4214, 704, 979,
- -1062, -1062, -1062, -1062, -1062, -1062, 837, 55, 223, 840,
- 55, 223, -1062, -1062, -1062, -1062, -1062, -1062, -1062, -1062,
- 230, 252, 254, 266, -1062, 968, 304, -1062, 990, 991,
- 325, 982, 339, -1062, -1062, -1062, -1062, -1062, 744, 978,
- 985, 988, 994, 4627, 997, 1788, 1788, 1788, 1788, 1788,
- 2888, 1788, 1343, -1062, 704, 5806, 55, 989, -1062, 5806,
- 55, 901, 992, 223, -1062, 987, -1062, 993, 996, 2382,
- -1062, 3907, 4754, 460, -1062, 999, 223, -1062, -1062, 5806,
- 5806, 5806, 1000, -1062, 1001, -1062, -1062, -1062, -1062, -1062,
- 1011, 1163, 1016, 1168, -1062, 1170, 1023, 1024, 1174, 1027,
- 6032, 6032, 6032, 6032, 1012, 2888, 152, 6032, 152, 152,
- 152, 152, 152, 1013, 367, 152, 1788, 1788, 1788, 1788,
- 1788, 1788, 1788, 1788, 1788, 1788, 1788, 1788, 1788, 1788,
- 1788, 1788, 1788, 1788, 1788, 5064, 4195, 4339, -1062, -1062,
- 1014, -1062, 55, -1062, 1015, -1062, -1062, 5806, -1062, -1062,
- 1172, -1062, 1019, -1062, -1062, 1021, 852, 852, 852, -1062,
- -1062, -1062, 1036, -1062, 1026, 1042, -1062, -1062, 369, -1062,
- 1028, 1034, 1039, 1041, 5064, 1032, 1043, 1788, -1062, 1911,
- 4954, 1257, 1257, 888, 888, 1441, 617, 617, -1062, 1363,
- 5678, 5743, 4478, 281, 281, 152, 152, 152, -1062, -1062,
- 370, 3205, -1062, 55, 1035, -1062, 3534, -1062, -1062, -1062,
- 5806, -1062, -1062, -1062, -1062, 5806, 5806, 1200, 1040, 1054,
- 1208, 1209, 1062, -1062, 1047, 1049, 1050, 1051, 4731, 1055,
- 152, 1788, -1062, -1062, 5806, 1057, -1062, 3534, -1062, -1062,
- -1062, -1062, 1067, -1062, 1058, 371, -1062, 4339, 4339, 4339,
- -1062, 4339, 1343, -1062, -1062, 5806, -1062, 1072, 1225, 1078,
- 372, 378, 380, 383, 5806, 852, -1062, 1064, -1062, -1062,
- -1062, -1062, -1062, 852, -1062, 1083, -1062, -1062
-};
-
-/* 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 yytype_int16 yydefact[] =
-{
- 0, 789, 0, 0, 0, 789, 5, 675, 671, 674,
- 785, 786, 677, 678, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 673, 679, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 681, 680,
- 0, 0, 0, 0, 0, 672, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 789, 0, 3, 609, 676,
- 307, 319, 317, 402, 318, 403, 405, 406, 407, 386,
- 0, 0, 418, 383, 417, 412, 409, 408, 411, 387,
- 0, 0, 388, 410, 420, 404, 789, 789, 4, 309,
- 310, 311, 369, 789, 789, 306, 399, 400, 401, 1,
- 0, 0, 7, 63, 789, 789, 0, 789, 789, 789,
- 789, 789, 0, 789, 0, 789, 0, 789, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 789, 335, 341, 342, 0, 0,
- 0, 634, 789, 789, 334, 0, 0, 789, 789, 0,
- 0, 631, 0, 0, 789, 789, 643, 641, 640, 642,
- 639, 307, 402, 403, 405, 406, 407, 418, 417, 412,
- 409, 408, 411, 410, 404, 0, 0, 567, 770, 771,
- 772, 780, 773, 776, 774, 778, 777, 775, 779, 759,
- 760, 0, 0, 789, 765, 758, 638, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 787, 788, 789, 789, 0, 384, 385, 419, 409,
- 414, 413, 416, 308, 0, 415, 0, 292, 789, 789,
- 789, 789, 789, 789, 789, 0, 345, 291, 347, 0,
- 372, 0, 0, 0, 68, 70, 0, 6, 789, 0,
- 566, 565, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 336, 0, 789, 0, 0, 667, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 670, 763, 766, 0, 789, 0, 761, 222, 652,
- 653, 654, 655, 656, 657, 658, 661, 662, 669, 0,
- 649, 650, 651, 659, 660, 647, 648, 644, 645, 646,
- 668, 666, 0, 0, 346, 348, 0, 0, 0, 789,
- 789, 789, 0, 294, 0, 296, 0, 295, 789, 789,
- 207, 789, 789, 789, 789, 0, 208, 211, 63, 789,
- 789, 781, 782, 783, 784, 0, 374, 770, 771, 772,
- 774, 349, 312, 351, 0, 789, 0, 789, 321, 332,
- 333, 0, 0, 0, 0, 323, 324, 325, 789, 789,
- 320, 0, 22, 789, 789, 789, 789, 789, 23, 789,
- 789, 789, 0, 0, 43, 789, 0, 0, 0, 0,
- 0, 0, 789, 789, 0, 0, 0, 789, 789, 0,
- 789, 789, 789, 0, 789, 789, 18, 8, 20, 0,
- 16, 17, 19, 78, 45, 616, 615, 633, 623, 618,
- 620, 621, 622, 0, 629, 0, 628, 684, 617, 685,
- 0, 687, 0, 688, 0, 691, 692, 693, 694, 695,
- 696, 697, 698, 699, 700, 701, 625, 0, 0, 0,
- 338, 337, 0, 624, 627, 0, 630, 0, 636, 637,
- 626, 619, 610, 568, 764, 0, 789, 789, 789, 103,
- 223, 0, 665, 664, 315, 314, 316, 789, 293, 0,
- 281, 789, 789, 789, 789, 789, 789, 299, 280, 298,
- 297, 789, 789, 789, 789, 789, 0, 789, 210, 789,
- 0, 564, 563, 380, 0, 377, 376, 371, 375, 0,
- 789, 789, 0, 64, 69, 751, 747, 750, 753, 754,
- 214, 0, 0, 0, 749, 755, 0, 757, 756, 0,
- 0, 0, 748, 0, 0, 0, 0, 0, 0, 0,
- 0, 215, 244, 218, 245, 702, 752, 63, 0, 322,
- 0, 789, 372, 0, 789, 60, 46, 57, 58, 59,
- 61, 789, 47, 160, 52, 0, 24, 789, 0, 50,
- 0, 0, 0, 0, 0, 0, 56, 789, 0, 27,
- 26, 25, 54, 49, 0, 164, 0, 163, 0, 62,
- 0, 21, 0, 0, 789, 51, 55, 344, 321, 0,
- 14, 0, 75, 0, 343, 72, 0, 0, 0, 0,
- 0, 339, 340, 635, 0, 632, 0, 762, 0, 111,
- 104, 113, 108, 112, 106, 0, 109, 0, 105, 110,
- 789, 663, 300, 789, 789, 789, 283, 285, 284, 789,
- 789, 789, 0, 0, 0, 789, 0, 789, 209, 212,
- 789, 789, 370, 313, 789, 354, 789, 353, 0, 0,
- 0, 0, 712, 0, 0, 0, 709, 0, 0, 720,
- 719, 718, 717, 0, 0, 716, 71, 217, 789, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 67, 328, 374, 326,
- 66, 48, 789, 44, 789, 0, 0, 0, 0, 0,
- 0, 0, 789, 0, 0, 789, 344, 321, 0, 343,
- 81, 0, 0, 395, 0, 86, 90, 0, 789, 789,
- 0, 0, 421, 229, 0, 77, 74, 0, 0, 0,
- 686, 689, 690, 0, 0, 789, 0, 0, 0, 0,
- 201, 789, 282, 288, 287, 286, 0, 0, 0, 0,
- 0, 789, 789, 789, 789, 789, 789, 789, 789, 789,
- 256, 0, 268, 789, 0, 0, 0, 789, 789, 0,
- 789, 789, 301, 381, 350, 0, 0, 356, 355, 789,
- 0, 0, 0, 789, 0, 0, 0, 0, 0, 0,
- 0, 746, 216, 219, 729, 730, 731, 732, 733, 734,
- 735, 738, 739, 745, 0, 726, 727, 728, 736, 737,
- 724, 725, 721, 722, 723, 744, 743, 0, 0, 330,
- 329, 331, 0, 53, 789, 391, 0, 0, 0, 0,
- 0, 0, 393, 389, 0, 0, 183, 184, 185, 169,
- 0, 170, 0, 0, 166, 171, 167, 789, 182, 165,
- 0, 83, 0, 398, 397, 0, 789, 0, 0, 0,
- 789, 789, 0, 789, 789, 789, 789, 789, 789, 0,
- 789, 246, 789, 92, 421, 224, 0, 0, 76, 0,
- 789, 0, 0, 789, 0, 0, 789, 0, 0, 0,
- 789, 789, 0, 73, 789, 789, 789, 613, 612, 614,
- 611, 789, 107, 114, 0, 0, 789, 421, 289, 789,
- 789, 789, 789, 789, 789, 258, 260, 259, 789, 789,
- 0, 789, 242, 257, 789, 789, 0, 270, 272, 271,
- 0, 0, 0, 789, 243, 302, 378, 0, 778, 0,
- 777, 0, 0, 357, 359, 767, 789, 0, 65, 711,
- 0, 0, 0, 0, 0, 708, 0, 714, 715, 703,
- 0, 742, 741, 327, 394, 789, 0, 0, 789, 0,
- 0, 0, 789, 0, 42, 789, 789, 789, 0, 174,
- 172, 0, 789, 789, 789, 789, 789, 789, 789, 789,
- 178, 82, 789, 0, 0, 0, 0, 0, 0, 0,
- 789, 789, 248, 250, 249, 789, 789, 98, 789, 247,
- 15, 789, 0, 0, 9, 0, 0, 0, 230, 422,
- 423, 232, 233, 789, 0, 236, 238, 235, 231, 789,
- 0, 189, 0, 127, 128, 129, 130, 131, 132, 135,
- 136, 137, 152, 140, 141, 142, 143, 144, 145, 146,
- 147, 148, 149, 150, 151, 156, 155, 139, 138, 124,
- 126, 125, 133, 134, 122, 123, 119, 120, 121, 118,
- 0, 0, 117, 789, 190, 0, 0, 0, 0, 197,
- 789, 199, 0, 0, 79, 186, 789, 0, 115, 789,
- 202, 0, 290, 0, 0, 0, 789, 263, 262, 261,
- 267, 0, 0, 269, 275, 274, 273, 279, 0, 382,
- 0, 362, 0, 361, 0, 360, 768, 0, 0, 0,
- 769, 789, 358, 0, 0, 713, 0, 710, 0, 740,
- 789, 0, 0, 0, 0, 0, 204, 0, 0, 0,
- 789, 0, 789, 179, 789, 181, 159, 157, 162, 158,
- 168, 175, 0, 789, 789, 789, 789, 0, 176, 220,
- 0, 84, 396, 789, 88, 0, 0, 789, 100, 789,
- 253, 252, 251, 789, 0, 0, 225, 421, 0, 789,
- 789, 227, 228, 425, 426, 430, 427, 435, 428, 429,
- 431, 432, 433, 434, 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, 473, 474, 475, 476, 477, 478, 479, 480, 481,
- 482, 483, 484, 485, 486, 487, 488, 489, 511, 490,
- 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
- 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
- 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
- 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
- 532, 533, 534, 535, 536, 537, 538, 539, 789, 556,
- 557, 558, 549, 561, 545, 546, 544, 551, 552, 540,
- 541, 542, 543, 550, 548, 555, 553, 559, 554, 547,
- 560, 424, 0, 234, 237, 0, 193, 789, 154, 153,
- 187, 192, 191, 196, 200, 789, 0, 223, 0, 0,
- 116, 203, 682, 789, 789, 789, 264, 789, 789, 276,
- 789, 789, 379, 368, 367, 366, 365, 364, 363, 352,
- 0, 0, 0, 0, 392, 0, 0, 34, 205, 0,
- 0, 0, 0, 390, 41, 177, 180, 173, 789, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 221, 569, 0, 789, 789, 0, 94, 789,
- 789, 254, 0, 789, 789, 0, 10, 0, 0, 0,
- 239, 789, 240, 194, 188, 0, 789, 80, 421, 789,
- 789, 789, 0, 265, 0, 277, 706, 705, 707, 704,
- 0, 0, 0, 0, 28, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 576, 0, 584, 582,
- 581, 583, 580, 0, 0, 579, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 85, 87,
- 0, 96, 789, 91, 0, 789, 255, 789, 226, 13,
- 11, 562, 0, 789, 195, 0, 789, 789, 789, 789,
- 789, 37, 789, 35, 0, 0, 38, 40, 0, 30,
- 0, 0, 0, 0, 0, 0, 0, 0, 608, 593,
- 594, 595, 596, 597, 598, 599, 600, 601, 607, 0,
- 590, 591, 592, 588, 589, 585, 586, 587, 606, 605,
- 0, 0, 789, 789, 0, 789, 99, 93, 12, 241,
- 789, 683, 305, 304, 303, 789, 789, 0, 0, 0,
- 0, 0, 0, 578, 0, 0, 0, 0, 575, 0,
- 570, 0, 604, 603, 789, 0, 789, 101, 198, 266,
- 278, 205, 0, 29, 0, 0, 31, 0, 0, 0,
- 577, 0, 602, 89, 789, 789, 36, 0, 0, 0,
- 0, 0, 0, 0, 789, 789, 39, 0, 32, 573,
- 572, 574, 571, 789, 95, 0, 97, 33
-};
-
-/* YYPGOTO[NTERM-NUM]. */
-static const yytype_int16 yypgoto[] =
-{
- -1062, -1062, -525, -1062, -1062, 4, -1062, -1062, 636, -428,
- -1062, -354, 210, -358, -1062, -426, -1062, -1062, -153, -1062,
- -1062, -208, -1062, -1062, -1062, -1062, 620, -1062, -1062, -1062,
- -1062, -1062, -448, -1062, -1062, -414, -1062, -1062, -1062, -1062,
- 209, -412, -746, -1062, -886, -775, -311, -406, -1062, -142,
- -1062, -644, -485, -1062, -731, -1061, -1062, -381, 537, -844,
- -643, 258, -39, -96, -77, -57, -236, -539, 633, 156,
- -235, -1062, -223, -1062, -1062, -1062, -1062, 257, -222, -1062,
- -1062, -521, -1062, -1062, -27, -22, -1062, -1062, -1062, -1062,
- -28, -47, -1062, -1062, -898, -1062, -92, -1062, -623, -110,
- -60, 571, 1273, 285, 692, -1062, -1062, 943, -822, 1127,
- -116, -395, -1
-};
-
-/* YYDEFGOTO[NTERM-NUM]. */
-static const yytype_int16 yydefgoto[] =
-{
- 0, 4, 5, 268, 1073, 1074, 446, 779, 447, 448,
- 607, 449, 374, 263, 264, 450, 787, 781, 953, 631,
- 912, 1051, 642, 916, 1456, 920, 643, 1071, 1542, 1603,
- 1233, 1460, 508, 1133, 1208, 451, 628, 903, 904, 905,
- 906, 907, 954, 1395, 955, 799, 1195, 375, 376, 580,
- 581, 1218, 327, 938, 785, 1084, 1085, 377, 583, 929,
- 975, 987, 255, 256, 96, 97, 644, 151, 645, 98,
- 99, 550, 100, 551, 696, 836, 837, 1003, 101, 259,
- 102, 547, 543, 544, 103, 104, 452, 1032, 1025, 453,
- 105, 106, 107, 108, 939, 940, 1079, 1381, 540, 269,
- 270, 1630, 187, 68, 584, 585, 202, 203, 1004, 1005,
- 819, 69, 113
-};
-
-/* 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 yytype_int16 yytable[] =
-{
- 6, 258, 586, 233, 186, 272, 603, 274, 275, 276,
- 277, 278, 625, 280, 627, 282, 582, 284, 154, 152,
- 536, 657, 1382, 234, 153, 694, 1052, 702, 693, 1147,
- 404, 405, 917, 918, 301, 918, 1072, 911, 554, 240,
- 241, 242, 818, 406, 407, 538, 245, 310, 311, 231,
- 110, 232, 111, 324, 317, 318, 995, 717, 806, 595,
- 596, 597, 598, 599, 205, 600, 602, 604, 236, 1151,
- 370, 609, 681, 807, 370, 325, 371, 1059, 616, 326,
- 1062, 1063, 1064, 622, 623, -781, 626, 629, 630, 687,
- 635, 636, 762, 109, 981, 257, 257, 381, 382, 383,
- 186, 658, 216, 110, 116, 111, 110, 110, 111, 111,
- 110, 798, 111, 271, 271, 117, 271, 271, 271, 271,
- 271, 320, 271, -782, 271, 231, 271, 232, 110, 728,
- 111, 118, 688, 240, 241, 242, 245, 354, 355, -783,
- 321, 237, 472, 271, 386, 393, 110, 110, 111, 111,
- 110, 119, 111, 363, 365, 367, 271, 271, 689, -781,
- 773, 473, -781, 271, 271, 110, 216, 111, 326, 352,
- 976, 977, 120, 1057, 980, 586, 1171, 1173, 1175, 1141,
- 602, 609, 110, 993, 111, 320, 1525, 539, -784, 919,
- 1148, 919, 240, 996, 698, 489, 997, -782, 121, 718,
- -782, 1091, 328, 1134, 512, 110, 1137, 111, 384, 122,
- 362, 364, 366, -783, 405, 112, -783, 1230, 617, 1201,
- 185, 1231, 1232, 372, 1144, 1217, 406, 407, 373, 884,
- 1067, 1068, 257, 257, 123, 834, 1138, 114, 410, 408,
- 981, 228, 229, 230, 409, 1239, 385, 751, 257, 257,
- 257, 1139, 1140, 378, 932, 115, 124, 892, 320, 966,
- 681, 808, -784, 1240, 1049, -784, 125, 454, 740, 741,
- 742, 110, 273, 111, 126, 1024, 1070, 851, 279, 1419,
- 281, 320, 283, 127, 285, 286, 287, 288, 289, 290,
- 291, 292, 293, 294, 295, 296, 297, 298, 299, 300,
- 957, 225, 226, 227, 271, 228, 229, 230, 681, 809,
- 1225, 1424, 309, 260, 261, 1525, 313, 128, 314, 315,
- 129, 1221, 527, 586, 509, 1535, 1536, 1537, 130, 529,
- 530, 1157, 216, 982, 1433, 1158, 1159, 582, 548, 1465,
- 320, 1, 2, 3, 1386, 994, 320, 961, 1413, -2,
- 1414, 131, 1415, 320, 132, 1416, 1417, 1418, 1161, 958,
- 528, 1023, 306, 307, 320, 959, 133, 528, 528, 1192,
- 1168, 1399, 960, 454, 134, 188, 189, 190, 542, 545,
- 782, 156, 783, 1021, 784, 1461, 162, 320, 1193, 1391,
- 1392, 405, 1202, 1204, 769, 405, 587, 110, 883, 111,
- 358, 976, 977, 406, 407, 980, 1486, 406, 407, 320,
- 1552, 320, 454, 454, 454, 454, 454, 135, 454, 454,
- 454, 410, 408, 320, 454, 136, 1149, 409, 1487, 137,
- 1488, 454, 267, 10, 191, 11, 454, 454, 138, 454,
- 454, 454, 1489, 454, 454, 1234, 139, 192, 193, 140,
- 1532, 1533, 1534, 141, 1535, 1536, 1537, 142, 361, 685,
- 488, 1491, 368, 369, 143, 223, 224, 225, 226, 227,
- 1143, 228, 229, 230, 1076, 1077, 748, 393, 672, 686,
- 1492, 1181, 1495, 676, 677, 678, 194, 195, 1035, 196,
- 1036, 144, 682, 683, 684, 197, 1498, 198, 157, 1033,
- 1190, 1496, 548, 981, 1160, 328, 378, 1200, 214, 215,
- 1054, 993, 1167, 1406, 1058, 1499, 528, 1396, 714, 216,
- 158, 528, 528, 528, 320, 163, 1621, 320, 1658, 320,
- 528, 528, 528, 454, 454, 320, 509, 320, 154, 152,
- 320, 963, 164, 1578, 153, 1622, 1632, 1659, 1669, 6,
- 697, -102, 319, -102, 1670, -102, 1671, 326, 1435, 1672,
- 1436, 165, 778, 235, 1153, 1154, 1155, 1220, 1052, 517,
- 518, 1157, 1158, 1159, 188, 189, 190, 213, 214, 215,
- 1555, 531, 532, 533, 1228, 1068, 788, 789, 244, 216,
- 266, 188, 189, 190, 793, 302, 794, 304, 410, 408,
- 454, 359, 410, 408, 409, 553, 454, 305, 409, 1206,
- 782, 1207, 783, -102, 1142, -102, 6, -102, 592, 593,
- 1177, 1178, 1179, 1209, 1237, 1238, 648, 312, 649, 380,
- 650, 775, 395, 191, 1139, 1140, 803, 379, -280, 1473,
- 804, 805, 455, 618, 396, 714, 192, 193, 397, 463,
- 191, 1525, 223, 224, 225, 226, 227, 320, 228, 229,
- 230, 465, 930, 192, 193, 1235, 1139, 1140, 1226, 800,
- 456, 956, 457, 934, 528, 935, 936, 937, 528, 528,
- 542, 877, 458, 626, 820, 194, 195, 459, 196, 1139,
- 1140, 1393, 460, 470, 197, 838, 198, 1139, 1140, 1457,
- 921, 461, 194, 195, 462, 196, 464, 466, 467, 468,
- 469, 197, 492, 198, 381, 382, 383, 945, 670, 471,
- 474, 946, 223, 224, 225, 226, 227, 475, 228, 229,
- 230, 675, 476, 1012, 713, 679, 680, 908, 477, -281,
- 497, 199, 478, 479, 480, 200, 745, 504, 481, 482,
- 201, 454, 483, 6, 381, 382, 383, 1041, 484, 822,
- 485, 1042, 968, 486, 909, 493, 494, 947, 496, 498,
- 154, 152, 500, 501, 507, 1455, 153, 931, 6, 1459,
- 514, 1612, 1613, 1614, 1530, 1531, 1532, 1533, 1534, 516,
- 1535, 1536, 1537, 549, 509, 1406, 956, 537, -206, 552,
- 528, 746, 588, 956, 750, 930, 590, 1043, 930, 930,
- 930, 820, 820, 820, 591, 606, 820, 328, 610, 611,
- 612, 613, 614, 615, 948, 384, 619, 1462, 620, 328,
- 800, 956, 621, 956, 624, 548, 956, 646, 647, 673,
- 654, 652, 271, -282, 774, 695, 246, 653, 247, 681,
- 248, 655, 656, 692, 949, 840, 841, 842, 690, 844,
- 699, 846, 700, 847, 848, 384, 701, 703, 950, 708,
- 1150, 1044, 908, 951, 908, 707, 716, 765, 952, -213,
- 776, 786, 797, 801, 802, 790, 798, 791, 835, 792,
- 1674, 795, -373, 839, 1045, 843, 249, 831, 1676, 845,
- 832, 833, 850, 879, 112, 882, 820, 881, 1046, 885,
- 1522, 1523, 1524, 1047, 886, 378, 887, 888, 1048, 378,
- 931, 889, 1525, 931, 931, 931, 890, 891, 893, 910,
- 933, 913, 914, 967, 973, 915, 984, 154, 152, 1080,
- 956, 969, 1087, 153, 830, 930, -290, 1006, 1010, 930,
- 930, 1007, 970, 800, 328, 1479, 1480, 1481, 971, 821,
- 250, 822, 972, 823, 1011, 257, 1009, 1013, 1015, 378,
- 378, 378, 112, 820, 956, 1016, 1017, 820, 820, 1026,
- 542, 1027, 1028, 251, 1029, 1030, 1031, 381, 382, 383,
- 810, 1037, 542, 1034, 811, 1038, 1055, 252, 1056, 1060,
- 586, 1482, 253, 1078, 1484, 6, 1081, 254, 1082, 824,
- 908, 1089, 981, 1180, 582, 993, 1547, 1183, 1191, 956,
- 956, 974, 1185, 1184, 6, 978, 979, 1196, 1186, 983,
- 1194, 6, 1187, 986, 820, 820, 454, 990, 991, 1188,
- 812, 1197, 820, 820, 820, 1212, 1198, 820, 1219, 1008,
- 1540, 328, 1199, 1401, 1544, 1530, 1531, 1532, 1533, 1534,
- 931, 1535, 1536, 1537, 931, 931, 1213, 542, 1222, 1223,
- 378, 1053, 1224, 825, 1241, 1227, 1068, 1236, 1242, 1383,
- 1384, 1387, 1087, 988, 989, 1388, 1389, 992, 1398, 1400,
- 1408, 1402, 1407, 1403, 112, 1404, 826, 1606, 384, 1410,
- 1405, 1411, 1425, 1426, 813, 1610, 1427, 1428, 1429, 1430,
- 827, 1615, 1616, 930, 1434, 828, 1431, 519, 1432, 520,
- 829, 521, 1454, 1420, 1421, 1458, 1422, 814, 1423, 1467,
- 1468, 1463, 1470, 1061, 1464, 1478, 1604, 1065, 1066, 542,
- 1069, 815, 112, 1476, 1490, 800, 816, 1493, 257, 1494,
- 1501, 817, 1500, 1502, 1634, 820, 1090, 1637, 1497, 1503,
- 1135, 1136, 1507, 1541, 1548, 1050, 1145, 522, 1545, 1561,
- 1549, 1146, 1550, 1562, 1563, 1553, 1559, 1560, 1564, 1152,
- 1565, 1566, 1567, 1156, 1568, 1569, 1574, 1608, 1655, 1577,
- 1602, 1605, 204, 1617, 1162, 1163, 1609, 1635, 1611, 1620,
- 1624, 1219, 1619, 1219, 1623, 1625, 1664, 1626, 1628, 1629,
- 1641, 1636, 1643, 820, 820, 820, 1642, 243, 1644, 1645,
- 1646, 1647, 509, 1648, 1649, 1656, 509, 1650, 931, 1651,
- 1666, 523, 378, 1654, 1657, 1667, 1668, 265, 271, 271,
- 1675, 1677, 1466, 753, 1164, 1477, 1538, 1210, 1165, 1166,
- 768, 1618, 1214, 1475, 524, 853, 1215, 1216, 381, 382,
- 383, 922, 706, 770, 1182, 923, 1469, 506, 525, 956,
- 1229, 0, 0, 526, 0, 67, 303, 1520, 1521, 1522,
- 1523, 1524, 956, 0, 0, 0, 0, 0, 0, 0,
- 0, 1525, 0, 1203, 1205, 0, 0, 0, 0, 1385,
- 0, 0, 988, 989, 0, 0, 992, 0, 0, 0,
- 0, 924, 0, 0, 0, 0, 0, 0, 0, 0,
- 155, 0, 0, 0, 0, 0, 161, 322, 323, 0,
- 0, 0, 166, 167, 168, 169, 170, 0, 956, 206,
- 0, 0, 0, 1390, 0, 0, 188, 189, 190, 0,
- 0, 0, 0, 0, 0, 350, 0, 1080, 0, 1516,
- 1517, 1518, 1519, 1520, 1521, 1522, 1523, 1524, 1437, 384,
- 0, 0, 0, 0, 360, 925, 0, 1525, 0, 1516,
- 1517, 1518, 1519, 1520, 1521, 1522, 1523, 1524, 392, 394,
- 1514, 112, 0, 0, 587, 0, 0, 1525, 926, 0,
- 112, 0, 509, 509, 509, 191, 378, 0, 0, 378,
- 112, 0, 927, 0, 0, 0, 0, 928, 192, 193,
- 1409, 0, 0, 1438, 1530, 1531, 1532, 1533, 1534, 0,
- 1535, 1536, 1537, 490, 491, 0, 316, 820, 0, 495,
- 0, 0, 0, 0, 0, 1514, 0, 0, 0, 0,
- 0, 204, 0, 0, 0, 378, 0, 194, 195, 378,
- 196, 0, 0, 509, 1523, 1524, 197, 0, 198, 0,
- 1087, 0, 1164, 1165, 1166, 1525, 1600, 0, 0, 1001,
- 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
- 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
- 349, 0, 1453, 353, 1526, 1527, 1528, 1529, 357, 0,
- 1530, 1531, 1532, 1533, 1534, 0, 1535, 1536, 1537, 0,
- 0, 0, 1631, 265, 1526, 1527, 1528, 1529, 0, 589,
- 1530, 1531, 1532, 1533, 1534, 0, 1535, 1536, 1537, 411,
- 0, 378, 0, 0, 509, 0, 0, 0, 0, 0,
- 0, 0, 509, 0, 0, 800, 800, 800, 509, 509,
- 0, 1196, 0, 0, 0, 0, 0, 0, 0, 0,
- 634, 0, 0, 0, 0, 487, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 1660, 1661, 1662,
- 0, 1663, 502, 503, 0, 0, 0, 1474, 0, 510,
- 0, 509, 378, 0, 509, 0, 1513, 0, 1530, 1531,
- 1532, 1533, 1534, 0, 1535, 1536, 1537, 0, 1483, 0,
- 0, 1485, 0, 0, 209, 210, 211, 212, 213, 214,
- 215, 0, 322, 73, 0, 509, 75, 76, 77, 78,
- 216, 188, 189, 190, 0, 0, 0, 674, 0, 238,
- 0, 0, 541, 509, 0, 0, 1570, 1571, 1572, 1573,
- 0, 1575, 0, 1576, 800, 1539, 0, 0, 85, 1543,
- 691, 0, 800, 1546, 0, 0, 0, 0, 0, 265,
- 0, 0, 0, 0, 0, 239, 1554, 0, 0, 1556,
- 1557, 1558, 0, 0, 0, 605, 1409, 0, 0, 0,
- 191, 0, 0, 0, 0, 0, 0, 87, 88, 0,
- 0, 0, 0, 192, 193, 0, 0, 0, 0, 747,
- 749, 0, 0, 0, 93, 0, 0, 0, 1453, 95,
- 1453, 1453, 1453, 1453, 1453, 755, 1453, 756, 757, 758,
- 759, 760, 761, 0, 0, 763, 0, 0, 0, 0,
- 0, 0, 194, 195, 0, 196, 0, 1607, 0, 771,
- 772, 197, 0, 198, 0, 0, 0, 0, 780, 502,
- 220, 221, 222, 223, 224, 225, 226, 227, 0, 228,
- 229, 230, 0, 0, 671, 0, 0, 0, 1452, 0,
- 0, 7, 8, 9, 10, 505, 11, 12, 13, 0,
- 201, 1453, 1453, 1453, 1453, 1453, 1453, 1453, 1453, 1453,
- 1453, 1453, 1453, 1453, 1453, 1453, 1453, 1453, 1453, 1453,
- 1638, 0, 0, 0, 0, 1639, 1640, 209, 210, 211,
- 212, 213, 214, 215, 0, 0, 0, 0, 0, 1439,
- 0, 0, 0, 216, 1653, 0, 0, 709, 710, 711,
- 712, 0, 715, 0, 0, 1440, 0, 0, 0, 0,
- 1441, 744, 1453, 0, 0, 1665, 0, 875, 0, 24,
- 25, 0, 0, 0, 1673, 27, 0, 0, 0, 29,
- 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
- 40, 41, 42, 43, 44, 0, 0, 764, 208, 209,
- 210, 211, 212, 213, 214, 215, 0, 48, 0, 49,
- 0, 0, 0, 1453, 1442, 216, 1453, 0, 0, 1443,
- 0, 0, 1444, 0, 964, 0, 0, 55, 1517, 1518,
- 1519, 1520, 1521, 1522, 1523, 1524, 0, 0, 796, 0,
- 0, 0, 0, 0, 0, 1525, 0, 0, 0, 985,
- 0, 0, 1445, 0, 541, 1446, 1447, 1448, 0, 0,
- 1449, 0, 1450, 65, 0, 0, 1451, 0, 0, 0,
- 0, 0, 1014, 0, 221, 222, 223, 224, 225, 226,
- 227, 849, 228, 229, 230, 0, 0, 0, 0, 0,
- 0, 0, 854, 855, 856, 857, 858, 859, 860, 861,
- 862, 863, 864, 865, 866, 867, 868, 869, 870, 871,
- 872, 873, 874, 0, 1506, 878, 1508, 1509, 1510, 1511,
- 1512, 0, 1515, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 1040, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 218, 219, 220, 221, 222, 223, 224,
- 225, 226, 227, 0, 228, 229, 230, 944, 0, 0,
- 387, 388, 389, 1075, 0, 555, 556, 557, 10, 0,
- 11, 558, 559, 1527, 1528, 1529, 0, 560, 1530, 1531,
- 1532, 1533, 1534, 0, 1535, 1536, 1537, 1579, 1580, 1581,
- 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 1590, 1591,
- 1592, 1593, 1594, 1595, 1596, 1597, 0, 0, 0, 0,
- 110, 0, 111, 561, 0, 0, 0, 0, 0, 191,
- 0, 0, 0, 1019, 0, 0, 0, 0, 1176, 562,
- 0, 0, 192, 193, 563, 0, 0, 0, 0, 0,
- 0, 0, 546, 564, 565, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 1211, 0, 0, 0,
- 0, 390, 195, 0, 196, 0, 0, 0, 566, 0,
- 197, 567, 198, 568, 0, 0, 73, 0, 569, 75,
- 76, 77, 78, 570, 0, 0, 571, 0, 0, 0,
- 0, 572, 1652, 0, 573, 0, 391, 7, 8, 9,
- 10, 0, 11, 12, 13, 14, 1086, 0, 0, 0,
- 0, 85, 0, 0, 0, 0, 574, 0, 0, 575,
- 576, 0, 0, 0, 577, 0, 578, 0, 239, 0,
- 579, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 541, 15, 0, 0, 0, 16,
- 87, 88, 17, 18, 19, 20, 541, 0, 0, 0,
- 1169, 21, 0, 941, 942, 22, 23, 93, 0, 0,
- 0, 0, 95, 0, 0, 24, 25, 26, 1019, 0,
- 0, 27, 0, 1189, 28, 29, 30, 31, 32, 33,
- 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
- 44, 45, 0, 0, 0, 0, 0, 0, 0, 0,
- 46, 0, 47, 48, 0, 49, 0, 0, 0, 0,
- 50, 0, 0, 51, 52, 53, 0, 0, 54, 0,
- 0, 541, 0, 55, 0, 0, 56, 0, 0, 0,
- 57, 0, 0, 0, 0, 58, 1086, 0, 0, 0,
- 943, 0, 0, 0, 0, 1075, 0, 0, 59, 0,
- 0, 60, 61, 62, 0, 0, 63, 0, 64, 65,
- 0, 0, 66, 0, 0, 1243, 1244, 1245, 1246, 1247,
- 1248, 1249, 1250, 1251, 1252, 1253, 0, 1254, 1255, 1256,
- 1257, 1258, 1259, 1260, 1261, 1262, 1263, 1264, 1265, 0,
- 0, 1394, 0, 541, 0, 1397, 1266, 1267, 1268, 1269,
- 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279,
- 1280, 1281, 1282, 1283, 1284, 0, 0, 1285, 1286, 1287,
- 1288, 1289, 1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297,
- 1298, 1299, 1300, 1301, 1302, 1303, 0, 1304, 0, 1305,
- 1306, 1307, 1308, 1309, 1310, 1311, 1312, 1313, 1314, 0,
- 1315, 1316, 1317, 207, 208, 209, 210, 211, 212, 213,
- 214, 215, 0, 0, 0, 0, 0, 0, 0, 1318,
- 0, 216, 0, 0, 0, 0, 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, 0, 637, 638, 1358, 1359,
- 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369,
- 1370, 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378, 1551,
- 1379, 1380, 0, 73, 0, 0, 75, 76, 77, 78,
- 0, 0, 0, 0, 0, 188, 189, 190, 399, 0,
- 0, 73, 400, 0, 75, 76, 77, 78, 79, 0,
- 0, 387, 388, 389, 401, 0, 0, 82, 85, 0,
- 0, 83, 0, 0, 0, 0, 0, 0, 0, 84,
- 0, 0, 0, 0, 0, 239, 85, 0, 217, 218,
- 219, 220, 221, 222, 223, 224, 225, 226, 227, 0,
- 228, 229, 230, 86, 191, 0, 513, 87, 88, 0,
- 0, 0, 0, 0, 0, 0, 639, 192, 193, 0,
- 191, 0, 0, 0, 93, 87, 88, 1472, 0, 95,
- 0, 89, 1598, 192, 193, 0, 0, 0, 0, 402,
- 403, 92, 93, 0, 0, 94, 0, 95, 0, 0,
- 0, 0, 640, 0, 0, 0, 194, 195, 0, 196,
- 0, 0, 0, 0, 0, 197, 0, 198, 641, 0,
- 0, 1627, 390, 195, 0, 196, 0, 0, 0, 0,
- 0, 197, 262, 198, 1243, 1244, 1245, 1246, 1247, 1248,
- 1249, 1250, 1251, 1252, 1253, 0, 1254, 1255, 1256, 1257,
- 1258, 1259, 1260, 1261, 1262, 1263, 1264, 1265, 0, 0,
- 385, 0, 0, 0, 1086, 1266, 1267, 1268, 1269, 1270,
- 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 1280,
- 1281, 1282, 1283, 1284, 0, 0, 1285, 1286, 1287, 1288,
- 1289, 1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298,
- 1299, 1300, 1301, 1302, 1303, 0, 1304, 0, 1305, 1306,
- 1307, 1308, 1309, 1310, 1311, 1312, 1313, 1314, 0, 1315,
- 1316, 1317, 0, 0, 0, 0, 0, 0, 0, 0,
- 1601, 0, 0, 0, 0, 0, 0, 0, 1318, 0,
- 0, 0, 0, 0, 0, 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, 0, 0, 0, 1358, 1359, 1360,
- 1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 1370,
- 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378, 0, 1379,
- 1380, 7, 8, 9, 10, 0, 11, 12, 13, 171,
- 71, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 207, 208, 209, 210, 211, 212, 213,
- 214, 215, 0, 0, 0, 0, 0, 0, 0, 15,
- 72, 216, 0, 172, 74, 0, 173, 174, 175, 176,
- 79, 80, 0, 0, 0, 21, 81, 0, 0, 177,
- 23, 0, 0, 83, 0, 0, 0, 0, 0, 24,
- 25, 178, 0, 0, 0, 27, 0, 0, 179, 29,
- 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
- 40, 41, 42, 43, 44, 180, 0, 0, 0, 0,
- 0, 0, 0, 0, 46, 0, 47, 48, 0, 49,
- 0, 0, 0, 0, 50, 0, 0, 181, 182, 53,
- 0, 0, 54, 89, 0, 0, 0, 55, 0, 0,
- 56, 90, 91, 92, 183, 0, 0, 94, 0, 184,
- 7, 8, 9, 10, 0, 11, 12, 13, 398, 0,
- 0, 0, 59, 0, 0, 60, 61, 62, 0, 0,
- 63, 0, 64, 65, 0, 0, 66, 0, 217, 218,
- 219, 220, 221, 222, 223, 224, 225, 226, 227, 0,
- 228, 229, 230, 0, 0, 0, 1022, 0, 15, 399,
- 0, 0, 172, 400, 0, 173, 174, 175, 176, 79,
- 0, 0, 0, 0, 21, 401, 0, 0, 177, 23,
- 0, 0, 83, 0, 0, 0, 0, 0, 24, 25,
- 178, 0, 0, 0, 27, 0, 0, 179, 29, 30,
- 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
- 41, 42, 43, 44, 180, 0, 0, 0, 0, 0,
- 0, 0, 0, 46, 0, 47, 48, 0, 49, 0,
- 0, 0, 0, 50, 0, 0, 181, 182, 53, 0,
- 0, 54, 89, 0, 0, 0, 55, 0, 0, 56,
- 402, 403, 92, 183, 0, 0, 94, 0, 184, 0,
- 7, 8, 9, 10, 0, 11, 12, 13, 14, 0,
- 0, 59, 159, 0, 60, 61, 62, 0, 0, 63,
- 0, 64, 65, 0, 0, 66, 0, 0, 0, 0,
- 0, 207, 208, 209, 210, 211, 212, 213, 214, 215,
- 0, 0, 0, 0, 0, 0, 0, 0, 15, 216,
- 0, 0, 16, 0, 0, 17, 18, 19, 20, 0,
- 0, 0, 0, 0, 21, 0, 0, 0, 22, 23,
- 0, 0, 0, 0, 0, 0, 0, 0, 24, 25,
- 26, 0, 0, 0, 27, 0, 0, 28, 29, 30,
- 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
- 41, 42, 43, 44, 45, 0, 0, 0, 0, 0,
- 0, 0, 0, 46, 0, 47, 48, 0, 49, 0,
- 0, 0, 0, 50, 0, 0, 51, 52, 53, 0,
- 0, 54, 0, 0, 0, 0, 55, 0, 0, 56,
- 0, 0, 0, 57, 7, 8, 9, 10, 58, 11,
- 12, 13, 14, 0, 0, 0, 0, 0, 0, 0,
- 0, 59, 0, 0, 60, 61, 62, 0, 0, 63,
- 0, 160, 65, 0, 0, 66, 217, 218, 219, 220,
- 221, 222, 223, 224, 225, 226, 227, 0, 228, 229,
- 230, 0, 15, 0, 1633, 0, 16, 0, 0, 17,
- 18, 19, 20, 0, 0, 0, 0, 0, 21, 188,
- 189, 190, 22, 23, 0, 0, 0, 0, 0, 0,
- 0, 0, 24, 25, 26, 0, 0, 0, 27, 0,
- 0, 28, 29, 30, 31, 32, 33, 34, 35, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 0,
- 0, 0, 0, 0, 0, 0, 0, 46, 0, 47,
- 48, 0, 49, 0, 0, 0, 0, 50, 191, 0,
- 51, 52, 53, 0, 0, 54, 0, 0, 0, 0,
- 55, 192, 193, 56, 0, 0, 0, 57, 7, 8,
- 9, 10, 58, 11, 12, 13, 14, 0, 0, 0,
- 0, 0, 0, 0, 0, 59, 0, 0, 60, 61,
- 62, 0, 0, 63, 0, 64, 65, 351, 0, 66,
- 194, 195, 0, 196, 0, 0, 0, 0, 0, 197,
- 0, 198, 0, 0, 0, 0, 15, 356, 0, 0,
- 16, 0, 0, 17, 18, 19, 20, 0, 0, 0,
- 0, 0, 21, 0, 0, 754, 22, 23, 0, 0,
- 0, 659, 0, 0, 0, 0, 24, 25, 26, 0,
- 0, 0, 27, 0, 0, 28, 29, 30, 31, 32,
- 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
- 43, 44, 45, 0, 0, 0, 0, 0, 0, 0,
- 0, 46, 0, 47, 48, 0, 49, 660, 0, 661,
- 0, 50, 0, 0, 51, 52, 53, 0, 0, 54,
- 0, 0, 0, 0, 55, 0, 662, 56, 0, 0,
- 0, 57, 7, 8, 9, 10, 58, 11, 12, 13,
- 14, 0, 0, 0, 0, 0, 0, 0, 0, 59,
- 0, 0, 60, 61, 62, 0, 0, 63, 663, 64,
- 65, 664, 665, 66, 0, 666, 0, 0, 207, 208,
- 209, 210, 211, 212, 213, 214, 215, 0, 0, 0,
- 15, 743, 667, 0, 16, 0, 216, 17, 18, 19,
- 20, 0, 0, 0, 668, 0, 21, 0, 0, 0,
- 22, 23, 0, 0, 0, 0, 0, 0, 669, 0,
- 24, 25, 26, 0, 0, 0, 27, 0, 0, 28,
- 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
- 39, 40, 41, 42, 43, 44, 45, 0, 0, 0,
- 0, 0, 0, 0, 0, 46, 0, 47, 48, 0,
- 49, 0, 0, 0, 0, 50, 0, 0, 51, 52,
- 53, 0, 0, 54, 0, 0, 0, 0, 55, 0,
- 0, 56, 0, 0, 0, 57, 7, 8, 9, 10,
- 58, 11, 12, 13, 14, 0, 0, 0, 0, 0,
- 0, 0, 0, 59, 0, 0, 60, 61, 62, 0,
- 0, 63, 0, 64, 65, 0, 0, 66, 0, 0,
- 0, 511, 0, 217, 218, 219, 220, 221, 222, 223,
- 224, 225, 226, 227, 15, 228, 229, 230, 16, 0,
- 0, 17, 18, 19, 20, 0, 0, 0, 0, 0,
- 21, 0, 0, 0, 22, 23, 0, 0, 0, 0,
- 0, 0, 0, 0, 24, 25, 26, 0, 0, 0,
- 27, 0, 0, 28, 29, 30, 31, 32, 33, 34,
- 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
- 45, 0, 0, 0, 0, 0, 0, 0, 0, 46,
- 0, 47, 48, 0, 49, 0, 0, 0, 0, 50,
- 0, 0, 51, 52, 53, 0, 0, 54, 0, 0,
- 0, 0, 55, 0, 0, 56, 0, 0, 0, 57,
- 7, 8, 9, 10, 58, 11, 12, 13, 14, 0,
- 0, 0, 0, 0, 0, 0, 0, 59, 0, 0,
- 60, 61, 62, 0, 0, 63, 0, 64, 65, 876,
- 0, 66, 0, 0, 0, 0, 207, 208, 209, 210,
- 211, 212, 213, 214, 215, 0, 0, 0, 15, 0,
- 0, 0, 16, 0, 216, 17, 18, 19, 20, 0,
- 0, 0, 0, 0, 21, 0, 0, 0, 22, 23,
- 0, 0, 0, 0, 0, 0, 0, 0, 24, 25,
- 26, 0, 0, 0, 27, 0, 0, 28, 29, 30,
- 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
- 41, 42, 43, 44, 45, 0, 0, 0, 0, 0,
- 0, 0, 0, 46, 0, 47, 48, 0, 49, 0,
- 0, 0, 0, 50, 0, 0, 51, 52, 53, 0,
- 0, 54, 0, 0, 0, 0, 55, 0, 0, 56,
- 0, 0, 0, 57, 7, 8, 9, 10, 58, 11,
- 12, 13, 14, 1083, 0, 0, 0, 0, 0, 0,
- 0, 59, 0, 0, 60, 61, 62, 0, 0, 63,
- 0, 64, 65, 0, 0, 66, 0, 0, 0, 1020,
- 0, 217, 218, 219, 220, 221, 222, 223, 224, 225,
- 226, 227, 15, 228, 229, 230, 16, 0, 0, 17,
- 18, 19, 20, 0, 0, 0, 0, 0, 21, 0,
- 0, 0, 22, 23, 0, 0, 0, 0, 0, 0,
- 0, 0, 24, 25, 26, 0, 0, 0, 27, 0,
- 0, 28, 29, 30, 31, 32, 33, 34, 35, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 0,
- 0, 0, 0, 0, 0, 0, 0, 46, 0, 47,
- 48, 0, 49, 0, 0, 0, 0, 50, 0, 0,
- 51, 52, 53, 0, 0, 54, 0, 0, 0, 0,
- 55, 0, 0, 56, 0, 0, 0, 57, 7, 8,
- 9, 10, 58, 11, 12, 13, 14, 1471, 0, 0,
- 0, 0, 0, 0, 0, 59, 0, 0, 60, 61,
- 62, 0, 0, 63, 0, 64, 65, 0, 0, 66,
- 207, 208, 209, 210, 211, 212, 213, 214, 215, 0,
- 0, 0, 0, 0, 0, 0, 15, 0, 216, 0,
- 16, 0, 0, 17, 18, 19, 20, 0, 0, 0,
- 0, 0, 21, 0, 0, 0, 22, 23, 0, 0,
- 0, 0, 0, 0, 0, 0, 24, 25, 26, 0,
- 0, 0, 27, 0, 0, 28, 29, 30, 31, 32,
- 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
- 43, 44, 45, 0, 0, 0, 0, 0, 0, 0,
- 0, 46, 0, 47, 48, 0, 49, 0, 0, 0,
- 0, 50, 0, 0, 51, 52, 53, 0, 0, 54,
- 0, 0, 0, 0, 55, 0, 0, 56, 0, 0,
- 0, 57, 7, 8, 9, 10, 58, 11, 12, 13,
- 14, 0, 0, 0, 0, 0, 0, 0, 0, 59,
- 0, 0, 60, 61, 62, 0, 0, 63, 0, 64,
- 65, 1599, 1088, 66, 0, 217, 218, 219, 220, 221,
- 222, 223, 224, 225, 226, 227, 0, 228, 229, 230,
- 15, 0, 0, 0, 16, 0, 0, 17, 18, 19,
- 20, 0, 0, 0, 0, 0, 21, 0, 0, 0,
- 22, 23, 0, 0, 0, 0, 0, 0, 0, 0,
- 24, 25, 26, 0, 0, 0, 27, 0, 0, 28,
- 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
- 39, 40, 41, 42, 43, 44, 45, 0, 0, 0,
- 0, 0, 0, 0, 0, 46, 0, 47, 48, 0,
- 49, 0, 0, 0, 0, 50, 0, 0, 51, 52,
- 53, 0, 0, 54, 0, 0, 0, 0, 55, 0,
- 0, 56, 0, 0, 0, 57, 7, 8, 9, 10,
- 58, 11, 12, 13, 14, 0, 1518, 1519, 1520, 1521,
- 1522, 1523, 1524, 59, 0, 0, 60, 61, 62, 0,
- 0, 63, 1525, 64, 65, 0, 0, 66, 0, 0,
- 0, 0, 207, 208, 209, 210, 211, 212, 213, 214,
- 215, 0, 0, 0, 15, 0, 0, 0, 16, 0,
- 216, 17, 18, 19, 20, 0, 0, 0, 0, 0,
- 21, 0, 0, 0, 22, 23, 0, 0, 0, 0,
- 0, 0, 0, 0, 24, 25, 26, 0, 0, 0,
- 27, 0, 0, 28, 29, 30, 31, 32, 33, 34,
- 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
- 45, 0, 0, 0, 0, 0, 0, 0, 0, 46,
- 0, 47, 48, 0, 49, 0, 0, 0, 0, 50,
- 0, 0, 51, 52, 53, 0, 0, 54, 0, 0,
- 0, 0, 55, 0, 0, 56, 0, 0, 0, 57,
- 7, 8, 9, 10, 58, 11, 12, 13, 0, 0,
- 0, 0, 1504, 0, 0, 1530, 1531, 1532, 1533, 1534,
- 0, 1535, 1536, 1537, 0, 63, 0, 64, 65, 0,
- 0, 66, 0, 894, 0, 0, 0, 217, 218, 219,
- 220, 221, 222, 223, 224, 225, 226, 227, 1439, 228,
- 229, 230, 895, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1440, 188, 189, 190, 0, 1441,
- 0, 0, 0, 0, 0, 0, 0, 0, 24, 25,
- 0, 0, 0, 0, 27, 0, 0, 0, 29, 30,
- 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
- 41, 42, 43, 44, 7, 8, 9, 10, 0, 11,
- 12, 13, 0, 0, 0, 0, 48, 0, 49, 0,
- 0, 0, 0, 1442, 191, 0, 0, 0, 1443, 0,
- 632, 1444, 0, 0, 0, 0, 55, 192, 193, 0,
- 207, 208, 209, 210, 211, 212, 213, 214, 215, 0,
- 0, 0, 1439, 0, 0, 0, 0, 0, 216, 0,
- 0, 1445, 0, 0, 1446, 1447, 1448, 0, 1440, 1449,
- 633, 1505, 65, 1441, 0, 1451, 194, 195, 0, 196,
- 0, 0, 24, 25, 0, 197, 0, 198, 27, 0,
- 0, 0, 29, 30, 31, 32, 33, 34, 35, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 48, 0, 49, 0, 0, 0, 0, 1442, 0, 0,
- 0, 0, 1443, 0, 0, 1444, 555, 556, 557, 10,
- 55, 11, 558, 559, 0, 0, 0, 0, 852, 0,
- 0, 0, 0, 555, 556, 557, 10, 0, 11, 558,
- 559, 0, 0, 0, 0, 704, 0, 0, 0, 0,
- 0, 0, 0, 1449, 0, 1450, 65, 0, 0, 1451,
- 0, 110, 0, 111, 561, 217, 218, 219, 220, 221,
- 222, 223, 224, 225, 226, 227, 0, 228, 229, 230,
- 562, 561, 0, 0, 0, 563, 0, 0, 0, 0,
- 0, 0, 0, 0, 564, 565, 0, 562, 0, 0,
- 0, 0, 563, 209, 210, 211, 212, 213, 214, 215,
- 0, 564, 565, 0, 0, 0, 0, 0, 0, 216,
- 0, 0, 1518, 1519, 1520, 1521, 1522, 1523, 1524, 566,
- 0, 0, 567, 0, 568, 0, 0, 0, 1525, 569,
- 0, 0, 0, 0, 570, 0, 566, 571, 0, 567,
- 0, 568, 572, 0, 0, 573, 569, 0, 0, 0,
- 0, 570, 0, 0, 571, 0, 0, 0, 0, 572,
- 0, 0, 573, 0, 0, 0, 0, 574, 0, 0,
- 575, 576, 0, 0, 0, 577, 0, 578, 0, 0,
- 0, 579, 0, 0, 574, 0, 0, 575, 576, 1092,
- 0, 0, 577, 0, 705, 0, 0, 0, 579, 1093,
- 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 0, 0,
- 0, 0, 0, 0, 188, 189, 190, 1102, 0, 1103,
- 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113,
- 1114, 0, 0, 0, 0, 0, 0, 218, 219, 220,
- 221, 222, 223, 224, 225, 226, 227, 0, 228, 229,
- 230, 0, 0, 1115, 0, 0, 1527, 1528, 1529, 637,
- 638, 1530, 1531, 1532, 1533, 1534, 0, 1535, 1536, 1537,
- 0, 0, 0, 191, 0, 0, 0, 0, 0, 0,
- 211, 212, 213, 214, 215, 0, 192, 193, 0, 0,
- 0, 0, 0, 0, 216, 0, 0, 0, 0, 1116,
- 0, 399, 0, 0, 73, 400, 0, 75, 76, 77,
- 78, 79, 0, 0, 0, 0, 0, 401, 0, 0,
- 82, 0, 0, 0, 83, 194, 195, 0, 196, 0,
- 0, 0, 84, 0, 197, 0, 198, 0, 0, 85,
- 1117, 0, 0, 1118, 0, 1119, 1120, 1121, 1122, 1123,
- 1124, 1125, 1126, 1127, 1128, 1129, 86, 1130, 1131, 766,
- 767, 1132, 0, 0, 0, 0, 0, 0, 0, 639,
- 0, 0, 0, 0, 0, 0, 0, 0, 87, 88,
- 0, 0, 0, 0, 89, 0, 0, 0, 0, 0,
- 0, 0, 402, 403, 92, 93, 0, 0, 94, 0,
- 95, 399, 0, 0, 73, 400, 0, 75, 76, 77,
- 78, 79, 0, 0, 0, 0, 0, 401, 0, 0,
- 82, 641, 0, 0, 83, 221, 222, 223, 224, 225,
- 226, 227, 84, 228, 229, 230, 0, 0, 0, 85,
- 207, 208, 209, 210, 211, 212, 213, 214, 215, 0,
- 0, 0, 0, 0, 0, 0, 86, 0, 216, 207,
- 208, 209, 210, 211, 212, 213, 214, 215, 0, 639,
- 0, 0, 0, 0, 0, 0, 0, 216, 87, 88,
- 0, 0, 0, 73, 89, 0, 75, 76, 77, 78,
- 0, 0, 402, 403, 92, 93, 0, 0, 94, 238,
- 95, 207, 208, 209, 210, 211, 212, 213, 214, 215,
- 0, 0, 0, 0, 0, 0, 0, 0, 85, 216,
- 0, 641, 207, 208, 209, 210, 211, 212, 213, 214,
- 215, 0, 0, 0, 0, 239, 0, 0, 0, 0,
- 216, 207, 208, 209, 210, 211, 212, 213, 214, 215,
- 0, 0, 0, 0, 0, 0, 0, 87, 88, 216,
- 207, 208, 209, 210, 211, 212, 213, 214, 215, 0,
- 0, 0, 0, 0, 93, 0, 0, 0, 216, 95,
- 0, 0, 0, 0, 0, 217, 218, 219, 220, 221,
- 222, 223, 224, 225, 226, 227, 0, 228, 229, 230,
- 308, 0, 144, 0, 217, 218, 219, 220, 221, 222,
- 223, 224, 225, 226, 227, 0, 228, 229, 230, 499,
- 207, 208, 209, 210, 211, 212, 213, 214, 215, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 216, 0,
- 0, 0, 0, 0, 0, 0, 217, 218, 219, 220,
- 221, 222, 223, 224, 225, 226, 227, 0, 228, 229,
- 230, 515, 0, 0, 0, 0, 0, 217, 218, 219,
- 220, 221, 222, 223, 224, 225, 226, 227, 0, 228,
- 229, 230, 594, 0, 0, 0, 217, 218, 219, 220,
- 221, 222, 223, 224, 225, 226, 227, 0, 228, 229,
- 230, 651, 0, 0, 0, 217, 218, 219, 220, 221,
- 222, 223, 224, 225, 226, 227, 0, 228, 229, 230,
- 752, 207, 208, 209, 210, 211, 212, 213, 214, 215,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 216,
- 207, 208, 209, 210, 211, 212, 213, 214, 215, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 216, 0,
- 0, 0, 0, 0, 0, 217, 218, 219, 220, 221,
- 222, 223, 224, 225, 226, 227, 0, 228, 229, 230,
- 880, 207, 208, 209, 210, 211, 212, 213, 214, 215,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 216,
- 719, 720, 721, 722, 723, 724, 725, 726, 727, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 728, 209,
- 210, 211, 212, 213, 214, 215, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 216, 1518, 1519, 1520, 1521,
- 1522, 1523, 1524, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 1525, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 217, 218, 219, 220,
- 221, 222, 223, 224, 225, 226, 227, 0, 228, 229,
- 230, 962, 0, 0, 0, 217, 218, 219, 220, 221,
- 222, 223, 224, 225, 226, 227, 0, 228, 229, 230,
- 1018, 1518, 1519, 1520, 1521, 1522, 1523, 1524, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 1525, 0, 0,
- 0, 0, 1412, 0, 0, 0, 217, 218, 219, 220,
- 221, 222, 223, 224, 225, 226, 227, 0, 228, 229,
- 230, 0, 0, 0, 0, 729, 730, 731, 732, 733,
- 734, 735, 736, 737, 738, 739, 0, 740, 741, 742,
- 601, 0, 0, 659, 219, 220, 221, 222, 223, 224,
- 225, 226, 227, 0, 228, 229, 230, 0, 0, 0,
- 0, 1528, 1529, 0, 0, 1530, 1531, 1532, 1533, 1534,
- 0, 1535, 1536, 1537, 110, 0, 111, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 413, 660,
- 0, 661, 0, 0, 0, 0, 0, 414, 415, 416,
- 417, 0, 0, 0, 0, 0, 0, 0, 662, 0,
- 419, 420, 421, 422, 0, 601, 0, 0, 0, 0,
- 0, 0, 0, 535, 0, 0, 0, 1529, 0, 0,
- 1530, 1531, 1532, 1533, 1534, 0, 1535, 1536, 1537, 0,
- 663, 0, 0, 664, 665, 0, 0, 666, 432, 0,
- 0, 896, 897, 898, 0, 0, 0, 0, 0, 437,
- 0, 0, 0, 413, 667, 0, 438, 0, 0, 0,
- 440, 441, 414, 415, 416, 417, 668, 0, 0, 0,
- 0, 0, 444, 0, 445, 419, 534, 421, 422, 0,
- 669, 0, 0, 0, 0, 0, 73, 0, 535, 75,
- 76, 77, 78, 899, 900, 896, 897, 898, 0, 0,
- 0, 0, 82, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 432, 84, 0, 0, 0, 0, 0,
- 0, 85, 0, 0, 437, 0, 0, 0, 0, 0,
- 0, 438, 0, 0, 0, 0, 441, 0, 86, 0,
- 73, 0, 0, 75, 76, 77, 78, 444, 0, 445,
- 0, 0, 0, 70, 71, 0, 82, 0, 0, 0,
- 87, 88, 0, 0, 0, 0, 0, 0, 84, 0,
- 0, 0, 0, 0, 901, 85, 0, 93, 0, 0,
- 94, 902, 95, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 86, 0, 72, 0, 0, 73, 74, 0,
- 75, 76, 77, 78, 79, 80, 0, 0, 0, 0,
- 81, 0, 0, 82, 87, 88, 0, 83, 70, 71,
- 0, 0, 0, 0, 0, 84, 0, 0, 0, 0,
- 0, 93, 85, 0, 94, 0, 95, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 86,
- 0, 70, 0, 0, 0, 0, 0, 0, 0, 72,
- 0, 0, 73, 74, 0, 75, 76, 77, 78, 79,
- 0, 87, 88, 0, 0, 81, 0, 89, 82, 0,
- 0, 0, 83, 0, 0, 90, 91, 92, 93, 0,
- 84, 94, 72, 95, 0, 73, 74, 85, 75, 76,
- 77, 78, 79, 777, 0, 0, 0, 0, 81, 0,
- 0, 82, 0, 0, 86, 83, 145, 0, 0, 0,
- 0, 0, 0, 84, 0, 0, 0, 0, 0, 0,
- 85, 0, 0, 0, 0, 0, 87, 88, 0, 0,
- 0, 0, 89, 0, 0, 0, 0, 86, 0, 145,
- 90, 91, 92, 93, 0, 0, 94, 146, 95, 0,
- 73, 147, 0, 75, 76, 77, 78, 79, 965, 87,
- 88, 0, 0, 148, 0, 89, 82, 0, 0, 0,
- 83, 0, 0, 90, 91, 92, 93, 0, 84, 94,
- 146, 95, 0, 73, 147, 85, 75, 76, 77, 78,
- 79, 0, 0, 0, 0, 0, 148, 0, 0, 82,
- 0, 0, 86, 83, 70, 0, 0, 0, 0, 0,
- 0, 84, 0, 0, 0, 0, 0, 0, 85, 0,
- 0, 188, 189, 190, 87, 88, 0, 0, 0, 0,
- 89, 0, 0, 0, 0, 86, 0, 0, 149, 150,
- 92, 93, 0, 0, 94, 72, 95, 0, 73, 74,
- 0, 75, 76, 77, 78, 79, 0, 87, 88, 0,
- 0, 81, 0, 89, 82, 0, 0, 0, 83, 0,
- 0, 149, 150, 92, 93, 0, 84, 94, 0, 95,
- 191, 0, 0, 85, 0, 0, 0, 0, 188, 189,
- 190, 0, 0, 192, 193, 0, 0, 0, 0, 0,
- 86, 0, 0, 188, 189, 190, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 188, 189,
- 190, 0, 87, 88, 0, 0, 0, 0, 89, 0,
- 0, 0, 194, 998, 999, 1000, 90, 91, 92, 93,
- 0, 197, 94, 198, 95, 0, 0, 191, 0, 0,
- 0, 0, 0, 0, 1001, 0, 0, 0, 0, 1002,
- 192, 193, 191, 0, 0, 0, 0, 0, 73, 0,
- 0, 75, 76, 77, 78, 192, 193, 191, 0, 0,
- 188, 189, 190, 0, 0, 1039, 0, 0, 0, 0,
- 192, 193, 73, 0, 0, 75, 76, 77, 78, 194,
- 195, 0, 196, 85, 0, 0, 0, 0, 197, 0,
- 198, 0, 0, 0, 194, 195, 0, 196, 0, 0,
- 239, 1001, 0, 197, 0, 198, 1170, 85, 0, 194,
- 195, 0, 196, 0, 0, 0, 1001, 0, 197, 191,
- 198, 1172, 87, 88, 239, 0, 0, 0, 0, 0,
- 0, 1001, 192, 193, 0, 0, 1174, 0, 0, 93,
- 0, 0, 0, 0, 95, 0, 87, 88, 73, 0,
- 0, 75, 76, 77, 78, 0, 0, 0, 0, 0,
- 0, 0, 0, 93, 0, 0, 0, 157, 95, 0,
- 0, 194, 195, 0, 196, 0, 0, 0, 0, 0,
- 197, 0, 198, 85, 0, 413, 0, 0, 0, 0,
- 0, 158, 0, 0, 414, 415, 416, 417, 0, 0,
- 239, 0, 0, 0, 0, 0, 0, 419, 534, 421,
- 422, 0, 0, 0, 0, 424, 0, 0, 0, 0,
- 535, 0, 87, 88, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 93,
- 0, 0, 0, 0, 95, 432, 0, 0, 0, 412,
- 413, 0, 0, 0, 0, 0, 437, 0, 0, 414,
- 415, 416, 417, 438, 0, 0, 0, 164, 441, 0,
- 418, 0, 419, 420, 421, 422, 423, 0, 443, 444,
- 424, 445, 0, 0, 0, 425, 0, 0, 0, 0,
- 413, 0, 0, 0, 0, 0, -161, 0, 0, 414,
- 415, 416, 417, 0, 426, 427, 428, 429, 430, 431,
- 432, 433, 419, 534, 421, 422, 0, 0, 434, 435,
- 436, 437, 0, 0, 0, 535, 0, 0, 438, 439,
- 413, 0, 440, 441, 0, 0, 0, 442, 0, 414,
- 415, 416, 417, 443, 444, 0, 445, 413, 0, 0,
- 432, 608, 419, 420, 421, 422, 414, 415, 416, 417,
- 424, 437, 0, 0, 0, 535, 0, 0, 438, 419,
- 534, 421, 422, 441, 0, 0, 0, 0, 0, 0,
- 0, 0, 535, 0, 444, 0, 445, 0, 0, 0,
- 432, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 437, 0, 0, 0, 0, 0, 432, 438, 0,
- 0, 0, 440, 441, 0, 0, 0, 0, 437, 0,
- 0, 0, 0, 443, 444, 438, 445, 0, 0, 0,
- 441, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 444, 0, 445
-};
-
-static const yytype_int16 yycheck[] =
-{
- 1, 97, 397, 80, 64, 115, 420, 117, 118, 119,
- 120, 121, 440, 123, 440, 125, 397, 127, 46, 46,
- 374, 506, 1083, 80, 46, 550, 912, 566, 549, 15,
- 266, 266, 10, 13, 144, 13, 934, 768, 396, 86,
- 87, 88, 685, 266, 266, 15, 93, 157, 158, 6,
- 48, 8, 50, 157, 164, 165, 831, 15, 681, 413,
- 414, 415, 416, 417, 65, 419, 420, 421, 62, 967,
- 15, 425, 175, 176, 15, 179, 17, 921, 432, 160,
- 924, 925, 926, 437, 438, 82, 440, 441, 442, 537,
- 444, 445, 617, 0, 175, 96, 97, 10, 11, 12,
- 160, 507, 34, 48, 174, 50, 48, 48, 50, 50,
- 48, 34, 50, 114, 115, 174, 117, 118, 119, 120,
- 121, 157, 123, 82, 125, 6, 127, 8, 48, 34,
- 50, 174, 15, 180, 181, 182, 183, 233, 234, 82,
- 176, 135, 157, 144, 260, 261, 48, 48, 50, 50,
- 48, 174, 50, 249, 250, 251, 157, 158, 539, 156,
- 158, 176, 159, 164, 165, 48, 34, 50, 160, 229,
- 813, 814, 174, 919, 817, 570, 998, 999, 1000, 954,
- 534, 535, 48, 175, 50, 157, 34, 157, 82, 169,
- 176, 169, 239, 157, 552, 305, 160, 156, 174, 157,
- 159, 947, 203, 949, 176, 48, 952, 50, 121, 165,
- 249, 250, 251, 156, 449, 5, 159, 1061, 156, 176,
- 64, 1065, 1066, 164, 955, 160, 449, 449, 169, 754,
- 174, 175, 233, 234, 174, 177, 159, 156, 266, 266,
- 175, 173, 174, 175, 266, 156, 159, 601, 249, 250,
- 251, 174, 175, 254, 779, 174, 165, 177, 157, 798,
- 175, 176, 156, 174, 907, 159, 174, 268, 173, 174,
- 175, 48, 116, 50, 174, 177, 177, 176, 122, 177,
- 124, 157, 126, 174, 128, 129, 130, 131, 132, 133,
- 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
- 176, 169, 170, 171, 305, 173, 174, 175, 175, 176,
- 1056, 177, 156, 103, 104, 34, 160, 174, 162, 163,
- 174, 1052, 361, 718, 325, 173, 174, 175, 174, 368,
- 369, 974, 34, 818, 177, 978, 979, 718, 385, 1237,
- 157, 153, 154, 155, 1090, 830, 157, 795, 1170, 0,
- 1172, 174, 1174, 157, 174, 1177, 1178, 1179, 981, 176,
- 361, 882, 152, 153, 157, 176, 174, 368, 369, 157,
- 993, 1146, 176, 374, 174, 10, 11, 12, 379, 380,
- 156, 165, 158, 176, 160, 1229, 165, 157, 176, 1135,
- 1136, 626, 1035, 1036, 630, 630, 397, 48, 752, 50,
- 244, 1044, 1045, 626, 626, 1048, 176, 630, 630, 157,
- 1471, 157, 413, 414, 415, 416, 417, 174, 419, 420,
- 421, 449, 449, 157, 425, 174, 965, 449, 176, 174,
- 176, 432, 158, 6, 69, 8, 437, 438, 174, 440,
- 441, 442, 176, 444, 445, 1068, 174, 82, 83, 174,
- 169, 170, 171, 174, 173, 174, 175, 174, 248, 536,
- 304, 157, 252, 253, 174, 167, 168, 169, 170, 171,
- 955, 173, 174, 175, 69, 70, 592, 593, 517, 536,
- 176, 1006, 157, 522, 523, 524, 121, 122, 900, 124,
- 902, 174, 531, 532, 533, 130, 157, 132, 174, 894,
- 1025, 176, 549, 175, 176, 506, 507, 1032, 23, 24,
- 916, 175, 176, 1156, 920, 176, 517, 1140, 578, 34,
- 174, 522, 523, 524, 157, 174, 157, 157, 157, 157,
- 531, 532, 533, 534, 535, 157, 537, 157, 566, 566,
- 157, 176, 174, 176, 566, 176, 176, 176, 176, 550,
- 551, 156, 176, 158, 176, 160, 176, 160, 1202, 176,
- 1204, 174, 639, 174, 970, 971, 972, 1052, 1454, 359,
- 360, 1214, 1215, 1216, 10, 11, 12, 22, 23, 24,
- 1478, 371, 372, 373, 174, 175, 646, 647, 174, 34,
- 174, 10, 11, 12, 654, 174, 656, 174, 626, 626,
- 601, 169, 630, 630, 626, 395, 607, 174, 630, 1037,
- 156, 1037, 158, 156, 160, 158, 617, 160, 408, 409,
- 122, 123, 124, 1037, 156, 157, 470, 174, 472, 156,
- 474, 174, 49, 69, 174, 175, 675, 175, 175, 1385,
- 679, 680, 177, 433, 157, 705, 82, 83, 174, 166,
- 69, 34, 167, 168, 169, 170, 171, 157, 173, 174,
- 175, 166, 778, 82, 83, 1071, 174, 175, 176, 670,
- 176, 787, 176, 156, 675, 158, 159, 160, 679, 680,
- 681, 741, 176, 1037, 685, 121, 122, 176, 124, 174,
- 175, 176, 176, 157, 130, 696, 132, 174, 175, 176,
- 777, 176, 121, 122, 176, 124, 176, 176, 176, 176,
- 176, 130, 166, 132, 10, 11, 12, 13, 508, 176,
- 157, 17, 167, 168, 169, 170, 171, 176, 173, 174,
- 175, 521, 176, 843, 578, 525, 526, 765, 176, 175,
- 166, 160, 176, 176, 176, 164, 590, 15, 176, 176,
- 169, 752, 176, 754, 10, 11, 12, 13, 176, 15,
- 176, 17, 801, 176, 765, 176, 176, 63, 176, 176,
- 798, 798, 176, 176, 174, 1223, 798, 778, 779, 1227,
- 176, 1556, 1557, 1558, 167, 168, 169, 170, 171, 176,
- 173, 174, 175, 159, 795, 1438, 912, 176, 176, 159,
- 801, 591, 174, 919, 594, 921, 174, 63, 924, 925,
- 926, 812, 813, 814, 176, 159, 817, 818, 174, 174,
- 174, 174, 174, 174, 120, 121, 159, 1233, 159, 830,
- 831, 947, 159, 949, 174, 882, 952, 174, 174, 169,
- 174, 176, 843, 175, 634, 82, 13, 176, 15, 175,
- 17, 176, 174, 177, 150, 699, 700, 701, 179, 703,
- 174, 705, 165, 707, 708, 121, 165, 165, 164, 174,
- 966, 127, 900, 169, 902, 165, 176, 165, 174, 176,
- 174, 158, 174, 673, 674, 176, 34, 176, 159, 176,
- 1665, 176, 156, 49, 150, 174, 63, 687, 1673, 174,
- 690, 691, 176, 176, 694, 159, 907, 176, 164, 156,
- 22, 23, 24, 169, 157, 916, 157, 157, 174, 920,
- 921, 157, 34, 924, 925, 926, 157, 157, 156, 174,
- 174, 158, 158, 156, 169, 160, 169, 965, 965, 940,
- 1056, 179, 943, 965, 686, 1061, 175, 156, 166, 1065,
- 1066, 157, 174, 954, 955, 1403, 1404, 1405, 174, 13,
- 127, 15, 174, 17, 166, 966, 176, 166, 176, 970,
- 971, 972, 762, 974, 1090, 166, 176, 978, 979, 10,
- 981, 10, 10, 150, 10, 10, 10, 10, 11, 12,
- 13, 166, 993, 158, 17, 157, 176, 164, 169, 169,
- 1395, 1407, 169, 177, 1410, 1006, 158, 174, 158, 63,
- 1038, 169, 175, 15, 1395, 175, 1464, 174, 157, 1135,
- 1136, 811, 176, 174, 1025, 815, 816, 1028, 174, 819,
- 157, 1032, 176, 823, 1035, 1036, 1037, 827, 828, 174,
- 63, 157, 1043, 1044, 1045, 160, 157, 1048, 1049, 839,
- 1456, 1052, 157, 1149, 1460, 167, 168, 169, 170, 171,
- 1061, 173, 174, 175, 1065, 1066, 169, 1068, 158, 176,
- 1071, 915, 174, 127, 158, 176, 175, 177, 158, 177,
- 157, 10, 1083, 825, 826, 176, 179, 829, 157, 176,
- 179, 177, 174, 176, 884, 176, 150, 1545, 121, 174,
- 176, 179, 10, 10, 127, 1553, 158, 10, 176, 10,
- 164, 1559, 1560, 1229, 158, 169, 10, 13, 10, 15,
- 174, 17, 157, 1183, 1184, 174, 1186, 150, 1188, 1239,
- 1240, 179, 177, 923, 176, 156, 1542, 927, 928, 1140,
- 930, 164, 932, 179, 176, 1146, 169, 157, 1149, 158,
- 165, 174, 174, 165, 1602, 1156, 946, 1605, 176, 165,
- 950, 951, 165, 174, 177, 907, 956, 63, 176, 158,
- 177, 961, 176, 10, 158, 176, 176, 176, 10, 969,
- 10, 158, 158, 973, 10, 158, 174, 15, 1636, 176,
- 176, 176, 65, 157, 984, 985, 177, 1603, 177, 157,
- 166, 1202, 176, 1204, 176, 166, 1654, 166, 176, 166,
- 10, 176, 158, 1214, 1215, 1216, 176, 90, 10, 10,
- 158, 174, 1223, 174, 174, 158, 1227, 176, 1229, 174,
- 158, 127, 1233, 176, 176, 10, 158, 110, 1239, 1240,
- 176, 158, 1238, 607, 986, 1398, 1454, 1038, 990, 991,
- 630, 1562, 1042, 1395, 150, 718, 1046, 1047, 10, 11,
- 12, 13, 570, 630, 1007, 17, 1358, 324, 164, 1385,
- 1060, -1, -1, 169, -1, 2, 149, 20, 21, 22,
- 23, 24, 1398, -1, -1, -1, -1, -1, -1, -1,
- -1, 34, -1, 1035, 1036, -1, -1, -1, -1, 1089,
- -1, -1, 1044, 1045, -1, -1, 1048, -1, -1, -1,
- -1, 63, -1, -1, -1, -1, -1, -1, -1, -1,
- 47, -1, -1, -1, -1, -1, 53, 200, 201, -1,
- -1, -1, 59, 60, 61, 62, 63, -1, 1454, 66,
- -1, -1, -1, 1133, -1, -1, 10, 11, 12, -1,
- -1, -1, -1, -1, -1, 228, -1, 1358, -1, 16,
- 17, 18, 19, 20, 21, 22, 23, 24, 1212, 121,
- -1, -1, -1, -1, 247, 127, -1, 34, -1, 16,
- 17, 18, 19, 20, 21, 22, 23, 24, 261, 262,
- 1450, 1181, -1, -1, 1395, -1, -1, 34, 150, -1,
- 1190, -1, 1403, 1404, 1405, 69, 1407, -1, -1, 1410,
- 1200, -1, 164, -1, -1, -1, -1, 169, 82, 83,
- 1162, -1, -1, 1213, 167, 168, 169, 170, 171, -1,
- 173, 174, 175, 306, 307, -1, 163, 1438, -1, 312,
- -1, -1, -1, -1, -1, 1505, -1, -1, -1, -1,
- -1, 324, -1, -1, -1, 1456, -1, 121, 122, 1460,
- 124, -1, -1, 1464, 23, 24, 130, -1, 132, -1,
- 1471, -1, 1214, 1215, 1216, 34, 1536, -1, -1, 143,
- 207, 208, 209, 210, 211, 212, 213, 214, 215, 216,
- 217, 218, 219, 220, 221, 222, 223, 224, 225, 226,
- 227, -1, 1217, 230, 161, 162, 163, 164, 235, -1,
- 167, 168, 169, 170, 171, -1, 173, 174, 175, -1,
- -1, -1, 159, 396, 161, 162, 163, 164, -1, 402,
- 167, 168, 169, 170, 171, -1, 173, 174, 175, 266,
- -1, 1542, -1, -1, 1545, -1, -1, -1, -1, -1,
- -1, -1, 1553, -1, -1, 1556, 1557, 1558, 1559, 1560,
- -1, 1562, -1, -1, -1, -1, -1, -1, -1, -1,
- 443, -1, -1, -1, -1, 302, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 1647, 1648, 1649,
- -1, 1651, 319, 320, -1, -1, -1, 1387, -1, 326,
- -1, 1602, 1603, -1, 1605, -1, 1450, -1, 167, 168,
- 169, 170, 171, -1, 173, 174, 175, -1, 1408, -1,
- -1, 1411, -1, -1, 18, 19, 20, 21, 22, 23,
- 24, -1, 505, 55, -1, 1636, 58, 59, 60, 61,
- 34, 10, 11, 12, -1, -1, -1, 520, -1, 71,
- -1, -1, 379, 1654, -1, -1, 1500, 1501, 1502, 1503,
- -1, 1505, -1, 1507, 1665, 1455, -1, -1, 90, 1459,
- 543, -1, 1673, 1463, -1, -1, -1, -1, -1, 552,
- -1, -1, -1, -1, -1, 107, 1476, -1, -1, 1479,
- 1480, 1481, -1, -1, -1, 422, 1438, -1, -1, -1,
- 69, -1, -1, -1, -1, -1, -1, 129, 130, -1,
- -1, -1, -1, 82, 83, -1, -1, -1, -1, 592,
- 593, -1, -1, -1, 146, -1, -1, -1, 1443, 151,
- 1445, 1446, 1447, 1448, 1449, 608, 1451, 610, 611, 612,
- 613, 614, 615, -1, -1, 618, -1, -1, -1, -1,
- -1, -1, 121, 122, -1, 124, -1, 1547, -1, 632,
- 633, 130, -1, 132, -1, -1, -1, -1, 641, 496,
- 164, 165, 166, 167, 168, 169, 170, 171, -1, 173,
- 174, 175, -1, -1, 511, -1, -1, -1, 1217, -1,
- -1, 3, 4, 5, 6, 164, 8, 9, 10, -1,
- 169, 1516, 1517, 1518, 1519, 1520, 1521, 1522, 1523, 1524,
- 1525, 1526, 1527, 1528, 1529, 1530, 1531, 1532, 1533, 1534,
- 1610, -1, -1, -1, -1, 1615, 1616, 18, 19, 20,
- 21, 22, 23, 24, -1, -1, -1, -1, -1, 51,
- -1, -1, -1, 34, 1634, -1, -1, 574, 575, 576,
- 577, -1, 579, -1, -1, 67, -1, -1, -1, -1,
- 72, 588, 1577, -1, -1, 1655, -1, 740, -1, 81,
- 82, -1, -1, -1, 1664, 87, -1, -1, -1, 91,
- 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
- 102, 103, 104, 105, 106, -1, -1, 624, 17, 18,
- 19, 20, 21, 22, 23, 24, -1, 119, -1, 121,
- -1, -1, -1, 1628, 126, 34, 1631, -1, -1, 131,
- -1, -1, 134, -1, 797, -1, -1, 139, 17, 18,
- 19, 20, 21, 22, 23, 24, -1, -1, 665, -1,
- -1, -1, -1, -1, -1, 34, -1, -1, -1, 822,
- -1, -1, 164, -1, 681, 167, 168, 169, -1, -1,
- 172, -1, 174, 175, -1, -1, 178, -1, -1, -1,
- -1, -1, 845, -1, 165, 166, 167, 168, 169, 170,
- 171, 708, 173, 174, 175, -1, -1, -1, -1, -1,
- -1, -1, 719, 720, 721, 722, 723, 724, 725, 726,
- 727, 728, 729, 730, 731, 732, 733, 734, 735, 736,
- 737, 738, 739, -1, 1443, 742, 1445, 1446, 1447, 1448,
- 1449, -1, 1451, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 905, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 162, 163, 164, 165, 166, 167, 168,
- 169, 170, 171, -1, 173, 174, 175, 784, -1, -1,
- 10, 11, 12, 936, -1, 3, 4, 5, 6, -1,
- 8, 9, 10, 162, 163, 164, -1, 15, 167, 168,
- 169, 170, 171, -1, 173, 174, 175, 1516, 1517, 1518,
- 1519, 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528,
- 1529, 1530, 1531, 1532, 1533, 1534, -1, -1, -1, -1,
- 48, -1, 50, 51, -1, -1, -1, -1, -1, 69,
- -1, -1, -1, 850, -1, -1, -1, -1, 1001, 67,
- -1, -1, 82, 83, 72, -1, -1, -1, -1, -1,
- -1, -1, 11, 81, 82, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 1039, -1, -1, -1,
- -1, 121, 122, -1, 124, -1, -1, -1, 116, -1,
- 130, 119, 132, 121, -1, -1, 55, -1, 126, 58,
- 59, 60, 61, 131, -1, -1, 134, -1, -1, -1,
- -1, 139, 1631, -1, 142, -1, 156, 3, 4, 5,
- 6, -1, 8, 9, 10, 11, 943, -1, -1, -1,
- -1, 90, -1, -1, -1, -1, 164, -1, -1, 167,
- 168, -1, -1, -1, 172, -1, 174, -1, 107, -1,
- 178, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 981, 51, -1, -1, -1, 55,
- 129, 130, 58, 59, 60, 61, 993, -1, -1, -1,
- 997, 67, -1, 69, 70, 71, 72, 146, -1, -1,
- -1, -1, 151, -1, -1, 81, 82, 83, 1015, -1,
- -1, 87, -1, 1020, 90, 91, 92, 93, 94, 95,
- 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
- 106, 107, -1, -1, -1, -1, -1, -1, -1, -1,
- 116, -1, 118, 119, -1, 121, -1, -1, -1, -1,
- 126, -1, -1, 129, 130, 131, -1, -1, 134, -1,
- -1, 1068, -1, 139, -1, -1, 142, -1, -1, -1,
- 146, -1, -1, -1, -1, 151, 1083, -1, -1, -1,
- 156, -1, -1, -1, -1, 1238, -1, -1, 164, -1,
- -1, 167, 168, 169, -1, -1, 172, -1, 174, 175,
- -1, -1, 178, -1, -1, 3, 4, 5, 6, 7,
- 8, 9, 10, 11, 12, 13, -1, 15, 16, 17,
- 18, 19, 20, 21, 22, 23, 24, 25, 26, -1,
- -1, 1138, -1, 1140, -1, 1142, 34, 35, 36, 37,
- 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, -1, -1, 55, 56, 57,
- 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
- 68, 69, 70, 71, 72, 73, -1, 75, -1, 77,
- 78, 79, 80, 81, 82, 83, 84, 85, 86, -1,
- 88, 89, 90, 16, 17, 18, 19, 20, 21, 22,
- 23, 24, -1, -1, -1, -1, -1, -1, -1, 107,
- -1, 34, -1, -1, -1, -1, 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, -1, 10, 11, 156, 157,
- 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
- 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
- 178, 179, -1, 55, -1, -1, 58, 59, 60, 61,
- -1, -1, -1, -1, -1, 10, 11, 12, 52, -1,
- -1, 55, 56, -1, 58, 59, 60, 61, 62, -1,
- -1, 10, 11, 12, 68, -1, -1, 71, 90, -1,
- -1, 75, -1, -1, -1, -1, -1, -1, -1, 83,
- -1, -1, -1, -1, -1, 107, 90, -1, 161, 162,
- 163, 164, 165, 166, 167, 168, 169, 170, 171, -1,
- 173, 174, 175, 107, 69, -1, 179, 129, 130, -1,
- -1, -1, -1, -1, -1, -1, 120, 82, 83, -1,
- 69, -1, -1, -1, 146, 129, 130, 1384, -1, 151,
- -1, 135, 1535, 82, 83, -1, -1, -1, -1, 143,
- 144, 145, 146, -1, -1, 149, -1, 151, -1, -1,
- -1, -1, 156, -1, -1, -1, 121, 122, -1, 124,
- -1, -1, -1, -1, -1, 130, -1, 132, 172, -1,
- -1, 1574, 121, 122, -1, 124, -1, -1, -1, -1,
- -1, 130, 147, 132, 3, 4, 5, 6, 7, 8,
- 9, 10, 11, 12, 13, -1, 15, 16, 17, 18,
- 19, 20, 21, 22, 23, 24, 25, 26, -1, -1,
- 159, -1, -1, -1, 1471, 34, 35, 36, 37, 38,
- 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
- 49, 50, 51, 52, -1, -1, 55, 56, 57, 58,
- 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
- 69, 70, 71, 72, 73, -1, 75, -1, 77, 78,
- 79, 80, 81, 82, 83, 84, 85, 86, -1, 88,
- 89, 90, -1, -1, -1, -1, -1, -1, -1, -1,
- 1537, -1, -1, -1, -1, -1, -1, -1, 107, -1,
- -1, -1, -1, -1, -1, 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, -1, -1, -1, 156, 157, 158,
- 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
- 169, 170, 171, 172, 173, 174, 175, 176, -1, 178,
- 179, 3, 4, 5, 6, -1, 8, 9, 10, 11,
- 12, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 16, 17, 18, 19, 20, 21, 22,
- 23, 24, -1, -1, -1, -1, -1, -1, -1, 51,
- 52, 34, -1, 55, 56, -1, 58, 59, 60, 61,
- 62, 63, -1, -1, -1, 67, 68, -1, -1, 71,
- 72, -1, -1, 75, -1, -1, -1, -1, -1, 81,
- 82, 83, -1, -1, -1, 87, -1, -1, 90, 91,
- 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
- 102, 103, 104, 105, 106, 107, -1, -1, -1, -1,
- -1, -1, -1, -1, 116, -1, 118, 119, -1, 121,
- -1, -1, -1, -1, 126, -1, -1, 129, 130, 131,
- -1, -1, 134, 135, -1, -1, -1, 139, -1, -1,
- 142, 143, 144, 145, 146, -1, -1, 149, -1, 151,
- 3, 4, 5, 6, -1, 8, 9, 10, 11, -1,
- -1, -1, 164, -1, -1, 167, 168, 169, -1, -1,
- 172, -1, 174, 175, -1, -1, 178, -1, 161, 162,
- 163, 164, 165, 166, 167, 168, 169, 170, 171, -1,
- 173, 174, 175, -1, -1, -1, 179, -1, 51, 52,
- -1, -1, 55, 56, -1, 58, 59, 60, 61, 62,
- -1, -1, -1, -1, 67, 68, -1, -1, 71, 72,
- -1, -1, 75, -1, -1, -1, -1, -1, 81, 82,
- 83, -1, -1, -1, 87, -1, -1, 90, 91, 92,
- 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
- 103, 104, 105, 106, 107, -1, -1, -1, -1, -1,
- -1, -1, -1, 116, -1, 118, 119, -1, 121, -1,
- -1, -1, -1, 126, -1, -1, 129, 130, 131, -1,
- -1, 134, 135, -1, -1, -1, 139, -1, -1, 142,
- 143, 144, 145, 146, -1, -1, 149, -1, 151, -1,
- 3, 4, 5, 6, -1, 8, 9, 10, 11, -1,
- -1, 164, 15, -1, 167, 168, 169, -1, -1, 172,
- -1, 174, 175, -1, -1, 178, -1, -1, -1, -1,
- -1, 16, 17, 18, 19, 20, 21, 22, 23, 24,
- -1, -1, -1, -1, -1, -1, -1, -1, 51, 34,
- -1, -1, 55, -1, -1, 58, 59, 60, 61, -1,
- -1, -1, -1, -1, 67, -1, -1, -1, 71, 72,
- -1, -1, -1, -1, -1, -1, -1, -1, 81, 82,
- 83, -1, -1, -1, 87, -1, -1, 90, 91, 92,
- 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
- 103, 104, 105, 106, 107, -1, -1, -1, -1, -1,
- -1, -1, -1, 116, -1, 118, 119, -1, 121, -1,
- -1, -1, -1, 126, -1, -1, 129, 130, 131, -1,
- -1, 134, -1, -1, -1, -1, 139, -1, -1, 142,
- -1, -1, -1, 146, 3, 4, 5, 6, 151, 8,
- 9, 10, 11, -1, -1, -1, -1, -1, -1, -1,
- -1, 164, -1, -1, 167, 168, 169, -1, -1, 172,
- -1, 174, 175, -1, -1, 178, 161, 162, 163, 164,
- 165, 166, 167, 168, 169, 170, 171, -1, 173, 174,
- 175, -1, 51, -1, 179, -1, 55, -1, -1, 58,
- 59, 60, 61, -1, -1, -1, -1, -1, 67, 10,
- 11, 12, 71, 72, -1, -1, -1, -1, -1, -1,
- -1, -1, 81, 82, 83, -1, -1, -1, 87, -1,
- -1, 90, 91, 92, 93, 94, 95, 96, 97, 98,
- 99, 100, 101, 102, 103, 104, 105, 106, 107, -1,
- -1, -1, -1, -1, -1, -1, -1, 116, -1, 118,
- 119, -1, 121, -1, -1, -1, -1, 126, 69, -1,
- 129, 130, 131, -1, -1, 134, -1, -1, -1, -1,
- 139, 82, 83, 142, -1, -1, -1, 146, 3, 4,
- 5, 6, 151, 8, 9, 10, 11, -1, -1, -1,
- -1, -1, -1, -1, -1, 164, -1, -1, 167, 168,
- 169, -1, -1, 172, -1, 174, 175, 176, -1, 178,
- 121, 122, -1, 124, -1, -1, -1, -1, -1, 130,
- -1, 132, -1, -1, -1, -1, 51, 52, -1, -1,
- 55, -1, -1, 58, 59, 60, 61, -1, -1, -1,
- -1, -1, 67, -1, -1, 156, 71, 72, -1, -1,
- -1, 17, -1, -1, -1, -1, 81, 82, 83, -1,
- -1, -1, 87, -1, -1, 90, 91, 92, 93, 94,
- 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
- 105, 106, 107, -1, -1, -1, -1, -1, -1, -1,
- -1, 116, -1, 118, 119, -1, 121, 63, -1, 65,
- -1, 126, -1, -1, 129, 130, 131, -1, -1, 134,
- -1, -1, -1, -1, 139, -1, 82, 142, -1, -1,
- -1, 146, 3, 4, 5, 6, 151, 8, 9, 10,
- 11, -1, -1, -1, -1, -1, -1, -1, -1, 164,
- -1, -1, 167, 168, 169, -1, -1, 172, 114, 174,
- 175, 117, 118, 178, -1, 121, -1, -1, 16, 17,
- 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
- 51, 52, 138, -1, 55, -1, 34, 58, 59, 60,
- 61, -1, -1, -1, 150, -1, 67, -1, -1, -1,
- 71, 72, -1, -1, -1, -1, -1, -1, 164, -1,
- 81, 82, 83, -1, -1, -1, 87, -1, -1, 90,
- 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
- 101, 102, 103, 104, 105, 106, 107, -1, -1, -1,
- -1, -1, -1, -1, -1, 116, -1, 118, 119, -1,
- 121, -1, -1, -1, -1, 126, -1, -1, 129, 130,
- 131, -1, -1, 134, -1, -1, -1, -1, 139, -1,
- -1, 142, -1, -1, -1, 146, 3, 4, 5, 6,
- 151, 8, 9, 10, 11, -1, -1, -1, -1, -1,
- -1, -1, -1, 164, -1, -1, 167, 168, 169, -1,
- -1, 172, -1, 174, 175, -1, -1, 178, -1, -1,
- -1, 159, -1, 161, 162, 163, 164, 165, 166, 167,
- 168, 169, 170, 171, 51, 173, 174, 175, 55, -1,
- -1, 58, 59, 60, 61, -1, -1, -1, -1, -1,
- 67, -1, -1, -1, 71, 72, -1, -1, -1, -1,
- -1, -1, -1, -1, 81, 82, 83, -1, -1, -1,
- 87, -1, -1, 90, 91, 92, 93, 94, 95, 96,
- 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
- 107, -1, -1, -1, -1, -1, -1, -1, -1, 116,
- -1, 118, 119, -1, 121, -1, -1, -1, -1, 126,
- -1, -1, 129, 130, 131, -1, -1, 134, -1, -1,
- -1, -1, 139, -1, -1, 142, -1, -1, -1, 146,
- 3, 4, 5, 6, 151, 8, 9, 10, 11, -1,
- -1, -1, -1, -1, -1, -1, -1, 164, -1, -1,
- 167, 168, 169, -1, -1, 172, -1, 174, 175, 176,
- -1, 178, -1, -1, -1, -1, 16, 17, 18, 19,
- 20, 21, 22, 23, 24, -1, -1, -1, 51, -1,
- -1, -1, 55, -1, 34, 58, 59, 60, 61, -1,
- -1, -1, -1, -1, 67, -1, -1, -1, 71, 72,
- -1, -1, -1, -1, -1, -1, -1, -1, 81, 82,
- 83, -1, -1, -1, 87, -1, -1, 90, 91, 92,
- 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
- 103, 104, 105, 106, 107, -1, -1, -1, -1, -1,
- -1, -1, -1, 116, -1, 118, 119, -1, 121, -1,
- -1, -1, -1, 126, -1, -1, 129, 130, 131, -1,
- -1, 134, -1, -1, -1, -1, 139, -1, -1, 142,
- -1, -1, -1, 146, 3, 4, 5, 6, 151, 8,
- 9, 10, 11, 156, -1, -1, -1, -1, -1, -1,
- -1, 164, -1, -1, 167, 168, 169, -1, -1, 172,
- -1, 174, 175, -1, -1, 178, -1, -1, -1, 159,
- -1, 161, 162, 163, 164, 165, 166, 167, 168, 169,
- 170, 171, 51, 173, 174, 175, 55, -1, -1, 58,
- 59, 60, 61, -1, -1, -1, -1, -1, 67, -1,
- -1, -1, 71, 72, -1, -1, -1, -1, -1, -1,
- -1, -1, 81, 82, 83, -1, -1, -1, 87, -1,
- -1, 90, 91, 92, 93, 94, 95, 96, 97, 98,
- 99, 100, 101, 102, 103, 104, 105, 106, 107, -1,
- -1, -1, -1, -1, -1, -1, -1, 116, -1, 118,
- 119, -1, 121, -1, -1, -1, -1, 126, -1, -1,
- 129, 130, 131, -1, -1, 134, -1, -1, -1, -1,
- 139, -1, -1, 142, -1, -1, -1, 146, 3, 4,
- 5, 6, 151, 8, 9, 10, 11, 156, -1, -1,
- -1, -1, -1, -1, -1, 164, -1, -1, 167, 168,
- 169, -1, -1, 172, -1, 174, 175, -1, -1, 178,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, -1,
- -1, -1, -1, -1, -1, -1, 51, -1, 34, -1,
- 55, -1, -1, 58, 59, 60, 61, -1, -1, -1,
- -1, -1, 67, -1, -1, -1, 71, 72, -1, -1,
- -1, -1, -1, -1, -1, -1, 81, 82, 83, -1,
- -1, -1, 87, -1, -1, 90, 91, 92, 93, 94,
- 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
- 105, 106, 107, -1, -1, -1, -1, -1, -1, -1,
- -1, 116, -1, 118, 119, -1, 121, -1, -1, -1,
- -1, 126, -1, -1, 129, 130, 131, -1, -1, 134,
- -1, -1, -1, -1, 139, -1, -1, 142, -1, -1,
- -1, 146, 3, 4, 5, 6, 151, 8, 9, 10,
- 11, -1, -1, -1, -1, -1, -1, -1, -1, 164,
- -1, -1, 167, 168, 169, -1, -1, 172, -1, 174,
- 175, 176, 158, 178, -1, 161, 162, 163, 164, 165,
- 166, 167, 168, 169, 170, 171, -1, 173, 174, 175,
- 51, -1, -1, -1, 55, -1, -1, 58, 59, 60,
- 61, -1, -1, -1, -1, -1, 67, -1, -1, -1,
- 71, 72, -1, -1, -1, -1, -1, -1, -1, -1,
- 81, 82, 83, -1, -1, -1, 87, -1, -1, 90,
- 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
- 101, 102, 103, 104, 105, 106, 107, -1, -1, -1,
- -1, -1, -1, -1, -1, 116, -1, 118, 119, -1,
- 121, -1, -1, -1, -1, 126, -1, -1, 129, 130,
- 131, -1, -1, 134, -1, -1, -1, -1, 139, -1,
- -1, 142, -1, -1, -1, 146, 3, 4, 5, 6,
- 151, 8, 9, 10, 11, -1, 18, 19, 20, 21,
- 22, 23, 24, 164, -1, -1, 167, 168, 169, -1,
- -1, 172, 34, 174, 175, -1, -1, 178, -1, -1,
- -1, -1, 16, 17, 18, 19, 20, 21, 22, 23,
- 24, -1, -1, -1, 51, -1, -1, -1, 55, -1,
- 34, 58, 59, 60, 61, -1, -1, -1, -1, -1,
- 67, -1, -1, -1, 71, 72, -1, -1, -1, -1,
- -1, -1, -1, -1, 81, 82, 83, -1, -1, -1,
- 87, -1, -1, 90, 91, 92, 93, 94, 95, 96,
- 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
- 107, -1, -1, -1, -1, -1, -1, -1, -1, 116,
- -1, 118, 119, -1, 121, -1, -1, -1, -1, 126,
- -1, -1, 129, 130, 131, -1, -1, 134, -1, -1,
- -1, -1, 139, -1, -1, 142, -1, -1, -1, 146,
- 3, 4, 5, 6, 151, 8, 9, 10, -1, -1,
- -1, -1, 15, -1, -1, 167, 168, 169, 170, 171,
- -1, 173, 174, 175, -1, 172, -1, 174, 175, -1,
- -1, 178, -1, 157, -1, -1, -1, 161, 162, 163,
- 164, 165, 166, 167, 168, 169, 170, 171, 51, 173,
- 174, 175, 176, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 67, 10, 11, 12, -1, 72,
- -1, -1, -1, -1, -1, -1, -1, -1, 81, 82,
- -1, -1, -1, -1, 87, -1, -1, -1, 91, 92,
- 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
- 103, 104, 105, 106, 3, 4, 5, 6, -1, 8,
- 9, 10, -1, -1, -1, -1, 119, -1, 121, -1,
- -1, -1, -1, 126, 69, -1, -1, -1, 131, -1,
- 75, 134, -1, -1, -1, -1, 139, 82, 83, -1,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, -1,
- -1, -1, 51, -1, -1, -1, -1, -1, 34, -1,
- -1, 164, -1, -1, 167, 168, 169, -1, 67, 172,
- 115, 174, 175, 72, -1, 178, 121, 122, -1, 124,
- -1, -1, 81, 82, -1, 130, -1, 132, 87, -1,
- -1, -1, 91, 92, 93, 94, 95, 96, 97, 98,
- 99, 100, 101, 102, 103, 104, 105, 106, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 119, -1, 121, -1, -1, -1, -1, 126, -1, -1,
- -1, -1, 131, -1, -1, 134, 3, 4, 5, 6,
- 139, 8, 9, 10, -1, -1, -1, -1, 15, -1,
- -1, -1, -1, 3, 4, 5, 6, -1, 8, 9,
- 10, -1, -1, -1, -1, 15, -1, -1, -1, -1,
- -1, -1, -1, 172, -1, 174, 175, -1, -1, 178,
- -1, 48, -1, 50, 51, 161, 162, 163, 164, 165,
- 166, 167, 168, 169, 170, 171, -1, 173, 174, 175,
- 67, 51, -1, -1, -1, 72, -1, -1, -1, -1,
- -1, -1, -1, -1, 81, 82, -1, 67, -1, -1,
- -1, -1, 72, 18, 19, 20, 21, 22, 23, 24,
- -1, 81, 82, -1, -1, -1, -1, -1, -1, 34,
- -1, -1, 18, 19, 20, 21, 22, 23, 24, 116,
- -1, -1, 119, -1, 121, -1, -1, -1, 34, 126,
- -1, -1, -1, -1, 131, -1, 116, 134, -1, 119,
- -1, 121, 139, -1, -1, 142, 126, -1, -1, -1,
- -1, 131, -1, -1, 134, -1, -1, -1, -1, 139,
- -1, -1, 142, -1, -1, -1, -1, 164, -1, -1,
- 167, 168, -1, -1, -1, 172, -1, 174, -1, -1,
- -1, 178, -1, -1, 164, -1, -1, 167, 168, 6,
- -1, -1, 172, -1, 174, -1, -1, -1, 178, 16,
- 17, 18, 19, 20, 21, 22, 23, 24, -1, -1,
- -1, -1, -1, -1, 10, 11, 12, 34, -1, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, -1, -1, -1, -1, -1, -1, 162, 163, 164,
- 165, 166, 167, 168, 169, 170, 171, -1, 173, 174,
- 175, -1, -1, 70, -1, -1, 162, 163, 164, 10,
- 11, 167, 168, 169, 170, 171, -1, 173, 174, 175,
- -1, -1, -1, 69, -1, -1, -1, -1, -1, -1,
- 20, 21, 22, 23, 24, -1, 82, 83, -1, -1,
- -1, -1, -1, -1, 34, -1, -1, -1, -1, 116,
- -1, 52, -1, -1, 55, 56, -1, 58, 59, 60,
- 61, 62, -1, -1, -1, -1, -1, 68, -1, -1,
- 71, -1, -1, -1, 75, 121, 122, -1, 124, -1,
- -1, -1, 83, -1, 130, -1, 132, -1, -1, 90,
- 157, -1, -1, 160, -1, 162, 163, 164, 165, 166,
- 167, 168, 169, 170, 171, 172, 107, 174, 175, 10,
- 11, 178, -1, -1, -1, -1, -1, -1, -1, 120,
- -1, -1, -1, -1, -1, -1, -1, -1, 129, 130,
- -1, -1, -1, -1, 135, -1, -1, -1, -1, -1,
- -1, -1, 143, 144, 145, 146, -1, -1, 149, -1,
- 151, 52, -1, -1, 55, 56, -1, 58, 59, 60,
- 61, 62, -1, -1, -1, -1, -1, 68, -1, -1,
- 71, 172, -1, -1, 75, 165, 166, 167, 168, 169,
- 170, 171, 83, 173, 174, 175, -1, -1, -1, 90,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, -1,
- -1, -1, -1, -1, -1, -1, 107, -1, 34, 16,
- 17, 18, 19, 20, 21, 22, 23, 24, -1, 120,
- -1, -1, -1, -1, -1, -1, -1, 34, 129, 130,
- -1, -1, -1, 55, 135, -1, 58, 59, 60, 61,
- -1, -1, 143, 144, 145, 146, -1, -1, 149, 71,
- 151, 16, 17, 18, 19, 20, 21, 22, 23, 24,
- -1, -1, -1, -1, -1, -1, -1, -1, 90, 34,
- -1, 172, 16, 17, 18, 19, 20, 21, 22, 23,
- 24, -1, -1, -1, -1, 107, -1, -1, -1, -1,
- 34, 16, 17, 18, 19, 20, 21, 22, 23, 24,
- -1, -1, -1, -1, -1, -1, -1, 129, 130, 34,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, -1,
- -1, -1, -1, -1, 146, -1, -1, -1, 34, 151,
- -1, -1, -1, -1, -1, 161, 162, 163, 164, 165,
- 166, 167, 168, 169, 170, 171, -1, 173, 174, 175,
- 176, -1, 174, -1, 161, 162, 163, 164, 165, 166,
- 167, 168, 169, 170, 171, -1, 173, 174, 175, 176,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 34, -1,
- -1, -1, -1, -1, -1, -1, 161, 162, 163, 164,
- 165, 166, 167, 168, 169, 170, 171, -1, 173, 174,
- 175, 176, -1, -1, -1, -1, -1, 161, 162, 163,
- 164, 165, 166, 167, 168, 169, 170, 171, -1, 173,
- 174, 175, 176, -1, -1, -1, 161, 162, 163, 164,
- 165, 166, 167, 168, 169, 170, 171, -1, 173, 174,
- 175, 176, -1, -1, -1, 161, 162, 163, 164, 165,
- 166, 167, 168, 169, 170, 171, -1, 173, 174, 175,
- 176, 16, 17, 18, 19, 20, 21, 22, 23, 24,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 34,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 34, -1,
- -1, -1, -1, -1, -1, 161, 162, 163, 164, 165,
- 166, 167, 168, 169, 170, 171, -1, 173, 174, 175,
- 176, 16, 17, 18, 19, 20, 21, 22, 23, 24,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 34,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 34, 18,
- 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 34, 18, 19, 20, 21,
- 22, 23, 24, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 34, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 161, 162, 163, 164,
- 165, 166, 167, 168, 169, 170, 171, -1, 173, 174,
- 175, 176, -1, -1, -1, 161, 162, 163, 164, 165,
- 166, 167, 168, 169, 170, 171, -1, 173, 174, 175,
- 176, 18, 19, 20, 21, 22, 23, 24, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 34, -1, -1,
- -1, -1, 157, -1, -1, -1, 161, 162, 163, 164,
- 165, 166, 167, 168, 169, 170, 171, -1, 173, 174,
- 175, -1, -1, -1, -1, 161, 162, 163, 164, 165,
- 166, 167, 168, 169, 170, 171, -1, 173, 174, 175,
- 6, -1, -1, 17, 163, 164, 165, 166, 167, 168,
- 169, 170, 171, -1, 173, 174, 175, -1, -1, -1,
- -1, 163, 164, -1, -1, 167, 168, 169, 170, 171,
- -1, 173, 174, 175, 48, -1, 50, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 54, 63,
- -1, 65, -1, -1, -1, -1, -1, 63, 64, 65,
- 66, -1, -1, -1, -1, -1, -1, -1, 82, -1,
- 76, 77, 78, 79, -1, 6, -1, -1, -1, -1,
- -1, -1, -1, 89, -1, -1, -1, 164, -1, -1,
- 167, 168, 169, 170, 171, -1, 173, 174, 175, -1,
- 114, -1, -1, 117, 118, -1, -1, 121, 114, -1,
- -1, 10, 11, 12, -1, -1, -1, -1, -1, 125,
- -1, -1, -1, 54, 138, -1, 132, -1, -1, -1,
- 136, 137, 63, 64, 65, 66, 150, -1, -1, -1,
- -1, -1, 148, -1, 150, 76, 77, 78, 79, -1,
- 164, -1, -1, -1, -1, -1, 55, -1, 89, 58,
- 59, 60, 61, 62, 63, 10, 11, 12, -1, -1,
- -1, -1, 71, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 114, 83, -1, -1, -1, -1, -1,
- -1, 90, -1, -1, 125, -1, -1, -1, -1, -1,
- -1, 132, -1, -1, -1, -1, 137, -1, 107, -1,
- 55, -1, -1, 58, 59, 60, 61, 148, -1, 150,
- -1, -1, -1, 11, 12, -1, 71, -1, -1, -1,
- 129, 130, -1, -1, -1, -1, -1, -1, 83, -1,
- -1, -1, -1, -1, 143, 90, -1, 146, -1, -1,
- 149, 150, 151, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 107, -1, 52, -1, -1, 55, 56, -1,
- 58, 59, 60, 61, 62, 63, -1, -1, -1, -1,
- 68, -1, -1, 71, 129, 130, -1, 75, 11, 12,
- -1, -1, -1, -1, -1, 83, -1, -1, -1, -1,
- -1, 146, 90, -1, 149, -1, 151, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 107,
- -1, 11, -1, -1, -1, -1, -1, -1, -1, 52,
- -1, -1, 55, 56, -1, 58, 59, 60, 61, 62,
- -1, 129, 130, -1, -1, 68, -1, 135, 71, -1,
- -1, -1, 75, -1, -1, 143, 144, 145, 146, -1,
- 83, 149, 52, 151, -1, 55, 56, 90, 58, 59,
- 60, 61, 62, 63, -1, -1, -1, -1, 68, -1,
- -1, 71, -1, -1, 107, 75, 11, -1, -1, -1,
- -1, -1, -1, 83, -1, -1, -1, -1, -1, -1,
- 90, -1, -1, -1, -1, -1, 129, 130, -1, -1,
- -1, -1, 135, -1, -1, -1, -1, 107, -1, 11,
- 143, 144, 145, 146, -1, -1, 149, 52, 151, -1,
- 55, 56, -1, 58, 59, 60, 61, 62, 63, 129,
- 130, -1, -1, 68, -1, 135, 71, -1, -1, -1,
- 75, -1, -1, 143, 144, 145, 146, -1, 83, 149,
- 52, 151, -1, 55, 56, 90, 58, 59, 60, 61,
- 62, -1, -1, -1, -1, -1, 68, -1, -1, 71,
- -1, -1, 107, 75, 11, -1, -1, -1, -1, -1,
- -1, 83, -1, -1, -1, -1, -1, -1, 90, -1,
- -1, 10, 11, 12, 129, 130, -1, -1, -1, -1,
- 135, -1, -1, -1, -1, 107, -1, -1, 143, 144,
- 145, 146, -1, -1, 149, 52, 151, -1, 55, 56,
- -1, 58, 59, 60, 61, 62, -1, 129, 130, -1,
- -1, 68, -1, 135, 71, -1, -1, -1, 75, -1,
- -1, 143, 144, 145, 146, -1, 83, 149, -1, 151,
- 69, -1, -1, 90, -1, -1, -1, -1, 10, 11,
- 12, -1, -1, 82, 83, -1, -1, -1, -1, -1,
- 107, -1, -1, 10, 11, 12, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 10, 11,
- 12, -1, 129, 130, -1, -1, -1, -1, 135, -1,
- -1, -1, 121, 122, 123, 124, 143, 144, 145, 146,
- -1, 130, 149, 132, 151, -1, -1, 69, -1, -1,
- -1, -1, -1, -1, 143, -1, -1, -1, -1, 148,
- 82, 83, 69, -1, -1, -1, -1, -1, 55, -1,
- -1, 58, 59, 60, 61, 82, 83, 69, -1, -1,
- 10, 11, 12, -1, -1, 15, -1, -1, -1, -1,
- 82, 83, 55, -1, -1, 58, 59, 60, 61, 121,
- 122, -1, 124, 90, -1, -1, -1, -1, 130, -1,
- 132, -1, -1, -1, 121, 122, -1, 124, -1, -1,
- 107, 143, -1, 130, -1, 132, 148, 90, -1, 121,
- 122, -1, 124, -1, -1, -1, 143, -1, 130, 69,
- 132, 148, 129, 130, 107, -1, -1, -1, -1, -1,
- -1, 143, 82, 83, -1, -1, 148, -1, -1, 146,
- -1, -1, -1, -1, 151, -1, 129, 130, 55, -1,
- -1, 58, 59, 60, 61, -1, -1, -1, -1, -1,
- -1, -1, -1, 146, -1, -1, -1, 174, 151, -1,
- -1, 121, 122, -1, 124, -1, -1, -1, -1, -1,
- 130, -1, 132, 90, -1, 54, -1, -1, -1, -1,
- -1, 174, -1, -1, 63, 64, 65, 66, -1, -1,
- 107, -1, -1, -1, -1, -1, -1, 76, 77, 78,
- 79, -1, -1, -1, -1, 84, -1, -1, -1, -1,
- 89, -1, 129, 130, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 146,
- -1, -1, -1, -1, 151, 114, -1, -1, -1, 53,
- 54, -1, -1, -1, -1, -1, 125, -1, -1, 63,
- 64, 65, 66, 132, -1, -1, -1, 174, 137, -1,
- 74, -1, 76, 77, 78, 79, 80, -1, 147, 148,
- 84, 150, -1, -1, -1, 89, -1, -1, -1, -1,
- 54, -1, -1, -1, -1, -1, 165, -1, -1, 63,
- 64, 65, 66, -1, 108, 109, 110, 111, 112, 113,
- 114, 115, 76, 77, 78, 79, -1, -1, 122, 123,
- 124, 125, -1, -1, -1, 89, -1, -1, 132, 133,
- 54, -1, 136, 137, -1, -1, -1, 141, -1, 63,
- 64, 65, 66, 147, 148, -1, 150, 54, -1, -1,
- 114, 115, 76, 77, 78, 79, 63, 64, 65, 66,
- 84, 125, -1, -1, -1, 89, -1, -1, 132, 76,
- 77, 78, 79, 137, -1, -1, -1, -1, -1, -1,
- -1, -1, 89, -1, 148, -1, 150, -1, -1, -1,
- 114, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 125, -1, -1, -1, -1, -1, 114, 132, -1,
- -1, -1, 136, 137, -1, -1, -1, -1, 125, -1,
- -1, -1, -1, 147, 148, 132, 150, -1, -1, -1,
- 137, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 148, -1, 150
-};
-
-/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
- state STATE-NUM. */
-static const yytype_int16 yystos[] =
-{
- 0, 153, 154, 155, 181, 182, 292, 3, 4, 5,
- 6, 8, 9, 10, 11, 51, 55, 58, 59, 60,
- 61, 67, 71, 72, 81, 82, 83, 87, 90, 91,
- 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
- 102, 103, 104, 105, 106, 107, 116, 118, 119, 121,
- 126, 129, 130, 131, 134, 139, 142, 146, 151, 164,
- 167, 168, 169, 172, 174, 175, 178, 282, 283, 291,
- 11, 12, 52, 55, 56, 58, 59, 60, 61, 62,
- 63, 68, 71, 75, 83, 90, 107, 129, 130, 135,
- 143, 144, 145, 146, 149, 151, 244, 245, 249, 250,
- 252, 258, 260, 264, 265, 270, 271, 272, 273, 0,
- 48, 50, 192, 292, 156, 174, 174, 174, 174, 174,
- 174, 174, 165, 174, 165, 174, 174, 174, 174, 174,
- 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
- 174, 174, 174, 174, 174, 11, 52, 56, 68, 143,
- 144, 247, 264, 265, 270, 282, 165, 174, 174, 15,
- 174, 282, 165, 174, 174, 174, 282, 282, 282, 282,
- 282, 11, 55, 58, 59, 60, 61, 71, 83, 90,
- 107, 129, 130, 146, 151, 249, 280, 282, 10, 11,
- 12, 69, 82, 83, 121, 122, 124, 130, 132, 160,
- 164, 169, 286, 287, 289, 292, 282, 16, 17, 18,
- 19, 20, 21, 22, 23, 24, 34, 161, 162, 163,
- 164, 165, 166, 167, 168, 169, 170, 171, 173, 174,
- 175, 6, 8, 244, 245, 174, 62, 135, 71, 107,
- 271, 271, 271, 289, 174, 271, 13, 15, 17, 63,
- 127, 150, 164, 169, 174, 242, 243, 292, 243, 259,
- 192, 192, 147, 193, 194, 289, 174, 158, 183, 279,
- 280, 292, 279, 249, 279, 279, 279, 279, 279, 249,
- 279, 249, 279, 249, 279, 249, 249, 249, 249, 249,
- 249, 249, 249, 249, 249, 249, 249, 249, 249, 249,
- 249, 279, 174, 289, 174, 174, 192, 192, 176, 249,
- 279, 279, 174, 249, 249, 249, 282, 279, 279, 176,
- 157, 176, 289, 289, 157, 179, 160, 232, 292, 282,
- 282, 282, 282, 282, 282, 282, 282, 282, 282, 282,
- 282, 282, 282, 282, 282, 282, 282, 282, 282, 282,
- 289, 176, 280, 282, 243, 243, 52, 282, 249, 169,
- 289, 192, 242, 243, 242, 243, 242, 243, 192, 192,
- 15, 17, 164, 169, 192, 227, 228, 237, 292, 175,
- 156, 10, 11, 12, 121, 159, 290, 10, 11, 12,
- 121, 156, 289, 290, 289, 49, 157, 174, 11, 52,
- 56, 68, 143, 144, 246, 250, 252, 258, 264, 265,
- 270, 282, 53, 54, 63, 64, 65, 66, 74, 76,
- 77, 78, 79, 80, 84, 89, 108, 109, 110, 111,
- 112, 113, 114, 115, 122, 123, 124, 125, 132, 133,
- 136, 137, 141, 147, 148, 150, 186, 188, 189, 191,
- 195, 215, 266, 269, 292, 177, 176, 176, 176, 176,
- 176, 176, 176, 166, 176, 166, 176, 176, 176, 176,
- 157, 176, 157, 176, 157, 176, 176, 176, 176, 176,
- 176, 176, 176, 176, 176, 176, 176, 282, 249, 279,
- 289, 289, 166, 176, 176, 289, 176, 166, 176, 176,
- 176, 176, 282, 282, 15, 164, 287, 174, 212, 292,
- 282, 159, 176, 179, 176, 176, 176, 192, 192, 13,
- 15, 17, 63, 127, 150, 164, 169, 242, 292, 242,
- 242, 192, 192, 192, 77, 89, 191, 176, 15, 157,
- 278, 282, 292, 262, 263, 292, 11, 261, 271, 159,
- 251, 253, 159, 192, 193, 3, 4, 5, 9, 10,
- 15, 51, 67, 72, 81, 82, 116, 119, 121, 126,
- 131, 134, 139, 142, 164, 167, 168, 172, 174, 178,
- 229, 230, 237, 238, 284, 285, 291, 292, 174, 289,
- 174, 176, 192, 192, 176, 191, 191, 191, 191, 191,
- 191, 6, 191, 215, 191, 282, 159, 190, 115, 191,
- 174, 174, 174, 174, 174, 174, 191, 156, 192, 159,
- 159, 159, 191, 191, 174, 189, 191, 195, 216, 191,
- 191, 199, 75, 115, 289, 191, 191, 10, 11, 120,
- 156, 172, 202, 206, 246, 248, 174, 174, 249, 249,
- 249, 176, 176, 176, 174, 176, 174, 232, 227, 17,
- 63, 65, 82, 114, 117, 118, 121, 138, 150, 164,
- 192, 282, 242, 169, 289, 192, 242, 242, 242, 192,
- 192, 175, 242, 242, 242, 244, 245, 212, 15, 237,
- 179, 289, 177, 261, 182, 82, 254, 292, 193, 174,
- 165, 165, 247, 165, 15, 174, 284, 165, 174, 282,
- 282, 282, 282, 249, 280, 282, 176, 15, 157, 16,
- 17, 18, 19, 20, 21, 22, 23, 24, 34, 161,
- 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
- 173, 174, 175, 52, 282, 249, 192, 289, 290, 289,
- 192, 191, 176, 188, 156, 289, 289, 289, 289, 289,
- 289, 289, 182, 289, 282, 165, 10, 11, 206, 246,
- 248, 289, 289, 158, 192, 174, 174, 63, 244, 187,
- 289, 197, 156, 158, 160, 234, 158, 196, 280, 280,
- 176, 176, 176, 280, 280, 176, 282, 174, 34, 225,
- 292, 192, 192, 242, 242, 242, 278, 176, 176, 176,
- 13, 17, 63, 127, 150, 164, 169, 174, 240, 290,
- 292, 13, 15, 17, 63, 127, 150, 164, 169, 174,
- 241, 192, 192, 192, 177, 159, 255, 256, 292, 49,
- 249, 249, 249, 174, 249, 174, 249, 249, 249, 282,
- 176, 176, 15, 238, 282, 282, 282, 282, 282, 282,
- 282, 282, 282, 282, 282, 282, 282, 282, 282, 282,
- 282, 282, 282, 282, 282, 289, 176, 280, 282, 176,
- 176, 176, 159, 191, 182, 156, 157, 157, 157, 157,
- 157, 157, 177, 156, 157, 176, 10, 11, 12, 62,
- 63, 143, 150, 217, 218, 219, 220, 221, 270, 292,
- 174, 234, 200, 158, 158, 160, 203, 10, 13, 169,
- 205, 244, 13, 17, 63, 127, 150, 164, 169, 239,
- 290, 292, 182, 174, 156, 158, 159, 160, 233, 274,
- 275, 69, 70, 156, 282, 13, 17, 63, 120, 150,
- 164, 169, 174, 198, 222, 224, 290, 176, 176, 176,
- 176, 212, 176, 176, 289, 63, 247, 156, 242, 179,
- 174, 174, 174, 169, 192, 240, 240, 240, 192, 192,
- 240, 175, 232, 192, 169, 289, 192, 241, 241, 241,
- 192, 192, 241, 175, 232, 225, 157, 160, 122, 123,
- 124, 143, 148, 257, 288, 289, 156, 157, 192, 176,
- 166, 166, 279, 166, 289, 176, 166, 176, 176, 282,
- 159, 176, 179, 261, 177, 268, 10, 10, 10, 10,
- 10, 10, 267, 291, 158, 221, 221, 166, 157, 15,
- 289, 13, 17, 63, 127, 150, 164, 169, 174, 240,
- 241, 201, 224, 249, 227, 176, 169, 222, 227, 239,
- 169, 192, 239, 239, 239, 192, 192, 174, 175, 192,
- 177, 207, 274, 184, 185, 289, 69, 70, 177, 276,
- 292, 158, 158, 156, 235, 236, 282, 292, 158, 169,
- 192, 222, 6, 16, 17, 18, 19, 20, 21, 22,
- 23, 24, 34, 36, 37, 38, 39, 40, 41, 42,
- 43, 44, 45, 46, 47, 70, 116, 157, 160, 162,
- 163, 164, 165, 166, 167, 168, 169, 170, 171, 172,
- 174, 175, 178, 213, 222, 192, 192, 222, 159, 174,
- 175, 225, 160, 232, 234, 192, 192, 15, 176, 247,
- 243, 274, 192, 227, 227, 227, 192, 240, 240, 240,
- 176, 278, 192, 192, 241, 241, 241, 176, 278, 282,
- 148, 288, 148, 288, 148, 288, 289, 122, 123, 124,
- 15, 182, 257, 174, 174, 176, 174, 176, 174, 282,
- 182, 157, 157, 176, 157, 226, 292, 157, 157, 157,
- 182, 176, 240, 241, 240, 241, 189, 195, 214, 215,
- 220, 289, 160, 169, 192, 192, 192, 160, 231, 292,
- 232, 234, 158, 176, 174, 222, 176, 176, 174, 192,
- 239, 239, 239, 210, 278, 227, 177, 156, 157, 156,
- 174, 158, 158, 3, 4, 5, 6, 7, 8, 9,
- 10, 11, 12, 13, 15, 16, 17, 18, 19, 20,
- 21, 22, 23, 24, 25, 26, 34, 35, 36, 37,
- 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 55, 56, 57, 58, 59,
- 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
- 70, 71, 72, 73, 75, 77, 78, 79, 80, 81,
- 82, 83, 84, 85, 86, 88, 89, 90, 107, 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, 156, 157,
- 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
- 168, 169, 170, 171, 172, 173, 174, 175, 176, 178,
- 179, 277, 235, 177, 157, 192, 222, 10, 176, 179,
- 192, 222, 222, 176, 282, 223, 278, 282, 157, 225,
- 176, 243, 177, 176, 176, 176, 240, 174, 179, 241,
- 174, 179, 157, 288, 288, 288, 288, 288, 288, 177,
- 280, 280, 280, 280, 177, 10, 10, 158, 10, 176,
- 10, 10, 10, 177, 158, 231, 231, 249, 192, 51,
- 67, 72, 126, 131, 134, 164, 167, 168, 169, 172,
- 174, 178, 281, 283, 157, 212, 204, 176, 174, 212,
- 211, 239, 227, 179, 176, 274, 185, 279, 279, 276,
- 177, 156, 282, 222, 192, 229, 179, 198, 156, 212,
- 212, 212, 227, 192, 227, 192, 176, 176, 176, 176,
- 176, 157, 176, 157, 158, 157, 176, 176, 157, 176,
- 174, 165, 165, 165, 15, 174, 281, 165, 281, 281,
- 281, 281, 281, 249, 280, 281, 16, 17, 18, 19,
- 20, 21, 22, 23, 24, 34, 161, 162, 163, 164,
- 167, 168, 169, 170, 171, 173, 174, 175, 201, 192,
- 227, 174, 208, 192, 227, 176, 192, 212, 177, 177,
- 176, 177, 235, 176, 192, 274, 192, 192, 192, 176,
- 176, 158, 10, 158, 10, 10, 158, 158, 10, 158,
- 249, 249, 249, 249, 174, 249, 249, 176, 176, 281,
- 281, 281, 281, 281, 281, 281, 281, 281, 281, 281,
- 281, 281, 281, 281, 281, 281, 281, 281, 289, 176,
- 280, 282, 176, 209, 227, 176, 212, 192, 15, 177,
- 212, 177, 225, 225, 225, 212, 212, 157, 226, 176,
- 157, 157, 176, 176, 166, 166, 166, 289, 176, 166,
- 281, 159, 176, 179, 212, 227, 176, 212, 192, 192,
- 192, 10, 176, 158, 10, 10, 158, 174, 174, 174,
- 176, 174, 281, 192, 176, 212, 158, 176, 157, 176,
- 280, 280, 280, 280, 212, 192, 158, 10, 158, 176,
- 176, 176, 176, 192, 225, 176, 225, 158
-};
-
-/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
-static const yytype_int16 yyr1[] =
-{
- 0, 180, 181, 181, 181, 182, 182, 183, 182, 184,
- 184, 185, 185, 185, 187, 186, 188, 188, 188, 188,
- 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
- 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
- 188, 188, 188, 190, 189, 191, 191, 191, 191, 191,
- 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
- 191, 191, 191, 192, 192, 192, 192, 192, 193, 193,
- 194, 194, 196, 195, 195, 197, 195, 195, 195, 198,
- 198, 200, 199, 199, 201, 201, 203, 202, 204, 202,
- 205, 202, 207, 206, 208, 206, 209, 206, 210, 206,
- 211, 206, 206, 212, 212, 212, 212, 212, 212, 212,
- 212, 212, 212, 212, 212, 212, 212, 213, 213, 213,
- 213, 213, 213, 213, 213, 213, 213, 213, 213, 213,
- 213, 213, 213, 213, 213, 213, 213, 213, 213, 213,
- 213, 213, 213, 213, 213, 213, 213, 213, 213, 213,
- 213, 213, 213, 213, 213, 213, 213, 214, 214, 214,
- 215, 216, 215, 215, 215, 217, 217, 218, 218, 219,
- 219, 220, 220, 220, 220, 220, 220, 220, 220, 220,
- 220, 220, 221, 221, 221, 221, 222, 222, 222, 222,
- 222, 222, 222, 222, 222, 222, 222, 223, 222, 224,
- 224, 225, 225, 225, 226, 226, 227, 227, 227, 227,
- 227, 228, 228, 229, 229, 229, 229, 229, 230, 230,
- 231, 231, 232, 232, 233, 233, 233, 233, 233, 234,
- 234, 234, 234, 234, 234, 235, 235, 235, 236, 236,
- 236, 236, 237, 237, 238, 238, 239, 239, 239, 239,
- 239, 239, 239, 239, 239, 239, 240, 240, 240, 240,
- 240, 240, 240, 240, 240, 240, 240, 240, 241, 241,
- 241, 241, 241, 241, 241, 241, 241, 241, 241, 241,
- 242, 242, 242, 242, 242, 242, 242, 242, 242, 242,
- 242, 243, 243, 243, 243, 243, 243, 243, 243, 243,
- 243, 243, 243, 243, 243, 243, 244, 244, 244, 244,
- 244, 244, 244, 244, 244, 244, 244, 244, 244, 245,
- 246, 246, 246, 246, 246, 246, 246, 246, 246, 246,
- 246, 246, 246, 246, 247, 247, 247, 247, 247, 247,
- 247, 247, 247, 248, 248, 249, 249, 249, 249, 251,
- 250, 253, 252, 254, 254, 255, 255, 256, 256, 257,
- 257, 257, 257, 257, 257, 257, 257, 257, 257, 259,
- 258, 260, 260, 260, 260, 261, 261, 262, 262, 262,
- 263, 263, 263, 264, 264, 264, 265, 265, 265, 267,
- 266, 268, 266, 266, 266, 269, 269, 269, 269, 270,
- 270, 270, 271, 271, 271, 271, 271, 271, 271, 271,
- 271, 271, 271, 271, 271, 271, 271, 272, 272, 272,
- 273, 275, 274, 276, 276, 277, 277, 277, 277, 277,
- 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
- 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
- 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
- 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
- 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
- 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
- 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
- 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
- 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
- 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
- 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
- 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
- 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
- 277, 277, 277, 278, 278, 279, 279, 280, 280, 281,
- 281, 281, 281, 281, 281, 281, 281, 281, 281, 281,
- 281, 281, 281, 281, 281, 281, 281, 281, 281, 281,
- 281, 281, 281, 281, 281, 281, 281, 281, 281, 281,
- 281, 281, 281, 281, 281, 281, 281, 281, 281, 282,
- 282, 282, 282, 282, 282, 282, 282, 282, 282, 282,
- 282, 282, 282, 282, 282, 282, 282, 282, 282, 282,
- 282, 282, 282, 282, 282, 282, 282, 282, 282, 282,
- 282, 282, 282, 282, 282, 282, 282, 282, 282, 282,
- 282, 282, 282, 282, 282, 282, 282, 282, 282, 282,
- 282, 282, 282, 282, 282, 282, 282, 282, 282, 282,
- 282, 283, 283, 283, 283, 283, 283, 283, 283, 283,
- 283, 283, 283, 283, 283, 283, 283, 283, 283, 283,
- 283, 283, 283, 283, 283, 283, 283, 283, 283, 283,
- 283, 283, 284, 284, 284, 284, 284, 284, 284, 284,
- 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
- 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
- 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
- 284, 284, 284, 284, 284, 284, 284, 285, 285, 285,
- 285, 285, 285, 285, 285, 285, 285, 285, 286, 286,
- 286, 286, 286, 287, 287, 287, 287, 288, 288, 288,
- 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
- 289, 290, 290, 290, 290, 291, 291, 291, 291, 292
-};
-
-/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
-static const yytype_int8 yyr2[] =
-{
- 0, 2, 2, 2, 2, 1, 3, 0, 4, 1,
- 3, 4, 5, 4, 0, 5, 1, 1, 1, 1,
- 1, 2, 1, 1, 2, 2, 2, 2, 8, 11,
- 9, 11, 13, 15, 7, 9, 12, 9, 9, 13,
- 9, 7, 5, 0, 3, 1, 2, 2, 3, 2,
- 2, 2, 2, 4, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 1, 4, 7, 5, 5, 1, 3,
- 1, 4, 0, 4, 3, 0, 4, 3, 1, 2,
- 4, 0, 4, 3, 2, 4, 0, 7, 0, 10,
- 0, 7, 0, 8, 0, 12, 0, 13, 0, 8,
- 0, 9, 1, 1, 2, 2, 2, 4, 2, 2,
- 2, 2, 2, 2, 4, 5, 6, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 2, 2, 1, 1, 1, 1, 1,
- 2, 0, 6, 2, 2, 1, 1, 1, 3, 1,
- 1, 1, 2, 4, 2, 3, 3, 4, 2, 3,
- 4, 3, 1, 1, 1, 1, 2, 3, 4, 2,
- 2, 3, 3, 3, 4, 5, 3, 0, 7, 2,
- 3, 1, 3, 4, 1, 2, 1, 1, 1, 3,
- 2, 1, 3, 1, 1, 1, 3, 2, 1, 3,
- 1, 2, 1, 2, 1, 3, 5, 3, 3, 1,
- 3, 3, 3, 3, 4, 1, 1, 2, 1, 3,
- 3, 5, 5, 5, 1, 1, 1, 2, 2, 2,
- 2, 3, 3, 3, 4, 5, 1, 2, 2, 2,
- 2, 3, 3, 3, 4, 5, 8, 3, 1, 3,
- 2, 2, 2, 3, 3, 3, 4, 5, 8, 3,
- 1, 1, 3, 2, 2, 2, 3, 3, 3, 4,
- 5, 1, 1, 3, 2, 2, 2, 3, 3, 3,
- 4, 5, 6, 11, 11, 11, 1, 1, 2, 1,
- 1, 1, 3, 5, 4, 4, 4, 1, 1, 1,
- 1, 1, 2, 1, 1, 1, 3, 5, 3, 4,
- 4, 4, 1, 1, 1, 1, 2, 3, 3, 4,
- 4, 1, 1, 1, 1, 2, 3, 2, 3, 0,
- 6, 0, 9, 1, 1, 1, 1, 2, 3, 1,
- 2, 2, 2, 3, 3, 3, 3, 3, 3, 0,
- 5, 4, 2, 5, 3, 1, 1, 1, 4, 6,
- 1, 3, 5, 1, 2, 2, 1, 1, 1, 0,
- 7, 0, 7, 4, 5, 3, 6, 4, 4, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 2, 2, 2, 2, 1, 1, 2,
- 1, 0, 2, 1, 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,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 3, 1, 1, 1, 1, 1, 3, 1,
- 4, 7, 7, 7, 7, 4, 2, 5, 4, 2,
- 2, 2, 2, 2, 2, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 5, 4, 4, 3, 3, 3, 3, 1,
- 4, 7, 7, 7, 7, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 2, 5, 4, 2, 5, 4, 4, 2, 2,
- 2, 2, 2, 2, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 5, 4, 4, 3, 3, 3, 3,
- 3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 9, 12, 4, 4, 6, 4, 4, 6,
- 6, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 1, 4, 7, 7, 7, 7, 4, 2,
- 5, 4, 2, 5, 4, 4, 2, 2, 2, 2,
- 2, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 5, 4, 4, 3, 3, 3, 3, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 2, 4, 2, 3, 1, 2, 1, 2, 2,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 2, 2, 0
-};
-
-
-enum { YYENOMEM = -2 };
-
-#define yyerrok (yyerrstatus = 0)
-#define yyclearin (yychar = YYEMPTY)
-
-#define YYACCEPT goto yyacceptlab
-#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrorlab
-#define YYNOMEM goto yyexhaustedlab
-
-
-#define YYRECOVERING() (!!yyerrstatus)
-
-#define YYBACKUP(Token, Value) \
- do \
- if (yychar == YYEMPTY) \
- { \
- yychar = (Token); \
- yylval = (Value); \
- YYPOPSTACK (yylen); \
- yystate = *yyssp; \
- goto yybackup; \
- } \
- else \
- { \
- yyerror (&yylloc, YY_("syntax error: cannot back up")); \
- YYERROR; \
- } \
- while (0)
-
-/* Backward compatibility with an undocumented macro.
- Use YYerror or YYUNDEF. */
-#define YYERRCODE YYUNDEF
-
-/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
- If N is 0, then set CURRENT to the empty location which ends
- the previous symbol: RHS[0] (always defined). */
-
-#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N) \
- do \
- if (N) \
- { \
- (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
- (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
- (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
- (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
- } \
- else \
- { \
- (Current).first_line = (Current).last_line = \
- YYRHSLOC (Rhs, 0).last_line; \
- (Current).first_column = (Current).last_column = \
- YYRHSLOC (Rhs, 0).last_column; \
- } \
- while (0)
-#endif
-
-#define YYRHSLOC(Rhs, K) ((Rhs)[K])
-
-
-/* Enable debugging if requested. */
-#if YYDEBUG
-
-# ifndef YYFPRINTF
-# include /* INFRINGES ON USER NAME SPACE */
-# define YYFPRINTF fprintf
-# endif
-
-# define YYDPRINTF(Args) \
-do { \
- if (yydebug) \
- YYFPRINTF Args; \
-} while (0)
-
-
-/* YYLOCATION_PRINT -- Print the location on the stream.
- This macro was not mandated originally: define only if we know
- we won't break user code: when these are the locations we know. */
-
-# ifndef YYLOCATION_PRINT
-
-# if defined YY_LOCATION_PRINT
-
- /* Temporary convenience wrapper in case some people defined the
- undocumented and private YY_LOCATION_PRINT macros. */
-# define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc))
-
-# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
-
-/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
-
-YY_ATTRIBUTE_UNUSED
-static int
-yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
-{
- int res = 0;
- int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
- if (0 <= yylocp->first_line)
- {
- res += YYFPRINTF (yyo, "%d", yylocp->first_line);
- if (0 <= yylocp->first_column)
- res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
- }
- if (0 <= yylocp->last_line)
- {
- if (yylocp->first_line < yylocp->last_line)
- {
- res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
- if (0 <= end_col)
- res += YYFPRINTF (yyo, ".%d", end_col);
- }
- else if (0 <= end_col && yylocp->first_column < end_col)
- res += YYFPRINTF (yyo, "-%d", end_col);
- }
- return res;
-}
-
-# define YYLOCATION_PRINT yy_location_print_
-
- /* Temporary convenience wrapper in case some people defined the
- undocumented and private YY_LOCATION_PRINT macros. */
-# define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc))
-
-# else
-
-# define YYLOCATION_PRINT(File, Loc) ((void) 0)
- /* Temporary convenience wrapper in case some people defined the
- undocumented and private YY_LOCATION_PRINT macros. */
-# define YY_LOCATION_PRINT YYLOCATION_PRINT
-
-# endif
-# endif /* !defined YYLOCATION_PRINT */
-
-
-# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
-do { \
- if (yydebug) \
- { \
- YYFPRINTF (stderr, "%s ", Title); \
- yy_symbol_print (stderr, \
- Kind, Value, Location); \
- YYFPRINTF (stderr, "\n"); \
- } \
-} while (0)
-
-
-/*-----------------------------------.
-| Print this symbol's value on YYO. |
-`-----------------------------------*/
-
-static void
-yy_symbol_value_print (FILE *yyo,
- yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
-{
- FILE *yyoutput = yyo;
- YY_USE (yyoutput);
- YY_USE (yylocationp);
- if (!yyvaluep)
- return;
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- YY_USE (yykind);
- YY_IGNORE_MAYBE_UNINITIALIZED_END
-}
-
-
-/*---------------------------.
-| Print this symbol on YYO. |
-`---------------------------*/
-
-static void
-yy_symbol_print (FILE *yyo,
- yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
-{
- YYFPRINTF (yyo, "%s %s (",
- yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
-
- YYLOCATION_PRINT (yyo, yylocationp);
- YYFPRINTF (yyo, ": ");
- yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp);
- YYFPRINTF (yyo, ")");
-}
-
-/*------------------------------------------------------------------.
-| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (included). |
-`------------------------------------------------------------------*/
-
-static void
-yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
-{
- YYFPRINTF (stderr, "Stack now");
- for (; yybottom <= yytop; yybottom++)
- {
- int yybot = *yybottom;
- YYFPRINTF (stderr, " %d", yybot);
- }
- YYFPRINTF (stderr, "\n");
-}
-
-# define YY_STACK_PRINT(Bottom, Top) \
-do { \
- if (yydebug) \
- yy_stack_print ((Bottom), (Top)); \
-} while (0)
-
-
-/*------------------------------------------------.
-| Report that the YYRULE is going to be reduced. |
-`------------------------------------------------*/
-
-static void
-yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp,
- int yyrule)
-{
- int yylno = yyrline[yyrule];
- int yynrhs = yyr2[yyrule];
- int yyi;
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
- yyrule - 1, yylno);
- /* The symbols being reduced. */
- for (yyi = 0; yyi < yynrhs; yyi++)
- {
- YYFPRINTF (stderr, " $%d = ", yyi + 1);
- yy_symbol_print (stderr,
- YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
- &yyvsp[(yyi + 1) - (yynrhs)],
- &(yylsp[(yyi + 1) - (yynrhs)]));
- YYFPRINTF (stderr, "\n");
- }
-}
-
-# define YY_REDUCE_PRINT(Rule) \
-do { \
- if (yydebug) \
- yy_reduce_print (yyssp, yyvsp, yylsp, Rule); \
-} while (0)
-
-/* Nonzero means print parse trace. It is left uninitialized so that
- multiple parsers can coexist. */
-int yydebug;
-#else /* !YYDEBUG */
-# define YYDPRINTF(Args) ((void) 0)
-# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
-# define YY_STACK_PRINT(Bottom, Top)
-# define YY_REDUCE_PRINT(Rule)
-#endif /* !YYDEBUG */
-
-
-/* YYINITDEPTH -- initial size of the parser's stacks. */
-#ifndef YYINITDEPTH
-# define YYINITDEPTH 200
-#endif
-
-/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
- if the built-in stack extension method is used).
-
- Do not make this value too large; the results are undefined if
- YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
- evaluated with infinite-precision integer arithmetic. */
-
-#ifndef YYMAXDEPTH
-# define YYMAXDEPTH 10000
-#endif
-
-
-
-
-
-
-/*-----------------------------------------------.
-| Release the memory associated to this symbol. |
-`-----------------------------------------------*/
-
-static void
-yydestruct (const char *yymsg,
- yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
-{
- YY_USE (yyvaluep);
- YY_USE (yylocationp);
- if (!yymsg)
- yymsg = "Deleting";
- YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
-
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- YY_USE (yykind);
- YY_IGNORE_MAYBE_UNINITIALIZED_END
-}
-
-
-
-
-
-
-/*----------.
-| yyparse. |
-`----------*/
-
-int
-yyparse (void)
-{
-/* Lookahead token kind. */
-int yychar;
-
-
-/* The semantic value of the lookahead symbol. */
-/* Default value used for initialization, for pacifying older GCCs
- or non-GCC compilers. */
-YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
-YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
-
-/* Location data for the lookahead symbol. */
-static YYLTYPE yyloc_default
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
- = { 1, 1, 1, 1 }
-# endif
-;
-YYLTYPE yylloc = yyloc_default;
-
- /* Number of syntax errors so far. */
- int yynerrs = 0;
-
- yy_state_fast_t yystate = 0;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus = 0;
-
- /* Refer to the stacks through separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
-
- /* Their size. */
- YYPTRDIFF_T yystacksize = YYINITDEPTH;
-
- /* The state stack: array, bottom, top. */
- yy_state_t yyssa[YYINITDEPTH];
- yy_state_t *yyss = yyssa;
- yy_state_t *yyssp = yyss;
-
- /* The semantic value stack: array, bottom, top. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs = yyvsa;
- YYSTYPE *yyvsp = yyvs;
-
- /* The location stack: array, bottom, top. */
- YYLTYPE yylsa[YYINITDEPTH];
- YYLTYPE *yyls = yylsa;
- YYLTYPE *yylsp = yyls;
-
- int yyn;
- /* The return value of yyparse. */
- int yyresult;
- /* Lookahead symbol kind. */
- yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
- /* The variables used to return semantic value and location from the
- action routines. */
- YYSTYPE yyval;
- YYLTYPE yyloc;
-
- /* The locations where the error started and ended. */
- YYLTYPE yyerror_range[3];
-
-
-
-#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
-
- /* The number of symbols on the RHS of the reduced rule.
- Keep to zero when no symbol should be popped. */
- int yylen = 0;
-
- YYDPRINTF ((stderr, "Starting parse\n"));
-
- yychar = YYEMPTY; /* Cause a token to be read. */
-
- yylsp[0] = yylloc;
- goto yysetstate;
-
-
-/*------------------------------------------------------------.
-| yynewstate -- push a new state, which is found in yystate. |
-`------------------------------------------------------------*/
-yynewstate:
- /* In all cases, when you get here, the value and location stacks
- have just been pushed. So pushing a state here evens the stacks. */
- yyssp++;
-
-
-/*--------------------------------------------------------------------.
-| yysetstate -- set current state (the top of the stack) to yystate. |
-`--------------------------------------------------------------------*/
-yysetstate:
- YYDPRINTF ((stderr, "Entering state %d\n", yystate));
- YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
- YY_IGNORE_USELESS_CAST_BEGIN
- *yyssp = YY_CAST (yy_state_t, yystate);
- YY_IGNORE_USELESS_CAST_END
- YY_STACK_PRINT (yyss, yyssp);
-
- if (yyss + yystacksize - 1 <= yyssp)
-#if !defined yyoverflow && !defined YYSTACK_RELOCATE
- YYNOMEM;
-#else
- {
- /* Get the current used size of the three stacks, in elements. */
- YYPTRDIFF_T yysize = yyssp - yyss + 1;
-
-# if defined yyoverflow
- {
- /* Give user a chance to reallocate the stack. Use copies of
- these so that the &'s don't force the real ones into
- memory. */
- yy_state_t *yyss1 = yyss;
- YYSTYPE *yyvs1 = yyvs;
- YYLTYPE *yyls1 = yyls;
-
- /* Each stack pointer address is followed by the size of the
- data in use in that stack, in bytes. This used to be a
- conditional around just the two extra args, but that might
- be undefined if yyoverflow is a macro. */
- yyoverflow (YY_("memory exhausted"),
- &yyss1, yysize * YYSIZEOF (*yyssp),
- &yyvs1, yysize * YYSIZEOF (*yyvsp),
- &yyls1, yysize * YYSIZEOF (*yylsp),
- &yystacksize);
- yyss = yyss1;
- yyvs = yyvs1;
- yyls = yyls1;
- }
-# else /* defined YYSTACK_RELOCATE */
- /* Extend the stack our own way. */
- if (YYMAXDEPTH <= yystacksize)
- YYNOMEM;
- yystacksize *= 2;
- if (YYMAXDEPTH < yystacksize)
- yystacksize = YYMAXDEPTH;
-
- {
- yy_state_t *yyss1 = yyss;
- union yyalloc *yyptr =
- YY_CAST (union yyalloc *,
- YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
- if (! yyptr)
- YYNOMEM;
- YYSTACK_RELOCATE (yyss_alloc, yyss);
- YYSTACK_RELOCATE (yyvs_alloc, yyvs);
- YYSTACK_RELOCATE (yyls_alloc, yyls);
-# undef YYSTACK_RELOCATE
- if (yyss1 != yyssa)
- YYSTACK_FREE (yyss1);
- }
-# endif
-
- yyssp = yyss + yysize - 1;
- yyvsp = yyvs + yysize - 1;
- yylsp = yyls + yysize - 1;
-
- YY_IGNORE_USELESS_CAST_BEGIN
- YYDPRINTF ((stderr, "Stack size increased to %ld\n",
- YY_CAST (long, yystacksize)));
- YY_IGNORE_USELESS_CAST_END
-
- if (yyss + yystacksize - 1 <= yyssp)
- YYABORT;
- }
-#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
-
-
- if (yystate == YYFINAL)
- YYACCEPT;
-
- goto yybackup;
-
-
-/*-----------.
-| yybackup. |
-`-----------*/
-yybackup:
- /* Do appropriate processing given the current state. Read a
- lookahead token if we need one and don't already have one. */
-
- /* First try to decide what to do without reference to lookahead token. */
- yyn = yypact[yystate];
- if (yypact_value_is_default (yyn))
- goto yydefault;
-
- /* Not known => get a lookahead token if don't already have one. */
-
- /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
- if (yychar == YYEMPTY)
- {
- YYDPRINTF ((stderr, "Reading a token\n"));
- yychar = yylex (&yylval, &yylloc);
- }
-
- if (yychar <= YYEOF)
- {
- yychar = YYEOF;
- yytoken = YYSYMBOL_YYEOF;
- YYDPRINTF ((stderr, "Now at end of input.\n"));
- }
- else if (yychar == 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. */
- yychar = YYUNDEF;
- yytoken = YYSYMBOL_YYerror;
- yyerror_range[1] = yylloc;
- goto yyerrlab1;
- }
- else
- {
- yytoken = YYTRANSLATE (yychar);
- YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
- }
-
- /* If the proper action on seeing token YYTOKEN is to reduce or to
- detect an error, take that action. */
- yyn += yytoken;
- if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
- goto yydefault;
- yyn = yytable[yyn];
- if (yyn <= 0)
- {
- if (yytable_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. */
- YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
- yystate = yyn;
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- *++yyvsp = yylval;
- YY_IGNORE_MAYBE_UNINITIALIZED_END
- *++yylsp = yylloc;
-
- /* Discard the shifted token. */
- yychar = YYEMPTY;
- goto yynewstate;
-
-
-/*-----------------------------------------------------------.
-| yydefault -- do the default action for the current state. |
-`-----------------------------------------------------------*/
-yydefault:
- yyn = yydefact[yystate];
- if (yyn == 0)
- goto yyerrlab;
- goto yyreduce;
-
-
-/*-----------------------------.
-| yyreduce -- do a reduction. |
-`-----------------------------*/
-yyreduce:
- /* yyn is the number of a rule to reduce with. */
- yylen = yyr2[yyn];
-
- /* If YYLEN is nonzero, implement the default value of the action:
- '$$ = $1'.
-
- Otherwise, the following line sets YYVAL to garbage.
- This behavior is undocumented and Bison
- users should not rely upon it. Assigning to YYVAL
- unconditionally makes the parser a bit smaller, and it avoids a
- GCC warning that YYVAL may be used uninitialized. */
- yyval = yyvsp[1-yylen];
-
- /* Default location. */
- YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
- yyerror_range[1] = yyloc;
- YY_REDUCE_PRINT (yyn);
- switch (yyn)
- {
- case 3: /* grammar: START_CONST_EXPR const_expr */
-#line 468 "dtool/src/cppparser/cppBison.yxx"
-{
- current_expr = (yyvsp[0].u.expr);
-}
-#line 3882 "built/tmp/cppBison.yxx.c"
- break;
-
- case 4: /* grammar: START_TYPE full_type */
-#line 472 "dtool/src/cppparser/cppBison.yxx"
-{
- current_type = (yyvsp[0].u.type);
-}
-#line 3890 "built/tmp/cppBison.yxx.c"
- break;
-
- case 6: /* cpp: cpp optional_attributes ';' */
-#line 480 "dtool/src/cppparser/cppBison.yxx"
-{
- if (!(yyvsp[-1].attr_list).is_empty()) {
- current_scope->add_declaration(new CPPDeclaration((yylsp[-1]).file, (yyvsp[-1].attr_list)), global_scope, current_lexer, (yylsp[-1]));
- }
-}
-#line 3900 "built/tmp/cppBison.yxx.c"
- break;
-
- case 7: /* $@1: %empty */
-#line 486 "dtool/src/cppparser/cppBison.yxx"
-{
- current_attributes = (yyvsp[0].attr_list);
-}
-#line 3908 "built/tmp/cppBison.yxx.c"
- break;
-
- case 8: /* cpp: cpp optional_attributes $@1 declaration */
-#line 490 "dtool/src/cppparser/cppBison.yxx"
-{
- current_attributes = CPPAttributeList();
-}
-#line 3916 "built/tmp/cppBison.yxx.c"
- break;
-
- case 11: /* constructor_init: name '(' optional_const_expr_comma ')' */
-#line 502 "dtool/src/cppparser/cppBison.yxx"
-{
- delete (yyvsp[-1].u.expr);
-}
-#line 3924 "built/tmp/cppBison.yxx.c"
- break;
-
- case 12: /* constructor_init: name '(' optional_const_expr_comma ')' ELLIPSIS */
-#line 506 "dtool/src/cppparser/cppBison.yxx"
-{
- delete (yyvsp[-2].u.expr);
-}
-#line 3932 "built/tmp/cppBison.yxx.c"
- break;
-
- case 13: /* constructor_init: name '{' optional_const_expr_comma '}' */
-#line 510 "dtool/src/cppparser/cppBison.yxx"
-{
- delete (yyvsp[-1].u.expr);
-}
-#line 3940 "built/tmp/cppBison.yxx.c"
- break;
-
- case 14: /* $@2: %empty */
-#line 522 "dtool/src/cppparser/cppBison.yxx"
-{
- push_storage_class((current_storage_class & ~CPPInstance::SC_c_binding) |
- ((yyvsp[-1].u.integer) & CPPInstance::SC_c_binding));
-}
-#line 3949 "built/tmp/cppBison.yxx.c"
- break;
-
- case 15: /* extern_c: storage_class '{' $@2 cpp '}' */
-#line 527 "dtool/src/cppparser/cppBison.yxx"
-{
- pop_storage_class();
-}
-#line 3957 "built/tmp/cppBison.yxx.c"
- break;
-
- case 22: /* declaration: KW_BEGIN_PUBLISH */
-#line 540 "dtool/src/cppparser/cppBison.yxx"
-{
- if (publish_nest_level != 0) {
- yyerror("Unclosed __begin_publish", publish_loc);
- publish_nest_level = 0;
- current_scope->set_current_vis(V_public);
- }
-
- publish_previous = current_scope->get_current_vis();
- publish_loc = (yylsp[0]);
- publish_nest_level++;
- current_scope->set_current_vis(V_published);
-}
-#line 3974 "built/tmp/cppBison.yxx.c"
- break;
-
- case 23: /* declaration: KW_END_PUBLISH */
-#line 553 "dtool/src/cppparser/cppBison.yxx"
-{
- if (publish_nest_level != 1) {
- yyerror("Unmatched __end_publish", (yylsp[0]));
- } else {
- current_scope->set_current_vis(publish_previous);
- }
- publish_nest_level = 0;
-}
-#line 3987 "built/tmp/cppBison.yxx.c"
- break;
-
- case 24: /* declaration: KW_PUBLISHED ':' */
-#line 562 "dtool/src/cppparser/cppBison.yxx"
-{
- current_scope->set_current_vis(V_published);
-}
-#line 3995 "built/tmp/cppBison.yxx.c"
- break;
-
- case 25: /* declaration: KW_PUBLIC ':' */
-#line 566 "dtool/src/cppparser/cppBison.yxx"
-{
- if (publish_nest_level > 0) {
- current_scope->set_current_vis(V_published);
- } else {
- current_scope->set_current_vis(V_public);
- }
-}
-#line 4007 "built/tmp/cppBison.yxx.c"
- break;
-
- case 26: /* declaration: KW_PROTECTED ':' */
-#line 574 "dtool/src/cppparser/cppBison.yxx"
-{
- current_scope->set_current_vis(V_protected);
-}
-#line 4015 "built/tmp/cppBison.yxx.c"
- break;
-
- case 27: /* declaration: KW_PRIVATE ':' */
-#line 578 "dtool/src/cppparser/cppBison.yxx"
-{
- current_scope->set_current_vis(V_private);
-}
-#line 4023 "built/tmp/cppBison.yxx.c"
- break;
-
- case 28: /* declaration: KW_MAKE_PROPERTY '(' name ',' IDENTIFIER maybe_comma_identifier ')' ';' */
-#line 582 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPDeclaration *getter = (yyvsp[-3].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (getter == nullptr || getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("Reference to non-existent or invalid getter: " + (yyvsp[-3].u.identifier)->get_fully_scoped_name(), (yylsp[-3]));
- } else {
- CPPMakeProperty *make_property = new CPPMakeProperty((yyvsp[-5].u.identifier), CPPMakeProperty::T_normal, current_scope, (yylsp[-7]).file);
- make_property->_get_function = getter->as_function_group();
-
- if ((yyvsp[-2].u.identifier) != nullptr) {
- CPPDeclaration *setter = (yyvsp[-2].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (setter == nullptr || setter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("Reference to non-existent or invalid setter: " + (yyvsp[-2].u.identifier)->get_fully_scoped_name(), (yylsp[-2]));
- } else {
- make_property->_set_function = setter->as_function_group();
- }
- }
-
- current_scope->add_declaration(make_property, global_scope, current_lexer, (yylsp[-7]));
- }
-}
-#line 4048 "built/tmp/cppBison.yxx.c"
- break;
-
- case 29: /* declaration: KW_MAKE_PROPERTY '(' name ',' IDENTIFIER ',' IDENTIFIER ',' IDENTIFIER ')' ';' */
-#line 603 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPDeclaration *getter = (yyvsp[-6].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (getter == nullptr || getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("Reference to non-existent or invalid getter: " + (yyvsp[-6].u.identifier)->get_fully_scoped_name(), (yylsp[-6]));
-
- } else {
- CPPMakeProperty *make_property = new CPPMakeProperty((yyvsp[-8].u.identifier), CPPMakeProperty::T_normal, current_scope, (yylsp[-10]).file);
- make_property->_get_function = getter->as_function_group();
-
- CPPDeclaration *setter = (yyvsp[-4].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (setter == nullptr || setter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("Reference to non-existent or invalid setter: " + (yyvsp[-4].u.identifier)->get_fully_scoped_name(), (yylsp[-4]));
- } else {
- make_property->_set_function = setter->as_function_group();
- }
-
- CPPDeclaration *deleter = (yyvsp[-2].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (deleter == nullptr || deleter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid delete method: " + (yyvsp[-2].u.identifier)->get_fully_scoped_name(), (yylsp[-2]));
- } else {
- make_property->_del_function = deleter->as_function_group();
- }
-
- current_scope->add_declaration(make_property, global_scope, current_lexer, (yylsp[-10]));
- }
-}
-#line 4079 "built/tmp/cppBison.yxx.c"
- break;
-
- case 30: /* declaration: KW_MAKE_SEQ_PROPERTY '(' name ',' IDENTIFIER ',' IDENTIFIER ')' ';' */
-#line 630 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPDeclaration *length_getter = (yyvsp[-4].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (length_getter == nullptr || length_getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid length method: " + (yyvsp[-4].u.identifier)->get_fully_scoped_name(), (yylsp[-4]));
- length_getter = nullptr;
- }
-
- CPPDeclaration *getter = (yyvsp[-2].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (getter == nullptr || getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("Reference to non-existent or invalid getter: " + (yyvsp[-2].u.identifier)->get_fully_scoped_name(), (yylsp[-2]));
- getter = nullptr;
- }
-
- if (getter != nullptr && length_getter != nullptr) {
- CPPMakeProperty *make_property = new CPPMakeProperty((yyvsp[-6].u.identifier), CPPMakeProperty::T_sequence, current_scope, (yylsp[-8]).file);
- make_property->_get_function = getter->as_function_group();
- make_property->_length_function = length_getter->as_function_group();
- current_scope->add_declaration(make_property, global_scope, current_lexer, (yylsp[-8]));
- }
-}
-#line 4104 "built/tmp/cppBison.yxx.c"
- break;
-
- case 31: /* declaration: KW_MAKE_SEQ_PROPERTY '(' name ',' IDENTIFIER ',' IDENTIFIER ',' IDENTIFIER ')' ';' */
-#line 651 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPDeclaration *length_getter = (yyvsp[-6].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (length_getter == nullptr || length_getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid length method: " + (yyvsp[-6].u.identifier)->get_fully_scoped_name(), (yylsp[-6]));
- length_getter = nullptr;
- }
-
- CPPDeclaration *getter = (yyvsp[-4].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (getter == nullptr || getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("Reference to non-existent or invalid getter: " + (yyvsp[-4].u.identifier)->get_fully_scoped_name(), (yylsp[-4]));
- getter = nullptr;
- }
-
- if (getter != nullptr && length_getter != nullptr) {
- CPPMakeProperty *make_property = new CPPMakeProperty((yyvsp[-8].u.identifier), CPPMakeProperty::T_sequence, current_scope, (yylsp[-10]).file);
- make_property->_get_function = getter->as_function_group();
- make_property->_length_function = length_getter->as_function_group();
-
- CPPDeclaration *setter = (yyvsp[-2].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (setter == nullptr || setter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("Reference to non-existent or invalid setter: " + (yyvsp[-2].u.identifier)->get_fully_scoped_name(), (yylsp[-2]));
- } else {
- make_property->_set_function = setter->as_function_group();
- }
-
- current_scope->add_declaration(make_property, global_scope, current_lexer, (yylsp[-10]));
- }
-}
-#line 4137 "built/tmp/cppBison.yxx.c"
- break;
-
- case 32: /* declaration: KW_MAKE_SEQ_PROPERTY '(' name ',' IDENTIFIER ',' IDENTIFIER ',' IDENTIFIER ',' IDENTIFIER ')' ';' */
-#line 680 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPDeclaration *length_getter = (yyvsp[-8].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (length_getter == nullptr || length_getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid length method: " + (yyvsp[-8].u.identifier)->get_fully_scoped_name(), (yylsp[-8]));
- length_getter = nullptr;
- }
-
- CPPDeclaration *getter = (yyvsp[-6].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (getter == nullptr || getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("Reference to non-existent or invalid getter: " + (yyvsp[-6].u.identifier)->get_fully_scoped_name(), (yylsp[-6]));
- getter = nullptr;
- }
-
- if (getter != nullptr && length_getter != nullptr) {
- CPPMakeProperty *make_property = new CPPMakeProperty((yyvsp[-10].u.identifier), CPPMakeProperty::T_sequence, current_scope, (yylsp[-12]).file);
- make_property->_get_function = getter->as_function_group();
- make_property->_length_function = length_getter->as_function_group();
-
- CPPDeclaration *setter = (yyvsp[-4].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (setter == nullptr || setter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("Reference to non-existent or invalid setter: " + (yyvsp[-4].u.identifier)->get_fully_scoped_name(), (yylsp[-4]));
- } else {
- make_property->_set_function = setter->as_function_group();
- }
-
- CPPDeclaration *deleter = (yyvsp[-2].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (deleter == nullptr || deleter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid delete method: " + (yyvsp[-2].u.identifier)->get_fully_scoped_name(), (yylsp[-2]));
- } else {
- make_property->_del_function = deleter->as_function_group();
- }
-
- current_scope->add_declaration(make_property, global_scope, current_lexer, (yylsp[-12]));
- }
-}
-#line 4177 "built/tmp/cppBison.yxx.c"
- break;
-
- case 33: /* declaration: KW_MAKE_SEQ_PROPERTY '(' name ',' IDENTIFIER ',' IDENTIFIER ',' IDENTIFIER ',' IDENTIFIER ',' IDENTIFIER ')' ';' */
-#line 716 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPDeclaration *length_getter = (yyvsp[-10].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (length_getter == nullptr || length_getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid length method: " + (yyvsp[-10].u.identifier)->get_fully_scoped_name(), (yylsp[-10]));
- length_getter = nullptr;
- }
-
- CPPDeclaration *getter = (yyvsp[-8].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (getter == nullptr || getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("Reference to non-existent or invalid getter: " + (yyvsp[-8].u.identifier)->get_fully_scoped_name(), (yylsp[-8]));
- getter = nullptr;
- }
-
- if (getter != nullptr && length_getter != nullptr) {
- CPPMakeProperty *make_property = new CPPMakeProperty((yyvsp[-12].u.identifier), CPPMakeProperty::T_sequence, current_scope, (yylsp[-14]).file);
- make_property->_get_function = getter->as_function_group();
- make_property->_length_function = length_getter->as_function_group();
-
- CPPDeclaration *setter = (yyvsp[-6].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (setter == nullptr || setter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("Reference to non-existent or invalid setter: " + (yyvsp[-6].u.identifier)->get_fully_scoped_name(), (yylsp[-6]));
- } else {
- make_property->_set_function = setter->as_function_group();
- }
-
- CPPDeclaration *deleter = (yyvsp[-4].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (deleter == nullptr || deleter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid delete method: " + (yyvsp[-4].u.identifier)->get_fully_scoped_name(), (yylsp[-4]));
- } else {
- make_property->_del_function = deleter->as_function_group();
- }
-
- CPPDeclaration *inserter = (yyvsp[-2].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (inserter == nullptr || inserter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid append method: " + (yyvsp[-2].u.identifier)->get_fully_scoped_name(), (yylsp[-2]));
- } else {
- make_property->_insert_function = inserter->as_function_group();
- }
-
- current_scope->add_declaration(make_property, global_scope, current_lexer, (yylsp[-14]));
- }
-}
-#line 4224 "built/tmp/cppBison.yxx.c"
- break;
-
- case 34: /* declaration: KW_MAKE_MAP_PROPERTY '(' name ',' IDENTIFIER ')' ';' */
-#line 759 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPDeclaration *getter = (yyvsp[-2].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (getter == nullptr || getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid item getter method: " + (yyvsp[-2].u.identifier)->get_fully_scoped_name(), (yylsp[-2]));
-
- } else {
- CPPMakeProperty *make_property = new CPPMakeProperty((yyvsp[-4].u.identifier), CPPMakeProperty::T_mapping, current_scope, (yylsp[-6]).file);
- make_property->_get_function = getter->as_function_group();
- current_scope->add_declaration(make_property, global_scope, current_lexer, (yylsp[-6]));
- }
-}
-#line 4240 "built/tmp/cppBison.yxx.c"
- break;
-
- case 35: /* declaration: KW_MAKE_MAP_PROPERTY '(' name ',' IDENTIFIER ',' IDENTIFIER ')' ';' */
-#line 771 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPDeclaration *getter = (yyvsp[-2].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (getter == nullptr || getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("Reference to non-existent or invalid getter: " + (yyvsp[-2].u.identifier)->get_fully_scoped_name(), (yylsp[-2]));
-
- } else {
- CPPMakeProperty *make_property;
- make_property = new CPPMakeProperty((yyvsp[-6].u.identifier), CPPMakeProperty::T_mapping, current_scope, (yylsp[-8]).file);
- make_property->_get_function = getter->as_function_group();
-
- CPPDeclaration *hasser = (yyvsp[-4].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (hasser == nullptr || hasser->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid has/find method: " + (yyvsp[-4].u.identifier)->get_fully_scoped_name(), (yylsp[-4]));
- } else {
- make_property->_has_function = hasser->as_function_group();
- }
-
- current_scope->add_declaration(make_property, global_scope, current_lexer, (yylsp[-8]));
- }
-}
-#line 4265 "built/tmp/cppBison.yxx.c"
- break;
-
- case 36: /* declaration: KW_MAKE_MAP_PROPERTY '(' name ',' IDENTIFIER ',' IDENTIFIER ',' IDENTIFIER maybe_comma_identifier ')' ';' */
-#line 792 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPDeclaration *getter = (yyvsp[-5].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (getter == nullptr || getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("Reference to non-existent or invalid getter: " + (yyvsp[-5].u.identifier)->get_fully_scoped_name(), (yylsp[-5]));
-
- } else {
- CPPMakeProperty *make_property = new CPPMakeProperty((yyvsp[-9].u.identifier), CPPMakeProperty::T_mapping, current_scope, (yylsp[-11]).file);
- make_property->_get_function = getter->as_function_group();
-
- CPPDeclaration *hasser = (yyvsp[-7].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (hasser == nullptr || hasser->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid has/find method: " + (yyvsp[-7].u.identifier)->get_fully_scoped_name(), (yylsp[-7]));
- } else {
- make_property->_has_function = hasser->as_function_group();
- }
-
- CPPDeclaration *setter = (yyvsp[-3].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (setter == nullptr || setter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("Reference to non-existent or invalid setter: " + (yyvsp[-3].u.identifier)->get_fully_scoped_name(), (yylsp[-3]));
- } else {
- make_property->_set_function = setter->as_function_group();
- }
-
- if ((yyvsp[-2].u.identifier) != nullptr) {
- CPPDeclaration *deleter = (yyvsp[-2].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (deleter == nullptr || deleter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid delete method: " + (yyvsp[-2].u.identifier)->get_fully_scoped_name(), (yylsp[-2]));
- } else {
- make_property->_del_function = deleter->as_function_group();
- }
- }
-
- current_scope->add_declaration(make_property, global_scope, current_lexer, (yylsp[-11]));
- }
-}
-#line 4305 "built/tmp/cppBison.yxx.c"
- break;
-
- case 37: /* declaration: KW_MAKE_MAP_KEYS_SEQ '(' name ',' IDENTIFIER ',' IDENTIFIER ')' ';' */
-#line 828 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPDeclaration *length_getter = (yyvsp[-4].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (length_getter == nullptr || length_getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid length method: " + (yyvsp[-4].u.identifier)->get_fully_scoped_name(), (yylsp[-4]));
- length_getter = nullptr;
- }
-
- CPPDeclaration *getter = (yyvsp[-2].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (getter == nullptr || getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid getter: " + (yyvsp[-2].u.identifier)->get_fully_scoped_name(), (yylsp[-2]));
- getter = nullptr;
- }
-
- if (getter != nullptr && length_getter != nullptr) {
- CPPMakeProperty *make_property = nullptr;
- for (size_t i = 0; i < current_scope->_declarations.size(); ++i) {
- make_property = current_scope->_declarations[i]->as_make_property();
- if (make_property != nullptr) {
- if (make_property->get_fully_scoped_name() == (yyvsp[-6].u.identifier)->get_fully_scoped_name()) {
- break;
- } else {
- make_property = nullptr;
- }
- }
- }
- if (make_property != nullptr) {
- make_property->_get_key_function = getter->as_function_group();
- make_property->_length_function = length_getter->as_function_group();
- } else {
- yyerror("reference to non-existent MAKE_MAP_PROPERTY: " + (yyvsp[-6].u.identifier)->get_fully_scoped_name(), (yylsp[-6]));
- }
- }
-}
-#line 4343 "built/tmp/cppBison.yxx.c"
- break;
-
- case 38: /* declaration: KW_MAKE_PROPERTY2 '(' name ',' IDENTIFIER ',' IDENTIFIER ')' ';' */
-#line 862 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPDeclaration *getter = (yyvsp[-2].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (getter == nullptr || getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("Reference to non-existent or invalid getter: " + (yyvsp[-2].u.identifier)->get_fully_scoped_name(), (yylsp[-2]));
-
- } else {
- CPPMakeProperty *make_property;
- make_property = new CPPMakeProperty((yyvsp[-6].u.identifier), CPPMakeProperty::T_normal,
- current_scope, (yylsp[-8]).file);
- make_property->_get_function = getter->as_function_group();
-
- CPPDeclaration *hasser = (yyvsp[-4].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (hasser == nullptr || hasser->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid has/find method: " + (yyvsp[-4].u.identifier)->get_fully_scoped_name(), (yylsp[-4]));
- } else {
- make_property->_has_function = hasser->as_function_group();
- }
-
- current_scope->add_declaration(make_property, global_scope, current_lexer, (yylsp[-8]));
- }
-}
-#line 4369 "built/tmp/cppBison.yxx.c"
- break;
-
- case 39: /* declaration: KW_MAKE_PROPERTY2 '(' name ',' IDENTIFIER ',' IDENTIFIER ',' IDENTIFIER ',' IDENTIFIER ')' ';' */
-#line 884 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPDeclaration *getter = (yyvsp[-6].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (getter == nullptr || getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("Reference to non-existent or invalid getter: " + (yyvsp[-6].u.identifier)->get_fully_scoped_name(), (yylsp[-6]));
-
- } else {
- CPPMakeProperty *make_property;
- make_property = new CPPMakeProperty((yyvsp[-10].u.identifier), CPPMakeProperty::T_normal,
- current_scope, (yylsp[-12]).file);
- make_property->_get_function = getter->as_function_group();
-
- CPPDeclaration *hasser = (yyvsp[-8].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (hasser == nullptr || hasser->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid has/find method: " + (yyvsp[-8].u.identifier)->get_fully_scoped_name(), (yylsp[-8]));
- } else {
- make_property->_has_function = hasser->as_function_group();
- }
-
- CPPDeclaration *setter = (yyvsp[-4].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (setter == nullptr || setter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid setter: " + (yyvsp[-4].u.identifier)->get_fully_scoped_name(), (yylsp[-4]));
- } else {
- make_property->_set_function = setter->as_function_group();
- }
-
- CPPDeclaration *clearer = (yyvsp[-2].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (clearer == nullptr || clearer->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid clear method: " + (yyvsp[-2].u.identifier)->get_fully_scoped_name(), (yylsp[-2]));
- } else {
- make_property->_clear_function = clearer->as_function_group();
- }
-
- current_scope->add_declaration(make_property, global_scope, current_lexer, (yylsp[-12]));
- }
-}
-#line 4409 "built/tmp/cppBison.yxx.c"
- break;
-
- case 40: /* declaration: KW_MAKE_SEQ '(' name ',' IDENTIFIER ',' IDENTIFIER ')' ';' */
-#line 920 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPDeclaration *length_getter = (yyvsp[-4].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (length_getter == nullptr || length_getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid length method: " + (yyvsp[-4].u.identifier)->get_fully_scoped_name(), (yylsp[-4]));
- length_getter = nullptr;
- }
-
- CPPDeclaration *element_getter = (yyvsp[-2].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (element_getter == nullptr || element_getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid element method: " + (yyvsp[-2].u.identifier)->get_fully_scoped_name(), (yylsp[-4]));
- element_getter = nullptr;
- }
-
- if (length_getter != nullptr && element_getter != nullptr) {
- CPPMakeSeq *make_seq = new CPPMakeSeq((yyvsp[-6].u.identifier),
- length_getter->as_function_group(),
- element_getter->as_function_group(),
- current_scope, (yylsp[-8]).file);
- current_scope->add_declaration(make_seq, global_scope, current_lexer, (yylsp[-8]));
- }
-}
-#line 4435 "built/tmp/cppBison.yxx.c"
- break;
-
- case 41: /* declaration: KW_STATIC_ASSERT '(' const_expr ',' string_literal ')' ';' */
-#line 942 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPExpression::Result result = (yyvsp[-4].u.expr)->evaluate();
- if (result._type == CPPExpression::RT_error) {
- yywarning("static_assert requires a constant expression", (yylsp[-4]));
- } else if (!result.as_boolean()) {
- stringstream str;
- str << *(yyvsp[-2].u.expr);
- yywarning("static_assert failed: " + str.str(), (yylsp[-4]));
- }
-}
-#line 4450 "built/tmp/cppBison.yxx.c"
- break;
-
- case 42: /* declaration: KW_STATIC_ASSERT '(' const_expr ')' ';' */
-#line 953 "dtool/src/cppparser/cppBison.yxx"
-{
- // This alternative version of static_assert was introduced in C++17.
- CPPExpression::Result result = (yyvsp[-2].u.expr)->evaluate();
- if (result._type == CPPExpression::RT_error) {
- yywarning("static_assert requires a constant expression", (yylsp[-2]));
- } else if (!result.as_boolean()) {
- yywarning("static_assert failed", (yylsp[-2]));
- }
-}
-#line 4464 "built/tmp/cppBison.yxx.c"
- break;
-
- case 43: /* $@3: %empty */
-#line 966 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPScope *new_scope = new CPPScope(current_scope, CPPNameComponent("temp"),
- V_public);
- push_scope(new_scope);
-}
-#line 4474 "built/tmp/cppBison.yxx.c"
- break;
-
- case 44: /* friend_declaration: KW_FRIEND $@3 declaration */
-#line 972 "dtool/src/cppparser/cppBison.yxx"
-{
- delete current_scope;
- pop_scope();
-}
-#line 4483 "built/tmp/cppBison.yxx.c"
- break;
-
- case 45: /* storage_class: empty */
-#line 981 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.integer) = 0;
-}
-#line 4491 "built/tmp/cppBison.yxx.c"
- break;
-
- case 46: /* storage_class: KW_CONST storage_class */
-#line 985 "dtool/src/cppparser/cppBison.yxx"
-{
- // This isn't really a storage class, but it helps with parsing.
- (yyval.u.integer) = (yyvsp[0].u.integer) | (int)CPPInstance::SC_const;
-}
-#line 4500 "built/tmp/cppBison.yxx.c"
- break;
-
- case 47: /* storage_class: KW_EXTERN storage_class */
-#line 990 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.integer) = (yyvsp[0].u.integer) | (int)CPPInstance::SC_extern;
-}
-#line 4508 "built/tmp/cppBison.yxx.c"
- break;
-
- case 48: /* storage_class: KW_EXTERN SIMPLE_STRING storage_class */
-#line 994 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.integer) = (yyvsp[0].u.integer) | (int)CPPInstance::SC_extern;
- if ((yyvsp[-1].str) == "C") {
- (yyval.u.integer) |= (int)CPPInstance::SC_c_binding;
- } else if ((yyvsp[-1].str) == "C++") {
- (yyval.u.integer) &= ~(int)CPPInstance::SC_c_binding;
- } else {
- yywarning("Ignoring unknown linkage type \"" + (yyvsp[-1].str) + "\"", (yylsp[-1]));
- }
-}
-#line 4523 "built/tmp/cppBison.yxx.c"
- break;
-
- case 49: /* storage_class: KW_STATIC storage_class */
-#line 1005 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.integer) = (yyvsp[0].u.integer) | (int)CPPInstance::SC_static;
-}
-#line 4531 "built/tmp/cppBison.yxx.c"
- break;
-
- case 50: /* storage_class: KW_INLINE storage_class */
-#line 1009 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.integer) = (yyvsp[0].u.integer) | (int)CPPInstance::SC_inline;
-}
-#line 4539 "built/tmp/cppBison.yxx.c"
- break;
-
- case 51: /* storage_class: KW_VIRTUAL storage_class */
-#line 1013 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.integer) = (yyvsp[0].u.integer) | (int)CPPInstance::SC_virtual;
-}
-#line 4547 "built/tmp/cppBison.yxx.c"
- break;
-
- case 52: /* storage_class: KW_EXPLICIT storage_class */
-#line 1017 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.integer) = (yyvsp[0].u.integer) | (int)CPPInstance::SC_explicit;
-}
-#line 4555 "built/tmp/cppBison.yxx.c"
- break;
-
- case 53: /* storage_class: KW_EXPLICIT_LPAREN const_expr ')' storage_class */
-#line 1021 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPExpression::Result result = (yyvsp[-2].u.expr)->evaluate();
- if (result._type == CPPExpression::RT_error) {
- yywarning("explicit() requires a constant expression", (yylsp[-2]));
- } else if (result.as_boolean()) {
- (yyval.u.integer) = (yyvsp[0].u.integer) | (int)CPPInstance::SC_explicit;
- }
-}
-#line 4568 "built/tmp/cppBison.yxx.c"
- break;
-
- case 54: /* storage_class: KW_REGISTER storage_class */
-#line 1030 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.integer) = (yyvsp[0].u.integer) | (int)CPPInstance::SC_register;
-}
-#line 4576 "built/tmp/cppBison.yxx.c"
- break;
-
- case 55: /* storage_class: KW_VOLATILE storage_class */
-#line 1034 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.integer) = (yyvsp[0].u.integer) | (int)CPPInstance::SC_volatile;
-}
-#line 4584 "built/tmp/cppBison.yxx.c"
- break;
-
- case 56: /* storage_class: KW_MUTABLE storage_class */
-#line 1038 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.integer) = (yyvsp[0].u.integer) | (int)CPPInstance::SC_mutable;
-}
-#line 4592 "built/tmp/cppBison.yxx.c"
- break;
-
- case 57: /* storage_class: KW_CONSTEVAL storage_class */
-#line 1042 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.integer) = (yyvsp[0].u.integer) | (int)CPPInstance::SC_consteval;
-}
-#line 4600 "built/tmp/cppBison.yxx.c"
- break;
-
- case 58: /* storage_class: KW_CONSTEXPR storage_class */
-#line 1046 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.integer) = (yyvsp[0].u.integer) | (int)CPPInstance::SC_constexpr;
-}
-#line 4608 "built/tmp/cppBison.yxx.c"
- break;
-
- case 59: /* storage_class: KW_CONSTINIT storage_class */
-#line 1050 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.integer) = (yyvsp[0].u.integer) | (int)CPPInstance::SC_constinit;
-}
-#line 4616 "built/tmp/cppBison.yxx.c"
- break;
-
- case 60: /* storage_class: KW_BLOCKING storage_class */
-#line 1054 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.integer) = (yyvsp[0].u.integer) | (int)CPPInstance::SC_blocking;
-}
-#line 4624 "built/tmp/cppBison.yxx.c"
- break;
-
- case 61: /* storage_class: KW_EXTENSION storage_class */
-#line 1058 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.integer) = (yyvsp[0].u.integer) | (int)CPPInstance::SC_extension;
-}
-#line 4632 "built/tmp/cppBison.yxx.c"
- break;
-
- case 62: /* storage_class: KW_THREAD_LOCAL storage_class */
-#line 1062 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.integer) = (yyvsp[0].u.integer) | (int)CPPInstance::SC_thread_local;
-}
-#line 4640 "built/tmp/cppBison.yxx.c"
- break;
-
- case 63: /* optional_attributes: empty */
-#line 1069 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.attr_list) = CPPAttributeList();
-}
-#line 4648 "built/tmp/cppBison.yxx.c"
- break;
-
- case 64: /* optional_attributes: ATTR_LEFT attribute_specifiers ATTR_RIGHT optional_attributes */
-#line 1073 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.attr_list) = (yyvsp[-2].attr_list);
- (yyval.attr_list).add_attributes_from((yyvsp[0].attr_list));
-}
-#line 4657 "built/tmp/cppBison.yxx.c"
- break;
-
- case 65: /* optional_attributes: ATTR_LEFT KW_USING name ':' attribute_specifiers ATTR_RIGHT optional_attributes */
-#line 1078 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.attr_list) = (yyvsp[-2].attr_list);
- for (CPPAttributeList::Attribute &attr : (yyval.attr_list)._attributes) {
- attr._ident->prepend((yyvsp[-4].u.identifier));
- }
- (yyval.attr_list).add_attributes_from((yyvsp[0].attr_list));
-}
-#line 4669 "built/tmp/cppBison.yxx.c"
- break;
-
- case 66: /* optional_attributes: KW_ALIGNAS '(' const_expr ')' optional_attributes */
-#line 1086 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.attr_list) = (yyvsp[0].attr_list);
- (yyval.attr_list).add_alignas((yyvsp[-2].u.expr)->as_expression());
-}
-#line 4678 "built/tmp/cppBison.yxx.c"
- break;
-
- case 67: /* optional_attributes: KW_ALIGNAS '(' type_decl ')' optional_attributes */
-#line 1091 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.attr_list) = (yyvsp[0].attr_list);
- (yyval.attr_list).add_alignas((yyvsp[-2].u.decl)->as_type());
-}
-#line 4687 "built/tmp/cppBison.yxx.c"
- break;
-
- case 68: /* attribute_specifiers: attribute_specifier */
-#line 1099 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.attr_list) = (yyvsp[0].attr_list);
-}
-#line 4695 "built/tmp/cppBison.yxx.c"
- break;
-
- case 69: /* attribute_specifiers: attribute_specifier ',' attribute_specifiers */
-#line 1103 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.attr_list) = (yyvsp[-2].attr_list);
- (yyval.attr_list).add_attributes_from((yyvsp[0].attr_list));
-}
-#line 4704 "built/tmp/cppBison.yxx.c"
- break;
-
- case 70: /* attribute_specifier: name */
-#line 1111 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.attr_list) = CPPAttributeList();
- (yyval.attr_list).add_attribute((yyvsp[0].u.identifier));
-}
-#line 4713 "built/tmp/cppBison.yxx.c"
- break;
-
- case 71: /* attribute_specifier: name '(' formal_parameter_list ')' */
-#line 1116 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.attr_list) = CPPAttributeList();
- (yyval.attr_list).add_attribute((yyvsp[-3].u.identifier));
-}
-#line 4722 "built/tmp/cppBison.yxx.c"
- break;
-
- case 72: /* $@4: %empty */
-#line 1124 "dtool/src/cppparser/cppBison.yxx"
-{
- // We don't need to push/pop type, because we can't nest
- // type_like_declaration.
- if ((yyvsp[0].u.decl)->as_type_declaration()) {
- current_type = (yyvsp[0].u.decl)->as_type_declaration()->_type;
- } else {
- current_type = (yyvsp[0].u.decl)->as_type();
- }
- push_storage_class((yyvsp[-1].u.integer));
-}
-#line 4737 "built/tmp/cppBison.yxx.c"
- break;
-
- case 73: /* type_like_declaration: storage_class var_type_decl $@4 multiple_instance_identifiers */
-#line 1135 "dtool/src/cppparser/cppBison.yxx"
-{
- pop_storage_class();
-}
-#line 4745 "built/tmp/cppBison.yxx.c"
- break;
-
- case 74: /* type_like_declaration: storage_class type_decl ';' */
-#line 1140 "dtool/src/cppparser/cppBison.yxx"
-{
- // We don't really care about the storage class here. In fact, it's
- // not actually legal to define a class or struct using a particular
- // storage class, but we require it just to help yacc out in its
- // parsing.
-
- current_scope->add_declaration((yyvsp[-1].u.decl), global_scope, current_lexer, (yylsp[-1]));
-}
-#line 4758 "built/tmp/cppBison.yxx.c"
- break;
-
- case 75: /* $@5: %empty */
-#line 1149 "dtool/src/cppparser/cppBison.yxx"
-{
- if ((yyvsp[0].u.instance) != nullptr) {
- // Push the scope so that the initializers can make use of things defined
- // in the class body.
- push_scope((yyvsp[0].u.instance)->get_scope(current_scope, global_scope));
- (yyvsp[0].u.instance)->_storage_class |= (current_storage_class | (yyvsp[-1].u.integer));
- }
-}
-#line 4771 "built/tmp/cppBison.yxx.c"
- break;
-
- case 76: /* type_like_declaration: storage_class constructor_prototype $@5 maybe_initialize_or_constructor_body */
-#line 1158 "dtool/src/cppparser/cppBison.yxx"
-{
- if ((yyvsp[-2].u.instance) != nullptr) {
- pop_scope();
- current_scope->add_declaration((yyvsp[-2].u.instance), global_scope, current_lexer, (yylsp[-2]));
- (yyvsp[-2].u.instance)->set_initializer((yyvsp[0].u.expr));
- }
-}
-#line 4783 "built/tmp/cppBison.yxx.c"
- break;
-
- case 77: /* type_like_declaration: storage_class function_prototype maybe_initialize_or_function_body */
-#line 1166 "dtool/src/cppparser/cppBison.yxx"
-{
- if ((yyvsp[-1].u.instance) != nullptr) {
- (yyvsp[-1].u.instance)->_storage_class |= (current_storage_class | (yyvsp[-2].u.integer));
- current_scope->add_declaration((yyvsp[-1].u.instance), global_scope, current_lexer, (yylsp[-1]));
- (yyvsp[-1].u.instance)->set_initializer((yyvsp[0].u.expr));
- }
-}
-#line 4795 "built/tmp/cppBison.yxx.c"
- break;
-
- case 79: /* multiple_instance_identifiers: instance_identifier_and_maybe_trailing_return_type maybe_initialize_or_function_body */
-#line 1182 "dtool/src/cppparser/cppBison.yxx"
-{
- if (current_storage_class & CPPInstance::SC_const) {
- (yyvsp[-1].u.inst_ident)->add_modifier(IIT_const);
- }
- (yyvsp[-1].u.inst_ident)->add_attributes(current_attributes);
- CPPInstance *inst = new CPPInstance(current_type, (yyvsp[-1].u.inst_ident),
- current_storage_class,
- (yylsp[-1]).file);
- inst->set_initializer((yyvsp[0].u.expr));
- current_scope->add_declaration(inst, global_scope, current_lexer, (yylsp[-1]));
-}
-#line 4811 "built/tmp/cppBison.yxx.c"
- break;
-
- case 80: /* multiple_instance_identifiers: instance_identifier_and_maybe_trailing_return_type maybe_initialize ',' multiple_instance_identifiers */
-#line 1194 "dtool/src/cppparser/cppBison.yxx"
-{
- if (current_storage_class & CPPInstance::SC_const) {
- (yyvsp[-3].u.inst_ident)->add_modifier(IIT_const);
- }
- (yyvsp[-3].u.inst_ident)->add_attributes(current_attributes);
- CPPInstance *inst = new CPPInstance(current_type, (yyvsp[-3].u.inst_ident),
- current_storage_class,
- (yylsp[-3]).file);
- inst->set_initializer((yyvsp[-2].u.expr));
- current_scope->add_declaration(inst, global_scope, current_lexer, (yylsp[-3]));
-}
-#line 4827 "built/tmp/cppBison.yxx.c"
- break;
-
- case 81: /* $@6: %empty */
-#line 1210 "dtool/src/cppparser/cppBison.yxx"
-{
- // We don't need to push/pop type, because we can't nest
- // multiple_var_declarations.
- if ((yyvsp[0].u.decl)->as_type_declaration()) {
- current_type = (yyvsp[0].u.decl)->as_type_declaration()->_type;
- } else {
- current_type = (yyvsp[0].u.decl)->as_type();
- }
- push_storage_class((yyvsp[-1].u.integer));
-}
-#line 4842 "built/tmp/cppBison.yxx.c"
- break;
-
- case 82: /* typedef_declaration: storage_class var_type_decl $@6 typedef_instance_identifiers */
-#line 1221 "dtool/src/cppparser/cppBison.yxx"
-{
- pop_storage_class();
-}
-#line 4850 "built/tmp/cppBison.yxx.c"
- break;
-
- case 83: /* typedef_declaration: storage_class function_prototype maybe_initialize_or_function_body */
-#line 1225 "dtool/src/cppparser/cppBison.yxx"
-{
- if ((yyvsp[-1].u.instance) != nullptr) {
- CPPInstance *inst = (yyvsp[-1].u.instance)->as_instance();
- if (inst != nullptr) {
- inst->_storage_class |= (current_storage_class | (yyvsp[-2].u.integer));
- current_scope->add_declaration(inst, global_scope, current_lexer, (yylsp[-1]));
- CPPTypedefType *typedef_type = new CPPTypedefType(inst->_type, inst->_ident, current_scope, inst->_attributes);
- current_scope->add_declaration(CPPType::new_type(typedef_type), global_scope, current_lexer, (yylsp[-1]));
- }
- }
-}
-#line 4866 "built/tmp/cppBison.yxx.c"
- break;
-
- case 84: /* typedef_instance_identifiers: instance_identifier_and_maybe_trailing_return_type maybe_initialize_or_function_body */
-#line 1240 "dtool/src/cppparser/cppBison.yxx"
-{
- if (current_storage_class & CPPInstance::SC_const) {
- (yyvsp[-1].u.inst_ident)->add_modifier(IIT_const);
- }
- (yyvsp[-1].u.inst_ident)->add_attributes(current_attributes);
- CPPType *target_type = current_type;
- CPPTypedefType *typedef_type = new CPPTypedefType(target_type, (yyvsp[-1].u.inst_ident), current_scope, (yylsp[-1]).file);
- current_scope->add_declaration(CPPType::new_type(typedef_type), global_scope, current_lexer, (yylsp[-1]));
-}
-#line 4880 "built/tmp/cppBison.yxx.c"
- break;
-
- case 85: /* typedef_instance_identifiers: instance_identifier_and_maybe_trailing_return_type maybe_initialize ',' typedef_instance_identifiers */
-#line 1250 "dtool/src/cppparser/cppBison.yxx"
-{
- if (current_storage_class & CPPInstance::SC_const) {
- (yyvsp[-3].u.inst_ident)->add_modifier(IIT_const);
- }
- (yyvsp[-3].u.inst_ident)->add_attributes(current_attributes);
- CPPType *target_type = current_type;
- CPPTypedefType *typedef_type = new CPPTypedefType(target_type, (yyvsp[-3].u.inst_ident), current_scope, (yylsp[-3]).file);
- current_scope->add_declaration(CPPType::new_type(typedef_type), global_scope, current_lexer, (yylsp[-3]));
-}
-#line 4894 "built/tmp/cppBison.yxx.c"
- break;
-
- case 86: /* $@7: %empty */
-#line 1265 "dtool/src/cppparser/cppBison.yxx"
-{
- // Create a scope for this function.
- CPPScope *scope = new CPPScope((yyvsp[-1].u.identifier)->get_scope(current_scope, global_scope),
- (yyvsp[-1].u.identifier)->_names.back(), V_private);
-
- // It still needs to be able to pick up any template arguments, if this is
- // a definition for a method template. Add a fake "using" declaration to
- // accomplish this.
- scope->_using.insert(current_scope);
-
- push_scope(scope);
-}
-#line 4911 "built/tmp/cppBison.yxx.c"
- break;
-
- case 87: /* constructor_prototype: IDENTIFIER '(' $@7 function_parameter_list ')' function_post optional_attributes */
-#line 1278 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPScope *scope = (yyvsp[-6].u.identifier)->get_scope(current_scope, global_scope);
- CPPType *type;
- std::string simple_name = (yyvsp[-6].u.identifier)->get_simple_name();
- if (!simple_name.empty() && simple_name[0] == '~') {
- // A destructor has no return type.
- type = new CPPSimpleType(CPPSimpleType::T_void);
- }
- else if (scope != nullptr && simple_name == scope->get_simple_name()) {
- // Neither does a constructor.
- type = new CPPSimpleType(CPPSimpleType::T_void);
- }
- else {
- // This isn't a constructor, so it has an implicit return type of
- // int.
- yywarning("function has no return type, assuming int", (yylsp[-6]));
- type = new CPPSimpleType(CPPSimpleType::T_int);
- }
- pop_scope();
-
- CPPInstanceIdentifier *ii = new CPPInstanceIdentifier((yyvsp[-6].u.identifier));
- ii->add_func_modifier((yyvsp[-3].u.param_list), (yyvsp[-1].u.integer), nullptr, (yyvsp[0].attr_list));
- ii->add_attributes(current_attributes);
-
- (yyval.u.instance) = new CPPInstance(type, ii, 0, (yylsp[-6]).file);
-}
-#line 4942 "built/tmp/cppBison.yxx.c"
- break;
-
- case 88: /* $@8: %empty */
-#line 1307 "dtool/src/cppparser/cppBison.yxx"
-{
- // Create a scope for this function.
- CPPScope *scope = new CPPScope((yyvsp[-2].u.identifier)->get_scope(current_scope, global_scope),
- (yyvsp[-2].u.identifier)->_names.back(), V_private);
-
- // It still needs to be able to pick up any template arguments, if this is
- // a definition for a method template. Add a fake "using" declaration to
- // accomplish this.
- scope->_using.insert(current_scope);
-
- push_scope(scope);
-}
-#line 4959 "built/tmp/cppBison.yxx.c"
- break;
-
- case 89: /* constructor_prototype: TYPENAME_IDENTIFIER '(' IDENTIFIER ')' '(' $@8 function_parameter_list ')' function_post optional_attributes */
-#line 1320 "dtool/src/cppparser/cppBison.yxx"
-{
- pop_scope();
- CPPType *type = (yyvsp[-9].u.identifier)->find_type(current_scope, global_scope, false, current_lexer);
- if (type == nullptr) {
- yyerror(string("internal error resolving type ") + (yyvsp[-9].u.identifier)->get_fully_scoped_name(), (yylsp[-9]));
- }
- assert(type != nullptr);
-
- CPPInstanceIdentifier *ii = new CPPInstanceIdentifier((yyvsp[-7].u.identifier));
- ii->add_func_modifier((yyvsp[-3].u.param_list), (yyvsp[-1].u.integer), nullptr, (yyvsp[0].attr_list));
- ii->add_attributes(current_attributes);
-
- (yyval.u.instance) = new CPPInstance(type, ii, 0, (yylsp[-9]).file);
-}
-#line 4978 "built/tmp/cppBison.yxx.c"
- break;
-
- case 90: /* $@9: %empty */
-#line 1335 "dtool/src/cppparser/cppBison.yxx"
-{
- // Create a scope for this function.
- CPPScope *scope = new CPPScope((yyvsp[-1].u.identifier)->get_scope(current_scope, global_scope),
- (yyvsp[-1].u.identifier)->_names.back(), V_private);
-
- // It still needs to be able to pick up any template arguments, if this is
- // a definition for a method template. Add a fake "using" declaration to
- // accomplish this.
- scope->_using.insert(current_scope);
-
- push_scope(scope);
-}
-#line 4995 "built/tmp/cppBison.yxx.c"
- break;
-
- case 91: /* constructor_prototype: TYPENAME_IDENTIFIER '(' $@9 function_parameter_list ')' function_post optional_attributes */
-#line 1348 "dtool/src/cppparser/cppBison.yxx"
-{
- pop_scope();
- CPPType *type;
- if ((yyvsp[-6].u.identifier)->get_simple_name() == current_scope->get_simple_name()) {
- // This is a constructor, and has no return.
- type = new CPPSimpleType(CPPSimpleType::T_void);
- } else {
- // This isn't a constructor, so it has an implicit return type of
- // int.
- type = new CPPSimpleType(CPPSimpleType::T_int);
- }
-
- CPPInstanceIdentifier *ii = new CPPInstanceIdentifier((yyvsp[-6].u.identifier));
- ii->add_func_modifier((yyvsp[-3].u.param_list), (yyvsp[-1].u.integer), nullptr, (yyvsp[0].attr_list));
- ii->add_attributes(current_attributes);
-
- (yyval.u.instance) = new CPPInstance(type, ii, 0, (yylsp[-6]).file);
-}
-#line 5018 "built/tmp/cppBison.yxx.c"
- break;
-
- case 92: /* $@10: %empty */
-#line 1372 "dtool/src/cppparser/cppBison.yxx"
-{
- push_scope((yyvsp[-1].u.identifier)->get_scope(current_scope, global_scope));
-}
-#line 5026 "built/tmp/cppBison.yxx.c"
- break;
-
- case 93: /* function_prototype: '~' name '(' $@10 function_parameter_list ')' function_post optional_attributes */
-#line 1376 "dtool/src/cppparser/cppBison.yxx"
-{
- pop_scope();
- if ((yyvsp[-6].u.identifier)->is_scoped()) {
- yyerror("Invalid destructor name: ~" + (yyvsp[-6].u.identifier)->get_fully_scoped_name(), (yylsp[-6]));
- } else {
- CPPIdentifier *ident =
- new CPPIdentifier("~" + (yyvsp[-6].u.identifier)->get_simple_name(), (yylsp[-6]));
- delete (yyvsp[-6].u.identifier);
-
- CPPType *type;
- type = new CPPSimpleType(CPPSimpleType::T_void);
-
- CPPInstanceIdentifier *ii = new CPPInstanceIdentifier(ident);
- ii->add_func_modifier((yyvsp[-3].u.param_list), (yyvsp[-1].u.integer), nullptr, (yyvsp[0].attr_list));
- ii->add_attributes(current_attributes);
-
- (yyval.u.instance) = new CPPInstance(type, ii, 0, (yylsp[-6]).file);
- }
-}
-#line 5050 "built/tmp/cppBison.yxx.c"
- break;
-
- case 94: /* $@11: %empty */
-#line 1403 "dtool/src/cppparser/cppBison.yxx"
-{
- push_scope((yyvsp[-2].u.inst_ident)->get_scope(current_scope, global_scope));
-}
-#line 5058 "built/tmp/cppBison.yxx.c"
- break;
-
- case 95: /* function_prototype: TYPENAME_IDENTIFIER '(' '*' instance_identifier ')' '(' $@11 function_parameter_list ')' function_post optional_attributes maybe_trailing_return_type */
-#line 1407 "dtool/src/cppparser/cppBison.yxx"
-{
- pop_scope();
- CPPType *type = (yyvsp[-11].u.identifier)->find_type(current_scope, global_scope, false, current_lexer);
- if (type == nullptr) {
- yyerror(string("internal error resolving type ") + (yyvsp[-11].u.identifier)->get_fully_scoped_name(), (yylsp[-11]));
- }
- assert(type != nullptr);
-
- CPPInstanceIdentifier *ii = (yyvsp[-8].u.inst_ident);
- ii->add_modifier(IIT_pointer);
- ii->add_func_modifier((yyvsp[-4].u.param_list), (yyvsp[-2].u.integer), nullptr, (yyvsp[-1].attr_list));
- ii->add_attributes(current_attributes);
- (yyval.u.instance) = new CPPInstance(type, ii, 0, (yylsp[-11]).file);
-}
-#line 5077 "built/tmp/cppBison.yxx.c"
- break;
-
- case 96: /* $@12: %empty */
-#line 1422 "dtool/src/cppparser/cppBison.yxx"
-{
- push_scope((yyvsp[-2].u.inst_ident)->get_scope(current_scope, global_scope));
-}
-#line 5085 "built/tmp/cppBison.yxx.c"
- break;
-
- case 97: /* function_prototype: TYPENAME_IDENTIFIER '(' SCOPING '*' instance_identifier ')' '(' $@12 function_parameter_list ')' function_post optional_attributes maybe_trailing_return_type */
-#line 1426 "dtool/src/cppparser/cppBison.yxx"
-{
- pop_scope();
- CPPType *type = (yyvsp[-12].u.identifier)->find_type(current_scope, global_scope, false, current_lexer);
- if (type == nullptr) {
- yyerror(string("internal error resolving type ") + (yyvsp[-12].u.identifier)->get_fully_scoped_name(), (yylsp[-12]));
- }
- assert(type != nullptr);
-
- CPPInstanceIdentifier *ii = (yyvsp[-8].u.inst_ident);
- ii->add_scoped_pointer_modifier((yyvsp[-10].u.identifier));
- ii->add_func_modifier((yyvsp[-4].u.param_list), (yyvsp[-2].u.integer), nullptr, (yyvsp[-1].attr_list));
- ii->add_attributes(current_attributes);
- (yyval.u.instance) = new CPPInstance(type, ii, 0, (yylsp[-12]).file);
-}
-#line 5104 "built/tmp/cppBison.yxx.c"
- break;
-
- case 98: /* $@13: %empty */
-#line 1443 "dtool/src/cppparser/cppBison.yxx"
-{
- if ((yyvsp[-3].u.identifier) != nullptr) {
- push_scope((yyvsp[-3].u.identifier)->get_scope(current_scope, global_scope));
- }
-}
-#line 5114 "built/tmp/cppBison.yxx.c"
- break;
-
- case 99: /* function_prototype: KW_OPERATOR type not_paren_formal_parameter_identifier '(' $@13 function_parameter_list ')' function_post */
-#line 1449 "dtool/src/cppparser/cppBison.yxx"
-{
- if ((yyvsp[-7].u.identifier) != nullptr) {
- pop_scope();
- }
-
- // We use formal_parameter_identifier, because that can match a type
- // name with or without an identifier, but especially without, which
- // is what follows the keyword "operator" in a typecast function.
- // As an added bonus, the type of the formal_parameter will be the
- // typecast type, i.e. the return type of the typecast function.
-
- // We give typecast operators the name "operator typecast ",
- // where is a simple name of the type to be typecast. Use
- // the method's return type to determine the full type description.
- string name = "operator typecast " + (yyvsp[-6].u.type)->get_simple_name();
- CPPIdentifier *ident = (yyvsp[-7].u.identifier);
- if (ident == nullptr) {
- ident = new CPPIdentifier(name, (yylsp[-6]));
- } else {
- ident->add_name(name);
- }
- (yyval.u.instance) = CPPInstance::make_typecast_function
- (new CPPInstance((yyvsp[-6].u.type), (yyvsp[-5].u.inst_ident), 0, (yylsp[-5]).file), ident, (yyvsp[-2].u.param_list), (yyvsp[0].u.integer));
- (yyval.u.instance)->_attributes.add_attributes_from(current_attributes);
-}
-#line 5144 "built/tmp/cppBison.yxx.c"
- break;
-
- case 100: /* $@14: %empty */
-#line 1475 "dtool/src/cppparser/cppBison.yxx"
-{
- if ((yyvsp[-4].u.identifier) != nullptr) {
- push_scope((yyvsp[-4].u.identifier)->get_scope(current_scope, global_scope));
- }
-}
-#line 5154 "built/tmp/cppBison.yxx.c"
- break;
-
- case 101: /* function_prototype: KW_OPERATOR KW_CONST type not_paren_formal_parameter_identifier '(' $@14 function_parameter_list ')' function_post */
-#line 1481 "dtool/src/cppparser/cppBison.yxx"
-{
- if ((yyvsp[-8].u.identifier) != nullptr) {
- pop_scope();
- }
-
- CPPIdentifier *ident = (yyvsp[-8].u.identifier);
- if (ident == nullptr) {
- ident = new CPPIdentifier("operator typecast", (yylsp[-5]));
- } else {
- ident->add_name("operator typecast");
- }
- (yyvsp[-5].u.inst_ident)->add_modifier(IIT_const);
- (yyvsp[-5].u.inst_ident)->add_attributes(current_attributes);
- (yyval.u.instance) = CPPInstance::make_typecast_function
- (new CPPInstance((yyvsp[-6].u.type), (yyvsp[-5].u.inst_ident), 0, (yylsp[-5]).file), ident, (yyvsp[-2].u.param_list), (yyvsp[0].u.integer));
-}
-#line 5175 "built/tmp/cppBison.yxx.c"
- break;
-
- case 102: /* function_prototype: IDENTIFIER */
-#line 1502 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPDeclaration *decl =
- (yyvsp[0].u.identifier)->find_symbol(current_scope, global_scope, current_lexer);
- if (decl != nullptr) {
- (yyval.u.instance) = decl->as_instance();
- } else {
- (yyval.u.instance) = nullptr;
- }
-}
-#line 5189 "built/tmp/cppBison.yxx.c"
- break;
-
- case 103: /* function_post: empty */
-#line 1515 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.integer) = 0;
-}
-#line 5197 "built/tmp/cppBison.yxx.c"
- break;
-
- case 104: /* function_post: function_post KW_CONST */
-#line 1519 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.integer) = (yyvsp[-1].u.integer) | (int)CPPFunctionType::F_const_method;
-}
-#line 5205 "built/tmp/cppBison.yxx.c"
- break;
-
- case 105: /* function_post: function_post KW_VOLATILE */
-#line 1523 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.integer) = (yyvsp[-1].u.integer) | (int)CPPFunctionType::F_volatile_method;
-}
-#line 5213 "built/tmp/cppBison.yxx.c"
- break;
-
- case 106: /* function_post: function_post KW_NOEXCEPT */
-#line 1527 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.integer) = (yyvsp[-1].u.integer) | (int)CPPFunctionType::F_noexcept;
-}
-#line 5221 "built/tmp/cppBison.yxx.c"
- break;
-
- case 107: /* function_post: function_post KW_NOEXCEPT_LPAREN const_expr ')' */
-#line 1531 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPExpression::Result result = (yyvsp[-1].u.expr)->evaluate();
- if (result._type == CPPExpression::RT_error) {
- yywarning("noexcept() requires a constant expression", (yylsp[-1]));
- } else if (result.as_boolean()) {
- (yyval.u.integer) = (yyvsp[-3].u.integer) | (int)CPPFunctionType::F_noexcept;
- }
-}
-#line 5234 "built/tmp/cppBison.yxx.c"
- break;
-
- case 108: /* function_post: function_post KW_FINAL */
-#line 1540 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.integer) = (yyvsp[-1].u.integer) | (int)CPPFunctionType::F_final;
-}
-#line 5242 "built/tmp/cppBison.yxx.c"
- break;
-
- case 109: /* function_post: function_post KW_OVERRIDE */
-#line 1544 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.integer) = (yyvsp[-1].u.integer) | (int)CPPFunctionType::F_override;
-}
-#line 5250 "built/tmp/cppBison.yxx.c"
- break;
-
- case 110: /* function_post: function_post '&' */
-#line 1548 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.integer) = (yyvsp[-1].u.integer) | (int)CPPFunctionType::F_lvalue_method;
-}
-#line 5258 "built/tmp/cppBison.yxx.c"
- break;
-
- case 111: /* function_post: function_post ANDAND */
-#line 1552 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.integer) = (yyvsp[-1].u.integer) | (int)CPPFunctionType::F_rvalue_method;
-}
-#line 5266 "built/tmp/cppBison.yxx.c"
- break;
-
- case 112: /* function_post: function_post KW_MUTABLE */
-#line 1556 "dtool/src/cppparser/cppBison.yxx"
-{
- // Used for lambdas, currently ignored.
- (yyval.u.integer) = (yyvsp[-1].u.integer);
-}
-#line 5275 "built/tmp/cppBison.yxx.c"
- break;
-
- case 113: /* function_post: function_post KW_CONSTEXPR */
-#line 1561 "dtool/src/cppparser/cppBison.yxx"
-{
- // Used for lambdas in C++17, currently ignored.
- (yyval.u.integer) = (yyvsp[-1].u.integer);
-}
-#line 5284 "built/tmp/cppBison.yxx.c"
- break;
-
- case 114: /* function_post: function_post KW_THROW '(' ')' */
-#line 1566 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.integer) = (yyvsp[-3].u.integer);
-}
-#line 5292 "built/tmp/cppBison.yxx.c"
- break;
-
- case 115: /* function_post: function_post KW_THROW '(' name ')' */
-#line 1570 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.integer) = (yyvsp[-4].u.integer);
-}
-#line 5300 "built/tmp/cppBison.yxx.c"
- break;
-
- case 116: /* function_post: function_post KW_THROW '(' name ELLIPSIS ')' */
-#line 1574 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.integer) = (yyvsp[-5].u.integer);
-}
-#line 5308 "built/tmp/cppBison.yxx.c"
- break;
-
- case 117: /* function_operator: '!' */
-#line 1581 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "!";
-}
-#line 5316 "built/tmp/cppBison.yxx.c"
- break;
-
- case 118: /* function_operator: '~' */
-#line 1585 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "~";
-}
-#line 5324 "built/tmp/cppBison.yxx.c"
- break;
-
- case 119: /* function_operator: '*' */
-#line 1589 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "*";
-}
-#line 5332 "built/tmp/cppBison.yxx.c"
- break;
-
- case 120: /* function_operator: '/' */
-#line 1593 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "/";
-}
-#line 5340 "built/tmp/cppBison.yxx.c"
- break;
-
- case 121: /* function_operator: '%' */
-#line 1597 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "%";
-}
-#line 5348 "built/tmp/cppBison.yxx.c"
- break;
-
- case 122: /* function_operator: '+' */
-#line 1601 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "+";
-}
-#line 5356 "built/tmp/cppBison.yxx.c"
- break;
-
- case 123: /* function_operator: '-' */
-#line 1605 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "-";
-}
-#line 5364 "built/tmp/cppBison.yxx.c"
- break;
-
- case 124: /* function_operator: '|' */
-#line 1609 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "|";
-}
-#line 5372 "built/tmp/cppBison.yxx.c"
- break;
-
- case 125: /* function_operator: '&' */
-#line 1613 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "&";
-}
-#line 5380 "built/tmp/cppBison.yxx.c"
- break;
-
- case 126: /* function_operator: '^' */
-#line 1617 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "^";
-}
-#line 5388 "built/tmp/cppBison.yxx.c"
- break;
-
- case 127: /* function_operator: OROR */
-#line 1621 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "||";
-}
-#line 5396 "built/tmp/cppBison.yxx.c"
- break;
-
- case 128: /* function_operator: ANDAND */
-#line 1625 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "&&";
-}
-#line 5404 "built/tmp/cppBison.yxx.c"
- break;
-
- case 129: /* function_operator: EQCOMPARE */
-#line 1629 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "==";
-}
-#line 5412 "built/tmp/cppBison.yxx.c"
- break;
-
- case 130: /* function_operator: NECOMPARE */
-#line 1633 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "!=";
-}
-#line 5420 "built/tmp/cppBison.yxx.c"
- break;
-
- case 131: /* function_operator: LECOMPARE */
-#line 1637 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "<=";
-}
-#line 5428 "built/tmp/cppBison.yxx.c"
- break;
-
- case 132: /* function_operator: GECOMPARE */
-#line 1641 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = ">=";
-}
-#line 5436 "built/tmp/cppBison.yxx.c"
- break;
-
- case 133: /* function_operator: '<' */
-#line 1645 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "<";
-}
-#line 5444 "built/tmp/cppBison.yxx.c"
- break;
-
- case 134: /* function_operator: '>' */
-#line 1649 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = ">";
-}
-#line 5452 "built/tmp/cppBison.yxx.c"
- break;
-
- case 135: /* function_operator: SPACESHIP */
-#line 1653 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "<=>";
-}
-#line 5460 "built/tmp/cppBison.yxx.c"
- break;
-
- case 136: /* function_operator: LSHIFT */
-#line 1657 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "<<";
-}
-#line 5468 "built/tmp/cppBison.yxx.c"
- break;
-
- case 137: /* function_operator: RSHIFT */
-#line 1661 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = ">>";
-}
-#line 5476 "built/tmp/cppBison.yxx.c"
- break;
-
- case 138: /* function_operator: '=' */
-#line 1665 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "=";
-}
-#line 5484 "built/tmp/cppBison.yxx.c"
- break;
-
- case 139: /* function_operator: ',' */
-#line 1669 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = ",";
-}
-#line 5492 "built/tmp/cppBison.yxx.c"
- break;
-
- case 140: /* function_operator: PLUSPLUS */
-#line 1673 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "++";
-}
-#line 5500 "built/tmp/cppBison.yxx.c"
- break;
-
- case 141: /* function_operator: MINUSMINUS */
-#line 1677 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "--";
-}
-#line 5508 "built/tmp/cppBison.yxx.c"
- break;
-
- case 142: /* function_operator: TIMESEQUAL */
-#line 1681 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "*=";
-}
-#line 5516 "built/tmp/cppBison.yxx.c"
- break;
-
- case 143: /* function_operator: DIVIDEEQUAL */
-#line 1685 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "/=";
-}
-#line 5524 "built/tmp/cppBison.yxx.c"
- break;
-
- case 144: /* function_operator: MODEQUAL */
-#line 1689 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "%=";
-}
-#line 5532 "built/tmp/cppBison.yxx.c"
- break;
-
- case 145: /* function_operator: PLUSEQUAL */
-#line 1693 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "+=";
-}
-#line 5540 "built/tmp/cppBison.yxx.c"
- break;
-
- case 146: /* function_operator: MINUSEQUAL */
-#line 1697 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "-=";
-}
-#line 5548 "built/tmp/cppBison.yxx.c"
- break;
-
- case 147: /* function_operator: OREQUAL */
-#line 1701 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "|=";
-}
-#line 5556 "built/tmp/cppBison.yxx.c"
- break;
-
- case 148: /* function_operator: ANDEQUAL */
-#line 1705 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "&=";
-}
-#line 5564 "built/tmp/cppBison.yxx.c"
- break;
-
- case 149: /* function_operator: XOREQUAL */
-#line 1709 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "^=";
-}
-#line 5572 "built/tmp/cppBison.yxx.c"
- break;
-
- case 150: /* function_operator: LSHIFTEQUAL */
-#line 1713 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "<<=";
-}
-#line 5580 "built/tmp/cppBison.yxx.c"
- break;
-
- case 151: /* function_operator: RSHIFTEQUAL */
-#line 1717 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = ">>=";
-}
-#line 5588 "built/tmp/cppBison.yxx.c"
- break;
-
- case 152: /* function_operator: POINTSAT */
-#line 1721 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "->";
-}
-#line 5596 "built/tmp/cppBison.yxx.c"
- break;
-
- case 153: /* function_operator: '[' ']' */
-#line 1725 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "[]";
-}
-#line 5604 "built/tmp/cppBison.yxx.c"
- break;
-
- case 154: /* function_operator: '(' ')' */
-#line 1729 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "()";
-}
-#line 5612 "built/tmp/cppBison.yxx.c"
- break;
-
- case 155: /* function_operator: KW_NEW */
-#line 1733 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "new";
-}
-#line 5620 "built/tmp/cppBison.yxx.c"
- break;
-
- case 156: /* function_operator: KW_DELETE */
-#line 1737 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.str) = "delete";
-}
-#line 5628 "built/tmp/cppBison.yxx.c"
- break;
-
- case 161: /* $@15: %empty */
-#line 1751 "dtool/src/cppparser/cppBison.yxx"
-{
- push_scope(new CPPTemplateScope(current_scope));
-}
-#line 5636 "built/tmp/cppBison.yxx.c"
- break;
-
- case 162: /* template_declaration: KW_TEMPLATE $@15 '<' template_formal_parameters '>' more_template_declaration */
-#line 1755 "dtool/src/cppparser/cppBison.yxx"
-{
- pop_scope();
-}
-#line 5644 "built/tmp/cppBison.yxx.c"
- break;
-
- case 167: /* template_nonempty_formal_parameters: template_formal_parameter */
-#line 1769 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPTemplateScope *ts = current_scope->as_template_scope();
- assert(ts != nullptr);
- ts->add_template_parameter((yyvsp[0].u.decl));
-}
-#line 5654 "built/tmp/cppBison.yxx.c"
- break;
-
- case 168: /* template_nonempty_formal_parameters: template_nonempty_formal_parameters ',' template_formal_parameter */
-#line 1775 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPTemplateScope *ts = current_scope->as_template_scope();
- assert(ts != nullptr);
- ts->add_template_parameter((yyvsp[0].u.decl));
-}
-#line 5664 "built/tmp/cppBison.yxx.c"
- break;
-
- case 171: /* template_formal_parameter: typename_keyword */
-#line 1789 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.decl) = CPPType::new_type(new CPPClassTemplateParameter(nullptr));
-}
-#line 5672 "built/tmp/cppBison.yxx.c"
- break;
-
- case 172: /* template_formal_parameter: typename_keyword name */
-#line 1793 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.decl) = CPPType::new_type(new CPPClassTemplateParameter((yyvsp[0].u.identifier)));
-}
-#line 5680 "built/tmp/cppBison.yxx.c"
- break;
-
- case 173: /* template_formal_parameter: typename_keyword name '=' full_type */
-#line 1797 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.decl) = CPPType::new_type(new CPPClassTemplateParameter((yyvsp[-2].u.identifier), (yyvsp[0].u.type)));
-}
-#line 5688 "built/tmp/cppBison.yxx.c"
- break;
-
- case 174: /* template_formal_parameter: typename_keyword ELLIPSIS */
-#line 1801 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPClassTemplateParameter *ctp = new CPPClassTemplateParameter(nullptr);
- ctp->_packed = true;
- (yyval.u.decl) = CPPType::new_type(ctp);
-}
-#line 5698 "built/tmp/cppBison.yxx.c"
- break;
-
- case 175: /* template_formal_parameter: typename_keyword ELLIPSIS name */
-#line 1807 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPClassTemplateParameter *ctp = new CPPClassTemplateParameter((yyvsp[0].u.identifier));
- ctp->_packed = true;
- (yyval.u.decl) = CPPType::new_type(ctp);
-}
-#line 5708 "built/tmp/cppBison.yxx.c"
- break;
-
- case 176: /* template_formal_parameter: template_formal_parameter_type formal_parameter_identifier template_parameter_maybe_initialize */
-#line 1813 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPInstance *inst = new CPPInstance((yyvsp[-2].u.type), (yyvsp[-1].u.inst_ident), 0, (yylsp[-1]).file);
- inst->set_initializer((yyvsp[0].u.expr));
- (yyval.u.decl) = inst;
-}
-#line 5718 "built/tmp/cppBison.yxx.c"
- break;
-
- case 177: /* template_formal_parameter: KW_CONST template_formal_parameter_type formal_parameter_identifier template_parameter_maybe_initialize */
-#line 1819 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyvsp[-1].u.inst_ident)->add_modifier(IIT_const);
- CPPInstance *inst = new CPPInstance((yyvsp[-2].u.type), (yyvsp[-1].u.inst_ident), 0, (yylsp[-1]).file);
- inst->set_initializer((yyvsp[0].u.expr));
- (yyval.u.decl) = inst;
-}
-#line 5729 "built/tmp/cppBison.yxx.c"
- break;
-
- case 178: /* template_formal_parameter: template_formal_parameter_type parameter_pack_identifier */
-#line 1826 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPInstance *inst = new CPPInstance((yyvsp[-1].u.type), (yyvsp[0].u.inst_ident), 0, (yylsp[0]).file);
- (yyval.u.decl) = inst;
-}
-#line 5738 "built/tmp/cppBison.yxx.c"
- break;
-
- case 179: /* template_formal_parameter: KW_CONST template_formal_parameter_type parameter_pack_identifier */
-#line 1831 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyvsp[0].u.inst_ident)->add_modifier(IIT_const);
- CPPInstance *inst = new CPPInstance((yyvsp[-1].u.type), (yyvsp[0].u.inst_ident), 0, (yylsp[0]).file);
- (yyval.u.decl) = inst;
-}
-#line 5748 "built/tmp/cppBison.yxx.c"
- break;
-
- case 180: /* template_formal_parameter: KW_VOLATILE template_formal_parameter_type formal_parameter_identifier template_parameter_maybe_initialize */
-#line 1837 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyvsp[-1].u.inst_ident)->add_modifier(IIT_volatile);
- CPPInstance *inst = new CPPInstance((yyvsp[-2].u.type), (yyvsp[-1].u.inst_ident), 0, (yylsp[-1]).file);
- inst->set_initializer((yyvsp[0].u.expr));
- (yyval.u.decl) = inst;
-}
-#line 5759 "built/tmp/cppBison.yxx.c"
- break;
-
- case 181: /* template_formal_parameter: KW_VOLATILE template_formal_parameter_type parameter_pack_identifier */
-#line 1844 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyvsp[0].u.inst_ident)->add_modifier(IIT_volatile);
- CPPInstance *inst = new CPPInstance((yyvsp[-1].u.type), (yyvsp[0].u.inst_ident), 0, (yylsp[0]).file);
- (yyval.u.decl) = inst;
-}
-#line 5769 "built/tmp/cppBison.yxx.c"
- break;
-
- case 182: /* template_formal_parameter_type: simple_type */
-#line 1853 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.type) = CPPType::new_type((yyvsp[0].u.simple_type));
-}
-#line 5777 "built/tmp/cppBison.yxx.c"
- break;
-
- case 183: /* template_formal_parameter_type: IDENTIFIER */
-#line 1857 "dtool/src/cppparser/cppBison.yxx"
-{
- yywarning("Not a type: " + (yyvsp[0].u.identifier)->get_fully_scoped_name(), (yylsp[0]));
- (yyval.u.type) = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_unknown));
-}
-#line 5786 "built/tmp/cppBison.yxx.c"
- break;
-
- case 184: /* template_formal_parameter_type: TYPENAME_IDENTIFIER */
-#line 1862 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.type) = (yyvsp[0].u.identifier)->find_type(current_scope, global_scope, false, current_lexer);
- if ((yyval.u.type) == nullptr) {
- yyerror(string("internal error resolving type ") + (yyvsp[0].u.identifier)->get_fully_scoped_name(), (yylsp[0]));
- }
- assert((yyval.u.type) != nullptr);
-}
-#line 5798 "built/tmp/cppBison.yxx.c"
- break;
-
- case 185: /* template_formal_parameter_type: TYPEPACK_IDENTIFIER */
-#line 1870 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.type) = (yyvsp[0].u.identifier)->find_type(current_scope, global_scope, false, current_lexer);
- if ((yyval.u.type) == nullptr) {
- yyerror(string("internal error resolving type ") + (yyvsp[0].u.identifier)->get_fully_scoped_name(), (yylsp[0]));
- }
- assert((yyval.u.type) != nullptr);
-}
-#line 5810 "built/tmp/cppBison.yxx.c"
- break;
-
- case 186: /* instance_identifier: name_no_final optional_attributes */
-#line 1882 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[-1].u.identifier), (yyvsp[0].attr_list));
-}
-#line 5818 "built/tmp/cppBison.yxx.c"
- break;
-
- case 187: /* instance_identifier: KW_OPERATOR function_operator optional_attributes */
-#line 1886 "dtool/src/cppparser/cppBison.yxx"
-{
- // For an operator function. We implement this simply by building a
- // ficticious name for the function; in other respects it's just
- // like a regular function.
- CPPIdentifier *ident = (yyvsp[-2].u.identifier);
- if (ident == nullptr) {
- ident = new CPPIdentifier("operator "+(yyvsp[-1].str), (yylsp[-1]));
- } else {
- ident->_names.push_back("operator "+(yyvsp[-1].str));
- }
-
- (yyval.u.inst_ident) = new CPPInstanceIdentifier(ident, (yyvsp[0].attr_list));
-}
-#line 5836 "built/tmp/cppBison.yxx.c"
- break;
-
- case 188: /* instance_identifier: KW_OPERATOR SIMPLE_STRING IDENTIFIER optional_attributes */
-#line 1900 "dtool/src/cppparser/cppBison.yxx"
-{
- // A C++11 literal operator.
- if (!(yyvsp[-2].str).empty()) {
- yyerror("expected empty string", (yylsp[-2]));
- }
- CPPIdentifier *ident = (yyvsp[-3].u.identifier);
- if (ident == nullptr) {
- ident = new CPPIdentifier("operator \"\" "+(yyvsp[-1].u.identifier)->get_simple_name(), (yylsp[-1]));
- } else {
- ident->_names.push_back("operator \"\" "+(yyvsp[-1].u.identifier)->get_simple_name());
- }
-
- (yyval.u.inst_ident) = new CPPInstanceIdentifier(ident, (yyvsp[0].attr_list));
-}
-#line 5855 "built/tmp/cppBison.yxx.c"
- break;
-
- case 189: /* instance_identifier: KW_CONST instance_identifier */
-#line 1915 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_const);
-}
-#line 5864 "built/tmp/cppBison.yxx.c"
- break;
-
- case 190: /* instance_identifier: KW_VOLATILE instance_identifier */
-#line 1920 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_volatile);
-}
-#line 5873 "built/tmp/cppBison.yxx.c"
- break;
-
- case 191: /* instance_identifier: '*' optional_attributes instance_identifier */
-#line 1925 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_pointer, (yyvsp[-1].attr_list));
-}
-#line 5882 "built/tmp/cppBison.yxx.c"
- break;
-
- case 192: /* instance_identifier: '&' optional_attributes instance_identifier */
-#line 1930 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_reference, (yyvsp[-1].attr_list));
-}
-#line 5891 "built/tmp/cppBison.yxx.c"
- break;
-
- case 193: /* instance_identifier: ANDAND optional_attributes instance_identifier */
-#line 1935 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference, (yyvsp[-1].attr_list));
-}
-#line 5900 "built/tmp/cppBison.yxx.c"
- break;
-
- case 194: /* instance_identifier: SCOPING '*' optional_attributes instance_identifier */
-#line 1940 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[-3].u.identifier), (yyvsp[-1].attr_list));
-}
-#line 5909 "built/tmp/cppBison.yxx.c"
- break;
-
- case 195: /* instance_identifier: instance_identifier '[' optional_const_expr ']' optional_attributes */
-#line 1945 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[-4].u.inst_ident);
- (yyval.u.inst_ident)->add_array_modifier((yyvsp[-2].u.expr), (yyvsp[0].attr_list));
-}
-#line 5918 "built/tmp/cppBison.yxx.c"
- break;
-
- case 196: /* instance_identifier: '(' instance_identifier ')' */
-#line 1950 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[-1].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_paren);
-}
-#line 5927 "built/tmp/cppBison.yxx.c"
- break;
-
- case 197: /* $@16: %empty */
-#line 1955 "dtool/src/cppparser/cppBison.yxx"
-{
- // Create a scope for this function (in case it is a function)
- CPPScope *scope = new CPPScope((yyvsp[-1].u.inst_ident)->get_scope(current_scope, global_scope),
- CPPNameComponent(""), V_private);
-
- // It still needs to be able to pick up any template arguments, if this is
- // a definition for a method template. Add a fake "using" declaration to
- // accomplish this.
- scope->_using.insert(current_scope);
-
- push_scope(scope);
-}
-#line 5944 "built/tmp/cppBison.yxx.c"
- break;
-
- case 198: /* instance_identifier: instance_identifier '(' $@16 formal_parameter_list ')' function_post optional_attributes */
-#line 1968 "dtool/src/cppparser/cppBison.yxx"
-{
- pop_scope();
- (yyval.u.inst_ident) = (yyvsp[-6].u.inst_ident);
- if ((yyvsp[-3].u.param_list)->is_parameter_expr() && (yyvsp[-1].u.integer) == 0) {
- // Oops, this must have been an instance declaration with a
- // parameter list, not a function prototype.
- (yyval.u.inst_ident)->add_initializer_modifier((yyvsp[-3].u.param_list));
- }
- else {
- // This was (probably) a function prototype.
- (yyval.u.inst_ident)->add_func_modifier((yyvsp[-3].u.param_list), (yyvsp[-1].u.integer), nullptr, (yyvsp[0].attr_list));
- }
-}
-#line 5962 "built/tmp/cppBison.yxx.c"
- break;
-
- case 199: /* instance_identifier_and_maybe_trailing_return_type: instance_identifier maybe_trailing_return_type */
-#line 1986 "dtool/src/cppparser/cppBison.yxx"
-{
- // This is handled a bit awkwardly right now. Ideally it'd be wrapped
- // up in the instance_identifier rule, but then more needs to happen in
- // order to avoid shift/reduce conflicts.
- if ((yyvsp[0].u.type) != nullptr) {
- (yyvsp[-1].u.inst_ident)->add_trailing_return_type((yyvsp[0].u.type));
- }
- (yyval.u.inst_ident) = (yyvsp[-1].u.inst_ident);
-}
-#line 5976 "built/tmp/cppBison.yxx.c"
- break;
-
- case 200: /* instance_identifier_and_maybe_trailing_return_type: instance_identifier ':' const_expr */
-#line 1996 "dtool/src/cppparser/cppBison.yxx"
-{
- // Bitfield definition.
- (yyvsp[-2].u.inst_ident)->_bit_width = (yyvsp[0].u.expr);
- (yyval.u.inst_ident) = (yyvsp[-2].u.inst_ident);
-}
-#line 5986 "built/tmp/cppBison.yxx.c"
- break;
-
- case 201: /* maybe_trailing_return_type: empty */
-#line 2006 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.type) = nullptr;
-}
-#line 5994 "built/tmp/cppBison.yxx.c"
- break;
-
- case 202: /* maybe_trailing_return_type: POINTSAT predefined_type empty_instance_identifier */
-#line 2010 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.type) = (yyvsp[0].u.inst_ident)->unroll_type((yyvsp[-1].u.type));
-}
-#line 6002 "built/tmp/cppBison.yxx.c"
- break;
-
- case 203: /* maybe_trailing_return_type: POINTSAT KW_CONST predefined_type empty_instance_identifier */
-#line 2014 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyvsp[0].u.inst_ident)->add_modifier(IIT_const);
- (yyval.u.type) = (yyvsp[0].u.inst_ident)->unroll_type((yyvsp[-1].u.type));
-}
-#line 6011 "built/tmp/cppBison.yxx.c"
- break;
-
- case 204: /* maybe_comma_identifier: empty */
-#line 2023 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.identifier) = nullptr;
-}
-#line 6019 "built/tmp/cppBison.yxx.c"
- break;
-
- case 205: /* maybe_comma_identifier: ',' IDENTIFIER */
-#line 2027 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.identifier) = (yyvsp[0].u.identifier);
-}
-#line 6027 "built/tmp/cppBison.yxx.c"
- break;
-
- case 206: /* function_parameter_list: empty */
-#line 2035 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.param_list) = new CPPParameterList;
-}
-#line 6035 "built/tmp/cppBison.yxx.c"
- break;
-
- case 207: /* function_parameter_list: ELLIPSIS */
-#line 2039 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.param_list) = new CPPParameterList;
- (yyval.u.param_list)->_includes_ellipsis = true;
-}
-#line 6044 "built/tmp/cppBison.yxx.c"
- break;
-
- case 208: /* function_parameter_list: function_parameters */
-#line 2044 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.param_list) = (yyvsp[0].u.param_list);
-}
-#line 6052 "built/tmp/cppBison.yxx.c"
- break;
-
- case 209: /* function_parameter_list: function_parameters ',' ELLIPSIS */
-#line 2048 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.param_list) = (yyvsp[-2].u.param_list);
- (yyval.u.param_list)->_includes_ellipsis = true;
-}
-#line 6061 "built/tmp/cppBison.yxx.c"
- break;
-
- case 210: /* function_parameter_list: function_parameters ELLIPSIS */
-#line 2053 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.param_list) = (yyvsp[-1].u.param_list);
- (yyval.u.param_list)->_includes_ellipsis = true;
-}
-#line 6070 "built/tmp/cppBison.yxx.c"
- break;
-
- case 211: /* function_parameters: function_parameter */
-#line 2061 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.param_list) = new CPPParameterList;
- (yyval.u.param_list)->_parameters.push_back((yyvsp[0].u.instance));
-}
-#line 6079 "built/tmp/cppBison.yxx.c"
- break;
-
- case 212: /* function_parameters: function_parameters ',' function_parameter */
-#line 2066 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.param_list) = (yyvsp[-2].u.param_list);
- (yyval.u.param_list)->_parameters.push_back((yyvsp[0].u.instance));
-}
-#line 6088 "built/tmp/cppBison.yxx.c"
- break;
-
- case 213: /* formal_parameter_list: empty */
-#line 2074 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.param_list) = new CPPParameterList;
-}
-#line 6096 "built/tmp/cppBison.yxx.c"
- break;
-
- case 214: /* formal_parameter_list: ELLIPSIS */
-#line 2078 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.param_list) = new CPPParameterList;
- (yyval.u.param_list)->_includes_ellipsis = true;
-}
-#line 6105 "built/tmp/cppBison.yxx.c"
- break;
-
- case 215: /* formal_parameter_list: formal_parameters */
-#line 2083 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.param_list) = (yyvsp[0].u.param_list);
-}
-#line 6113 "built/tmp/cppBison.yxx.c"
- break;
-
- case 216: /* formal_parameter_list: formal_parameters ',' ELLIPSIS */
-#line 2087 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.param_list) = (yyvsp[-2].u.param_list);
- (yyval.u.param_list)->_includes_ellipsis = true;
-}
-#line 6122 "built/tmp/cppBison.yxx.c"
- break;
-
- case 217: /* formal_parameter_list: formal_parameters ELLIPSIS */
-#line 2092 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.param_list) = (yyvsp[-1].u.param_list);
- (yyval.u.param_list)->_includes_ellipsis = true;
-}
-#line 6131 "built/tmp/cppBison.yxx.c"
- break;
-
- case 218: /* formal_parameters: formal_parameter */
-#line 2100 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.param_list) = new CPPParameterList;
- (yyval.u.param_list)->_parameters.push_back((yyvsp[0].u.instance));
-}
-#line 6140 "built/tmp/cppBison.yxx.c"
- break;
-
- case 219: /* formal_parameters: formal_parameters ',' formal_parameter */
-#line 2105 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.param_list) = (yyvsp[-2].u.param_list);
- (yyval.u.param_list)->_parameters.push_back((yyvsp[0].u.instance));
-}
-#line 6149 "built/tmp/cppBison.yxx.c"
- break;
-
- case 220: /* template_parameter_maybe_initialize: empty */
-#line 2113 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = nullptr;
-}
-#line 6157 "built/tmp/cppBison.yxx.c"
- break;
-
- case 221: /* template_parameter_maybe_initialize: '=' no_angle_bracket_const_expr */
-#line 2117 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = (yyvsp[0].u.expr);
-}
-#line 6165 "built/tmp/cppBison.yxx.c"
- break;
-
- case 222: /* maybe_initialize: empty */
-#line 2124 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = nullptr;
-}
-#line 6173 "built/tmp/cppBison.yxx.c"
- break;
-
- case 223: /* maybe_initialize: '=' const_expr */
-#line 2128 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = (yyvsp[0].u.expr);
-}
-#line 6181 "built/tmp/cppBison.yxx.c"
- break;
-
- case 224: /* maybe_initialize_or_constructor_body: ';' */
-#line 2135 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = nullptr;
-}
-#line 6189 "built/tmp/cppBison.yxx.c"
- break;
-
- case 225: /* maybe_initialize_or_constructor_body: '{' code '}' */
-#line 2139 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = nullptr;
-}
-#line 6197 "built/tmp/cppBison.yxx.c"
- break;
-
- case 226: /* maybe_initialize_or_constructor_body: ':' constructor_inits '{' code '}' */
-#line 2143 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = nullptr;
-}
-#line 6205 "built/tmp/cppBison.yxx.c"
- break;
-
- case 227: /* maybe_initialize_or_constructor_body: '=' KW_DEFAULT ';' */
-#line 2147 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::get_default());
-}
-#line 6213 "built/tmp/cppBison.yxx.c"
- break;
-
- case 228: /* maybe_initialize_or_constructor_body: '=' KW_DELETE ';' */
-#line 2151 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::get_delete());
-}
-#line 6221 "built/tmp/cppBison.yxx.c"
- break;
-
- case 229: /* maybe_initialize_or_function_body: ';' */
-#line 2158 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = nullptr;
-}
-#line 6229 "built/tmp/cppBison.yxx.c"
- break;
-
- case 230: /* maybe_initialize_or_function_body: '{' code '}' */
-#line 2162 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = nullptr;
-}
-#line 6237 "built/tmp/cppBison.yxx.c"
- break;
-
- case 231: /* maybe_initialize_or_function_body: '=' const_expr ';' */
-#line 2166 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = (yyvsp[-1].u.expr);
-}
-#line 6245 "built/tmp/cppBison.yxx.c"
- break;
-
- case 232: /* maybe_initialize_or_function_body: '=' KW_DEFAULT ';' */
-#line 2170 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::get_default());
-}
-#line 6253 "built/tmp/cppBison.yxx.c"
- break;
-
- case 233: /* maybe_initialize_or_function_body: '=' KW_DELETE ';' */
-#line 2174 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::get_delete());
-}
-#line 6261 "built/tmp/cppBison.yxx.c"
- break;
-
- case 234: /* maybe_initialize_or_function_body: '=' '{' structure_init '}' */
-#line 2178 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = nullptr;
-}
-#line 6269 "built/tmp/cppBison.yxx.c"
- break;
-
- case 238: /* structure_init_body: const_expr */
-#line 2191 "dtool/src/cppparser/cppBison.yxx"
-{
-}
-#line 6276 "built/tmp/cppBison.yxx.c"
- break;
-
- case 242: /* function_parameter: optional_attributes storage_class type formal_parameter_identifier maybe_initialize */
-#line 2200 "dtool/src/cppparser/cppBison.yxx"
-{
- if ((yyvsp[-3].u.integer) & CPPInstance::SC_const) {
- (yyvsp[-1].u.inst_ident)->add_modifier(IIT_const);
- }
- if ((yyvsp[-3].u.integer) & CPPInstance::SC_volatile) {
- (yyvsp[-1].u.inst_ident)->add_modifier(IIT_volatile);
- }
- (yyvsp[-1].u.inst_ident)->add_attributes((yyvsp[-4].attr_list));
- (yyval.u.instance) = new CPPInstance((yyvsp[-2].u.type), (yyvsp[-1].u.inst_ident), 0, (yylsp[-1]).file);
- (yyval.u.instance)->set_initializer((yyvsp[0].u.expr));
-}
-#line 6292 "built/tmp/cppBison.yxx.c"
- break;
-
- case 243: /* function_parameter: optional_attributes storage_class type_pack parameter_pack_identifier maybe_initialize */
-#line 2212 "dtool/src/cppparser/cppBison.yxx"
-{
- if ((yyvsp[-3].u.integer) & CPPInstance::SC_const) {
- (yyvsp[-1].u.inst_ident)->add_modifier(IIT_const);
- }
- if ((yyvsp[-3].u.integer) & CPPInstance::SC_volatile) {
- (yyvsp[-1].u.inst_ident)->add_modifier(IIT_volatile);
- }
- (yyvsp[-1].u.inst_ident)->add_attributes((yyvsp[-4].attr_list));
- (yyval.u.instance) = new CPPInstance((yyvsp[-2].u.type), (yyvsp[-1].u.inst_ident), 0, (yylsp[-1]).file);
- (yyval.u.instance)->set_initializer((yyvsp[0].u.expr));
-}
-#line 6308 "built/tmp/cppBison.yxx.c"
- break;
-
- case 244: /* formal_parameter: function_parameter */
-#line 2231 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.instance) = (yyvsp[0].u.instance);
-}
-#line 6316 "built/tmp/cppBison.yxx.c"
- break;
-
- case 245: /* formal_parameter: formal_const_expr */
-#line 2235 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPType *type =
- CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_parameter));
- (yyval.u.instance) = new CPPInstance(type, "expr");
- (yyval.u.instance)->set_initializer((yyvsp[0].u.expr));
-}
-#line 6327 "built/tmp/cppBison.yxx.c"
- break;
-
- case 246: /* not_paren_formal_parameter_identifier: empty */
-#line 2245 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = new CPPInstanceIdentifier(nullptr);
-}
-#line 6335 "built/tmp/cppBison.yxx.c"
- break;
-
- case 247: /* not_paren_formal_parameter_identifier: name_no_final optional_attributes */
-#line 2249 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[-1].u.identifier), (yyvsp[0].attr_list));
-}
-#line 6343 "built/tmp/cppBison.yxx.c"
- break;
-
- case 248: /* not_paren_formal_parameter_identifier: KW_CONST not_paren_formal_parameter_identifier */
-#line 2253 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_const);
-}
-#line 6352 "built/tmp/cppBison.yxx.c"
- break;
-
- case 249: /* not_paren_formal_parameter_identifier: KW_VOLATILE not_paren_formal_parameter_identifier */
-#line 2258 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_volatile);
-}
-#line 6361 "built/tmp/cppBison.yxx.c"
- break;
-
- case 250: /* not_paren_formal_parameter_identifier: KW_RESTRICT not_paren_formal_parameter_identifier */
-#line 2263 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_restrict);
-}
-#line 6370 "built/tmp/cppBison.yxx.c"
- break;
-
- case 251: /* not_paren_formal_parameter_identifier: '*' optional_attributes not_paren_formal_parameter_identifier */
-#line 2268 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_pointer, (yyvsp[-1].attr_list));
-}
-#line 6379 "built/tmp/cppBison.yxx.c"
- break;
-
- case 252: /* not_paren_formal_parameter_identifier: '&' optional_attributes not_paren_formal_parameter_identifier */
-#line 2273 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_reference, (yyvsp[-1].attr_list));
-}
-#line 6388 "built/tmp/cppBison.yxx.c"
- break;
-
- case 253: /* not_paren_formal_parameter_identifier: ANDAND optional_attributes not_paren_formal_parameter_identifier */
-#line 2278 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference, (yyvsp[-1].attr_list));
-}
-#line 6397 "built/tmp/cppBison.yxx.c"
- break;
-
- case 254: /* not_paren_formal_parameter_identifier: SCOPING '*' optional_attributes not_paren_formal_parameter_identifier */
-#line 2283 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[-3].u.identifier), (yyvsp[-1].attr_list));
-}
-#line 6406 "built/tmp/cppBison.yxx.c"
- break;
-
- case 255: /* not_paren_formal_parameter_identifier: not_paren_formal_parameter_identifier '[' optional_const_expr ']' optional_attributes */
-#line 2288 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[-4].u.inst_ident);
- (yyval.u.inst_ident)->add_array_modifier((yyvsp[-2].u.expr), (yyvsp[0].attr_list));
-}
-#line 6415 "built/tmp/cppBison.yxx.c"
- break;
-
- case 256: /* formal_parameter_identifier: empty */
-#line 2296 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = new CPPInstanceIdentifier(nullptr);
-}
-#line 6423 "built/tmp/cppBison.yxx.c"
- break;
-
- case 257: /* formal_parameter_identifier: name_no_final optional_attributes */
-#line 2300 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[-1].u.identifier), (yyvsp[0].attr_list));
-}
-#line 6431 "built/tmp/cppBison.yxx.c"
- break;
-
- case 258: /* formal_parameter_identifier: KW_CONST formal_parameter_identifier */
-#line 2304 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_const);
-}
-#line 6440 "built/tmp/cppBison.yxx.c"
- break;
-
- case 259: /* formal_parameter_identifier: KW_VOLATILE formal_parameter_identifier */
-#line 2309 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_volatile);
-}
-#line 6449 "built/tmp/cppBison.yxx.c"
- break;
-
- case 260: /* formal_parameter_identifier: KW_RESTRICT formal_parameter_identifier */
-#line 2314 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_restrict);
-}
-#line 6458 "built/tmp/cppBison.yxx.c"
- break;
-
- case 261: /* formal_parameter_identifier: '*' optional_attributes formal_parameter_identifier */
-#line 2319 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_pointer, (yyvsp[-1].attr_list));
-}
-#line 6467 "built/tmp/cppBison.yxx.c"
- break;
-
- case 262: /* formal_parameter_identifier: '&' optional_attributes formal_parameter_identifier */
-#line 2324 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_reference, (yyvsp[-1].attr_list));
-}
-#line 6476 "built/tmp/cppBison.yxx.c"
- break;
-
- case 263: /* formal_parameter_identifier: ANDAND optional_attributes formal_parameter_identifier */
-#line 2329 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference, (yyvsp[-1].attr_list));
-}
-#line 6485 "built/tmp/cppBison.yxx.c"
- break;
-
- case 264: /* formal_parameter_identifier: SCOPING '*' optional_attributes formal_parameter_identifier */
-#line 2334 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[-3].u.identifier), (yyvsp[-1].attr_list));
-}
-#line 6494 "built/tmp/cppBison.yxx.c"
- break;
-
- case 265: /* formal_parameter_identifier: formal_parameter_identifier '[' optional_const_expr ']' optional_attributes */
-#line 2339 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[-4].u.inst_ident);
- (yyval.u.inst_ident)->add_array_modifier((yyvsp[-2].u.expr), (yyvsp[0].attr_list));
-}
-#line 6503 "built/tmp/cppBison.yxx.c"
- break;
-
- case 266: /* formal_parameter_identifier: '(' formal_parameter_identifier ')' '(' function_parameter_list ')' function_post optional_attributes */
-#line 2344 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[-6].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_paren);
- (yyval.u.inst_ident)->add_func_modifier((yyvsp[-3].u.param_list), (yyvsp[-1].u.integer), nullptr, (yyvsp[0].attr_list));
-}
-#line 6513 "built/tmp/cppBison.yxx.c"
- break;
-
- case 267: /* formal_parameter_identifier: '(' formal_parameter_identifier ')' */
-#line 2350 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[-1].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_paren);
-}
-#line 6522 "built/tmp/cppBison.yxx.c"
- break;
-
- case 268: /* parameter_pack_identifier: ELLIPSIS */
-#line 2358 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = new CPPInstanceIdentifier(nullptr);
- (yyval.u.inst_ident)->_packed = true;
-}
-#line 6531 "built/tmp/cppBison.yxx.c"
- break;
-
- case 269: /* parameter_pack_identifier: ELLIPSIS name optional_attributes */
-#line 2363 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[-1].u.identifier), (yyvsp[0].attr_list));
- (yyval.u.inst_ident)->_packed = true;
-}
-#line 6540 "built/tmp/cppBison.yxx.c"
- break;
-
- case 270: /* parameter_pack_identifier: KW_CONST parameter_pack_identifier */
-#line 2368 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_const);
-}
-#line 6549 "built/tmp/cppBison.yxx.c"
- break;
-
- case 271: /* parameter_pack_identifier: KW_VOLATILE parameter_pack_identifier */
-#line 2373 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_volatile);
-}
-#line 6558 "built/tmp/cppBison.yxx.c"
- break;
-
- case 272: /* parameter_pack_identifier: KW_RESTRICT parameter_pack_identifier */
-#line 2378 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_restrict);
-}
-#line 6567 "built/tmp/cppBison.yxx.c"
- break;
-
- case 273: /* parameter_pack_identifier: '*' optional_attributes parameter_pack_identifier */
-#line 2383 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_pointer, (yyvsp[-1].attr_list));
-}
-#line 6576 "built/tmp/cppBison.yxx.c"
- break;
-
- case 274: /* parameter_pack_identifier: '&' optional_attributes parameter_pack_identifier */
-#line 2388 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_reference, (yyvsp[-1].attr_list));
-}
-#line 6585 "built/tmp/cppBison.yxx.c"
- break;
-
- case 275: /* parameter_pack_identifier: ANDAND optional_attributes parameter_pack_identifier */
-#line 2393 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference, (yyvsp[-1].attr_list));
-}
-#line 6594 "built/tmp/cppBison.yxx.c"
- break;
-
- case 276: /* parameter_pack_identifier: SCOPING '*' optional_attributes parameter_pack_identifier */
-#line 2398 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[-3].u.identifier), (yyvsp[-1].attr_list));
-}
-#line 6603 "built/tmp/cppBison.yxx.c"
- break;
-
- case 277: /* parameter_pack_identifier: parameter_pack_identifier '[' optional_const_expr ']' optional_attributes */
-#line 2403 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[-4].u.inst_ident);
- (yyval.u.inst_ident)->add_array_modifier((yyvsp[-2].u.expr), (yyvsp[0].attr_list));
-}
-#line 6612 "built/tmp/cppBison.yxx.c"
- break;
-
- case 278: /* parameter_pack_identifier: '(' parameter_pack_identifier ')' '(' function_parameter_list ')' function_post optional_attributes */
-#line 2408 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[-6].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_paren);
- (yyval.u.inst_ident)->add_func_modifier((yyvsp[-3].u.param_list), (yyvsp[-1].u.integer), nullptr, (yyvsp[0].attr_list));
-}
-#line 6622 "built/tmp/cppBison.yxx.c"
- break;
-
- case 279: /* parameter_pack_identifier: '(' parameter_pack_identifier ')' */
-#line 2414 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[-1].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_paren);
-}
-#line 6631 "built/tmp/cppBison.yxx.c"
- break;
-
- case 280: /* not_paren_empty_instance_identifier: empty */
-#line 2422 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = new CPPInstanceIdentifier(nullptr);
-}
-#line 6639 "built/tmp/cppBison.yxx.c"
- break;
-
- case 281: /* not_paren_empty_instance_identifier: ELLIPSIS */
-#line 2426 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = new CPPInstanceIdentifier(nullptr);
- (yyval.u.inst_ident)->_packed = true;
-}
-#line 6648 "built/tmp/cppBison.yxx.c"
- break;
-
- case 282: /* not_paren_empty_instance_identifier: ELLIPSIS name optional_attributes */
-#line 2431 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[-1].u.identifier), (yyvsp[0].attr_list));
- (yyval.u.inst_ident)->_packed = true;
-}
-#line 6657 "built/tmp/cppBison.yxx.c"
- break;
-
- case 283: /* not_paren_empty_instance_identifier: KW_CONST not_paren_empty_instance_identifier */
-#line 2436 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_const);
-}
-#line 6666 "built/tmp/cppBison.yxx.c"
- break;
-
- case 284: /* not_paren_empty_instance_identifier: KW_VOLATILE not_paren_empty_instance_identifier */
-#line 2441 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_volatile);
-}
-#line 6675 "built/tmp/cppBison.yxx.c"
- break;
-
- case 285: /* not_paren_empty_instance_identifier: KW_RESTRICT not_paren_empty_instance_identifier */
-#line 2446 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_restrict);
-}
-#line 6684 "built/tmp/cppBison.yxx.c"
- break;
-
- case 286: /* not_paren_empty_instance_identifier: '*' optional_attributes not_paren_empty_instance_identifier */
-#line 2451 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_pointer, (yyvsp[-1].attr_list));
-}
-#line 6693 "built/tmp/cppBison.yxx.c"
- break;
-
- case 287: /* not_paren_empty_instance_identifier: '&' optional_attributes not_paren_empty_instance_identifier */
-#line 2456 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_reference, (yyvsp[-1].attr_list));
-}
-#line 6702 "built/tmp/cppBison.yxx.c"
- break;
-
- case 288: /* not_paren_empty_instance_identifier: ANDAND optional_attributes not_paren_empty_instance_identifier */
-#line 2461 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference, (yyvsp[-1].attr_list));
-}
-#line 6711 "built/tmp/cppBison.yxx.c"
- break;
-
- case 289: /* not_paren_empty_instance_identifier: SCOPING '*' optional_attributes not_paren_empty_instance_identifier */
-#line 2466 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[-3].u.identifier), (yyvsp[-1].attr_list));
-}
-#line 6720 "built/tmp/cppBison.yxx.c"
- break;
-
- case 290: /* not_paren_empty_instance_identifier: not_paren_empty_instance_identifier '[' optional_const_expr ']' optional_attributes */
-#line 2471 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[-4].u.inst_ident);
- (yyval.u.inst_ident)->add_array_modifier((yyvsp[-2].u.expr), (yyvsp[0].attr_list));
-}
-#line 6729 "built/tmp/cppBison.yxx.c"
- break;
-
- case 291: /* empty_instance_identifier: empty */
-#line 2479 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = new CPPInstanceIdentifier(nullptr);
-}
-#line 6737 "built/tmp/cppBison.yxx.c"
- break;
-
- case 292: /* empty_instance_identifier: ELLIPSIS */
-#line 2483 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = new CPPInstanceIdentifier(nullptr);
- (yyval.u.inst_ident)->_packed = true;
-}
-#line 6746 "built/tmp/cppBison.yxx.c"
- break;
-
- case 293: /* empty_instance_identifier: ELLIPSIS name optional_attributes */
-#line 2488 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[-1].u.identifier), (yyvsp[0].attr_list));
- (yyval.u.inst_ident)->_packed = true;
-}
-#line 6755 "built/tmp/cppBison.yxx.c"
- break;
-
- case 294: /* empty_instance_identifier: KW_CONST empty_instance_identifier */
-#line 2493 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_const);
-}
-#line 6764 "built/tmp/cppBison.yxx.c"
- break;
-
- case 295: /* empty_instance_identifier: KW_VOLATILE empty_instance_identifier */
-#line 2498 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_volatile);
-}
-#line 6773 "built/tmp/cppBison.yxx.c"
- break;
-
- case 296: /* empty_instance_identifier: KW_RESTRICT empty_instance_identifier */
-#line 2503 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_restrict);
-}
-#line 6782 "built/tmp/cppBison.yxx.c"
- break;
-
- case 297: /* empty_instance_identifier: '*' optional_attributes not_paren_empty_instance_identifier */
-#line 2508 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_pointer, (yyvsp[-1].attr_list));
-}
-#line 6791 "built/tmp/cppBison.yxx.c"
- break;
-
- case 298: /* empty_instance_identifier: '&' optional_attributes not_paren_empty_instance_identifier */
-#line 2513 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_reference, (yyvsp[-1].attr_list));
-}
-#line 6800 "built/tmp/cppBison.yxx.c"
- break;
-
- case 299: /* empty_instance_identifier: ANDAND optional_attributes not_paren_empty_instance_identifier */
-#line 2518 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference, (yyvsp[-1].attr_list));
-}
-#line 6809 "built/tmp/cppBison.yxx.c"
- break;
-
- case 300: /* empty_instance_identifier: SCOPING '*' optional_attributes not_paren_empty_instance_identifier */
-#line 2523 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident);
- (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[-3].u.identifier), (yyvsp[-1].attr_list));
-}
-#line 6818 "built/tmp/cppBison.yxx.c"
- break;
-
- case 301: /* empty_instance_identifier: not_paren_empty_instance_identifier '[' optional_const_expr ']' optional_attributes */
-#line 2528 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[-4].u.inst_ident);
- (yyval.u.inst_ident)->add_array_modifier((yyvsp[-2].u.expr), (yyvsp[0].attr_list));
-}
-#line 6827 "built/tmp/cppBison.yxx.c"
- break;
-
- case 302: /* empty_instance_identifier: '(' function_parameter_list ')' function_post optional_attributes maybe_trailing_return_type */
-#line 2533 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = new CPPInstanceIdentifier(nullptr);
- (yyval.u.inst_ident)->add_modifier(IIT_paren);
- (yyval.u.inst_ident)->add_func_modifier((yyvsp[-4].u.param_list), (yyvsp[-2].u.integer), (yyvsp[0].u.type), (yyvsp[-1].attr_list));
-}
-#line 6837 "built/tmp/cppBison.yxx.c"
- break;
-
- case 303: /* empty_instance_identifier: '(' '*' optional_attributes not_paren_empty_instance_identifier ')' '(' function_parameter_list ')' function_post optional_attributes maybe_trailing_return_type */
-#line 2539 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[-7].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_pointer, (yyvsp[-8].attr_list));
- (yyval.u.inst_ident)->add_modifier(IIT_paren);
- (yyval.u.inst_ident)->add_func_modifier((yyvsp[-4].u.param_list), (yyvsp[-2].u.integer), (yyvsp[0].u.type), (yyvsp[-1].attr_list));
-}
-#line 6848 "built/tmp/cppBison.yxx.c"
- break;
-
- case 304: /* empty_instance_identifier: '(' '&' optional_attributes not_paren_empty_instance_identifier ')' '(' function_parameter_list ')' function_post optional_attributes maybe_trailing_return_type */
-#line 2546 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[-7].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_reference, (yyvsp[-8].attr_list));
- (yyval.u.inst_ident)->add_modifier(IIT_paren);
- (yyval.u.inst_ident)->add_func_modifier((yyvsp[-4].u.param_list), (yyvsp[-2].u.integer), (yyvsp[0].u.type), (yyvsp[-1].attr_list));
-}
-#line 6859 "built/tmp/cppBison.yxx.c"
- break;
-
- case 305: /* empty_instance_identifier: '(' ANDAND optional_attributes not_paren_empty_instance_identifier ')' '(' function_parameter_list ')' function_post optional_attributes maybe_trailing_return_type */
-#line 2553 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.inst_ident) = (yyvsp[-7].u.inst_ident);
- (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference, (yyvsp[-8].attr_list));
- (yyval.u.inst_ident)->add_modifier(IIT_paren);
- (yyval.u.inst_ident)->add_func_modifier((yyvsp[-4].u.param_list), (yyvsp[-2].u.integer), (yyvsp[0].u.type), (yyvsp[-1].attr_list));
-}
-#line 6870 "built/tmp/cppBison.yxx.c"
- break;
-
- case 306: /* type: simple_type */
-#line 2563 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.type) = CPPType::new_type((yyvsp[0].u.simple_type));
-}
-#line 6878 "built/tmp/cppBison.yxx.c"
- break;
-
- case 307: /* type: TYPENAME_IDENTIFIER */
-#line 2567 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.type) = (yyvsp[0].u.identifier)->find_type(current_scope, global_scope, false, current_lexer);
- if ((yyval.u.type) == nullptr) {
- yyerror(string("internal error resolving type ") + (yyvsp[0].u.identifier)->get_fully_scoped_name(), (yylsp[0]));
- }
- assert((yyval.u.type) != nullptr);
-}
-#line 6890 "built/tmp/cppBison.yxx.c"
- break;
-
- case 308: /* type: KW_TYPENAME name */
-#line 2575 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.type) = CPPType::new_type(new CPPTBDType((yyvsp[0].u.identifier)));
-}
-#line 6898 "built/tmp/cppBison.yxx.c"
- break;
-
- case 309: /* type: anonymous_struct */
-#line 2579 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.type) = CPPType::new_type((yyvsp[0].u.struct_type));
-}
-#line 6906 "built/tmp/cppBison.yxx.c"
- break;
-
- case 310: /* type: named_struct */
-#line 2583 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.type) = CPPType::new_type((yyvsp[0].u.struct_type));
-}
-#line 6914 "built/tmp/cppBison.yxx.c"
- break;
-
- case 311: /* type: enum */
-#line 2587 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.type) = CPPType::new_type((yyvsp[0].u.enum_type));
-}
-#line 6922 "built/tmp/cppBison.yxx.c"
- break;
-
- case 312: /* type: struct_keyword optional_attributes name */
-#line 2591 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPType *type = (yyvsp[0].u.identifier)->find_type(current_scope, global_scope, false, current_lexer);
- if (type != nullptr) {
- (yyval.u.type) = type;
- } else {
- CPPExtensionType *et =
- CPPType::new_type(new CPPExtensionType((yyvsp[-2].u.extension_enum), (yyvsp[0].u.identifier), current_scope, (yylsp[-2]).file, (yyvsp[-1].attr_list)))
- ->as_extension_type();
- CPPScope *scope = (yyvsp[0].u.identifier)->get_scope(current_scope, global_scope);
- if (scope != nullptr) {
- scope->define_extension_type(et);
- }
- (yyval.u.type) = et;
- }
-}
-#line 6942 "built/tmp/cppBison.yxx.c"
- break;
-
- case 313: /* type: enum_keyword optional_attributes name_no_final ':' enum_element_type */
-#line 2607 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPType *type = (yyvsp[-2].u.identifier)->find_type(current_scope, global_scope, false, current_lexer);
- if (type != nullptr) {
- (yyval.u.type) = type;
- } else {
- CPPExtensionType *et =
- CPPType::new_type(new CPPExtensionType((yyvsp[-4].u.extension_enum), (yyvsp[-2].u.identifier), current_scope, (yylsp[-4]).file, (yyvsp[-3].attr_list)))
- ->as_extension_type();
- CPPScope *scope = (yyvsp[-2].u.identifier)->get_scope(current_scope, global_scope);
- if (scope != nullptr) {
- scope->define_extension_type(et);
- }
- (yyval.u.type) = et;
- }
-}
-#line 6962 "built/tmp/cppBison.yxx.c"
- break;
-
- case 314: /* type: KW_DECLTYPE '(' const_expr ')' */
-#line 2623 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.type) = (yyvsp[-1].u.expr)->determine_type();
- if ((yyval.u.type) == nullptr) {
- stringstream str;
- str << *(yyvsp[-1].u.expr);
- yyerror("could not determine type of " + str.str(), (yylsp[-1]));
- }
-}
-#line 6975 "built/tmp/cppBison.yxx.c"
- break;
-
- case 315: /* type: KW_DECLTYPE '(' KW_AUTO ')' */
-#line 2632 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.type) = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_auto));
-}
-#line 6983 "built/tmp/cppBison.yxx.c"
- break;
-
- case 316: /* type: KW_UNDERLYING_TYPE '(' full_type ')' */
-#line 2636 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPEnumType *enum_type = (yyvsp[-1].u.type)->as_enum_type();
- if (enum_type == nullptr) {
- yyerror("an enumeration type is required", (yylsp[-1]));
- (yyval.u.type) = (yyvsp[-1].u.type);
- } else {
- (yyval.u.type) = enum_type->get_underlying_type();
- }
-}
-#line 6997 "built/tmp/cppBison.yxx.c"
- break;
-
- case 317: /* type: KW_AUTO */
-#line 2646 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.type) = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_auto));
-}
-#line 7005 "built/tmp/cppBison.yxx.c"
- break;
-
- case 318: /* type: KW_BUILTIN_VA_LIST */
-#line 2650 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.type) = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_va_list));
-}
-#line 7013 "built/tmp/cppBison.yxx.c"
- break;
-
- case 319: /* type_pack: TYPEPACK_IDENTIFIER */
-#line 2657 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.type) = (yyvsp[0].u.identifier)->find_type(current_scope, global_scope, false, current_lexer);
- if ((yyval.u.type) == nullptr) {
- yyerror(string("internal error resolving type ") + (yyvsp[0].u.identifier)->get_fully_scoped_name(), (yylsp[0]));
- }
- assert((yyval.u.type) != nullptr);
-}
-#line 7025 "built/tmp/cppBison.yxx.c"
- break;
-
- case 320: /* type_decl: simple_type */
-#line 2668 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.decl) = CPPType::new_type((yyvsp[0].u.simple_type));
-}
-#line 7033 "built/tmp/cppBison.yxx.c"
- break;
-
- case 321: /* type_decl: TYPENAME_IDENTIFIER */
-#line 2672 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.decl) = (yyvsp[0].u.identifier)->find_type(current_scope, global_scope, false, current_lexer);
- if ((yyval.u.decl) == nullptr) {
- yyerror(string("internal error resolving type ") + (yyvsp[0].u.identifier)->get_fully_scoped_name(), (yylsp[0]));
- }
- assert((yyval.u.decl) != nullptr);
-}
-#line 7045 "built/tmp/cppBison.yxx.c"
- break;
-
- case 322: /* type_decl: KW_TYPENAME name */
-#line 2680 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.decl) = CPPType::new_type(new CPPTBDType((yyvsp[0].u.identifier)));
-}
-#line 7053 "built/tmp/cppBison.yxx.c"
- break;
-
- case 323: /* type_decl: anonymous_struct */
-#line 2684 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.decl) = CPPType::new_type((yyvsp[0].u.struct_type));
-}
-#line 7061 "built/tmp/cppBison.yxx.c"
- break;
-
- case 324: /* type_decl: named_struct */
-#line 2688 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.decl) = new CPPTypeDeclaration(CPPType::new_type((yyvsp[0].u.struct_type)));
-}
-#line 7069 "built/tmp/cppBison.yxx.c"
- break;
-
- case 325: /* type_decl: enum */
-#line 2692 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.decl) = new CPPTypeDeclaration(CPPType::new_type((yyvsp[0].u.enum_type)));
-}
-#line 7077 "built/tmp/cppBison.yxx.c"
- break;
-
- case 326: /* type_decl: struct_keyword optional_attributes name */
-#line 2696 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPType *type = (yyvsp[0].u.identifier)->find_type(current_scope, global_scope, false, current_lexer);
- if (type != nullptr) {
- (yyval.u.decl) = type;
- } else {
- CPPExtensionType *et =
- CPPType::new_type(new CPPExtensionType((yyvsp[-2].u.extension_enum), (yyvsp[0].u.identifier), current_scope, (yylsp[-2]).file, (yyvsp[-1].attr_list)))
- ->as_extension_type();
- CPPScope *scope = (yyvsp[0].u.identifier)->get_scope(current_scope, global_scope);
- if (scope != nullptr) {
- scope->define_extension_type(et);
- }
- (yyval.u.decl) = et;
- }
-}
-#line 7097 "built/tmp/cppBison.yxx.c"
- break;
-
- case 327: /* type_decl: enum_keyword optional_attributes name_no_final ':' enum_element_type */
-#line 2712 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPType *type = (yyvsp[-2].u.identifier)->find_type(current_scope, global_scope, false, current_lexer);
- if (type != nullptr) {
- (yyval.u.decl) = type;
- } else {
- CPPExtensionType *et =
- CPPType::new_type(new CPPExtensionType((yyvsp[-4].u.extension_enum), (yyvsp[-2].u.identifier), current_scope, (yylsp[-4]).file, (yyvsp[-3].attr_list)))
- ->as_extension_type();
- CPPScope *scope = (yyvsp[-2].u.identifier)->get_scope(current_scope, global_scope);
- if (scope != nullptr) {
- scope->define_extension_type(et);
- }
- (yyval.u.decl) = et;
- }
-}
-#line 7117 "built/tmp/cppBison.yxx.c"
- break;
-
- case 328: /* type_decl: enum_keyword optional_attributes name */
-#line 2728 "dtool/src/cppparser/cppBison.yxx"
-{
- yywarning(string("C++ does not permit forward declaration of untyped enum ") + (yyvsp[0].u.identifier)->get_fully_scoped_name(), (yylsp[-2]));
-
- CPPType *type = (yyvsp[0].u.identifier)->find_type(current_scope, global_scope, false, current_lexer);
- if (type != nullptr) {
- (yyval.u.decl) = type;
- } else {
- CPPExtensionType *et =
- CPPType::new_type(new CPPExtensionType((yyvsp[-2].u.extension_enum), (yyvsp[0].u.identifier), current_scope, (yylsp[-2]).file, (yyvsp[-1].attr_list)))
- ->as_extension_type();
- CPPScope *scope = (yyvsp[0].u.identifier)->get_scope(current_scope, global_scope);
- if (scope != nullptr) {
- scope->define_extension_type(et);
- }
- (yyval.u.decl) = et;
- }
-}
-#line 7139 "built/tmp/cppBison.yxx.c"
- break;
-
- case 329: /* type_decl: KW_DECLTYPE '(' const_expr ')' */
-#line 2746 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.decl) = (yyvsp[-1].u.expr)->determine_type();
- if ((yyval.u.decl) == nullptr) {
- stringstream str;
- str << *(yyvsp[-1].u.expr);
- yyerror("could not determine type of " + str.str(), (yylsp[-1]));
- }
-}
-#line 7152 "built/tmp/cppBison.yxx.c"
- break;
-
- case 330: /* type_decl: KW_DECLTYPE '(' KW_AUTO ')' */
-#line 2755 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.decl) = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_auto));
-}
-#line 7160 "built/tmp/cppBison.yxx.c"
- break;
-
- case 331: /* type_decl: KW_UNDERLYING_TYPE '(' full_type ')' */
-#line 2759 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPEnumType *enum_type = (yyvsp[-1].u.type)->as_enum_type();
- if (enum_type == nullptr) {
- yyerror("an enumeration type is required", (yylsp[-1]));
- (yyval.u.decl) = (yyvsp[-1].u.type);
- } else {
- (yyval.u.decl) = enum_type->get_underlying_type();
- }
-}
-#line 7174 "built/tmp/cppBison.yxx.c"
- break;
-
- case 332: /* type_decl: KW_AUTO */
-#line 2769 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.decl) = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_auto));
-}
-#line 7182 "built/tmp/cppBison.yxx.c"
- break;
-
- case 333: /* type_decl: KW_BUILTIN_VA_LIST */
-#line 2773 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.decl) = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_va_list));
-}
-#line 7190 "built/tmp/cppBison.yxx.c"
- break;
-
- case 334: /* predefined_type: simple_type */
-#line 2780 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.type) = CPPType::new_type((yyvsp[0].u.simple_type));
-}
-#line 7198 "built/tmp/cppBison.yxx.c"
- break;
-
- case 335: /* predefined_type: TYPENAME_IDENTIFIER */
-#line 2784 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.type) = (yyvsp[0].u.identifier)->find_type(current_scope, global_scope, false, current_lexer);
- if ((yyval.u.type) == nullptr) {
- yyerror(string("internal error resolving type ") + (yyvsp[0].u.identifier)->get_fully_scoped_name(), (yylsp[0]));
- }
- assert((yyval.u.type) != nullptr);
-}
-#line 7210 "built/tmp/cppBison.yxx.c"
- break;
-
- case 336: /* predefined_type: KW_TYPENAME name */
-#line 2792 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.type) = CPPType::new_type(new CPPTBDType((yyvsp[0].u.identifier)));
-}
-#line 7218 "built/tmp/cppBison.yxx.c"
- break;
-
- case 337: /* predefined_type: struct_keyword optional_attributes name */
-#line 2796 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPType *type = (yyvsp[0].u.identifier)->find_type(current_scope, global_scope, false, current_lexer);
- if (type != nullptr) {
- (yyval.u.type) = type;
- } else {
- CPPExtensionType *et =
- CPPType::new_type(new CPPExtensionType((yyvsp[-2].u.extension_enum), (yyvsp[0].u.identifier), current_scope, (yylsp[-2]).file, (yyvsp[-1].attr_list)))
- ->as_extension_type();
- CPPScope *scope = (yyvsp[0].u.identifier)->get_scope(current_scope, global_scope);
- if (scope != nullptr) {
- scope->define_extension_type(et);
- }
- (yyval.u.type) = et;
- }
-}
-#line 7238 "built/tmp/cppBison.yxx.c"
- break;
-
- case 338: /* predefined_type: enum_keyword optional_attributes name */
-#line 2812 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPType *type = (yyvsp[0].u.identifier)->find_type(current_scope, global_scope, false, current_lexer);
- if (type != nullptr) {
- (yyval.u.type) = type;
- } else {
- CPPExtensionType *et =
- CPPType::new_type(new CPPExtensionType((yyvsp[-2].u.extension_enum), (yyvsp[0].u.identifier), current_scope, (yylsp[-2]).file, (yyvsp[-1].attr_list)))
- ->as_extension_type();
- CPPScope *scope = (yyvsp[0].u.identifier)->get_scope(current_scope, global_scope);
- if (scope != nullptr) {
- scope->define_extension_type(et);
- }
- (yyval.u.type) = et;
- }
-}
-#line 7258 "built/tmp/cppBison.yxx.c"
- break;
-
- case 339: /* predefined_type: KW_DECLTYPE '(' const_expr ')' */
-#line 2828 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.type) = (yyvsp[-1].u.expr)->determine_type();
- if ((yyval.u.type) == nullptr) {
- stringstream str;
- str << *(yyvsp[-1].u.expr);
- yyerror("could not determine type of " + str.str(), (yylsp[-1]));
- }
-}
-#line 7271 "built/tmp/cppBison.yxx.c"
- break;
-
- case 340: /* predefined_type: KW_UNDERLYING_TYPE '(' full_type ')' */
-#line 2837 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPEnumType *enum_type = (yyvsp[-1].u.type)->as_enum_type();
- if (enum_type == nullptr) {
- yyerror("an enumeration type is required", (yylsp[-1]));
- (yyval.u.type) = (yyvsp[-1].u.type);
- } else {
- (yyval.u.type) = enum_type->get_underlying_type();
- }
-}
-#line 7285 "built/tmp/cppBison.yxx.c"
- break;
-
- case 341: /* predefined_type: KW_AUTO */
-#line 2847 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.type) = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_auto));
-}
-#line 7293 "built/tmp/cppBison.yxx.c"
- break;
-
- case 342: /* predefined_type: KW_BUILTIN_VA_LIST */
-#line 2851 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.type) = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_va_list));
-}
-#line 7301 "built/tmp/cppBison.yxx.c"
- break;
-
- case 343: /* var_type_decl: type_decl */
-#line 2858 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.decl) = (yyvsp[0].u.decl);
-}
-#line 7309 "built/tmp/cppBison.yxx.c"
- break;
-
- case 344: /* var_type_decl: IDENTIFIER */
-#line 2862 "dtool/src/cppparser/cppBison.yxx"
-{
- yyerror(string("unknown type '") + (yyvsp[0].u.identifier)->get_fully_scoped_name() + "'", (yylsp[0]));
-
- (yyval.u.decl) = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_unknown));
-}
-#line 7319 "built/tmp/cppBison.yxx.c"
- break;
-
- case 345: /* full_type: type empty_instance_identifier */
-#line 2870 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.type) = (yyvsp[0].u.inst_ident)->unroll_type((yyvsp[-1].u.type));
-}
-#line 7327 "built/tmp/cppBison.yxx.c"
- break;
-
- case 346: /* full_type: KW_CONST type empty_instance_identifier */
-#line 2874 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyvsp[0].u.inst_ident)->add_modifier(IIT_const);
- (yyval.u.type) = (yyvsp[0].u.inst_ident)->unroll_type((yyvsp[-1].u.type));
-}
-#line 7336 "built/tmp/cppBison.yxx.c"
- break;
-
- case 347: /* full_type: type_pack empty_instance_identifier */
-#line 2879 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.type) = (yyvsp[0].u.inst_ident)->unroll_type((yyvsp[-1].u.type));
-}
-#line 7344 "built/tmp/cppBison.yxx.c"
- break;
-
- case 348: /* full_type: KW_CONST type_pack empty_instance_identifier */
-#line 2883 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyvsp[0].u.inst_ident)->add_modifier(IIT_const);
- (yyval.u.type) = (yyvsp[0].u.inst_ident)->unroll_type((yyvsp[-1].u.type));
-}
-#line 7353 "built/tmp/cppBison.yxx.c"
- break;
-
- case 349: /* $@17: %empty */
-#line 2891 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPVisibility starting_vis =
- ((yyvsp[-2].u.extension_enum) == CPPExtensionType::T_class) ? V_private : V_public;
-
- CPPScope *new_scope = new CPPScope(current_scope, CPPNameComponent("anon"),
- starting_vis);
- CPPStructType *st = new CPPStructType((yyvsp[-2].u.extension_enum), nullptr, current_scope,
- new_scope, (yylsp[-2]).file, (yyvsp[-1].attr_list));
- new_scope->set_struct_type(st);
-
- push_scope(new_scope);
- push_struct(st);
-}
-#line 7371 "built/tmp/cppBison.yxx.c"
- break;
-
- case 350: /* anonymous_struct: struct_keyword optional_attributes '{' $@17 cpp '}' */
-#line 2905 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.struct_type) = current_struct;
- current_struct->_incomplete = false;
- pop_struct();
- pop_scope();
-}
-#line 7382 "built/tmp/cppBison.yxx.c"
- break;
-
- case 351: /* $@18: %empty */
-#line 2915 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPVisibility starting_vis =
- ((yyvsp[-2].u.extension_enum) == CPPExtensionType::T_class) ? V_private : V_public;
-
- CPPScope *scope = (yyvsp[0].u.identifier)->get_scope(current_scope, global_scope, current_lexer);
- if (scope == nullptr) {
- scope = current_scope;
- }
- CPPScope *new_scope = new CPPScope(scope, (yyvsp[0].u.identifier)->_names.back(),
- starting_vis);
-
- CPPStructType *st = new CPPStructType((yyvsp[-2].u.extension_enum), (yyvsp[0].u.identifier), current_scope,
- new_scope, (yylsp[-2]).file, (yyvsp[-1].attr_list));
- new_scope->set_struct_type(st);
- current_scope->define_extension_type(st);
-
- push_scope(new_scope);
- push_struct(st);
-}
-#line 7406 "built/tmp/cppBison.yxx.c"
- break;
-
- case 352: /* named_struct: struct_keyword optional_attributes name_no_final $@18 maybe_final maybe_class_derivation '{' cpp '}' */
-#line 2935 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.struct_type) = current_struct;
- current_struct->_incomplete = false;
- pop_struct();
- pop_scope();
-}
-#line 7417 "built/tmp/cppBison.yxx.c"
- break;
-
- case 354: /* maybe_final: KW_FINAL */
-#line 2946 "dtool/src/cppparser/cppBison.yxx"
-{
- current_struct->_final = true;
-}
-#line 7425 "built/tmp/cppBison.yxx.c"
- break;
-
- case 359: /* base_specification: class_derivation_name */
-#line 2963 "dtool/src/cppparser/cppBison.yxx"
-{
- current_struct->append_derivation((yyvsp[0].u.type), V_unknown, false);
-}
-#line 7433 "built/tmp/cppBison.yxx.c"
- break;
-
- case 360: /* base_specification: KW_PUBLIC class_derivation_name */
-#line 2967 "dtool/src/cppparser/cppBison.yxx"
-{
- current_struct->append_derivation((yyvsp[0].u.type), V_public, false);
-}
-#line 7441 "built/tmp/cppBison.yxx.c"
- break;
-
- case 361: /* base_specification: KW_PROTECTED class_derivation_name */
-#line 2971 "dtool/src/cppparser/cppBison.yxx"
-{
- current_struct->append_derivation((yyvsp[0].u.type), V_protected, false);
-}
-#line 7449 "built/tmp/cppBison.yxx.c"
- break;
-
- case 362: /* base_specification: KW_PRIVATE class_derivation_name */
-#line 2975 "dtool/src/cppparser/cppBison.yxx"
-{
- current_struct->append_derivation((yyvsp[0].u.type), V_private, false);
-}
-#line 7457 "built/tmp/cppBison.yxx.c"
- break;
-
- case 363: /* base_specification: KW_VIRTUAL KW_PUBLIC class_derivation_name */
-#line 2979 "dtool/src/cppparser/cppBison.yxx"
-{
- current_struct->append_derivation((yyvsp[0].u.type), V_public, true);
-}
-#line 7465 "built/tmp/cppBison.yxx.c"
- break;
-
- case 364: /* base_specification: KW_VIRTUAL KW_PROTECTED class_derivation_name */
-#line 2983 "dtool/src/cppparser/cppBison.yxx"
-{
- current_struct->append_derivation((yyvsp[0].u.type), V_protected, true);
-}
-#line 7473 "built/tmp/cppBison.yxx.c"
- break;
-
- case 365: /* base_specification: KW_VIRTUAL KW_PRIVATE class_derivation_name */
-#line 2987 "dtool/src/cppparser/cppBison.yxx"
-{
- current_struct->append_derivation((yyvsp[0].u.type), V_private, true);
-}
-#line 7481 "built/tmp/cppBison.yxx.c"
- break;
-
- case 366: /* base_specification: KW_PUBLIC KW_VIRTUAL class_derivation_name */
-#line 2991 "dtool/src/cppparser/cppBison.yxx"
-{
- current_struct->append_derivation((yyvsp[0].u.type), V_public, true);
-}
-#line 7489 "built/tmp/cppBison.yxx.c"
- break;
-
- case 367: /* base_specification: KW_PROTECTED KW_VIRTUAL class_derivation_name */
-#line 2995 "dtool/src/cppparser/cppBison.yxx"
-{
- current_struct->append_derivation((yyvsp[0].u.type), V_protected, true);
-}
-#line 7497 "built/tmp/cppBison.yxx.c"
- break;
-
- case 368: /* base_specification: KW_PRIVATE KW_VIRTUAL class_derivation_name */
-#line 2999 "dtool/src/cppparser/cppBison.yxx"
-{
- current_struct->append_derivation((yyvsp[0].u.type), V_private, true);
-}
-#line 7505 "built/tmp/cppBison.yxx.c"
- break;
-
- case 369: /* $@19: %empty */
-#line 3006 "dtool/src/cppparser/cppBison.yxx"
-{
- if (current_enum->_scope != nullptr) {
- push_scope(current_enum->_scope);
- }
-}
-#line 7515 "built/tmp/cppBison.yxx.c"
- break;
-
- case 370: /* enum: enum_decl $@19 '{' enum_body '}' */
-#line 3012 "dtool/src/cppparser/cppBison.yxx"
-{
- if (current_enum->_scope != nullptr) {
- pop_scope();
- }
- (yyval.u.enum_type) = current_enum;
- current_enum = nullptr;
-}
-#line 7527 "built/tmp/cppBison.yxx.c"
- break;
-
- case 371: /* enum_decl: enum_keyword optional_attributes ':' enum_element_type */
-#line 3023 "dtool/src/cppparser/cppBison.yxx"
-{
- current_enum = new CPPEnumType((yyvsp[-3].u.extension_enum), nullptr, (yyvsp[0].u.type), current_scope, nullptr, (yylsp[-3]).file, (yyvsp[-2].attr_list));
-}
-#line 7535 "built/tmp/cppBison.yxx.c"
- break;
-
- case 372: /* enum_decl: enum_keyword optional_attributes */
-#line 3027 "dtool/src/cppparser/cppBison.yxx"
-{
- current_enum = new CPPEnumType((yyvsp[-1].u.extension_enum), nullptr, current_scope, nullptr, (yylsp[-1]).file, (yyvsp[0].attr_list));
-}
-#line 7543 "built/tmp/cppBison.yxx.c"
- break;
-
- case 373: /* enum_decl: enum_keyword optional_attributes name_no_final ':' enum_element_type */
-#line 3031 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPScope *new_scope = new CPPScope(current_scope, (yyvsp[-2].u.identifier)->_names.back(), V_public);
- current_enum = new CPPEnumType((yyvsp[-4].u.extension_enum), (yyvsp[-2].u.identifier), (yyvsp[0].u.type), current_scope, new_scope, (yylsp[-4]).file, (yyvsp[-3].attr_list));
-}
-#line 7552 "built/tmp/cppBison.yxx.c"
- break;
-
- case 374: /* enum_decl: enum_keyword optional_attributes name_no_final */
-#line 3036 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPScope *new_scope = new CPPScope(current_scope, (yyvsp[0].u.identifier)->_names.back(), V_public);
- current_enum = new CPPEnumType((yyvsp[-2].u.extension_enum), (yyvsp[0].u.identifier), current_scope, new_scope, (yylsp[-2]).file, (yyvsp[-1].attr_list));
-}
-#line 7561 "built/tmp/cppBison.yxx.c"
- break;
-
- case 375: /* enum_element_type: simple_int_type */
-#line 3044 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.type) = CPPType::new_type((yyvsp[0].u.simple_type));
-}
-#line 7569 "built/tmp/cppBison.yxx.c"
- break;
-
- case 376: /* enum_element_type: TYPENAME_IDENTIFIER */
-#line 3048 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.type) = (yyvsp[0].u.identifier)->find_type(current_scope, global_scope, false, current_lexer);
-}
-#line 7577 "built/tmp/cppBison.yxx.c"
- break;
-
- case 378: /* enum_body_trailing_comma: enum_body_trailing_comma name optional_attributes ',' */
-#line 3056 "dtool/src/cppparser/cppBison.yxx"
-{
- assert(current_enum != nullptr);
- current_enum->add_element((yyvsp[-2].u.identifier)->get_simple_name(), nullptr, current_lexer, (yylsp[-2]), (yyvsp[-1].attr_list));
-}
-#line 7586 "built/tmp/cppBison.yxx.c"
- break;
-
- case 379: /* enum_body_trailing_comma: enum_body_trailing_comma name optional_attributes '=' const_expr ',' */
-#line 3061 "dtool/src/cppparser/cppBison.yxx"
-{
- assert(current_enum != nullptr);
- current_enum->add_element((yyvsp[-4].u.identifier)->get_simple_name(), (yyvsp[-1].u.expr), current_lexer, (yylsp[-4]), (yyvsp[-3].attr_list));
-}
-#line 7595 "built/tmp/cppBison.yxx.c"
- break;
-
- case 381: /* enum_body: enum_body_trailing_comma name optional_attributes */
-#line 3069 "dtool/src/cppparser/cppBison.yxx"
-{
- assert(current_enum != nullptr);
- current_enum->add_element((yyvsp[-1].u.identifier)->get_simple_name(), nullptr, current_lexer, (yylsp[-1]), (yyvsp[0].attr_list));
-}
-#line 7604 "built/tmp/cppBison.yxx.c"
- break;
-
- case 382: /* enum_body: enum_body_trailing_comma name optional_attributes '=' const_expr */
-#line 3074 "dtool/src/cppparser/cppBison.yxx"
-{
- assert(current_enum != nullptr);
- current_enum->add_element((yyvsp[-3].u.identifier)->get_simple_name(), (yyvsp[0].u.expr), current_lexer, (yylsp[-3]), (yyvsp[-2].attr_list));
-}
-#line 7613 "built/tmp/cppBison.yxx.c"
- break;
-
- case 383: /* enum_keyword: KW_ENUM */
-#line 3082 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.extension_enum) = CPPExtensionType::T_enum;
-}
-#line 7621 "built/tmp/cppBison.yxx.c"
- break;
-
- case 384: /* enum_keyword: KW_ENUM KW_CLASS */
-#line 3086 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.extension_enum) = CPPExtensionType::T_enum_class;
-}
-#line 7629 "built/tmp/cppBison.yxx.c"
- break;
-
- case 385: /* enum_keyword: KW_ENUM KW_STRUCT */
-#line 3090 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.extension_enum) = CPPExtensionType::T_enum_struct;
-}
-#line 7637 "built/tmp/cppBison.yxx.c"
- break;
-
- case 386: /* struct_keyword: KW_CLASS */
-#line 3097 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.extension_enum) = CPPExtensionType::T_class;
-}
-#line 7645 "built/tmp/cppBison.yxx.c"
- break;
-
- case 387: /* struct_keyword: KW_STRUCT */
-#line 3101 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.extension_enum) = CPPExtensionType::T_struct;
-}
-#line 7653 "built/tmp/cppBison.yxx.c"
- break;
-
- case 388: /* struct_keyword: KW_UNION */
-#line 3105 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.extension_enum) = CPPExtensionType::T_union;
-}
-#line 7661 "built/tmp/cppBison.yxx.c"
- break;
-
- case 389: /* $@20: %empty */
-#line 3112 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPScope *scope = (yyvsp[-1].u.identifier)->find_scope(current_scope, global_scope, current_lexer);
- if (scope == nullptr) {
- // This must be a new namespace declaration.
- CPPScope *parent_scope =
- (yyvsp[-1].u.identifier)->get_scope(current_scope, global_scope, current_lexer);
- if (parent_scope == nullptr) {
- parent_scope = current_scope;
- }
- scope = new CPPScope(parent_scope, (yyvsp[-1].u.identifier)->_names.back(), V_public);
- }
-
- CPPNamespace *nspace = new CPPNamespace((yyvsp[-1].u.identifier), scope, (yylsp[-3]).file, (yyvsp[-2].attr_list));
- current_scope->add_declaration(nspace, global_scope, current_lexer, (yylsp[-3]));
- current_scope->define_namespace(nspace);
- push_scope(scope);
-}
-#line 7683 "built/tmp/cppBison.yxx.c"
- break;
-
- case 390: /* namespace_declaration: KW_NAMESPACE optional_attributes name '{' $@20 cpp '}' */
-#line 3130 "dtool/src/cppparser/cppBison.yxx"
-{
- pop_scope();
-}
-#line 7691 "built/tmp/cppBison.yxx.c"
- break;
-
- case 391: /* $@21: %empty */
-#line 3134 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPScope *scope = (yyvsp[-1].u.identifier)->find_scope(current_scope, global_scope, current_lexer);
- if (scope == nullptr) {
- // This must be a new namespace declaration.
- CPPScope *parent_scope =
- (yyvsp[-1].u.identifier)->get_scope(current_scope, global_scope, current_lexer);
- if (parent_scope == nullptr) {
- parent_scope = current_scope;
- }
- scope = new CPPScope(parent_scope, (yyvsp[-1].u.identifier)->_names.back(), V_public);
- }
-
- CPPNamespace *nspace = new CPPNamespace((yyvsp[-1].u.identifier), scope, (yylsp[-2]).file);
- nspace->_is_inline = true;
- current_scope->add_declaration(nspace, global_scope, current_lexer, (yylsp[-2]));
- current_scope->define_namespace(nspace);
- push_scope(scope);
-}
-#line 7714 "built/tmp/cppBison.yxx.c"
- break;
-
- case 392: /* namespace_declaration: KW_INLINE KW_NAMESPACE name '{' $@21 cpp '}' */
-#line 3153 "dtool/src/cppparser/cppBison.yxx"
-{
- pop_scope();
-}
-#line 7722 "built/tmp/cppBison.yxx.c"
- break;
-
- case 395: /* using_declaration: KW_USING name ';' */
-#line 3162 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPUsing *using_decl = new CPPUsing((yyvsp[-1].u.identifier), false, (yylsp[-2]).file);
- current_scope->add_declaration(using_decl, global_scope, current_lexer, (yylsp[-2]));
- current_scope->add_using(using_decl, global_scope, current_lexer);
-}
-#line 7732 "built/tmp/cppBison.yxx.c"
- break;
-
- case 396: /* using_declaration: KW_USING name optional_attributes '=' full_type ';' */
-#line 3168 "dtool/src/cppparser/cppBison.yxx"
-{
- // This is really just an alternative way to declare a typedef.
- CPPTypedefType *typedef_type = new CPPTypedefType((yyvsp[-1].u.type), (yyvsp[-4].u.identifier), current_scope, (yyvsp[-3].attr_list));
- typedef_type->_using = true;
- current_scope->add_declaration(CPPType::new_type(typedef_type), global_scope, current_lexer, (yylsp[-5]));
-}
-#line 7743 "built/tmp/cppBison.yxx.c"
- break;
-
- case 397: /* using_declaration: KW_USING KW_NAMESPACE name ';' */
-#line 3175 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPUsing *using_decl = new CPPUsing((yyvsp[-1].u.identifier), true, (yylsp[-3]).file);
- current_scope->add_declaration(using_decl, global_scope, current_lexer, (yylsp[-3]));
- current_scope->add_using(using_decl, global_scope, current_lexer);
-}
-#line 7753 "built/tmp/cppBison.yxx.c"
- break;
-
- case 398: /* using_declaration: KW_USING KW_ENUM name ';' */
-#line 3181 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPUsing *using_decl = new CPPUsing((yyvsp[-1].u.identifier), false, (yylsp[-3]).file);
- current_scope->add_declaration(using_decl, global_scope, current_lexer, (yylsp[-3]));
- current_scope->add_using(using_decl, global_scope, current_lexer);
-}
-#line 7763 "built/tmp/cppBison.yxx.c"
- break;
-
- case 402: /* simple_int_type: KW_BOOL */
-#line 3196 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_bool);
-}
-#line 7771 "built/tmp/cppBison.yxx.c"
- break;
-
- case 403: /* simple_int_type: KW_CHAR */
-#line 3200 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_char);
-}
-#line 7779 "built/tmp/cppBison.yxx.c"
- break;
-
- case 404: /* simple_int_type: KW_WCHAR_T */
-#line 3204 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_wchar_t);
-}
-#line 7787 "built/tmp/cppBison.yxx.c"
- break;
-
- case 405: /* simple_int_type: KW_CHAR8_T */
-#line 3208 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_char8_t);
-}
-#line 7795 "built/tmp/cppBison.yxx.c"
- break;
-
- case 406: /* simple_int_type: KW_CHAR16_T */
-#line 3212 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_char16_t);
-}
-#line 7803 "built/tmp/cppBison.yxx.c"
- break;
-
- case 407: /* simple_int_type: KW_CHAR32_T */
-#line 3216 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_char32_t);
-}
-#line 7811 "built/tmp/cppBison.yxx.c"
- break;
-
- case 408: /* simple_int_type: KW_SHORT */
-#line 3220 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int,
- CPPSimpleType::F_short);
-}
-#line 7820 "built/tmp/cppBison.yxx.c"
- break;
-
- case 409: /* simple_int_type: KW_LONG */
-#line 3225 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int,
- CPPSimpleType::F_long);
-}
-#line 7829 "built/tmp/cppBison.yxx.c"
- break;
-
- case 410: /* simple_int_type: KW_UNSIGNED */
-#line 3230 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int,
- CPPSimpleType::F_unsigned);
-}
-#line 7838 "built/tmp/cppBison.yxx.c"
- break;
-
- case 411: /* simple_int_type: KW_SIGNED */
-#line 3235 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int,
- CPPSimpleType::F_signed);
-}
-#line 7847 "built/tmp/cppBison.yxx.c"
- break;
-
- case 412: /* simple_int_type: KW_INT */
-#line 3240 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int);
-}
-#line 7855 "built/tmp/cppBison.yxx.c"
- break;
-
- case 413: /* simple_int_type: KW_SHORT simple_int_type */
-#line 3244 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.simple_type) = (yyvsp[0].u.simple_type);
- (yyval.u.simple_type)->_flags |= CPPSimpleType::F_short;
-}
-#line 7864 "built/tmp/cppBison.yxx.c"
- break;
-
- case 414: /* simple_int_type: KW_LONG simple_int_type */
-#line 3249 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.simple_type) = (yyvsp[0].u.simple_type);
- if ((yyval.u.simple_type)->_flags & CPPSimpleType::F_long) {
- (yyval.u.simple_type)->_flags |= CPPSimpleType::F_longlong;
- } else {
- (yyval.u.simple_type)->_flags |= CPPSimpleType::F_long;
- }
-}
-#line 7877 "built/tmp/cppBison.yxx.c"
- break;
-
- case 415: /* simple_int_type: KW_UNSIGNED simple_int_type */
-#line 3258 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.simple_type) = (yyvsp[0].u.simple_type);
- (yyval.u.simple_type)->_flags |= CPPSimpleType::F_unsigned;
-}
-#line 7886 "built/tmp/cppBison.yxx.c"
- break;
-
- case 416: /* simple_int_type: KW_SIGNED simple_int_type */
-#line 3263 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.simple_type) = (yyvsp[0].u.simple_type);
- (yyval.u.simple_type)->_flags |= CPPSimpleType::F_signed;
-}
-#line 7895 "built/tmp/cppBison.yxx.c"
- break;
-
- case 417: /* simple_float_type: KW_FLOAT */
-#line 3271 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_float);
-}
-#line 7903 "built/tmp/cppBison.yxx.c"
- break;
-
- case 418: /* simple_float_type: KW_DOUBLE */
-#line 3275 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_double);
-}
-#line 7911 "built/tmp/cppBison.yxx.c"
- break;
-
- case 419: /* simple_float_type: KW_LONG KW_DOUBLE */
-#line 3279 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_double,
- CPPSimpleType::F_long);
-}
-#line 7920 "built/tmp/cppBison.yxx.c"
- break;
-
- case 420: /* simple_void_type: KW_VOID */
-#line 3287 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_void);
-}
-#line 7928 "built/tmp/cppBison.yxx.c"
- break;
-
- case 421: /* $@22: %empty */
-#line 3296 "dtool/src/cppparser/cppBison.yxx"
-{
- current_lexer->_resolve_identifiers = false;
-}
-#line 7936 "built/tmp/cppBison.yxx.c"
- break;
-
- case 422: /* code: $@22 code_block */
-#line 3300 "dtool/src/cppparser/cppBison.yxx"
-{
- current_lexer->_resolve_identifiers = true;
-}
-#line 7944 "built/tmp/cppBison.yxx.c"
- break;
-
- case 539: /* element: KW_WHILE */
-#line 3345 "dtool/src/cppparser/cppBison.yxx"
-{
-}
-#line 7951 "built/tmp/cppBison.yxx.c"
- break;
-
- case 563: /* optional_const_expr: empty */
-#line 3354 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = nullptr;
-}
-#line 7959 "built/tmp/cppBison.yxx.c"
- break;
-
- case 564: /* optional_const_expr: const_expr */
-#line 3358 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = (yyvsp[0].u.expr);
-}
-#line 7967 "built/tmp/cppBison.yxx.c"
- break;
-
- case 565: /* optional_const_expr_comma: empty */
-#line 3365 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = nullptr;
-}
-#line 7975 "built/tmp/cppBison.yxx.c"
- break;
-
- case 566: /* optional_const_expr_comma: const_expr_comma */
-#line 3369 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = (yyvsp[0].u.expr);
-}
-#line 7983 "built/tmp/cppBison.yxx.c"
- break;
-
- case 567: /* const_expr_comma: const_expr */
-#line 3376 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = (yyvsp[0].u.expr);
-}
-#line 7991 "built/tmp/cppBison.yxx.c"
- break;
-
- case 568: /* const_expr_comma: const_expr_comma ',' const_expr */
-#line 3380 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(',', (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 7999 "built/tmp/cppBison.yxx.c"
- break;
-
- case 569: /* no_angle_bracket_const_expr: const_operand */
-#line 3387 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = (yyvsp[0].u.expr);
-}
-#line 8007 "built/tmp/cppBison.yxx.c"
- break;
-
- case 570: /* no_angle_bracket_const_expr: '(' full_type ')' no_angle_bracket_const_expr */
-#line 3391 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[-2].u.type), (yyvsp[0].u.expr)));
-}
-#line 8015 "built/tmp/cppBison.yxx.c"
- break;
-
- case 571: /* no_angle_bracket_const_expr: KW_STATIC_CAST '<' full_type '>' '(' const_expr_comma ')' */
-#line 3395 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[-4].u.type), (yyvsp[-1].u.expr), CPPExpression::T_static_cast));
-}
-#line 8023 "built/tmp/cppBison.yxx.c"
- break;
-
- case 572: /* no_angle_bracket_const_expr: KW_DYNAMIC_CAST '<' full_type '>' '(' const_expr_comma ')' */
-#line 3399 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[-4].u.type), (yyvsp[-1].u.expr), CPPExpression::T_dynamic_cast));
-}
-#line 8031 "built/tmp/cppBison.yxx.c"
- break;
-
- case 573: /* no_angle_bracket_const_expr: KW_CONST_CAST '<' full_type '>' '(' const_expr_comma ')' */
-#line 3403 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[-4].u.type), (yyvsp[-1].u.expr), CPPExpression::T_const_cast));
-}
-#line 8039 "built/tmp/cppBison.yxx.c"
- break;
-
- case 574: /* no_angle_bracket_const_expr: KW_REINTERPRET_CAST '<' full_type '>' '(' const_expr_comma ')' */
-#line 3407 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[-4].u.type), (yyvsp[-1].u.expr), CPPExpression::T_reinterpret_cast));
-}
-#line 8047 "built/tmp/cppBison.yxx.c"
- break;
-
- case 575: /* no_angle_bracket_const_expr: KW_SIZEOF '(' full_type ')' */
-#line 3411 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[-1].u.type)));
-}
-#line 8055 "built/tmp/cppBison.yxx.c"
- break;
-
- case 576: /* no_angle_bracket_const_expr: KW_SIZEOF no_angle_bracket_const_expr */
-#line 3415 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[0].u.expr)));
-}
-#line 8063 "built/tmp/cppBison.yxx.c"
- break;
-
- case 577: /* no_angle_bracket_const_expr: KW_SIZEOF ELLIPSIS '(' name ')' */
-#line 3419 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_ellipsis_func((yyvsp[-1].u.identifier)));
-}
-#line 8071 "built/tmp/cppBison.yxx.c"
- break;
-
- case 578: /* no_angle_bracket_const_expr: KW_ALIGNOF '(' full_type ')' */
-#line 3423 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::alignof_func((yyvsp[-1].u.type)));
-}
-#line 8079 "built/tmp/cppBison.yxx.c"
- break;
-
- case 579: /* no_angle_bracket_const_expr: '!' no_angle_bracket_const_expr */
-#line 3427 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[0].u.expr));
-}
-#line 8087 "built/tmp/cppBison.yxx.c"
- break;
-
- case 580: /* no_angle_bracket_const_expr: '~' no_angle_bracket_const_expr */
-#line 3431 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[0].u.expr));
-}
-#line 8095 "built/tmp/cppBison.yxx.c"
- break;
-
- case 581: /* no_angle_bracket_const_expr: '-' no_angle_bracket_const_expr */
-#line 3435 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(UNARY_MINUS, (yyvsp[0].u.expr));
-}
-#line 8103 "built/tmp/cppBison.yxx.c"
- break;
-
- case 582: /* no_angle_bracket_const_expr: '+' no_angle_bracket_const_expr */
-#line 3439 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(UNARY_PLUS, (yyvsp[0].u.expr));
-}
-#line 8111 "built/tmp/cppBison.yxx.c"
- break;
-
- case 583: /* no_angle_bracket_const_expr: '*' no_angle_bracket_const_expr */
-#line 3443 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(UNARY_STAR, (yyvsp[0].u.expr));
-}
-#line 8119 "built/tmp/cppBison.yxx.c"
- break;
-
- case 584: /* no_angle_bracket_const_expr: '&' no_angle_bracket_const_expr */
-#line 3447 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[0].u.expr));
-}
-#line 8127 "built/tmp/cppBison.yxx.c"
- break;
-
- case 585: /* no_angle_bracket_const_expr: no_angle_bracket_const_expr '*' no_angle_bracket_const_expr */
-#line 3451 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('*', (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8135 "built/tmp/cppBison.yxx.c"
- break;
-
- case 586: /* no_angle_bracket_const_expr: no_angle_bracket_const_expr '/' no_angle_bracket_const_expr */
-#line 3455 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('/', (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8143 "built/tmp/cppBison.yxx.c"
- break;
-
- case 587: /* no_angle_bracket_const_expr: no_angle_bracket_const_expr '%' no_angle_bracket_const_expr */
-#line 3459 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('%', (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8151 "built/tmp/cppBison.yxx.c"
- break;
-
- case 588: /* no_angle_bracket_const_expr: no_angle_bracket_const_expr '+' no_angle_bracket_const_expr */
-#line 3463 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('+', (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8159 "built/tmp/cppBison.yxx.c"
- break;
-
- case 589: /* no_angle_bracket_const_expr: no_angle_bracket_const_expr '-' no_angle_bracket_const_expr */
-#line 3467 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('-', (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8167 "built/tmp/cppBison.yxx.c"
- break;
-
- case 590: /* no_angle_bracket_const_expr: no_angle_bracket_const_expr '|' no_angle_bracket_const_expr */
-#line 3471 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('|', (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8175 "built/tmp/cppBison.yxx.c"
- break;
-
- case 591: /* no_angle_bracket_const_expr: no_angle_bracket_const_expr '^' no_angle_bracket_const_expr */
-#line 3475 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('^', (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8183 "built/tmp/cppBison.yxx.c"
- break;
-
- case 592: /* no_angle_bracket_const_expr: no_angle_bracket_const_expr '&' no_angle_bracket_const_expr */
-#line 3479 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('&', (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8191 "built/tmp/cppBison.yxx.c"
- break;
-
- case 593: /* no_angle_bracket_const_expr: no_angle_bracket_const_expr OROR no_angle_bracket_const_expr */
-#line 3483 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8199 "built/tmp/cppBison.yxx.c"
- break;
-
- case 594: /* no_angle_bracket_const_expr: no_angle_bracket_const_expr ANDAND no_angle_bracket_const_expr */
-#line 3487 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8207 "built/tmp/cppBison.yxx.c"
- break;
-
- case 595: /* no_angle_bracket_const_expr: no_angle_bracket_const_expr EQCOMPARE no_angle_bracket_const_expr */
-#line 3491 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8215 "built/tmp/cppBison.yxx.c"
- break;
-
- case 596: /* no_angle_bracket_const_expr: no_angle_bracket_const_expr NECOMPARE no_angle_bracket_const_expr */
-#line 3495 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8223 "built/tmp/cppBison.yxx.c"
- break;
-
- case 597: /* no_angle_bracket_const_expr: no_angle_bracket_const_expr LECOMPARE no_angle_bracket_const_expr */
-#line 3499 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8231 "built/tmp/cppBison.yxx.c"
- break;
-
- case 598: /* no_angle_bracket_const_expr: no_angle_bracket_const_expr GECOMPARE no_angle_bracket_const_expr */
-#line 3503 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8239 "built/tmp/cppBison.yxx.c"
- break;
-
- case 599: /* no_angle_bracket_const_expr: no_angle_bracket_const_expr SPACESHIP no_angle_bracket_const_expr */
-#line 3507 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(SPACESHIP, (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8247 "built/tmp/cppBison.yxx.c"
- break;
-
- case 600: /* no_angle_bracket_const_expr: no_angle_bracket_const_expr LSHIFT no_angle_bracket_const_expr */
-#line 3511 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8255 "built/tmp/cppBison.yxx.c"
- break;
-
- case 601: /* no_angle_bracket_const_expr: no_angle_bracket_const_expr RSHIFT no_angle_bracket_const_expr */
-#line 3515 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8263 "built/tmp/cppBison.yxx.c"
- break;
-
- case 602: /* no_angle_bracket_const_expr: no_angle_bracket_const_expr '?' no_angle_bracket_const_expr ':' no_angle_bracket_const_expr */
-#line 3519 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('?', (yyvsp[-4].u.expr), (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8271 "built/tmp/cppBison.yxx.c"
- break;
-
- case 603: /* no_angle_bracket_const_expr: no_angle_bracket_const_expr '[' const_expr ']' */
-#line 3523 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('[', (yyvsp[-3].u.expr), (yyvsp[-1].u.expr));
-}
-#line 8279 "built/tmp/cppBison.yxx.c"
- break;
-
- case 604: /* no_angle_bracket_const_expr: no_angle_bracket_const_expr '(' const_expr_comma ')' */
-#line 3527 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('f', (yyvsp[-3].u.expr), (yyvsp[-1].u.expr));
-}
-#line 8287 "built/tmp/cppBison.yxx.c"
- break;
-
- case 605: /* no_angle_bracket_const_expr: no_angle_bracket_const_expr '(' ')' */
-#line 3531 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('f', (yyvsp[-2].u.expr));
-}
-#line 8295 "built/tmp/cppBison.yxx.c"
- break;
-
- case 606: /* no_angle_bracket_const_expr: no_angle_bracket_const_expr '.' name */
-#line 3535 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('.', (yyvsp[-2].u.expr), new CPPExpression((yyvsp[0].u.identifier), current_scope, global_scope, current_lexer));
-}
-#line 8303 "built/tmp/cppBison.yxx.c"
- break;
-
- case 607: /* no_angle_bracket_const_expr: no_angle_bracket_const_expr POINTSAT no_angle_bracket_const_expr */
-#line 3539 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8311 "built/tmp/cppBison.yxx.c"
- break;
-
- case 608: /* no_angle_bracket_const_expr: '(' const_expr_comma ')' */
-#line 3543 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = (yyvsp[-1].u.expr);
-}
-#line 8319 "built/tmp/cppBison.yxx.c"
- break;
-
- case 609: /* const_expr: const_operand */
-#line 3551 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = (yyvsp[0].u.expr);
-}
-#line 8327 "built/tmp/cppBison.yxx.c"
- break;
-
- case 610: /* const_expr: '(' full_type ')' const_expr */
-#line 3555 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[-2].u.type), (yyvsp[0].u.expr)));
-}
-#line 8335 "built/tmp/cppBison.yxx.c"
- break;
-
- case 611: /* const_expr: KW_STATIC_CAST '<' full_type '>' '(' const_expr_comma ')' */
-#line 3559 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[-4].u.type), (yyvsp[-1].u.expr), CPPExpression::T_static_cast));
-}
-#line 8343 "built/tmp/cppBison.yxx.c"
- break;
-
- case 612: /* const_expr: KW_DYNAMIC_CAST '<' full_type '>' '(' const_expr_comma ')' */
-#line 3563 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[-4].u.type), (yyvsp[-1].u.expr), CPPExpression::T_dynamic_cast));
-}
-#line 8351 "built/tmp/cppBison.yxx.c"
- break;
-
- case 613: /* const_expr: KW_CONST_CAST '<' full_type '>' '(' const_expr_comma ')' */
-#line 3567 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[-4].u.type), (yyvsp[-1].u.expr), CPPExpression::T_const_cast));
-}
-#line 8359 "built/tmp/cppBison.yxx.c"
- break;
-
- case 614: /* const_expr: KW_REINTERPRET_CAST '<' full_type '>' '(' const_expr_comma ')' */
-#line 3571 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[-4].u.type), (yyvsp[-1].u.expr), CPPExpression::T_reinterpret_cast));
-}
-#line 8367 "built/tmp/cppBison.yxx.c"
- break;
-
- case 615: /* const_expr: TYPENAME_IDENTIFIER '(' optional_const_expr_comma ')' */
-#line 3575 "dtool/src/cppparser/cppBison.yxx"
-{
- // A constructor call.
- CPPType *type = (yyvsp[-3].u.identifier)->find_type(current_scope, global_scope, false, current_lexer);
- if (type == nullptr) {
- yyerror(string("internal error resolving type ") + (yyvsp[-3].u.identifier)->get_fully_scoped_name(), (yylsp[-3]));
- }
- assert(type != nullptr);
- (yyval.u.expr) = new CPPExpression(CPPExpression::construct_op(type, (yyvsp[-1].u.expr)));
-}
-#line 8381 "built/tmp/cppBison.yxx.c"
- break;
-
- case 616: /* const_expr: TYPENAME_IDENTIFIER '{' optional_const_expr_comma '}' */
-#line 3585 "dtool/src/cppparser/cppBison.yxx"
-{
- // Aggregate initialization.
- CPPType *type = (yyvsp[-3].u.identifier)->find_type(current_scope, global_scope, false, current_lexer);
- if (type == nullptr) {
- yyerror(string("internal error resolving type ") + (yyvsp[-3].u.identifier)->get_fully_scoped_name(), (yylsp[-3]));
- }
- assert(type != nullptr);
- (yyval.u.expr) = new CPPExpression(CPPExpression::aggregate_init_op(type, (yyvsp[-1].u.expr)));
-}
-#line 8395 "built/tmp/cppBison.yxx.c"
- break;
-
- case 617: /* const_expr: KW_INT '(' optional_const_expr_comma ')' */
-#line 3595 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPType *type =
- CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int));
- (yyval.u.expr) = new CPPExpression(CPPExpression::construct_op(type, (yyvsp[-1].u.expr)));
-}
-#line 8405 "built/tmp/cppBison.yxx.c"
- break;
-
- case 618: /* const_expr: KW_CHAR '(' optional_const_expr_comma ')' */
-#line 3601 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPType *type =
- CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char));
- (yyval.u.expr) = new CPPExpression(CPPExpression::construct_op(type, (yyvsp[-1].u.expr)));
-}
-#line 8415 "built/tmp/cppBison.yxx.c"
- break;
-
- case 619: /* const_expr: KW_WCHAR_T '(' optional_const_expr_comma ')' */
-#line 3607 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPType *type =
- CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_wchar_t));
- (yyval.u.expr) = new CPPExpression(CPPExpression::construct_op(type, (yyvsp[-1].u.expr)));
-}
-#line 8425 "built/tmp/cppBison.yxx.c"
- break;
-
- case 620: /* const_expr: KW_CHAR8_T '(' optional_const_expr_comma ')' */
-#line 3613 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPType *type =
- CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char8_t));
- (yyval.u.expr) = new CPPExpression(CPPExpression::construct_op(type, (yyvsp[-1].u.expr)));
-}
-#line 8435 "built/tmp/cppBison.yxx.c"
- break;
-
- case 621: /* const_expr: KW_CHAR16_T '(' optional_const_expr_comma ')' */
-#line 3619 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPType *type =
- CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char16_t));
- (yyval.u.expr) = new CPPExpression(CPPExpression::construct_op(type, (yyvsp[-1].u.expr)));
-}
-#line 8445 "built/tmp/cppBison.yxx.c"
- break;
-
- case 622: /* const_expr: KW_CHAR32_T '(' optional_const_expr_comma ')' */
-#line 3625 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPType *type =
- CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char32_t));
- (yyval.u.expr) = new CPPExpression(CPPExpression::construct_op(type, (yyvsp[-1].u.expr)));
-}
-#line 8455 "built/tmp/cppBison.yxx.c"
- break;
-
- case 623: /* const_expr: KW_BOOL '(' optional_const_expr_comma ')' */
-#line 3631 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPType *type =
- CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_bool));
- (yyval.u.expr) = new CPPExpression(CPPExpression::construct_op(type, (yyvsp[-1].u.expr)));
-}
-#line 8465 "built/tmp/cppBison.yxx.c"
- break;
-
- case 624: /* const_expr: KW_SHORT '(' optional_const_expr_comma ')' */
-#line 3637 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPType *type =
- CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int,
- CPPSimpleType::F_short));
- (yyval.u.expr) = new CPPExpression(CPPExpression::construct_op(type, (yyvsp[-1].u.expr)));
-}
-#line 8476 "built/tmp/cppBison.yxx.c"
- break;
-
- case 625: /* const_expr: KW_LONG '(' optional_const_expr_comma ')' */
-#line 3644 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPType *type =
- CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int,
- CPPSimpleType::F_long));
- (yyval.u.expr) = new CPPExpression(CPPExpression::construct_op(type, (yyvsp[-1].u.expr)));
-}
-#line 8487 "built/tmp/cppBison.yxx.c"
- break;
-
- case 626: /* const_expr: KW_UNSIGNED '(' optional_const_expr_comma ')' */
-#line 3651 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPType *type =
- CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int,
- CPPSimpleType::F_unsigned));
- (yyval.u.expr) = new CPPExpression(CPPExpression::construct_op(type, (yyvsp[-1].u.expr)));
-}
-#line 8498 "built/tmp/cppBison.yxx.c"
- break;
-
- case 627: /* const_expr: KW_SIGNED '(' optional_const_expr_comma ')' */
-#line 3658 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPType *type =
- CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int,
- CPPSimpleType::F_signed));
- (yyval.u.expr) = new CPPExpression(CPPExpression::construct_op(type, (yyvsp[-1].u.expr)));
-}
-#line 8509 "built/tmp/cppBison.yxx.c"
- break;
-
- case 628: /* const_expr: KW_FLOAT '(' optional_const_expr_comma ')' */
-#line 3665 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPType *type =
- CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_float));
- (yyval.u.expr) = new CPPExpression(CPPExpression::construct_op(type, (yyvsp[-1].u.expr)));
-}
-#line 8519 "built/tmp/cppBison.yxx.c"
- break;
-
- case 629: /* const_expr: KW_DOUBLE '(' optional_const_expr_comma ')' */
-#line 3671 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPType *type =
- CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_double));
- (yyval.u.expr) = new CPPExpression(CPPExpression::construct_op(type, (yyvsp[-1].u.expr)));
-}
-#line 8529 "built/tmp/cppBison.yxx.c"
- break;
-
- case 630: /* const_expr: KW_SIZEOF '(' full_type ')' */
-#line 3677 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[-1].u.type)));
-}
-#line 8537 "built/tmp/cppBison.yxx.c"
- break;
-
- case 631: /* const_expr: KW_SIZEOF const_expr */
-#line 3681 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[0].u.expr)));
-}
-#line 8545 "built/tmp/cppBison.yxx.c"
- break;
-
- case 632: /* const_expr: KW_SIZEOF ELLIPSIS '(' name ')' */
-#line 3685 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_ellipsis_func((yyvsp[-1].u.identifier)));
-}
-#line 8553 "built/tmp/cppBison.yxx.c"
- break;
-
- case 633: /* const_expr: KW_ALIGNOF '(' full_type ')' */
-#line 3689 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::alignof_func((yyvsp[-1].u.type)));
-}
-#line 8561 "built/tmp/cppBison.yxx.c"
- break;
-
- case 634: /* const_expr: KW_NEW predefined_type */
-#line 3693 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[0].u.type)));
-}
-#line 8569 "built/tmp/cppBison.yxx.c"
- break;
-
- case 635: /* const_expr: KW_NEW predefined_type '(' optional_const_expr_comma ')' */
-#line 3697 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[-3].u.type), (yyvsp[-1].u.expr)));
-}
-#line 8577 "built/tmp/cppBison.yxx.c"
- break;
-
- case 636: /* const_expr: KW_TYPEID '(' full_type ')' */
-#line 3701 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPIdentifier ident("");
- ident.add_name("std");
- ident.add_name("type_info");
- CPPType *std_type_info = ident.find_type(current_scope, global_scope, false, current_lexer);
- if (!std_type_info) {
- yywarning("cannot use typeid before including ", (yylsp[-3]));
- }
- (yyval.u.expr) = new CPPExpression(CPPExpression::typeid_op((yyvsp[-1].u.type), std_type_info));
-}
-#line 8592 "built/tmp/cppBison.yxx.c"
- break;
-
- case 637: /* const_expr: KW_TYPEID '(' const_expr ')' */
-#line 3712 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPIdentifier ident("");
- ident.add_name("std");
- ident.add_name("type_info");
- CPPType *std_type_info = ident.find_type(current_scope, global_scope, false, current_lexer);
- if (!std_type_info) {
- yywarning("cannot use typeid before including ", (yylsp[-3]));
- }
- (yyval.u.expr) = new CPPExpression(CPPExpression::typeid_op((yyvsp[-1].u.expr), std_type_info));
-}
-#line 8607 "built/tmp/cppBison.yxx.c"
- break;
-
- case 638: /* const_expr: '!' const_expr */
-#line 3723 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[0].u.expr));
-}
-#line 8615 "built/tmp/cppBison.yxx.c"
- break;
-
- case 639: /* const_expr: '~' const_expr */
-#line 3727 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[0].u.expr));
-}
-#line 8623 "built/tmp/cppBison.yxx.c"
- break;
-
- case 640: /* const_expr: '-' const_expr */
-#line 3731 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(UNARY_MINUS, (yyvsp[0].u.expr));
-}
-#line 8631 "built/tmp/cppBison.yxx.c"
- break;
-
- case 641: /* const_expr: '+' const_expr */
-#line 3735 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(UNARY_PLUS, (yyvsp[0].u.expr));
-}
-#line 8639 "built/tmp/cppBison.yxx.c"
- break;
-
- case 642: /* const_expr: '*' const_expr */
-#line 3739 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(UNARY_STAR, (yyvsp[0].u.expr));
-}
-#line 8647 "built/tmp/cppBison.yxx.c"
- break;
-
- case 643: /* const_expr: '&' const_expr */
-#line 3743 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[0].u.expr));
-}
-#line 8655 "built/tmp/cppBison.yxx.c"
- break;
-
- case 644: /* const_expr: const_expr '*' const_expr */
-#line 3747 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('*', (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8663 "built/tmp/cppBison.yxx.c"
- break;
-
- case 645: /* const_expr: const_expr '/' const_expr */
-#line 3751 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('/', (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8671 "built/tmp/cppBison.yxx.c"
- break;
-
- case 646: /* const_expr: const_expr '%' const_expr */
-#line 3755 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('%', (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8679 "built/tmp/cppBison.yxx.c"
- break;
-
- case 647: /* const_expr: const_expr '+' const_expr */
-#line 3759 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('+', (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8687 "built/tmp/cppBison.yxx.c"
- break;
-
- case 648: /* const_expr: const_expr '-' const_expr */
-#line 3763 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('-', (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8695 "built/tmp/cppBison.yxx.c"
- break;
-
- case 649: /* const_expr: const_expr '|' const_expr */
-#line 3767 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('|', (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8703 "built/tmp/cppBison.yxx.c"
- break;
-
- case 650: /* const_expr: const_expr '^' const_expr */
-#line 3771 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('^', (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8711 "built/tmp/cppBison.yxx.c"
- break;
-
- case 651: /* const_expr: const_expr '&' const_expr */
-#line 3775 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('&', (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8719 "built/tmp/cppBison.yxx.c"
- break;
-
- case 652: /* const_expr: const_expr OROR const_expr */
-#line 3779 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8727 "built/tmp/cppBison.yxx.c"
- break;
-
- case 653: /* const_expr: const_expr ANDAND const_expr */
-#line 3783 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8735 "built/tmp/cppBison.yxx.c"
- break;
-
- case 654: /* const_expr: const_expr EQCOMPARE const_expr */
-#line 3787 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8743 "built/tmp/cppBison.yxx.c"
- break;
-
- case 655: /* const_expr: const_expr NECOMPARE const_expr */
-#line 3791 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8751 "built/tmp/cppBison.yxx.c"
- break;
-
- case 656: /* const_expr: const_expr LECOMPARE const_expr */
-#line 3795 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8759 "built/tmp/cppBison.yxx.c"
- break;
-
- case 657: /* const_expr: const_expr GECOMPARE const_expr */
-#line 3799 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8767 "built/tmp/cppBison.yxx.c"
- break;
-
- case 658: /* const_expr: const_expr SPACESHIP const_expr */
-#line 3803 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(SPACESHIP, (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8775 "built/tmp/cppBison.yxx.c"
- break;
-
- case 659: /* const_expr: const_expr '<' const_expr */
-#line 3807 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('<', (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8783 "built/tmp/cppBison.yxx.c"
- break;
-
- case 660: /* const_expr: const_expr '>' const_expr */
-#line 3811 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('>', (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8791 "built/tmp/cppBison.yxx.c"
- break;
-
- case 661: /* const_expr: const_expr LSHIFT const_expr */
-#line 3815 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8799 "built/tmp/cppBison.yxx.c"
- break;
-
- case 662: /* const_expr: const_expr RSHIFT const_expr */
-#line 3819 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8807 "built/tmp/cppBison.yxx.c"
- break;
-
- case 663: /* const_expr: const_expr '?' const_expr ':' const_expr */
-#line 3823 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('?', (yyvsp[-4].u.expr), (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8815 "built/tmp/cppBison.yxx.c"
- break;
-
- case 664: /* const_expr: const_expr '[' const_expr ']' */
-#line 3827 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('[', (yyvsp[-3].u.expr), (yyvsp[-1].u.expr));
-}
-#line 8823 "built/tmp/cppBison.yxx.c"
- break;
-
- case 665: /* const_expr: const_expr '(' const_expr_comma ')' */
-#line 3831 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('f', (yyvsp[-3].u.expr), (yyvsp[-1].u.expr));
-}
-#line 8831 "built/tmp/cppBison.yxx.c"
- break;
-
- case 666: /* const_expr: const_expr '(' ')' */
-#line 3835 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('f', (yyvsp[-2].u.expr));
-}
-#line 8839 "built/tmp/cppBison.yxx.c"
- break;
-
- case 667: /* const_expr: KW_NOEXCEPT_LPAREN const_expr ')' */
-#line 3839 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(KW_NOEXCEPT, (yyvsp[-1].u.expr));
-}
-#line 8847 "built/tmp/cppBison.yxx.c"
- break;
-
- case 668: /* const_expr: const_expr '.' name */
-#line 3843 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('.', (yyvsp[-2].u.expr), new CPPExpression((yyvsp[0].u.identifier), current_scope, global_scope, current_lexer));
-}
-#line 8855 "built/tmp/cppBison.yxx.c"
- break;
-
- case 669: /* const_expr: const_expr POINTSAT const_expr */
-#line 3847 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 8863 "built/tmp/cppBison.yxx.c"
- break;
-
- case 670: /* const_expr: '(' const_expr_comma ')' */
-#line 3851 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = (yyvsp[-1].u.expr);
-}
-#line 8871 "built/tmp/cppBison.yxx.c"
- break;
-
- case 671: /* const_operand: INTEGER */
-#line 3858 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression((yyvsp[0].u.integer));
-}
-#line 8879 "built/tmp/cppBison.yxx.c"
- break;
-
- case 672: /* const_operand: KW_TRUE */
-#line 3862 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(true);
-}
-#line 8887 "built/tmp/cppBison.yxx.c"
- break;
-
- case 673: /* const_operand: KW_FALSE */
-#line 3866 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(false);
-}
-#line 8895 "built/tmp/cppBison.yxx.c"
- break;
-
- case 674: /* const_operand: CHAR_TOK */
-#line 3870 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression((yyvsp[0].u.integer));
-}
-#line 8903 "built/tmp/cppBison.yxx.c"
- break;
-
- case 675: /* const_operand: REAL */
-#line 3874 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression((yyvsp[0].u.real));
-}
-#line 8911 "built/tmp/cppBison.yxx.c"
- break;
-
- case 676: /* const_operand: string_literal */
-#line 3878 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = (yyvsp[0].u.expr);
-}
-#line 8919 "built/tmp/cppBison.yxx.c"
- break;
-
- case 677: /* const_operand: CUSTOM_LITERAL */
-#line 3882 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = (yyvsp[0].u.expr);
-}
-#line 8927 "built/tmp/cppBison.yxx.c"
- break;
-
- case 678: /* const_operand: IDENTIFIER */
-#line 3886 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression((yyvsp[0].u.identifier), current_scope, global_scope, current_lexer);
-}
-#line 8935 "built/tmp/cppBison.yxx.c"
- break;
-
- case 679: /* const_operand: KW_FINAL */
-#line 3890 "dtool/src/cppparser/cppBison.yxx"
-{
- // A variable named "final". C++11 explicitly permits this.
- CPPIdentifier *ident = new CPPIdentifier("final", (yylsp[0]));
- (yyval.u.expr) = new CPPExpression(ident, current_scope, global_scope, current_lexer);
-}
-#line 8945 "built/tmp/cppBison.yxx.c"
- break;
-
- case 680: /* const_operand: KW_OVERRIDE */
-#line 3896 "dtool/src/cppparser/cppBison.yxx"
-{
- // A variable named "override". C++11 explicitly permits this.
- CPPIdentifier *ident = new CPPIdentifier("override", (yylsp[0]));
- (yyval.u.expr) = new CPPExpression(ident, current_scope, global_scope, current_lexer);
-}
-#line 8955 "built/tmp/cppBison.yxx.c"
- break;
-
- case 681: /* const_operand: KW_NULLPTR */
-#line 3902 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::get_nullptr());
-}
-#line 8963 "built/tmp/cppBison.yxx.c"
- break;
-
- case 682: /* const_operand: '[' capture_list ']' function_post optional_attributes maybe_trailing_return_type '{' code '}' */
-#line 3906 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyvsp[-7].u.closure_type)->_flags = (yyvsp[-5].u.integer);
- (yyvsp[-7].u.closure_type)->_attributes = (yyvsp[-4].attr_list);
- (yyvsp[-7].u.closure_type)->_return_type = (yyvsp[-3].u.type);
- (yyval.u.expr) = new CPPExpression(CPPExpression::lambda((yyvsp[-7].u.closure_type)));
-}
-#line 8974 "built/tmp/cppBison.yxx.c"
- break;
-
- case 683: /* const_operand: '[' capture_list ']' '(' function_parameter_list ')' function_post optional_attributes maybe_trailing_return_type '{' code '}' */
-#line 3913 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyvsp[-10].u.closure_type)->_parameters = (yyvsp[-7].u.param_list);
- (yyvsp[-10].u.closure_type)->_flags = (yyvsp[-5].u.integer);
- (yyvsp[-10].u.closure_type)->_attributes = (yyvsp[-4].attr_list);
- (yyvsp[-10].u.closure_type)->_return_type = (yyvsp[-3].u.type);
- (yyval.u.expr) = new CPPExpression(CPPExpression::lambda((yyvsp[-10].u.closure_type)));
-}
-#line 8986 "built/tmp/cppBison.yxx.c"
- break;
-
- case 684: /* const_operand: KW_HAS_VIRTUAL_DESTRUCTOR '(' full_type ')' */
-#line 3921 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_HAS_VIRTUAL_DESTRUCTOR, (yyvsp[-1].u.type)));
-}
-#line 8994 "built/tmp/cppBison.yxx.c"
- break;
-
- case 685: /* const_operand: KW_IS_ABSTRACT '(' full_type ')' */
-#line 3925 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_IS_ABSTRACT, (yyvsp[-1].u.type)));
-}
-#line 9002 "built/tmp/cppBison.yxx.c"
- break;
-
- case 686: /* const_operand: KW_IS_BASE_OF '(' full_type ',' full_type ')' */
-#line 3929 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_IS_CLASS, (yyvsp[-3].u.type), (yyvsp[-1].u.type)));
-}
-#line 9010 "built/tmp/cppBison.yxx.c"
- break;
-
- case 687: /* const_operand: KW_IS_CLASS '(' full_type ')' */
-#line 3933 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_IS_CLASS, (yyvsp[-1].u.type)));
-}
-#line 9018 "built/tmp/cppBison.yxx.c"
- break;
-
- case 688: /* const_operand: KW_IS_CONSTRUCTIBLE '(' full_type ')' */
-#line 3937 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_IS_CONSTRUCTIBLE, (yyvsp[-1].u.type)));
-}
-#line 9026 "built/tmp/cppBison.yxx.c"
- break;
-
- case 689: /* const_operand: KW_IS_CONSTRUCTIBLE '(' full_type ',' full_type ')' */
-#line 3941 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_IS_CONSTRUCTIBLE, (yyvsp[-3].u.type), (yyvsp[-1].u.type)));
-}
-#line 9034 "built/tmp/cppBison.yxx.c"
- break;
-
- case 690: /* const_operand: KW_IS_CONVERTIBLE_TO '(' full_type ',' full_type ')' */
-#line 3945 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_IS_CONVERTIBLE_TO, (yyvsp[-3].u.type), (yyvsp[-1].u.type)));
-}
-#line 9042 "built/tmp/cppBison.yxx.c"
- break;
-
- case 691: /* const_operand: KW_IS_DESTRUCTIBLE '(' full_type ')' */
-#line 3949 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_IS_DESTRUCTIBLE, (yyvsp[-1].u.type)));
-}
-#line 9050 "built/tmp/cppBison.yxx.c"
- break;
-
- case 692: /* const_operand: KW_IS_EMPTY '(' full_type ')' */
-#line 3953 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_IS_EMPTY, (yyvsp[-1].u.type)));
-}
-#line 9058 "built/tmp/cppBison.yxx.c"
- break;
-
- case 693: /* const_operand: KW_IS_ENUM '(' full_type ')' */
-#line 3957 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_IS_ENUM, (yyvsp[-1].u.type)));
-}
-#line 9066 "built/tmp/cppBison.yxx.c"
- break;
-
- case 694: /* const_operand: KW_IS_FINAL '(' full_type ')' */
-#line 3961 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_IS_FINAL, (yyvsp[-1].u.type)));
-}
-#line 9074 "built/tmp/cppBison.yxx.c"
- break;
-
- case 695: /* const_operand: KW_IS_FUNDAMENTAL '(' full_type ')' */
-#line 3965 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_IS_FUNDAMENTAL, (yyvsp[-1].u.type)));
-}
-#line 9082 "built/tmp/cppBison.yxx.c"
- break;
-
- case 696: /* const_operand: KW_IS_POD '(' full_type ')' */
-#line 3969 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_IS_POD, (yyvsp[-1].u.type)));
-}
-#line 9090 "built/tmp/cppBison.yxx.c"
- break;
-
- case 697: /* const_operand: KW_IS_POLYMORPHIC '(' full_type ')' */
-#line 3973 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_IS_POLYMORPHIC, (yyvsp[-1].u.type)));
-}
-#line 9098 "built/tmp/cppBison.yxx.c"
- break;
-
- case 698: /* const_operand: KW_IS_STANDARD_LAYOUT '(' full_type ')' */
-#line 3977 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_IS_STANDARD_LAYOUT, (yyvsp[-1].u.type)));
-}
-#line 9106 "built/tmp/cppBison.yxx.c"
- break;
-
- case 699: /* const_operand: KW_IS_TRIVIAL '(' full_type ')' */
-#line 3981 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_IS_TRIVIAL, (yyvsp[-1].u.type)));
-}
-#line 9114 "built/tmp/cppBison.yxx.c"
- break;
-
- case 700: /* const_operand: KW_IS_TRIVIALLY_COPYABLE '(' full_type ')' */
-#line 3985 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_IS_TRIVIALLY_COPYABLE, (yyvsp[-1].u.type)));
-}
-#line 9122 "built/tmp/cppBison.yxx.c"
- break;
-
- case 701: /* const_operand: KW_IS_UNION '(' full_type ')' */
-#line 3989 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_IS_UNION, (yyvsp[-1].u.type)));
-}
-#line 9130 "built/tmp/cppBison.yxx.c"
- break;
-
- case 702: /* formal_const_expr: formal_const_operand */
-#line 4003 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = (yyvsp[0].u.expr);
-}
-#line 9138 "built/tmp/cppBison.yxx.c"
- break;
-
- case 703: /* formal_const_expr: '(' full_type ')' const_expr */
-#line 4007 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[-2].u.type), (yyvsp[0].u.expr)));
-}
-#line 9146 "built/tmp/cppBison.yxx.c"
- break;
-
- case 704: /* formal_const_expr: KW_STATIC_CAST '<' full_type '>' '(' const_expr_comma ')' */
-#line 4011 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[-4].u.type), (yyvsp[-1].u.expr), CPPExpression::T_static_cast));
-}
-#line 9154 "built/tmp/cppBison.yxx.c"
- break;
-
- case 705: /* formal_const_expr: KW_DYNAMIC_CAST '<' full_type '>' '(' const_expr_comma ')' */
-#line 4015 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[-4].u.type), (yyvsp[-1].u.expr), CPPExpression::T_dynamic_cast));
-}
-#line 9162 "built/tmp/cppBison.yxx.c"
- break;
-
- case 706: /* formal_const_expr: KW_CONST_CAST '<' full_type '>' '(' const_expr_comma ')' */
-#line 4019 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[-4].u.type), (yyvsp[-1].u.expr), CPPExpression::T_const_cast));
-}
-#line 9170 "built/tmp/cppBison.yxx.c"
- break;
-
- case 707: /* formal_const_expr: KW_REINTERPRET_CAST '<' full_type '>' '(' const_expr_comma ')' */
-#line 4023 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[-4].u.type), (yyvsp[-1].u.expr), CPPExpression::T_reinterpret_cast));
-}
-#line 9178 "built/tmp/cppBison.yxx.c"
- break;
-
- case 708: /* formal_const_expr: KW_SIZEOF '(' full_type ')' */
-#line 4027 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[-1].u.type)));
-}
-#line 9186 "built/tmp/cppBison.yxx.c"
- break;
-
- case 709: /* formal_const_expr: KW_SIZEOF formal_const_expr */
-#line 4031 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[0].u.expr)));
-}
-#line 9194 "built/tmp/cppBison.yxx.c"
- break;
-
- case 710: /* formal_const_expr: KW_SIZEOF ELLIPSIS '(' name ')' */
-#line 4035 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_ellipsis_func((yyvsp[-1].u.identifier)));
-}
-#line 9202 "built/tmp/cppBison.yxx.c"
- break;
-
- case 711: /* formal_const_expr: KW_ALIGNOF '(' full_type ')' */
-#line 4039 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::alignof_func((yyvsp[-1].u.type)));
-}
-#line 9210 "built/tmp/cppBison.yxx.c"
- break;
-
- case 712: /* formal_const_expr: KW_NEW predefined_type */
-#line 4043 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[0].u.type)));
-}
-#line 9218 "built/tmp/cppBison.yxx.c"
- break;
-
- case 713: /* formal_const_expr: KW_NEW predefined_type '(' optional_const_expr_comma ')' */
-#line 4047 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[-3].u.type), (yyvsp[-1].u.expr)));
-}
-#line 9226 "built/tmp/cppBison.yxx.c"
- break;
-
- case 714: /* formal_const_expr: KW_TYPEID '(' full_type ')' */
-#line 4051 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPIdentifier ident("");
- ident.add_name("std");
- ident.add_name("type_info");
- CPPType *std_type_info = ident.find_type(current_scope, global_scope, false, current_lexer);
- if (!std_type_info) {
- yywarning("cannot use typeid before including ", (yylsp[-3]));
- }
- (yyval.u.expr) = new CPPExpression(CPPExpression::typeid_op((yyvsp[-1].u.type), std_type_info));
-}
-#line 9241 "built/tmp/cppBison.yxx.c"
- break;
-
- case 715: /* formal_const_expr: KW_TYPEID '(' const_expr ')' */
-#line 4062 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPIdentifier ident("");
- ident.add_name("std");
- ident.add_name("type_info");
- CPPType *std_type_info = ident.find_type(current_scope, global_scope, false, current_lexer);
- if (!std_type_info) {
- yywarning("cannot use typeid before including ", (yylsp[-3]));
- }
- (yyval.u.expr) = new CPPExpression(CPPExpression::typeid_op((yyvsp[-1].u.expr), std_type_info));
-}
-#line 9256 "built/tmp/cppBison.yxx.c"
- break;
-
- case 716: /* formal_const_expr: '!' const_expr */
-#line 4073 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[0].u.expr));
-}
-#line 9264 "built/tmp/cppBison.yxx.c"
- break;
-
- case 717: /* formal_const_expr: '~' const_expr */
-#line 4077 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[0].u.expr));
-}
-#line 9272 "built/tmp/cppBison.yxx.c"
- break;
-
- case 718: /* formal_const_expr: '-' const_expr */
-#line 4081 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(UNARY_MINUS, (yyvsp[0].u.expr));
-}
-#line 9280 "built/tmp/cppBison.yxx.c"
- break;
-
- case 719: /* formal_const_expr: '+' const_expr */
-#line 4085 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(UNARY_PLUS, (yyvsp[0].u.expr));
-}
-#line 9288 "built/tmp/cppBison.yxx.c"
- break;
-
- case 720: /* formal_const_expr: '&' const_expr */
-#line 4089 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[0].u.expr));
-}
-#line 9296 "built/tmp/cppBison.yxx.c"
- break;
-
- case 721: /* formal_const_expr: formal_const_expr '*' const_expr */
-#line 4093 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('*', (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 9304 "built/tmp/cppBison.yxx.c"
- break;
-
- case 722: /* formal_const_expr: formal_const_expr '/' const_expr */
-#line 4097 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('/', (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 9312 "built/tmp/cppBison.yxx.c"
- break;
-
- case 723: /* formal_const_expr: formal_const_expr '%' const_expr */
-#line 4101 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('%', (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 9320 "built/tmp/cppBison.yxx.c"
- break;
-
- case 724: /* formal_const_expr: formal_const_expr '+' const_expr */
-#line 4105 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('+', (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 9328 "built/tmp/cppBison.yxx.c"
- break;
-
- case 725: /* formal_const_expr: formal_const_expr '-' const_expr */
-#line 4109 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('-', (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 9336 "built/tmp/cppBison.yxx.c"
- break;
-
- case 726: /* formal_const_expr: formal_const_expr '|' const_expr */
-#line 4113 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('|', (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 9344 "built/tmp/cppBison.yxx.c"
- break;
-
- case 727: /* formal_const_expr: formal_const_expr '^' const_expr */
-#line 4117 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('^', (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 9352 "built/tmp/cppBison.yxx.c"
- break;
-
- case 728: /* formal_const_expr: formal_const_expr '&' const_expr */
-#line 4121 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('&', (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 9360 "built/tmp/cppBison.yxx.c"
- break;
-
- case 729: /* formal_const_expr: formal_const_expr OROR const_expr */
-#line 4125 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 9368 "built/tmp/cppBison.yxx.c"
- break;
-
- case 730: /* formal_const_expr: formal_const_expr ANDAND const_expr */
-#line 4129 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 9376 "built/tmp/cppBison.yxx.c"
- break;
-
- case 731: /* formal_const_expr: formal_const_expr EQCOMPARE const_expr */
-#line 4133 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 9384 "built/tmp/cppBison.yxx.c"
- break;
-
- case 732: /* formal_const_expr: formal_const_expr NECOMPARE const_expr */
-#line 4137 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 9392 "built/tmp/cppBison.yxx.c"
- break;
-
- case 733: /* formal_const_expr: formal_const_expr LECOMPARE const_expr */
-#line 4141 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 9400 "built/tmp/cppBison.yxx.c"
- break;
-
- case 734: /* formal_const_expr: formal_const_expr GECOMPARE const_expr */
-#line 4145 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 9408 "built/tmp/cppBison.yxx.c"
- break;
-
- case 735: /* formal_const_expr: formal_const_expr SPACESHIP const_expr */
-#line 4149 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(SPACESHIP, (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 9416 "built/tmp/cppBison.yxx.c"
- break;
-
- case 736: /* formal_const_expr: formal_const_expr '<' const_expr */
-#line 4153 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('<', (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 9424 "built/tmp/cppBison.yxx.c"
- break;
-
- case 737: /* formal_const_expr: formal_const_expr '>' const_expr */
-#line 4157 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('>', (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 9432 "built/tmp/cppBison.yxx.c"
- break;
-
- case 738: /* formal_const_expr: formal_const_expr LSHIFT const_expr */
-#line 4161 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 9440 "built/tmp/cppBison.yxx.c"
- break;
-
- case 739: /* formal_const_expr: formal_const_expr RSHIFT const_expr */
-#line 4165 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 9448 "built/tmp/cppBison.yxx.c"
- break;
-
- case 740: /* formal_const_expr: formal_const_expr '?' const_expr ':' const_expr */
-#line 4169 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('?', (yyvsp[-4].u.expr), (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 9456 "built/tmp/cppBison.yxx.c"
- break;
-
- case 741: /* formal_const_expr: formal_const_expr '[' const_expr ']' */
-#line 4173 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('[', (yyvsp[-3].u.expr), (yyvsp[-1].u.expr));
-}
-#line 9464 "built/tmp/cppBison.yxx.c"
- break;
-
- case 742: /* formal_const_expr: formal_const_expr '(' const_expr_comma ')' */
-#line 4177 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('f', (yyvsp[-3].u.expr), (yyvsp[-1].u.expr));
-}
-#line 9472 "built/tmp/cppBison.yxx.c"
- break;
-
- case 743: /* formal_const_expr: formal_const_expr '(' ')' */
-#line 4181 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('f', (yyvsp[-2].u.expr));
-}
-#line 9480 "built/tmp/cppBison.yxx.c"
- break;
-
- case 744: /* formal_const_expr: formal_const_expr '.' name */
-#line 4185 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression('.', (yyvsp[-2].u.expr), new CPPExpression((yyvsp[0].u.identifier), current_scope, global_scope, current_lexer));
-}
-#line 9488 "built/tmp/cppBison.yxx.c"
- break;
-
- case 745: /* formal_const_expr: formal_const_expr POINTSAT const_expr */
-#line 4189 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[-2].u.expr), (yyvsp[0].u.expr));
-}
-#line 9496 "built/tmp/cppBison.yxx.c"
- break;
-
- case 746: /* formal_const_expr: '(' const_expr_comma ')' */
-#line 4193 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = (yyvsp[-1].u.expr);
-}
-#line 9504 "built/tmp/cppBison.yxx.c"
- break;
-
- case 747: /* formal_const_operand: INTEGER */
-#line 4200 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression((yyvsp[0].u.integer));
-}
-#line 9512 "built/tmp/cppBison.yxx.c"
- break;
-
- case 748: /* formal_const_operand: KW_TRUE */
-#line 4204 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(true);
-}
-#line 9520 "built/tmp/cppBison.yxx.c"
- break;
-
- case 749: /* formal_const_operand: KW_FALSE */
-#line 4208 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(false);
-}
-#line 9528 "built/tmp/cppBison.yxx.c"
- break;
-
- case 750: /* formal_const_operand: CHAR_TOK */
-#line 4212 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression((yyvsp[0].u.integer));
-}
-#line 9536 "built/tmp/cppBison.yxx.c"
- break;
-
- case 751: /* formal_const_operand: REAL */
-#line 4216 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression((yyvsp[0].u.real));
-}
-#line 9544 "built/tmp/cppBison.yxx.c"
- break;
-
- case 752: /* formal_const_operand: string_literal */
-#line 4220 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = (yyvsp[0].u.expr);
-}
-#line 9552 "built/tmp/cppBison.yxx.c"
- break;
-
- case 753: /* formal_const_operand: CUSTOM_LITERAL */
-#line 4224 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = (yyvsp[0].u.expr);
-}
-#line 9560 "built/tmp/cppBison.yxx.c"
- break;
-
- case 754: /* formal_const_operand: IDENTIFIER */
-#line 4228 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression((yyvsp[0].u.identifier), current_scope, global_scope, current_lexer);
-}
-#line 9568 "built/tmp/cppBison.yxx.c"
- break;
-
- case 755: /* formal_const_operand: KW_FINAL */
-#line 4232 "dtool/src/cppparser/cppBison.yxx"
-{
- // A variable named "final". C++11 explicitly permits this.
- CPPIdentifier *ident = new CPPIdentifier("final", (yylsp[0]));
- (yyval.u.expr) = new CPPExpression(ident, current_scope, global_scope, current_lexer);
-}
-#line 9578 "built/tmp/cppBison.yxx.c"
- break;
-
- case 756: /* formal_const_operand: KW_OVERRIDE */
-#line 4238 "dtool/src/cppparser/cppBison.yxx"
-{
- // A variable named "override". C++11 explicitly permits this.
- CPPIdentifier *ident = new CPPIdentifier("override", (yylsp[0]));
- (yyval.u.expr) = new CPPExpression(ident, current_scope, global_scope, current_lexer);
-}
-#line 9588 "built/tmp/cppBison.yxx.c"
- break;
-
- case 757: /* formal_const_operand: KW_NULLPTR */
-#line 4244 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression(CPPExpression::get_nullptr());
-}
-#line 9596 "built/tmp/cppBison.yxx.c"
- break;
-
- case 758: /* capture_list: empty */
-#line 4252 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.closure_type) = new CPPClosureType();
-}
-#line 9604 "built/tmp/cppBison.yxx.c"
- break;
-
- case 759: /* capture_list: '=' */
-#line 4256 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.closure_type) = new CPPClosureType(CPPClosureType::CT_by_value);
-}
-#line 9612 "built/tmp/cppBison.yxx.c"
- break;
-
- case 760: /* capture_list: '&' */
-#line 4260 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.closure_type) = new CPPClosureType(CPPClosureType::CT_by_reference);
-}
-#line 9620 "built/tmp/cppBison.yxx.c"
- break;
-
- case 761: /* capture_list: capture maybe_initialize */
-#line 4264 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.closure_type) = new CPPClosureType();
- (yyvsp[-1].u.capture)->_initializer = (yyvsp[0].u.expr);
- (yyval.u.closure_type)->_captures.push_back(*(yyvsp[-1].u.capture));
- delete (yyvsp[-1].u.capture);
-}
-#line 9631 "built/tmp/cppBison.yxx.c"
- break;
-
- case 762: /* capture_list: capture_list ',' capture maybe_initialize */
-#line 4271 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.closure_type) = (yyvsp[-3].u.closure_type);
- (yyvsp[-1].u.capture)->_initializer = (yyvsp[0].u.expr);
- (yyval.u.closure_type)->_captures.push_back(*(yyvsp[-1].u.capture));
- delete (yyvsp[-1].u.capture);
-}
-#line 9642 "built/tmp/cppBison.yxx.c"
- break;
-
- case 763: /* capture: '&' name */
-#line 4281 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.capture) = new CPPClosureType::Capture;
- (yyval.u.capture)->_name = (yyvsp[0].u.identifier)->get_simple_name();
- (yyval.u.capture)->_type = CPPClosureType::CT_by_reference;
-}
-#line 9652 "built/tmp/cppBison.yxx.c"
- break;
-
- case 764: /* capture: '&' name ELLIPSIS */
-#line 4287 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.capture) = new CPPClosureType::Capture;
- (yyval.u.capture)->_name = (yyvsp[-1].u.identifier)->get_simple_name();
- (yyval.u.capture)->_type = CPPClosureType::CT_by_reference;
-}
-#line 9662 "built/tmp/cppBison.yxx.c"
- break;
-
- case 765: /* capture: name */
-#line 4293 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.capture) = new CPPClosureType::Capture;
- (yyval.u.capture)->_name = (yyvsp[0].u.identifier)->get_simple_name();
- if ((yyval.u.capture)->_name == "this") {
- (yyval.u.capture)->_type = CPPClosureType::CT_by_reference;
- } else {
- (yyval.u.capture)->_type = CPPClosureType::CT_by_value;
- }
-}
-#line 9676 "built/tmp/cppBison.yxx.c"
- break;
-
- case 766: /* capture: '*' name */
-#line 4303 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.capture) = new CPPClosureType::Capture;
- (yyval.u.capture)->_name = (yyvsp[0].u.identifier)->get_simple_name();
- (yyval.u.capture)->_type = CPPClosureType::CT_by_value;
- if ((yyval.u.capture)->_name != "this") {
- yywarning("only capture name 'this' may be preceded by an asterisk", (yylsp[0]));
- }
-}
-#line 9689 "built/tmp/cppBison.yxx.c"
- break;
-
- case 767: /* class_derivation_name: name */
-#line 4315 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPType *type = (yyvsp[0].u.identifier)->find_type(current_scope, global_scope, true);
- if (type == nullptr) {
- type = CPPType::new_type(new CPPTBDType((yyvsp[0].u.identifier)));
- }
- (yyval.u.type) = type;
-}
-#line 9701 "built/tmp/cppBison.yxx.c"
- break;
-
- case 768: /* class_derivation_name: KW_TYPENAME name */
-#line 4323 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.type) = CPPType::new_type(new CPPTBDType((yyvsp[0].u.identifier)));
-}
-#line 9709 "built/tmp/cppBison.yxx.c"
- break;
-
- case 769: /* class_derivation_name: name ELLIPSIS */
-#line 4327 "dtool/src/cppparser/cppBison.yxx"
-{
- CPPClassTemplateParameter *ctp = new CPPClassTemplateParameter((yyvsp[-1].u.identifier));
- ctp->_packed = true;
- (yyval.u.type) = CPPType::new_type(ctp);
-}
-#line 9719 "built/tmp/cppBison.yxx.c"
- break;
-
- case 770: /* name: IDENTIFIER */
-#line 4357 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.identifier) = (yyvsp[0].u.identifier);
-}
-#line 9727 "built/tmp/cppBison.yxx.c"
- break;
-
- case 771: /* name: TYPENAME_IDENTIFIER */
-#line 4361 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.identifier) = (yyvsp[0].u.identifier);
-}
-#line 9735 "built/tmp/cppBison.yxx.c"
- break;
-
- case 772: /* name: TYPEPACK_IDENTIFIER */
-#line 4365 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.identifier) = (yyvsp[0].u.identifier);
-}
-#line 9743 "built/tmp/cppBison.yxx.c"
- break;
-
- case 773: /* name: KW_FINAL */
-#line 4369 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.identifier) = new CPPIdentifier("final", (yylsp[0]));
-}
-#line 9751 "built/tmp/cppBison.yxx.c"
- break;
-
- case 774: /* name: KW_OVERRIDE */
-#line 4373 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.identifier) = new CPPIdentifier("override", (yylsp[0]));
-}
-#line 9759 "built/tmp/cppBison.yxx.c"
- break;
-
- case 775: /* name: KW_SIGNED */
-#line 4377 "dtool/src/cppparser/cppBison.yxx"
-{
- // This is not a keyword in Python, so it is useful to be able to use this
- // in MAKE_PROPERTY definitions, etc.
- (yyval.u.identifier) = new CPPIdentifier("signed", (yylsp[0]));
-}
-#line 9769 "built/tmp/cppBison.yxx.c"
- break;
-
- case 776: /* name: KW_FLOAT */
-#line 4383 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.identifier) = new CPPIdentifier("float", (yylsp[0]));
-}
-#line 9777 "built/tmp/cppBison.yxx.c"
- break;
-
- case 777: /* name: KW_PUBLIC */
-#line 4387 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.identifier) = new CPPIdentifier("public", (yylsp[0]));
-}
-#line 9785 "built/tmp/cppBison.yxx.c"
- break;
-
- case 778: /* name: KW_PRIVATE */
-#line 4391 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.identifier) = new CPPIdentifier("private", (yylsp[0]));
-}
-#line 9793 "built/tmp/cppBison.yxx.c"
- break;
-
- case 779: /* name: KW_STATIC */
-#line 4395 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.identifier) = new CPPIdentifier("static", (yylsp[0]));
-}
-#line 9801 "built/tmp/cppBison.yxx.c"
- break;
-
- case 780: /* name: KW_DEFAULT */
-#line 4399 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.identifier) = new CPPIdentifier("default", (yylsp[0]));
-}
-#line 9809 "built/tmp/cppBison.yxx.c"
- break;
-
- case 781: /* name_no_final: IDENTIFIER */
-#line 4410 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.identifier) = (yyvsp[0].u.identifier);
-}
-#line 9817 "built/tmp/cppBison.yxx.c"
- break;
-
- case 782: /* name_no_final: TYPENAME_IDENTIFIER */
-#line 4414 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.identifier) = (yyvsp[0].u.identifier);
-}
-#line 9825 "built/tmp/cppBison.yxx.c"
- break;
-
- case 783: /* name_no_final: TYPEPACK_IDENTIFIER */
-#line 4418 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.identifier) = (yyvsp[0].u.identifier);
-}
-#line 9833 "built/tmp/cppBison.yxx.c"
- break;
-
- case 784: /* name_no_final: KW_OVERRIDE */
-#line 4422 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.identifier) = new CPPIdentifier("override", (yylsp[0]));
-}
-#line 9841 "built/tmp/cppBison.yxx.c"
- break;
-
- case 785: /* string_literal: SIMPLE_STRING */
-#line 4430 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = new CPPExpression((yyvsp[0].str));
-}
-#line 9849 "built/tmp/cppBison.yxx.c"
- break;
-
- case 786: /* string_literal: STRING_LITERAL */
-#line 4434 "dtool/src/cppparser/cppBison.yxx"
-{
- (yyval.u.expr) = (yyvsp[0].u.expr);
-}
-#line 9857 "built/tmp/cppBison.yxx.c"
- break;
-
- case 787: /* string_literal: string_literal SIMPLE_STRING */
-#line 4438 "dtool/src/cppparser/cppBison.yxx"
-{
- // The right string takes on the literal type of the left.
- (yyval.u.expr) = (yyvsp[-1].u.expr);
- (yyval.u.expr)->_str += (yyvsp[0].str);
-}
-#line 9867 "built/tmp/cppBison.yxx.c"
- break;
-
- case 788: /* string_literal: string_literal STRING_LITERAL */
-#line 4444 "dtool/src/cppparser/cppBison.yxx"
-{
- // We have to check that the two literal types match up.
- (yyval.u.expr) = (yyvsp[-1].u.expr);
- if ((yyvsp[0].u.expr)->_type != CPPExpression::T_string && (yyvsp[0].u.expr)->_type != (yyvsp[-1].u.expr)->_type) {
- yywarning("cannot concatenate two string literals of different types", (yyloc));
- }
- (yyval.u.expr)->_str += (yyvsp[0].u.expr)->_str;
-}
-#line 9880 "built/tmp/cppBison.yxx.c"
- break;
-
-
-#line 9884 "built/tmp/cppBison.yxx.c"
-
- default: break;
- }
- /* User semantic actions sometimes alter yychar, and that requires
- that yytoken be updated with the new translation. We take the
- approach of translating immediately before every use of yytoken.
- One alternative is translating here after every semantic action,
- but that translation would be missed if the semantic action invokes
- YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
- if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
- incorrect destructor might then be invoked immediately. In the
- case of YYERROR or YYBACKUP, subsequent parser actions might lead
- to an incorrect destructor call or verbose syntax error message
- before the lookahead is translated. */
- YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
-
- YYPOPSTACK (yylen);
- yylen = 0;
-
- *++yyvsp = yyval;
- *++yylsp = yyloc;
-
- /* Now 'shift' the result of the reduction. Determine what state
- that goes to, based on the state we popped back to and the rule
- number reduced by. */
- {
- const int yylhs = yyr1[yyn] - YYNTOKENS;
- const int yyi = yypgoto[yylhs] + *yyssp;
- yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
- ? yytable[yyi]
- : yydefgoto[yylhs]);
- }
-
- goto yynewstate;
-
-
-/*--------------------------------------.
-| yyerrlab -- here on detecting error. |
-`--------------------------------------*/
-yyerrlab:
- /* Make sure we have latest lookahead translation. See comments at
- user semantic actions for why this is necessary. */
- yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
- /* If not already recovering from an error, report this error. */
- if (!yyerrstatus)
- {
- ++yynerrs;
- yyerror (&yylloc, YY_("syntax error"));
- }
-
- yyerror_range[1] = yylloc;
- if (yyerrstatus == 3)
- {
- /* If just tried and failed to reuse lookahead token after an
- error, discard it. */
-
- if (yychar <= YYEOF)
- {
- /* Return failure if at end of input. */
- if (yychar == YYEOF)
- YYABORT;
- }
- else
- {
- yydestruct ("Error: discarding",
- yytoken, &yylval, &yylloc);
- yychar = YYEMPTY;
- }
- }
-
- /* 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 (0)
- YYERROR;
- ++yynerrs;
-
- /* Do not reclaim the symbols of the rule whose action triggered
- this YYERROR. */
- YYPOPSTACK (yylen);
- yylen = 0;
- YY_STACK_PRINT (yyss, yyssp);
- yystate = *yyssp;
- 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[yystate];
- if (!yypact_value_is_default (yyn))
- {
- yyn += YYSYMBOL_YYerror;
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
- {
- yyn = yytable[yyn];
- if (0 < yyn)
- break;
- }
- }
-
- /* Pop the current state because it cannot handle the error token. */
- if (yyssp == yyss)
- YYABORT;
-
- yyerror_range[1] = *yylsp;
- yydestruct ("Error: popping",
- YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp);
- YYPOPSTACK (1);
- yystate = *yyssp;
- YY_STACK_PRINT (yyss, yyssp);
- }
-
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- *++yyvsp = yylval;
- YY_IGNORE_MAYBE_UNINITIALIZED_END
-
- yyerror_range[2] = yylloc;
- ++yylsp;
- YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);
-
- /* Shift the error token. */
- YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
-
- yystate = yyn;
- goto yynewstate;
-
-
-/*-------------------------------------.
-| yyacceptlab -- YYACCEPT comes here. |
-`-------------------------------------*/
-yyacceptlab:
- yyresult = 0;
- goto yyreturnlab;
-
-
-/*-----------------------------------.
-| yyabortlab -- YYABORT comes here. |
-`-----------------------------------*/
-yyabortlab:
- yyresult = 1;
- goto yyreturnlab;
-
-
-/*-----------------------------------------------------------.
-| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
-`-----------------------------------------------------------*/
-yyexhaustedlab:
- yyerror (&yylloc, YY_("memory exhausted"));
- yyresult = 2;
- goto yyreturnlab;
-
-
-/*----------------------------------------------------------.
-| yyreturnlab -- parsing is finished, clean up and return. |
-`----------------------------------------------------------*/
-yyreturnlab:
- if (yychar != YYEMPTY)
- {
- /* Make sure we have latest lookahead translation. See comments at
- user semantic actions for why this is necessary. */
- yytoken = YYTRANSLATE (yychar);
- yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval, &yylloc);
- }
- /* Do not reclaim the symbols of the rule whose action triggered
- this YYABORT or YYACCEPT. */
- YYPOPSTACK (yylen);
- YY_STACK_PRINT (yyss, yyssp);
- while (yyssp != yyss)
- {
- yydestruct ("Cleanup: popping",
- YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp);
- YYPOPSTACK (1);
- }
-#ifndef yyoverflow
- if (yyss != yyssa)
- YYSTACK_FREE (yyss);
-#endif
-
- return yyresult;
-}
-
diff --git a/dtool/src/cppparser/cppBison.h.prebuilt b/dtool/src/cppparser/cppBison.h.prebuilt
deleted file mode 100644
index 78032c0153c..00000000000
--- a/dtool/src/cppparser/cppBison.h.prebuilt
+++ /dev/null
@@ -1,394 +0,0 @@
-/* A Bison parser, made by GNU Bison 3.8.2. */
-
-/* Bison interface for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-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. */
-
-#ifndef YY_CPPYY_BUILT_TMP_CPPBISON_YXX_H_INCLUDED
-# define YY_CPPYY_BUILT_TMP_CPPBISON_YXX_H_INCLUDED
-/* Debug traces. */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-#if YYDEBUG
-extern int cppyydebug;
-#endif
-
-/* Token kinds. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- enum yytokentype
- {
- YYEMPTY = -2,
- YYEOF = 0, /* "end of file" */
- YYerror = 256, /* error */
- YYUNDEF = 257, /* "invalid token" */
- REAL = 258, /* REAL */
- INTEGER = 259, /* INTEGER */
- CHAR_TOK = 260, /* CHAR_TOK */
- SIMPLE_STRING = 261, /* SIMPLE_STRING */
- SIMPLE_IDENTIFIER = 262, /* SIMPLE_IDENTIFIER */
- STRING_LITERAL = 263, /* STRING_LITERAL */
- CUSTOM_LITERAL = 264, /* CUSTOM_LITERAL */
- IDENTIFIER = 265, /* IDENTIFIER */
- TYPENAME_IDENTIFIER = 266, /* TYPENAME_IDENTIFIER */
- TYPEPACK_IDENTIFIER = 267, /* TYPEPACK_IDENTIFIER */
- SCOPING = 268, /* SCOPING */
- TYPEDEFNAME = 269, /* TYPEDEFNAME */
- ELLIPSIS = 270, /* ELLIPSIS */
- OROR = 271, /* OROR */
- ANDAND = 272, /* ANDAND */
- EQCOMPARE = 273, /* EQCOMPARE */
- NECOMPARE = 274, /* NECOMPARE */
- LECOMPARE = 275, /* LECOMPARE */
- GECOMPARE = 276, /* GECOMPARE */
- SPACESHIP = 277, /* SPACESHIP */
- LSHIFT = 278, /* LSHIFT */
- RSHIFT = 279, /* RSHIFT */
- POINTSAT_STAR = 280, /* POINTSAT_STAR */
- DOT_STAR = 281, /* DOT_STAR */
- UNARY = 282, /* UNARY */
- UNARY_NOT = 283, /* UNARY_NOT */
- UNARY_NEGATE = 284, /* UNARY_NEGATE */
- UNARY_MINUS = 285, /* UNARY_MINUS */
- UNARY_PLUS = 286, /* UNARY_PLUS */
- UNARY_STAR = 287, /* UNARY_STAR */
- UNARY_REF = 288, /* UNARY_REF */
- POINTSAT = 289, /* POINTSAT */
- SCOPE = 290, /* SCOPE */
- PLUSPLUS = 291, /* PLUSPLUS */
- MINUSMINUS = 292, /* MINUSMINUS */
- TIMESEQUAL = 293, /* TIMESEQUAL */
- DIVIDEEQUAL = 294, /* DIVIDEEQUAL */
- MODEQUAL = 295, /* MODEQUAL */
- PLUSEQUAL = 296, /* PLUSEQUAL */
- MINUSEQUAL = 297, /* MINUSEQUAL */
- OREQUAL = 298, /* OREQUAL */
- ANDEQUAL = 299, /* ANDEQUAL */
- XOREQUAL = 300, /* XOREQUAL */
- LSHIFTEQUAL = 301, /* LSHIFTEQUAL */
- RSHIFTEQUAL = 302, /* RSHIFTEQUAL */
- ATTR_LEFT = 303, /* ATTR_LEFT */
- ATTR_RIGHT = 304, /* ATTR_RIGHT */
- KW_ALIGNAS = 305, /* KW_ALIGNAS */
- KW_ALIGNOF = 306, /* KW_ALIGNOF */
- KW_AUTO = 307, /* KW_AUTO */
- KW_BEGIN_PUBLISH = 308, /* KW_BEGIN_PUBLISH */
- KW_BLOCKING = 309, /* KW_BLOCKING */
- KW_BOOL = 310, /* KW_BOOL */
- KW_BUILTIN_VA_LIST = 311, /* KW_BUILTIN_VA_LIST */
- KW_CATCH = 312, /* KW_CATCH */
- KW_CHAR = 313, /* KW_CHAR */
- KW_CHAR8_T = 314, /* KW_CHAR8_T */
- KW_CHAR16_T = 315, /* KW_CHAR16_T */
- KW_CHAR32_T = 316, /* KW_CHAR32_T */
- KW_CLASS = 317, /* KW_CLASS */
- KW_CONST = 318, /* KW_CONST */
- KW_CONSTEVAL = 319, /* KW_CONSTEVAL */
- KW_CONSTEXPR = 320, /* KW_CONSTEXPR */
- KW_CONSTINIT = 321, /* KW_CONSTINIT */
- KW_CONST_CAST = 322, /* KW_CONST_CAST */
- KW_DECLTYPE = 323, /* KW_DECLTYPE */
- KW_DEFAULT = 324, /* KW_DEFAULT */
- KW_DELETE = 325, /* KW_DELETE */
- KW_DOUBLE = 326, /* KW_DOUBLE */
- KW_DYNAMIC_CAST = 327, /* KW_DYNAMIC_CAST */
- KW_ELSE = 328, /* KW_ELSE */
- KW_END_PUBLISH = 329, /* KW_END_PUBLISH */
- KW_ENUM = 330, /* KW_ENUM */
- KW_EXTENSION = 331, /* KW_EXTENSION */
- KW_EXTERN = 332, /* KW_EXTERN */
- KW_EXPLICIT = 333, /* KW_EXPLICIT */
- KW_EXPLICIT_LPAREN = 334, /* KW_EXPLICIT_LPAREN */
- KW_PUBLISHED = 335, /* KW_PUBLISHED */
- KW_FALSE = 336, /* KW_FALSE */
- KW_FINAL = 337, /* KW_FINAL */
- KW_FLOAT = 338, /* KW_FLOAT */
- KW_FRIEND = 339, /* KW_FRIEND */
- KW_FOR = 340, /* KW_FOR */
- KW_GOTO = 341, /* KW_GOTO */
- KW_HAS_VIRTUAL_DESTRUCTOR = 342, /* KW_HAS_VIRTUAL_DESTRUCTOR */
- KW_IF = 343, /* KW_IF */
- KW_INLINE = 344, /* KW_INLINE */
- KW_INT = 345, /* KW_INT */
- KW_IS_ABSTRACT = 346, /* KW_IS_ABSTRACT */
- KW_IS_BASE_OF = 347, /* KW_IS_BASE_OF */
- KW_IS_CLASS = 348, /* KW_IS_CLASS */
- KW_IS_CONSTRUCTIBLE = 349, /* KW_IS_CONSTRUCTIBLE */
- KW_IS_CONVERTIBLE_TO = 350, /* KW_IS_CONVERTIBLE_TO */
- KW_IS_DESTRUCTIBLE = 351, /* KW_IS_DESTRUCTIBLE */
- KW_IS_EMPTY = 352, /* KW_IS_EMPTY */
- KW_IS_ENUM = 353, /* KW_IS_ENUM */
- KW_IS_FINAL = 354, /* KW_IS_FINAL */
- KW_IS_FUNDAMENTAL = 355, /* KW_IS_FUNDAMENTAL */
- KW_IS_POD = 356, /* KW_IS_POD */
- KW_IS_POLYMORPHIC = 357, /* KW_IS_POLYMORPHIC */
- KW_IS_STANDARD_LAYOUT = 358, /* KW_IS_STANDARD_LAYOUT */
- KW_IS_TRIVIAL = 359, /* KW_IS_TRIVIAL */
- KW_IS_TRIVIALLY_COPYABLE = 360, /* KW_IS_TRIVIALLY_COPYABLE */
- KW_IS_UNION = 361, /* KW_IS_UNION */
- KW_LONG = 362, /* KW_LONG */
- KW_MAKE_MAP_KEYS_SEQ = 363, /* KW_MAKE_MAP_KEYS_SEQ */
- KW_MAKE_MAP_PROPERTY = 364, /* KW_MAKE_MAP_PROPERTY */
- KW_MAKE_PROPERTY = 365, /* KW_MAKE_PROPERTY */
- KW_MAKE_PROPERTY2 = 366, /* KW_MAKE_PROPERTY2 */
- KW_MAKE_SEQ = 367, /* KW_MAKE_SEQ */
- KW_MAKE_SEQ_PROPERTY = 368, /* KW_MAKE_SEQ_PROPERTY */
- KW_MUTABLE = 369, /* KW_MUTABLE */
- KW_NAMESPACE = 370, /* KW_NAMESPACE */
- KW_NEW = 371, /* KW_NEW */
- KW_NOEXCEPT = 372, /* KW_NOEXCEPT */
- KW_NOEXCEPT_LPAREN = 373, /* KW_NOEXCEPT_LPAREN */
- KW_NULLPTR = 374, /* KW_NULLPTR */
- KW_OPERATOR = 375, /* KW_OPERATOR */
- KW_OVERRIDE = 376, /* KW_OVERRIDE */
- KW_PRIVATE = 377, /* KW_PRIVATE */
- KW_PROTECTED = 378, /* KW_PROTECTED */
- KW_PUBLIC = 379, /* KW_PUBLIC */
- KW_REGISTER = 380, /* KW_REGISTER */
- KW_REINTERPRET_CAST = 381, /* KW_REINTERPRET_CAST */
- KW_RESTRICT = 382, /* KW_RESTRICT */
- KW_RETURN = 383, /* KW_RETURN */
- KW_SHORT = 384, /* KW_SHORT */
- KW_SIGNED = 385, /* KW_SIGNED */
- KW_SIZEOF = 386, /* KW_SIZEOF */
- KW_STATIC = 387, /* KW_STATIC */
- KW_STATIC_ASSERT = 388, /* KW_STATIC_ASSERT */
- KW_STATIC_CAST = 389, /* KW_STATIC_CAST */
- KW_STRUCT = 390, /* KW_STRUCT */
- KW_TEMPLATE = 391, /* KW_TEMPLATE */
- KW_THREAD_LOCAL = 392, /* KW_THREAD_LOCAL */
- KW_THROW = 393, /* KW_THROW */
- KW_TRUE = 394, /* KW_TRUE */
- KW_TRY = 395, /* KW_TRY */
- KW_TYPEDEF = 396, /* KW_TYPEDEF */
- KW_TYPEID = 397, /* KW_TYPEID */
- KW_TYPENAME = 398, /* KW_TYPENAME */
- KW_UNDERLYING_TYPE = 399, /* KW_UNDERLYING_TYPE */
- KW_UNION = 400, /* KW_UNION */
- KW_UNSIGNED = 401, /* KW_UNSIGNED */
- KW_USING = 402, /* KW_USING */
- KW_VIRTUAL = 403, /* KW_VIRTUAL */
- KW_VOID = 404, /* KW_VOID */
- KW_VOLATILE = 405, /* KW_VOLATILE */
- KW_WCHAR_T = 406, /* KW_WCHAR_T */
- KW_WHILE = 407, /* KW_WHILE */
- START_CPP = 408, /* START_CPP */
- START_CONST_EXPR = 409, /* START_CONST_EXPR */
- START_TYPE = 410 /* START_TYPE */
- };
- typedef enum yytokentype yytoken_kind_t;
-#endif
-/* Token kinds. */
-#define YYEMPTY -2
-#define YYEOF 0
-#define YYerror 256
-#define YYUNDEF 257
-#define REAL 258
-#define INTEGER 259
-#define CHAR_TOK 260
-#define SIMPLE_STRING 261
-#define SIMPLE_IDENTIFIER 262
-#define STRING_LITERAL 263
-#define CUSTOM_LITERAL 264
-#define IDENTIFIER 265
-#define TYPENAME_IDENTIFIER 266
-#define TYPEPACK_IDENTIFIER 267
-#define SCOPING 268
-#define TYPEDEFNAME 269
-#define ELLIPSIS 270
-#define OROR 271
-#define ANDAND 272
-#define EQCOMPARE 273
-#define NECOMPARE 274
-#define LECOMPARE 275
-#define GECOMPARE 276
-#define SPACESHIP 277
-#define LSHIFT 278
-#define RSHIFT 279
-#define POINTSAT_STAR 280
-#define DOT_STAR 281
-#define UNARY 282
-#define UNARY_NOT 283
-#define UNARY_NEGATE 284
-#define UNARY_MINUS 285
-#define UNARY_PLUS 286
-#define UNARY_STAR 287
-#define UNARY_REF 288
-#define POINTSAT 289
-#define SCOPE 290
-#define PLUSPLUS 291
-#define MINUSMINUS 292
-#define TIMESEQUAL 293
-#define DIVIDEEQUAL 294
-#define MODEQUAL 295
-#define PLUSEQUAL 296
-#define MINUSEQUAL 297
-#define OREQUAL 298
-#define ANDEQUAL 299
-#define XOREQUAL 300
-#define LSHIFTEQUAL 301
-#define RSHIFTEQUAL 302
-#define ATTR_LEFT 303
-#define ATTR_RIGHT 304
-#define KW_ALIGNAS 305
-#define KW_ALIGNOF 306
-#define KW_AUTO 307
-#define KW_BEGIN_PUBLISH 308
-#define KW_BLOCKING 309
-#define KW_BOOL 310
-#define KW_BUILTIN_VA_LIST 311
-#define KW_CATCH 312
-#define KW_CHAR 313
-#define KW_CHAR8_T 314
-#define KW_CHAR16_T 315
-#define KW_CHAR32_T 316
-#define KW_CLASS 317
-#define KW_CONST 318
-#define KW_CONSTEVAL 319
-#define KW_CONSTEXPR 320
-#define KW_CONSTINIT 321
-#define KW_CONST_CAST 322
-#define KW_DECLTYPE 323
-#define KW_DEFAULT 324
-#define KW_DELETE 325
-#define KW_DOUBLE 326
-#define KW_DYNAMIC_CAST 327
-#define KW_ELSE 328
-#define KW_END_PUBLISH 329
-#define KW_ENUM 330
-#define KW_EXTENSION 331
-#define KW_EXTERN 332
-#define KW_EXPLICIT 333
-#define KW_EXPLICIT_LPAREN 334
-#define KW_PUBLISHED 335
-#define KW_FALSE 336
-#define KW_FINAL 337
-#define KW_FLOAT 338
-#define KW_FRIEND 339
-#define KW_FOR 340
-#define KW_GOTO 341
-#define KW_HAS_VIRTUAL_DESTRUCTOR 342
-#define KW_IF 343
-#define KW_INLINE 344
-#define KW_INT 345
-#define KW_IS_ABSTRACT 346
-#define KW_IS_BASE_OF 347
-#define KW_IS_CLASS 348
-#define KW_IS_CONSTRUCTIBLE 349
-#define KW_IS_CONVERTIBLE_TO 350
-#define KW_IS_DESTRUCTIBLE 351
-#define KW_IS_EMPTY 352
-#define KW_IS_ENUM 353
-#define KW_IS_FINAL 354
-#define KW_IS_FUNDAMENTAL 355
-#define KW_IS_POD 356
-#define KW_IS_POLYMORPHIC 357
-#define KW_IS_STANDARD_LAYOUT 358
-#define KW_IS_TRIVIAL 359
-#define KW_IS_TRIVIALLY_COPYABLE 360
-#define KW_IS_UNION 361
-#define KW_LONG 362
-#define KW_MAKE_MAP_KEYS_SEQ 363
-#define KW_MAKE_MAP_PROPERTY 364
-#define KW_MAKE_PROPERTY 365
-#define KW_MAKE_PROPERTY2 366
-#define KW_MAKE_SEQ 367
-#define KW_MAKE_SEQ_PROPERTY 368
-#define KW_MUTABLE 369
-#define KW_NAMESPACE 370
-#define KW_NEW 371
-#define KW_NOEXCEPT 372
-#define KW_NOEXCEPT_LPAREN 373
-#define KW_NULLPTR 374
-#define KW_OPERATOR 375
-#define KW_OVERRIDE 376
-#define KW_PRIVATE 377
-#define KW_PROTECTED 378
-#define KW_PUBLIC 379
-#define KW_REGISTER 380
-#define KW_REINTERPRET_CAST 381
-#define KW_RESTRICT 382
-#define KW_RETURN 383
-#define KW_SHORT 384
-#define KW_SIGNED 385
-#define KW_SIZEOF 386
-#define KW_STATIC 387
-#define KW_STATIC_ASSERT 388
-#define KW_STATIC_CAST 389
-#define KW_STRUCT 390
-#define KW_TEMPLATE 391
-#define KW_THREAD_LOCAL 392
-#define KW_THROW 393
-#define KW_TRUE 394
-#define KW_TRY 395
-#define KW_TYPEDEF 396
-#define KW_TYPEID 397
-#define KW_TYPENAME 398
-#define KW_UNDERLYING_TYPE 399
-#define KW_UNION 400
-#define KW_UNSIGNED 401
-#define KW_USING 402
-#define KW_VIRTUAL 403
-#define KW_VOID 404
-#define KW_VOLATILE 405
-#define KW_WCHAR_T 406
-#define KW_WHILE 407
-#define START_CPP 408
-#define START_CONST_EXPR 409
-#define START_TYPE 410
-
-/* Value type. */
-
-/* Location type. */
-#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
-typedef struct YYLTYPE YYLTYPE;
-struct YYLTYPE
-{
- int first_line;
- int first_column;
- int last_line;
- int last_column;
-};
-# define YYLTYPE_IS_DECLARED 1
-# define YYLTYPE_IS_TRIVIAL 1
-#endif
-
-
-
-
-int cppyyparse (void);
-
-
-#endif /* !YY_CPPYY_BUILT_TMP_CPPBISON_YXX_H_INCLUDED */
diff --git a/dtool/src/cppparser/cppBison.yxx b/dtool/src/cppparser/cppBison.yxx
deleted file mode 100644
index 8a249d1185f..00000000000
--- a/dtool/src/cppparser/cppBison.yxx
+++ /dev/null
@@ -1,4455 +0,0 @@
-/**
- * @file cppBison.yxx
- * @author drose
- * @date 1999-01-16
- */
-
-%{
-
-#include "cppBisonDefs.h"
-#include "cppParser.h"
-#include "cppClosureType.h"
-#include "cppExpression.h"
-#include "cppSimpleType.h"
-#include "cppExtensionType.h"
-#include "cppStructType.h"
-#include "cppEnumType.h"
-#include "cppFunctionType.h"
-#include "cppTBDType.h"
-#include "cppMakeProperty.h"
-#include "cppMakeSeq.h"
-#include "cppParameterList.h"
-#include "cppInstance.h"
-#include "cppClassTemplateParameter.h"
-#include "cppTemplateParameterList.h"
-#include "cppInstanceIdentifier.h"
-#include "cppTypedefType.h"
-#include "cppTypeDeclaration.h"
-#include "cppVisibility.h"
-#include "cppIdentifier.h"
-#include "cppScope.h"
-#include "cppTemplateScope.h"
-#include "cppNamespace.h"
-#include "cppUsing.h"
-
-using std::stringstream;
-using std::string;
-
-////////////////////////////////////////////////////////////////////
-// Defining the interface to the parser.
-////////////////////////////////////////////////////////////////////
-
-CPPScope *current_scope = nullptr;
-CPPScope *global_scope = nullptr;
-CPPPreprocessor *current_lexer = nullptr;
-
-static CPPStructType *current_struct = nullptr;
-static CPPEnumType *current_enum = nullptr;
-static int current_storage_class = 0;
-static CPPType *current_type = nullptr;
-static CPPExpression *current_expr = nullptr;
-static CPPAttributeList current_attributes;
-static int publish_nest_level = 0;
-static CPPVisibility publish_previous;
-static YYLTYPE publish_loc;
-
-static std::vector last_scopes;
-static std::vector last_storage_classes;
-static std::vector last_structs;
-
-int yyparse();
-
-#define YYERROR_VERBOSE
-
-static void
-yyerror(const string &msg) {
- current_lexer->error(msg, current_lexer->_last_token_loc);
-}
-
-static void
-yyerror(YYLTYPE *loc, const string &msg) {
- current_lexer->error(msg, *loc);
-}
-
-static void
-yyerror(const string &msg, YYLTYPE &loc) {
- current_lexer->error(msg, loc);
-}
-
-static void
-yywarning(const string &msg, YYLTYPE &loc) {
- current_lexer->warning(msg, loc);
-}
-
-static int
-yylex(YYSTYPE *lval, YYLTYPE *lloc) {
- CPPToken token = current_lexer->get_next_token();
- *lval = token._lval;
- *lloc = token._lloc;
- return token._token;
-}
-
-void
-parse_cpp(CPPParser *cp) {
- CPPScope *old_scope = current_scope;
- CPPScope *old_global_scope = global_scope;
- CPPPreprocessor *old_lexer = current_lexer;
-
- current_scope = cp;
- global_scope = cp;
- current_lexer = cp;
- publish_nest_level = 0;
- yyparse();
-
- if (publish_nest_level != 0) {
- yyerror("Unclosed __begin_publish", publish_loc);
- publish_nest_level = 0;
- }
-
- current_scope = old_scope;
- global_scope = old_global_scope;
- current_lexer = old_lexer;
-
-}
-
-CPPExpression *
-parse_const_expr(CPPPreprocessor *pp, CPPScope *new_current_scope,
- CPPScope *new_global_scope) {
- CPPScope *old_scope = current_scope;
- CPPScope *old_global_scope = global_scope;
- CPPPreprocessor *old_lexer = current_lexer;
- CPPExpression *old_expr = current_expr;
-
- current_scope = new_current_scope;
- global_scope = new_global_scope;
- current_expr = nullptr;
- current_lexer = pp;
- yyparse();
-
- CPPExpression *result = current_expr;
-
- current_scope = old_scope;
- global_scope = old_global_scope;
- current_lexer = old_lexer;
- current_expr = old_expr;
-
- return result;
-}
-
-CPPType *
-parse_type(CPPPreprocessor *pp, CPPScope *new_current_scope,
- CPPScope *new_global_scope) {
- CPPScope *old_scope = current_scope;
- CPPScope *old_global_scope = global_scope;
- CPPPreprocessor *old_lexer = current_lexer;
- CPPType *old_type = current_type;
-
- current_scope = new_current_scope;
- global_scope = new_global_scope;
- current_type = nullptr;
- current_lexer = pp;
- yyparse();
-
- CPPType *result = current_type;
-
- current_scope = old_scope;
- global_scope = old_global_scope;
- current_lexer = old_lexer;
- current_type = old_type;
-
- return result;
-}
-
-static void
-push_scope(CPPScope *new_scope) {
- last_scopes.push_back(current_scope);
- if (new_scope != nullptr) {
- current_scope = new_scope;
- }
-}
-
-static void
-pop_scope() {
- assert(!last_scopes.empty());
- current_scope = last_scopes.back();
- last_scopes.pop_back();
-}
-
-static void
-push_storage_class(int new_storage_class) {
- last_storage_classes.push_back(current_storage_class);
- current_storage_class = new_storage_class;
-}
-
-static void
-pop_storage_class() {
- assert(!last_storage_classes.empty());
- current_storage_class = last_storage_classes.back();
- last_storage_classes.pop_back();
-}
-
-static void
-push_struct(CPPStructType *new_struct) {
- last_structs.push_back(current_struct);
- current_struct = new_struct;
-}
-
-static void
-pop_struct() {
- assert(!last_structs.empty());
- current_struct = last_structs.back();
- last_structs.pop_back();
-}
-
-%}
-
-/* This is a bison-specific declaration to enable recursive calls to
- yyparse(). It changes the calling sequence to yylex(), passing
- pointers to the current yylval and yylloc. Bison 2.7 introduces a
- different syntax that will also pass the current yylloc to yyerror,
- but we have to support Bison versions as old as 2.5 for now. */
-/*%define api.pure full*/
-%pure-parser
-%locations
-
-%token REAL
-%token INTEGER
-%token CHAR_TOK
-%token SIMPLE_STRING SIMPLE_IDENTIFIER
-%token STRING_LITERAL CUSTOM_LITERAL
-%token IDENTIFIER TYPENAME_IDENTIFIER TYPEPACK_IDENTIFIER SCOPING
-%token TYPEDEFNAME
-
-%token ELLIPSIS
-%token OROR
-%token ANDAND
-%token EQCOMPARE
-%token NECOMPARE
-%token LECOMPARE
-%token GECOMPARE
-%token SPACESHIP
-%token LSHIFT
-%token RSHIFT
-%token POINTSAT_STAR
-%token DOT_STAR
-%token UNARY
-%token UNARY_NOT
-%token UNARY_NEGATE
-%token UNARY_MINUS
-%token UNARY_PLUS
-%token UNARY_STAR
-%token UNARY_REF
-%token POINTSAT
-%token SCOPE
-%token PLUSPLUS
-%token MINUSMINUS
-%token TIMESEQUAL
-%token DIVIDEEQUAL
-%token MODEQUAL
-%token PLUSEQUAL
-%token MINUSEQUAL
-%token OREQUAL
-%token ANDEQUAL
-%token XOREQUAL
-%token LSHIFTEQUAL
-%token RSHIFTEQUAL
-%token ATTR_LEFT
-%token ATTR_RIGHT
-
-%token KW_ALIGNAS
-%token KW_ALIGNOF
-%token KW_AUTO
-%token KW_BEGIN_PUBLISH
-%token KW_BLOCKING
-%token KW_BOOL
-%token KW_BUILTIN_VA_LIST
-%token KW_CATCH
-%token KW_CHAR
-%token KW_CHAR8_T
-%token KW_CHAR16_T
-%token KW_CHAR32_T
-%token KW_CLASS
-%token KW_CONST
-%token KW_CONSTEVAL
-%token KW_CONSTEXPR
-%token KW_CONSTINIT
-%token KW_CONST_CAST
-%token KW_DECLTYPE
-%token KW_DEFAULT
-%token KW_DELETE
-%token KW_DOUBLE
-%token KW_DYNAMIC_CAST
-%token KW_ELSE
-%token KW_END_PUBLISH
-%token KW_ENUM
-%token KW_EXTENSION
-%token KW_EXTERN
-%token KW_EXPLICIT
-%token KW_EXPLICIT_LPAREN
-%token KW_PUBLISHED
-%token KW_FALSE
-%token KW_FINAL
-%token KW_FLOAT
-%token KW_FRIEND
-%token KW_FOR
-%token KW_GOTO
-%token KW_HAS_VIRTUAL_DESTRUCTOR
-%token KW_IF
-%token KW_INLINE
-%token KW_INT
-%token KW_IS_ABSTRACT
-%token KW_IS_BASE_OF
-%token KW_IS_CLASS
-%token KW_IS_CONSTRUCTIBLE
-%token KW_IS_CONVERTIBLE_TO
-%token KW_IS_DESTRUCTIBLE
-%token KW_IS_EMPTY
-%token KW_IS_ENUM
-%token KW_IS_FINAL
-%token KW_IS_FUNDAMENTAL
-%token KW_IS_POD
-%token KW_IS_POLYMORPHIC
-%token KW_IS_STANDARD_LAYOUT
-%token KW_IS_TRIVIAL
-%token KW_IS_TRIVIALLY_COPYABLE
-%token KW_IS_UNION
-%token KW_LONG
-%token KW_MAKE_MAP_KEYS_SEQ
-%token KW_MAKE_MAP_PROPERTY
-%token KW_MAKE_PROPERTY
-%token KW_MAKE_PROPERTY2
-%token KW_MAKE_SEQ
-%token KW_MAKE_SEQ_PROPERTY
-%token KW_MUTABLE
-%token KW_NAMESPACE
-%token KW_NEW
-%token KW_NOEXCEPT
-%token KW_NOEXCEPT_LPAREN
-%token KW_NULLPTR
-%token KW_OPERATOR
-%token KW_OVERRIDE
-%token KW_PRIVATE
-%token KW_PROTECTED
-%token KW_PUBLIC
-%token KW_REGISTER
-%token KW_REINTERPRET_CAST
-%token KW_RESTRICT
-%token KW_RETURN
-%token KW_SHORT
-%token KW_SIGNED
-%token KW_SIZEOF
-%token KW_STATIC
-%token KW_STATIC_ASSERT
-%token KW_STATIC_CAST
-%token KW_STRUCT
-%token KW_TEMPLATE
-%token KW_THREAD_LOCAL
-%token KW_THROW
-%token KW_TRUE
-%token KW_TRY
-%token KW_TYPEDEF
-%token KW_TYPEID
-%token KW_TYPENAME
-%token KW_UNDERLYING_TYPE
-%token KW_UNION
-%token KW_UNSIGNED
-%token KW_USING
-%token KW_VIRTUAL
-%token KW_VOID
-%token KW_VOLATILE
-%token KW_WCHAR_T
-%token KW_WHILE
-
-/* These special tokens are used to set the starting state of the
- parser. The lexer places the appropriate one of these on the head
- of the input stream. */
-%token START_CPP
-%token START_CONST_EXPR
-%token START_TYPE
-
-%type optional_attributes
-%type attribute_specifiers
-%type attribute_specifier
-%type storage_class
-%type constructor_prototype
-%type function_prototype
-%type function_post
-%type function_operator
-%type template_formal_parameter
-%type template_formal_parameter_type
-%type instance_identifier
-%type instance_identifier_and_maybe_trailing_return_type
-%type function_parameter_list
-%type function_parameters
-%type formal_parameter_list
-%type formal_parameters
-%type capture_list
-%type capture
-%type template_parameter_maybe_initialize
-%type maybe_initialize
-%type maybe_initialize_or_constructor_body
-%type maybe_initialize_or_function_body
-%type function_parameter
-%type formal_parameter
-%type not_paren_formal_parameter_identifier
-%type formal_parameter_identifier
-%type parameter_pack_identifier
-%type not_paren_empty_instance_identifier
-%type empty_instance_identifier
-%type type type_pack
-%type type_decl
-%type var_type_decl
-%type predefined_type
-%type full_type
-%type anonymous_struct
-%type named_struct
-%type enum
-%type enum_keyword
-%type struct_keyword
-%type simple_type
-%type simple_int_type
-%type simple_float_type
-%type simple_void_type
-%type class_derivation_name
-%type enum_element_type
-%type maybe_trailing_return_type
-%type maybe_comma_identifier
-/*%type typedefname*/
-%type name
-%type name_no_final
-%type string_literal
-
-/* We need to treat KW_OPERATOR as a scopable keyword. */
-%type KW_OPERATOR
-
-%type optional_const_expr
-%type optional_const_expr_comma
-%type const_expr_comma
-%type no_angle_bracket_const_expr
-%type const_expr
-%type const_operand
-%type formal_const_expr
-%type formal_const_operand
-
-
-/* Precedence rules. */
-
-%left IDENTIFIER TYPENAME_IDENTIFIER TYPEDEFNAME KW_ENUM ELLIPSIS KW_OPERATOR KW_TYPENAME KW_INT KW_SHORT KW_UNSIGNED KW_SIGNED KW_LONG KW_FLOAT KW_DOUBLE KW_CHAR KW_WCHAR_T KW_CHAR8_T KW_CHAR16_T KW_CHAR32_T KW_BOOL
-
-%left '{' ',' ';'
-
-%nonassoc KW_THROW
-%right ':'
-%right '='
-%right '?'
-%left OROR
-%left ANDAND
-%left '|'
-%left '^'
-%left '&'
-%left EQCOMPARE NECOMPARE
-%left LECOMPARE GECOMPARE '<' '>'
-%left SPACESHIP
-%left LSHIFT RSHIFT
-%left '+' '-'
-%left '*' '/' '%'
-%left POINTSAT_STAR DOT_STAR
-%right UNARY PLUSPLUS MINUSMINUS '~'
-%left POINTSAT '.' '(' '['
-
-%right SCOPE
-%nonassoc KW_NEW KW_DELETE KW_TRY KW_CATCH
-
-%%
-
-grammar:
- START_CPP cpp
- | START_CONST_EXPR const_expr
-{
- current_expr = $2;
-}
- | START_TYPE full_type
-{
- current_type = $2;
-}
- ;
-
-cpp:
- empty
- | cpp optional_attributes ';'
-{
- if (!$2.is_empty()) {
- current_scope->add_declaration(new CPPDeclaration(@2.file, $2), global_scope, current_lexer, @2);
- }
-}
- | cpp optional_attributes
-{
- current_attributes = $2;
-}
- declaration
-{
- current_attributes = CPPAttributeList();
-}
- ;
-
-constructor_inits:
- constructor_init
- | constructor_inits ',' constructor_init
- ;
-
-constructor_init:
- name '(' optional_const_expr_comma ')'
-{
- delete $3;
-}
- | name '(' optional_const_expr_comma ')' ELLIPSIS
-{
- delete $3;
-}
- | name '{' optional_const_expr_comma '}'
-{
- delete $3;
-}
- ;
-
-/* This is principally for the syntax: extern "C" { ... }.
-
- We use storage_class instead of simply KW_EXTERN to avoid
- shift/reduce conflicts with yacc's limited differentiation
- ability. */
-extern_c:
- storage_class '{'
-{
- push_storage_class((current_storage_class & ~CPPInstance::SC_c_binding) |
- ($1 & CPPInstance::SC_c_binding));
-}
- cpp '}'
-{
- pop_storage_class();
-}
- ;
-
-declaration:
- type_like_declaration
- | template_declaration
- | extern_c
- | namespace_declaration
- | friend_declaration
- | KW_TYPEDEF typedef_declaration
- | KW_BEGIN_PUBLISH
-{
- if (publish_nest_level != 0) {
- yyerror("Unclosed __begin_publish", publish_loc);
- publish_nest_level = 0;
- current_scope->set_current_vis(V_public);
- }
-
- publish_previous = current_scope->get_current_vis();
- publish_loc = @1;
- publish_nest_level++;
- current_scope->set_current_vis(V_published);
-}
- | KW_END_PUBLISH
-{
- if (publish_nest_level != 1) {
- yyerror("Unmatched __end_publish", @1);
- } else {
- current_scope->set_current_vis(publish_previous);
- }
- publish_nest_level = 0;
-}
- | KW_PUBLISHED ':'
-{
- current_scope->set_current_vis(V_published);
-}
- | KW_PUBLIC ':'
-{
- if (publish_nest_level > 0) {
- current_scope->set_current_vis(V_published);
- } else {
- current_scope->set_current_vis(V_public);
- }
-}
- | KW_PROTECTED ':'
-{
- current_scope->set_current_vis(V_protected);
-}
- | KW_PRIVATE ':'
-{
- current_scope->set_current_vis(V_private);
-}
- | KW_MAKE_PROPERTY '(' name ',' IDENTIFIER maybe_comma_identifier ')' ';'
-{
- CPPDeclaration *getter = $5->find_symbol(current_scope, global_scope, current_lexer);
- if (getter == nullptr || getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("Reference to non-existent or invalid getter: " + $5->get_fully_scoped_name(), @5);
- } else {
- CPPMakeProperty *make_property = new CPPMakeProperty($3, CPPMakeProperty::T_normal, current_scope, @1.file);
- make_property->_get_function = getter->as_function_group();
-
- if ($6 != nullptr) {
- CPPDeclaration *setter = $6->find_symbol(current_scope, global_scope, current_lexer);
- if (setter == nullptr || setter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("Reference to non-existent or invalid setter: " + $6->get_fully_scoped_name(), @6);
- } else {
- make_property->_set_function = setter->as_function_group();
- }
- }
-
- current_scope->add_declaration(make_property, global_scope, current_lexer, @1);
- }
-}
- | KW_MAKE_PROPERTY '(' name ',' IDENTIFIER ',' IDENTIFIER ',' IDENTIFIER ')' ';'
-{
- CPPDeclaration *getter = $5->find_symbol(current_scope, global_scope, current_lexer);
- if (getter == nullptr || getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("Reference to non-existent or invalid getter: " + $5->get_fully_scoped_name(), @5);
-
- } else {
- CPPMakeProperty *make_property = new CPPMakeProperty($3, CPPMakeProperty::T_normal, current_scope, @1.file);
- make_property->_get_function = getter->as_function_group();
-
- CPPDeclaration *setter = $7->find_symbol(current_scope, global_scope, current_lexer);
- if (setter == nullptr || setter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("Reference to non-existent or invalid setter: " + $7->get_fully_scoped_name(), @7);
- } else {
- make_property->_set_function = setter->as_function_group();
- }
-
- CPPDeclaration *deleter = $9->find_symbol(current_scope, global_scope, current_lexer);
- if (deleter == nullptr || deleter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid delete method: " + $9->get_fully_scoped_name(), @9);
- } else {
- make_property->_del_function = deleter->as_function_group();
- }
-
- current_scope->add_declaration(make_property, global_scope, current_lexer, @1);
- }
-}
- | KW_MAKE_SEQ_PROPERTY '(' name ',' IDENTIFIER ',' IDENTIFIER ')' ';'
-{
- CPPDeclaration *length_getter = $5->find_symbol(current_scope, global_scope, current_lexer);
- if (length_getter == nullptr || length_getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid length method: " + $5->get_fully_scoped_name(), @5);
- length_getter = nullptr;
- }
-
- CPPDeclaration *getter = $7->find_symbol(current_scope, global_scope, current_lexer);
- if (getter == nullptr || getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("Reference to non-existent or invalid getter: " + $7->get_fully_scoped_name(), @7);
- getter = nullptr;
- }
-
- if (getter != nullptr && length_getter != nullptr) {
- CPPMakeProperty *make_property = new CPPMakeProperty($3, CPPMakeProperty::T_sequence, current_scope, @1.file);
- make_property->_get_function = getter->as_function_group();
- make_property->_length_function = length_getter->as_function_group();
- current_scope->add_declaration(make_property, global_scope, current_lexer, @1);
- }
-}
- | KW_MAKE_SEQ_PROPERTY '(' name ',' IDENTIFIER ',' IDENTIFIER ',' IDENTIFIER ')' ';'
-{
- CPPDeclaration *length_getter = $5->find_symbol(current_scope, global_scope, current_lexer);
- if (length_getter == nullptr || length_getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid length method: " + $5->get_fully_scoped_name(), @5);
- length_getter = nullptr;
- }
-
- CPPDeclaration *getter = $7->find_symbol(current_scope, global_scope, current_lexer);
- if (getter == nullptr || getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("Reference to non-existent or invalid getter: " + $7->get_fully_scoped_name(), @7);
- getter = nullptr;
- }
-
- if (getter != nullptr && length_getter != nullptr) {
- CPPMakeProperty *make_property = new CPPMakeProperty($3, CPPMakeProperty::T_sequence, current_scope, @1.file);
- make_property->_get_function = getter->as_function_group();
- make_property->_length_function = length_getter->as_function_group();
-
- CPPDeclaration *setter = $9->find_symbol(current_scope, global_scope, current_lexer);
- if (setter == nullptr || setter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("Reference to non-existent or invalid setter: " + $9->get_fully_scoped_name(), @9);
- } else {
- make_property->_set_function = setter->as_function_group();
- }
-
- current_scope->add_declaration(make_property, global_scope, current_lexer, @1);
- }
-}
- | KW_MAKE_SEQ_PROPERTY '(' name ',' IDENTIFIER ',' IDENTIFIER ',' IDENTIFIER ',' IDENTIFIER ')' ';'
-{
- CPPDeclaration *length_getter = $5->find_symbol(current_scope, global_scope, current_lexer);
- if (length_getter == nullptr || length_getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid length method: " + $5->get_fully_scoped_name(), @5);
- length_getter = nullptr;
- }
-
- CPPDeclaration *getter = $7->find_symbol(current_scope, global_scope, current_lexer);
- if (getter == nullptr || getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("Reference to non-existent or invalid getter: " + $7->get_fully_scoped_name(), @7);
- getter = nullptr;
- }
-
- if (getter != nullptr && length_getter != nullptr) {
- CPPMakeProperty *make_property = new CPPMakeProperty($3, CPPMakeProperty::T_sequence, current_scope, @1.file);
- make_property->_get_function = getter->as_function_group();
- make_property->_length_function = length_getter->as_function_group();
-
- CPPDeclaration *setter = $9->find_symbol(current_scope, global_scope, current_lexer);
- if (setter == nullptr || setter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("Reference to non-existent or invalid setter: " + $9->get_fully_scoped_name(), @9);
- } else {
- make_property->_set_function = setter->as_function_group();
- }
-
- CPPDeclaration *deleter = $11->find_symbol(current_scope, global_scope, current_lexer);
- if (deleter == nullptr || deleter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid delete method: " + $11->get_fully_scoped_name(), @11);
- } else {
- make_property->_del_function = deleter->as_function_group();
- }
-
- current_scope->add_declaration(make_property, global_scope, current_lexer, @1);
- }
-}
- | KW_MAKE_SEQ_PROPERTY '(' name ',' IDENTIFIER ',' IDENTIFIER ',' IDENTIFIER ',' IDENTIFIER ',' IDENTIFIER ')' ';'
-{
- CPPDeclaration *length_getter = $5->find_symbol(current_scope, global_scope, current_lexer);
- if (length_getter == nullptr || length_getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid length method: " + $5->get_fully_scoped_name(), @5);
- length_getter = nullptr;
- }
-
- CPPDeclaration *getter = $7->find_symbol(current_scope, global_scope, current_lexer);
- if (getter == nullptr || getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("Reference to non-existent or invalid getter: " + $7->get_fully_scoped_name(), @7);
- getter = nullptr;
- }
-
- if (getter != nullptr && length_getter != nullptr) {
- CPPMakeProperty *make_property = new CPPMakeProperty($3, CPPMakeProperty::T_sequence, current_scope, @1.file);
- make_property->_get_function = getter->as_function_group();
- make_property->_length_function = length_getter->as_function_group();
-
- CPPDeclaration *setter = $9->find_symbol(current_scope, global_scope, current_lexer);
- if (setter == nullptr || setter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("Reference to non-existent or invalid setter: " + $9->get_fully_scoped_name(), @9);
- } else {
- make_property->_set_function = setter->as_function_group();
- }
-
- CPPDeclaration *deleter = $11->find_symbol(current_scope, global_scope, current_lexer);
- if (deleter == nullptr || deleter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid delete method: " + $11->get_fully_scoped_name(), @11);
- } else {
- make_property->_del_function = deleter->as_function_group();
- }
-
- CPPDeclaration *inserter = $13->find_symbol(current_scope, global_scope, current_lexer);
- if (inserter == nullptr || inserter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid append method: " + $13->get_fully_scoped_name(), @13);
- } else {
- make_property->_insert_function = inserter->as_function_group();
- }
-
- current_scope->add_declaration(make_property, global_scope, current_lexer, @1);
- }
-}
- | KW_MAKE_MAP_PROPERTY '(' name ',' IDENTIFIER ')' ';'
-{
- CPPDeclaration *getter = $5->find_symbol(current_scope, global_scope, current_lexer);
- if (getter == nullptr || getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid item getter method: " + $5->get_fully_scoped_name(), @5);
-
- } else {
- CPPMakeProperty *make_property = new CPPMakeProperty($3, CPPMakeProperty::T_mapping, current_scope, @1.file);
- make_property->_get_function = getter->as_function_group();
- current_scope->add_declaration(make_property, global_scope, current_lexer, @1);
- }
-}
- | KW_MAKE_MAP_PROPERTY '(' name ',' IDENTIFIER ',' IDENTIFIER ')' ';'
-{
- CPPDeclaration *getter = $7->find_symbol(current_scope, global_scope, current_lexer);
- if (getter == nullptr || getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("Reference to non-existent or invalid getter: " + $7->get_fully_scoped_name(), @7);
-
- } else {
- CPPMakeProperty *make_property;
- make_property = new CPPMakeProperty($3, CPPMakeProperty::T_mapping, current_scope, @1.file);
- make_property->_get_function = getter->as_function_group();
-
- CPPDeclaration *hasser = $5->find_symbol(current_scope, global_scope, current_lexer);
- if (hasser == nullptr || hasser->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid has/find method: " + $5->get_fully_scoped_name(), @5);
- } else {
- make_property->_has_function = hasser->as_function_group();
- }
-
- current_scope->add_declaration(make_property, global_scope, current_lexer, @1);
- }
-}
- | KW_MAKE_MAP_PROPERTY '(' name ',' IDENTIFIER ',' IDENTIFIER ',' IDENTIFIER maybe_comma_identifier ')' ';'
-{
- CPPDeclaration *getter = $7->find_symbol(current_scope, global_scope, current_lexer);
- if (getter == nullptr || getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("Reference to non-existent or invalid getter: " + $7->get_fully_scoped_name(), @7);
-
- } else {
- CPPMakeProperty *make_property = new CPPMakeProperty($3, CPPMakeProperty::T_mapping, current_scope, @1.file);
- make_property->_get_function = getter->as_function_group();
-
- CPPDeclaration *hasser = $5->find_symbol(current_scope, global_scope, current_lexer);
- if (hasser == nullptr || hasser->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid has/find method: " + $5->get_fully_scoped_name(), @5);
- } else {
- make_property->_has_function = hasser->as_function_group();
- }
-
- CPPDeclaration *setter = $9->find_symbol(current_scope, global_scope, current_lexer);
- if (setter == nullptr || setter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("Reference to non-existent or invalid setter: " + $9->get_fully_scoped_name(), @9);
- } else {
- make_property->_set_function = setter->as_function_group();
- }
-
- if ($10 != nullptr) {
- CPPDeclaration *deleter = $10->find_symbol(current_scope, global_scope, current_lexer);
- if (deleter == nullptr || deleter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid delete method: " + $10->get_fully_scoped_name(), @10);
- } else {
- make_property->_del_function = deleter->as_function_group();
- }
- }
-
- current_scope->add_declaration(make_property, global_scope, current_lexer, @1);
- }
-}
- | KW_MAKE_MAP_KEYS_SEQ '(' name ',' IDENTIFIER ',' IDENTIFIER ')' ';'
-{
- CPPDeclaration *length_getter = $5->find_symbol(current_scope, global_scope, current_lexer);
- if (length_getter == nullptr || length_getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid length method: " + $5->get_fully_scoped_name(), @5);
- length_getter = nullptr;
- }
-
- CPPDeclaration *getter = $7->find_symbol(current_scope, global_scope, current_lexer);
- if (getter == nullptr || getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid getter: " + $7->get_fully_scoped_name(), @7);
- getter = nullptr;
- }
-
- if (getter != nullptr && length_getter != nullptr) {
- CPPMakeProperty *make_property = nullptr;
- for (size_t i = 0; i < current_scope->_declarations.size(); ++i) {
- make_property = current_scope->_declarations[i]->as_make_property();
- if (make_property != nullptr) {
- if (make_property->get_fully_scoped_name() == $3->get_fully_scoped_name()) {
- break;
- } else {
- make_property = nullptr;
- }
- }
- }
- if (make_property != nullptr) {
- make_property->_get_key_function = getter->as_function_group();
- make_property->_length_function = length_getter->as_function_group();
- } else {
- yyerror("reference to non-existent MAKE_MAP_PROPERTY: " + $3->get_fully_scoped_name(), @3);
- }
- }
-}
- | KW_MAKE_PROPERTY2 '(' name ',' IDENTIFIER ',' IDENTIFIER ')' ';'
-{
- CPPDeclaration *getter = $7->find_symbol(current_scope, global_scope, current_lexer);
- if (getter == nullptr || getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("Reference to non-existent or invalid getter: " + $7->get_fully_scoped_name(), @7);
-
- } else {
- CPPMakeProperty *make_property;
- make_property = new CPPMakeProperty($3, CPPMakeProperty::T_normal,
- current_scope, @1.file);
- make_property->_get_function = getter->as_function_group();
-
- CPPDeclaration *hasser = $5->find_symbol(current_scope, global_scope, current_lexer);
- if (hasser == nullptr || hasser->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid has/find method: " + $5->get_fully_scoped_name(), @5);
- } else {
- make_property->_has_function = hasser->as_function_group();
- }
-
- current_scope->add_declaration(make_property, global_scope, current_lexer, @1);
- }
-}
- | KW_MAKE_PROPERTY2 '(' name ',' IDENTIFIER ',' IDENTIFIER ',' IDENTIFIER ',' IDENTIFIER ')' ';'
-{
- CPPDeclaration *getter = $7->find_symbol(current_scope, global_scope, current_lexer);
- if (getter == nullptr || getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("Reference to non-existent or invalid getter: " + $7->get_fully_scoped_name(), @7);
-
- } else {
- CPPMakeProperty *make_property;
- make_property = new CPPMakeProperty($3, CPPMakeProperty::T_normal,
- current_scope, @1.file);
- make_property->_get_function = getter->as_function_group();
-
- CPPDeclaration *hasser = $5->find_symbol(current_scope, global_scope, current_lexer);
- if (hasser == nullptr || hasser->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid has/find method: " + $5->get_fully_scoped_name(), @5);
- } else {
- make_property->_has_function = hasser->as_function_group();
- }
-
- CPPDeclaration *setter = $9->find_symbol(current_scope, global_scope, current_lexer);
- if (setter == nullptr || setter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid setter: " + $9->get_fully_scoped_name(), @9);
- } else {
- make_property->_set_function = setter->as_function_group();
- }
-
- CPPDeclaration *clearer = $11->find_symbol(current_scope, global_scope, current_lexer);
- if (clearer == nullptr || clearer->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid clear method: " + $11->get_fully_scoped_name(), @11);
- } else {
- make_property->_clear_function = clearer->as_function_group();
- }
-
- current_scope->add_declaration(make_property, global_scope, current_lexer, @1);
- }
-}
- | KW_MAKE_SEQ '(' name ',' IDENTIFIER ',' IDENTIFIER ')' ';'
-{
- CPPDeclaration *length_getter = $5->find_symbol(current_scope, global_scope, current_lexer);
- if (length_getter == nullptr || length_getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid length method: " + $5->get_fully_scoped_name(), @5);
- length_getter = nullptr;
- }
-
- CPPDeclaration *element_getter = $7->find_symbol(current_scope, global_scope, current_lexer);
- if (element_getter == nullptr || element_getter->get_subtype() != CPPDeclaration::ST_function_group) {
- yyerror("reference to non-existent or invalid element method: " + $7->get_fully_scoped_name(), @5);
- element_getter = nullptr;
- }
-
- if (length_getter != nullptr && element_getter != nullptr) {
- CPPMakeSeq *make_seq = new CPPMakeSeq($3,
- length_getter->as_function_group(),
- element_getter->as_function_group(),
- current_scope, @1.file);
- current_scope->add_declaration(make_seq, global_scope, current_lexer, @1);
- }
-}
- | KW_STATIC_ASSERT '(' const_expr ',' string_literal ')' ';'
-{
- CPPExpression::Result result = $3->evaluate();
- if (result._type == CPPExpression::RT_error) {
- yywarning("static_assert requires a constant expression", @3);
- } else if (!result.as_boolean()) {
- stringstream str;
- str << *$5;
- yywarning("static_assert failed: " + str.str(), @3);
- }
-}
- | KW_STATIC_ASSERT '(' const_expr ')' ';'
-{
- // This alternative version of static_assert was introduced in C++17.
- CPPExpression::Result result = $3->evaluate();
- if (result._type == CPPExpression::RT_error) {
- yywarning("static_assert requires a constant expression", @3);
- } else if (!result.as_boolean()) {
- yywarning("static_assert failed", @3);
- }
-}
- ;
-
-friend_declaration:
- KW_FRIEND
-{
- CPPScope *new_scope = new CPPScope(current_scope, CPPNameComponent("temp"),
- V_public);
- push_scope(new_scope);
-}
- declaration
-{
- delete current_scope;
- pop_scope();
-}
- ;
-
-
-storage_class:
- empty
-{
- $$ = 0;
-}
- | KW_CONST storage_class
-{
- // This isn't really a storage class, but it helps with parsing.
- $$ = $2 | (int)CPPInstance::SC_const;
-}
- | KW_EXTERN storage_class
-{
- $$ = $2 | (int)CPPInstance::SC_extern;
-}
- | KW_EXTERN SIMPLE_STRING storage_class
-{
- $$ = $3 | (int)CPPInstance::SC_extern;
- if ($2 == "C") {
- $$ |= (int)CPPInstance::SC_c_binding;
- } else if ($2 == "C++") {
- $$ &= ~(int)CPPInstance::SC_c_binding;
- } else {
- yywarning("Ignoring unknown linkage type \"" + $2 + "\"", @2);
- }
-}
- | KW_STATIC storage_class
-{
- $$ = $2 | (int)CPPInstance::SC_static;
-}
- | KW_INLINE storage_class
-{
- $$ = $2 | (int)CPPInstance::SC_inline;
-}
- | KW_VIRTUAL storage_class
-{
- $$ = $2 | (int)CPPInstance::SC_virtual;
-}
- | KW_EXPLICIT storage_class
-{
- $$ = $2 | (int)CPPInstance::SC_explicit;
-}
- | KW_EXPLICIT_LPAREN const_expr ')' storage_class
-{
- CPPExpression::Result result = $2->evaluate();
- if (result._type == CPPExpression::RT_error) {
- yywarning("explicit() requires a constant expression", @2);
- } else if (result.as_boolean()) {
- $$ = $4 | (int)CPPInstance::SC_explicit;
- }
-}
- | KW_REGISTER storage_class
-{
- $$ = $2 | (int)CPPInstance::SC_register;
-}
- | KW_VOLATILE storage_class
-{
- $$ = $2 | (int)CPPInstance::SC_volatile;
-}
- | KW_MUTABLE storage_class
-{
- $$ = $2 | (int)CPPInstance::SC_mutable;
-}
- | KW_CONSTEVAL storage_class
-{
- $$ = $2 | (int)CPPInstance::SC_consteval;
-}
- | KW_CONSTEXPR storage_class
-{
- $$ = $2 | (int)CPPInstance::SC_constexpr;
-}
- | KW_CONSTINIT storage_class
-{
- $$ = $2 | (int)CPPInstance::SC_constinit;
-}
- | KW_BLOCKING storage_class
-{
- $$ = $2 | (int)CPPInstance::SC_blocking;
-}
- | KW_EXTENSION storage_class
-{
- $$ = $2 | (int)CPPInstance::SC_extension;
-}
- | KW_THREAD_LOCAL storage_class
-{
- $$ = $2 | (int)CPPInstance::SC_thread_local;
-}
- ;
-
-optional_attributes:
- empty
-{
- $$ = CPPAttributeList();
-}
- | ATTR_LEFT attribute_specifiers ATTR_RIGHT optional_attributes
-{
- $$ = $2;
- $$.add_attributes_from($4);
-}
- | ATTR_LEFT KW_USING name ':' attribute_specifiers ATTR_RIGHT optional_attributes
-{
- $$ = $5;
- for (CPPAttributeList::Attribute &attr : $$._attributes) {
- attr._ident->prepend($3);
- }
- $$.add_attributes_from($7);
-}
- | KW_ALIGNAS '(' const_expr ')' optional_attributes
-{
- $$ = $5;
- $$.add_alignas($3->as_expression());
-}
- | KW_ALIGNAS '(' type_decl ')' optional_attributes
-{
- $$ = $5;
- $$.add_alignas($3->as_type());
-}
- ;
-
-attribute_specifiers:
- attribute_specifier
-{
- $$ = $1;
-}
- | attribute_specifier ',' attribute_specifiers
-{
- $$ = $1;
- $$.add_attributes_from($3);
-}
- ;
-
-attribute_specifier:
- name
-{
- $$ = CPPAttributeList();
- $$.add_attribute($1);
-}
- | name '(' formal_parameter_list ')'
-{
- $$ = CPPAttributeList();
- $$.add_attribute($1);
-}
- ;
-
-type_like_declaration:
- storage_class var_type_decl
-{
- // We don't need to push/pop type, because we can't nest
- // type_like_declaration.
- if ($2->as_type_declaration()) {
- current_type = $2->as_type_declaration()->_type;
- } else {
- current_type = $2->as_type();
- }
- push_storage_class($1);
-}
- multiple_instance_identifiers
-{
- pop_storage_class();
-}
-
- | storage_class type_decl ';'
-{
- // We don't really care about the storage class here. In fact, it's
- // not actually legal to define a class or struct using a particular
- // storage class, but we require it just to help yacc out in its
- // parsing.
-
- current_scope->add_declaration($2, global_scope, current_lexer, @2);
-}
- | storage_class constructor_prototype
-{
- if ($2 != nullptr) {
- // Push the scope so that the initializers can make use of things defined
- // in the class body.
- push_scope($2->get_scope(current_scope, global_scope));
- $2->_storage_class |= (current_storage_class | $1);
- }
-}
- maybe_initialize_or_constructor_body
-{
- if ($2 != nullptr) {
- pop_scope();
- current_scope->add_declaration($2, global_scope, current_lexer, @2);
- $2->set_initializer($4);
- }
-}
- | storage_class function_prototype maybe_initialize_or_function_body
-{
- if ($2 != nullptr) {
- $2->_storage_class |= (current_storage_class | $1);
- current_scope->add_declaration($2, global_scope, current_lexer, @2);
- $2->set_initializer($3);
- }
-}
- | using_declaration
-
- /* We don't need to include a rule for variables that point to
- functions, because we get those from the function_prototype
- definition. */
- ;
-
-multiple_instance_identifiers:
- instance_identifier_and_maybe_trailing_return_type maybe_initialize_or_function_body
-{
- if (current_storage_class & CPPInstance::SC_const) {
- $1->add_modifier(IIT_const);
- }
- $1->add_attributes(current_attributes);
- CPPInstance *inst = new CPPInstance(current_type, $1,
- current_storage_class,
- @1.file);
- inst->set_initializer($2);
- current_scope->add_declaration(inst, global_scope, current_lexer, @1);
-}
- | instance_identifier_and_maybe_trailing_return_type maybe_initialize ',' multiple_instance_identifiers
-{
- if (current_storage_class & CPPInstance::SC_const) {
- $1->add_modifier(IIT_const);
- }
- $1->add_attributes(current_attributes);
- CPPInstance *inst = new CPPInstance(current_type, $1,
- current_storage_class,
- @1.file);
- inst->set_initializer($2);
- current_scope->add_declaration(inst, global_scope, current_lexer, @1);
-}
- ;
-
-
-typedef_declaration:
- storage_class var_type_decl
-{
- // We don't need to push/pop type, because we can't nest
- // multiple_var_declarations.
- if ($2->as_type_declaration()) {
- current_type = $2->as_type_declaration()->_type;
- } else {
- current_type = $2->as_type();
- }
- push_storage_class($1);
-}
- typedef_instance_identifiers
-{
- pop_storage_class();
-}
- | storage_class function_prototype maybe_initialize_or_function_body
-{
- if ($2 != nullptr) {
- CPPInstance *inst = $2->as_instance();
- if (inst != nullptr) {
- inst->_storage_class |= (current_storage_class | $1);
- current_scope->add_declaration(inst, global_scope, current_lexer, @2);
- CPPTypedefType *typedef_type = new CPPTypedefType(inst->_type, inst->_ident, current_scope, inst->_attributes);
- current_scope->add_declaration(CPPType::new_type(typedef_type), global_scope, current_lexer, @2);
- }
- }
-}
- ;
-
-typedef_instance_identifiers:
- instance_identifier_and_maybe_trailing_return_type maybe_initialize_or_function_body
-{
- if (current_storage_class & CPPInstance::SC_const) {
- $1->add_modifier(IIT_const);
- }
- $1->add_attributes(current_attributes);
- CPPType *target_type = current_type;
- CPPTypedefType *typedef_type = new CPPTypedefType(target_type, $1, current_scope, @1.file);
- current_scope->add_declaration(CPPType::new_type(typedef_type), global_scope, current_lexer, @1);
-}
- | instance_identifier_and_maybe_trailing_return_type maybe_initialize ',' typedef_instance_identifiers
-{
- if (current_storage_class & CPPInstance::SC_const) {
- $1->add_modifier(IIT_const);
- }
- $1->add_attributes(current_attributes);
- CPPType *target_type = current_type;
- CPPTypedefType *typedef_type = new CPPTypedefType(target_type, $1, current_scope, @1.file);
- current_scope->add_declaration(CPPType::new_type(typedef_type), global_scope, current_lexer, @1);
-}
- ;
-
-constructor_prototype:
-
-/* Functions with implicit return types, and constructors */
- IDENTIFIER '('
-{
- // Create a scope for this function.
- CPPScope *scope = new CPPScope($1->get_scope(current_scope, global_scope),
- $1->_names.back(), V_private);
-
- // It still needs to be able to pick up any template arguments, if this is
- // a definition for a method template. Add a fake "using" declaration to
- // accomplish this.
- scope->_using.insert(current_scope);
-
- push_scope(scope);
-}
- function_parameter_list ')' function_post optional_attributes
-{
- CPPScope *scope = $1->get_scope(current_scope, global_scope);
- CPPType *type;
- std::string simple_name = $1->get_simple_name();
- if (!simple_name.empty() && simple_name[0] == '~') {
- // A destructor has no return type.
- type = new CPPSimpleType(CPPSimpleType::T_void);
- }
- else if (scope != nullptr && simple_name == scope->get_simple_name()) {
- // Neither does a constructor.
- type = new CPPSimpleType(CPPSimpleType::T_void);
- }
- else {
- // This isn't a constructor, so it has an implicit return type of
- // int.
- yywarning("function has no return type, assuming int", @1);
- type = new CPPSimpleType(CPPSimpleType::T_int);
- }
- pop_scope();
-
- CPPInstanceIdentifier *ii = new CPPInstanceIdentifier($1);
- ii->add_func_modifier($4, $6, nullptr, $7);
- ii->add_attributes(current_attributes);
-
- $$ = new CPPInstance(type, ii, 0, @1.file);
-}
-/* This is a hack to support functions with the identifier enveloped by a
- pair of parentheses. */
- | TYPENAME_IDENTIFIER '(' IDENTIFIER ')' '('
-{
- // Create a scope for this function.
- CPPScope *scope = new CPPScope($3->get_scope(current_scope, global_scope),
- $3->_names.back(), V_private);
-
- // It still needs to be able to pick up any template arguments, if this is
- // a definition for a method template. Add a fake "using" declaration to
- // accomplish this.
- scope->_using.insert(current_scope);
-
- push_scope(scope);
-}
- function_parameter_list ')' function_post optional_attributes
-{
- pop_scope();
- CPPType *type = $1->find_type(current_scope, global_scope, false, current_lexer);
- if (type == nullptr) {
- yyerror(string("internal error resolving type ") + $1->get_fully_scoped_name(), @1);
- }
- assert(type != nullptr);
-
- CPPInstanceIdentifier *ii = new CPPInstanceIdentifier($3);
- ii->add_func_modifier($7, $9, nullptr, $10);
- ii->add_attributes(current_attributes);
-
- $$ = new CPPInstance(type, ii, 0, @1.file);
-}
- | TYPENAME_IDENTIFIER '('
-{
- // Create a scope for this function.
- CPPScope *scope = new CPPScope($1->get_scope(current_scope, global_scope),
- $1->_names.back(), V_private);
-
- // It still needs to be able to pick up any template arguments, if this is
- // a definition for a method template. Add a fake "using" declaration to
- // accomplish this.
- scope->_using.insert(current_scope);
-
- push_scope(scope);
-}
- function_parameter_list ')' function_post optional_attributes
-{
- pop_scope();
- CPPType *type;
- if ($1->get_simple_name() == current_scope->get_simple_name()) {
- // This is a constructor, and has no return.
- type = new CPPSimpleType(CPPSimpleType::T_void);
- } else {
- // This isn't a constructor, so it has an implicit return type of
- // int.
- type = new CPPSimpleType(CPPSimpleType::T_int);
- }
-
- CPPInstanceIdentifier *ii = new CPPInstanceIdentifier($1);
- ii->add_func_modifier($4, $6, nullptr, $7);
- ii->add_attributes(current_attributes);
-
- $$ = new CPPInstance(type, ii, 0, @1.file);
-}
- ;
-
-function_prototype:
-
-/* Destructors */
- '~' name '('
-{
- push_scope($2->get_scope(current_scope, global_scope));
-}
- function_parameter_list ')' function_post optional_attributes
-{
- pop_scope();
- if ($2->is_scoped()) {
- yyerror("Invalid destructor name: ~" + $2->get_fully_scoped_name(), @2);
- } else {
- CPPIdentifier *ident =
- new CPPIdentifier("~" + $2->get_simple_name(), @2);
- delete $2;
-
- CPPType *type;
- type = new CPPSimpleType(CPPSimpleType::T_void);
-
- CPPInstanceIdentifier *ii = new CPPInstanceIdentifier(ident);
- ii->add_func_modifier($5, $7, nullptr, $8);
- ii->add_attributes(current_attributes);
-
- $$ = new CPPInstance(type, ii, 0, @2.file);
- }
-}
-
-/* This is a special case: a function pointer declaration that looks
- at first a lot like a constructor declaration. This is provided to
- help yacc sort out the differences. It isn't an ideal solution,
- because it doesn't catch a lot of subtle variants on this form--but
- this will get at least the 99% most common uses. */
-
- | TYPENAME_IDENTIFIER '(' '*' instance_identifier ')' '('
-{
- push_scope($4->get_scope(current_scope, global_scope));
-}
- function_parameter_list ')' function_post optional_attributes maybe_trailing_return_type
-{
- pop_scope();
- CPPType *type = $1->find_type(current_scope, global_scope, false, current_lexer);
- if (type == nullptr) {
- yyerror(string("internal error resolving type ") + $1->get_fully_scoped_name(), @1);
- }
- assert(type != nullptr);
-
- CPPInstanceIdentifier *ii = $4;
- ii->add_modifier(IIT_pointer);
- ii->add_func_modifier($8, $10, nullptr, $11);
- ii->add_attributes(current_attributes);
- $$ = new CPPInstance(type, ii, 0, @1.file);
-}
- | TYPENAME_IDENTIFIER '(' SCOPING '*' instance_identifier ')' '('
-{
- push_scope($5->get_scope(current_scope, global_scope));
-}
- function_parameter_list ')' function_post optional_attributes maybe_trailing_return_type
-{
- pop_scope();
- CPPType *type = $1->find_type(current_scope, global_scope, false, current_lexer);
- if (type == nullptr) {
- yyerror(string("internal error resolving type ") + $1->get_fully_scoped_name(), @1);
- }
- assert(type != nullptr);
-
- CPPInstanceIdentifier *ii = $5;
- ii->add_scoped_pointer_modifier($3);
- ii->add_func_modifier($9, $11, nullptr, $12);
- ii->add_attributes(current_attributes);
- $$ = new CPPInstance(type, ii, 0, @1.file);
-}
-
-/* Typecast operators */
- | KW_OPERATOR type not_paren_formal_parameter_identifier '('
-{
- if ($1 != nullptr) {
- push_scope($1->get_scope(current_scope, global_scope));
- }
-}
- function_parameter_list ')' function_post
-{
- if ($1 != nullptr) {
- pop_scope();
- }
-
- // We use formal_parameter_identifier, because that can match a type
- // name with or without an identifier, but especially without, which
- // is what follows the keyword "operator" in a typecast function.
- // As an added bonus, the type of the formal_parameter will be the
- // typecast type, i.e. the return type of the typecast function.
-
- // We give typecast operators the name "operator typecast ",
- // where is a simple name of the type to be typecast. Use
- // the method's return type to determine the full type description.
- string name = "operator typecast " + $2->get_simple_name();
- CPPIdentifier *ident = $1;
- if (ident == nullptr) {
- ident = new CPPIdentifier(name, @2);
- } else {
- ident->add_name(name);
- }
- $$ = CPPInstance::make_typecast_function
- (new CPPInstance($2, $3, 0, @3.file), ident, $6, $8);
- $$->_attributes.add_attributes_from(current_attributes);
-}
- | KW_OPERATOR KW_CONST type not_paren_formal_parameter_identifier '('
-{
- if ($1 != nullptr) {
- push_scope($1->get_scope(current_scope, global_scope));
- }
-}
- function_parameter_list ')' function_post
-{
- if ($1 != nullptr) {
- pop_scope();
- }
-
- CPPIdentifier *ident = $1;
- if (ident == nullptr) {
- ident = new CPPIdentifier("operator typecast", @4);
- } else {
- ident->add_name("operator typecast");
- }
- $4->add_modifier(IIT_const);
- $4->add_attributes(current_attributes);
- $$ = CPPInstance::make_typecast_function
- (new CPPInstance($3, $4, 0, @4.file), ident, $7, $9);
-}
-
-/* Not actually a function prototype, but maybe a template
- instantiation. Just included here (instead of somewhere else) to
- avoid shift/reduce conflicts. */
- | IDENTIFIER
-{
- CPPDeclaration *decl =
- $1->find_symbol(current_scope, global_scope, current_lexer);
- if (decl != nullptr) {
- $$ = decl->as_instance();
- } else {
- $$ = nullptr;
- }
-}
- ;
-
-function_post:
- empty
-{
- $$ = 0;
-}
- | function_post KW_CONST
-{
- $$ = $1 | (int)CPPFunctionType::F_const_method;
-}
- | function_post KW_VOLATILE
-{
- $$ = $1 | (int)CPPFunctionType::F_volatile_method;
-}
- | function_post KW_NOEXCEPT
-{
- $$ = $1 | (int)CPPFunctionType::F_noexcept;
-}
- | function_post KW_NOEXCEPT_LPAREN const_expr ')'
-{
- CPPExpression::Result result = $3->evaluate();
- if (result._type == CPPExpression::RT_error) {
- yywarning("noexcept() requires a constant expression", @3);
- } else if (result.as_boolean()) {
- $$ = $1 | (int)CPPFunctionType::F_noexcept;
- }
-}
- | function_post KW_FINAL
-{
- $$ = $1 | (int)CPPFunctionType::F_final;
-}
- | function_post KW_OVERRIDE
-{
- $$ = $1 | (int)CPPFunctionType::F_override;
-}
- | function_post '&'
-{
- $$ = $1 | (int)CPPFunctionType::F_lvalue_method;
-}
- | function_post ANDAND
-{
- $$ = $1 | (int)CPPFunctionType::F_rvalue_method;
-}
- | function_post KW_MUTABLE
-{
- // Used for lambdas, currently ignored.
- $$ = $1;
-}
- | function_post KW_CONSTEXPR
-{
- // Used for lambdas in C++17, currently ignored.
- $$ = $1;
-}
- | function_post KW_THROW '(' ')'
-{
- $$ = $1;
-}
- | function_post KW_THROW '(' name ')'
-{
- $$ = $1;
-}
- | function_post KW_THROW '(' name ELLIPSIS ')'
-{
- $$ = $1;
-}
- ;
-
-function_operator:
- '!'
-{
- $$ = "!";
-}
- | '~'
-{
- $$ = "~";
-}
- | '*'
-{
- $$ = "*";
-}
- | '/'
-{
- $$ = "/";
-}
- | '%'
-{
- $$ = "%";
-}
- | '+'
-{
- $$ = "+";
-}
- | '-'
-{
- $$ = "-";
-}
- | '|'
-{
- $$ = "|";
-}
- | '&'
-{
- $$ = "&";
-}
- | '^'
-{
- $$ = "^";
-}
- | OROR
-{
- $$ = "||";
-}
- | ANDAND
-{
- $$ = "&&";
-}
- | EQCOMPARE
-{
- $$ = "==";
-}
- | NECOMPARE
-{
- $$ = "!=";
-}
- | LECOMPARE
-{
- $$ = "<=";
-}
- | GECOMPARE
-{
- $$ = ">=";
-}
- | '<'
-{
- $$ = "<";
-}
- | '>'
-{
- $$ = ">";
-}
- | SPACESHIP
-{
- $$ = "<=>";
-}
- | LSHIFT
-{
- $$ = "<<";
-}
- | RSHIFT
-{
- $$ = ">>";
-}
- | '='
-{
- $$ = "=";
-}
- | ','
-{
- $$ = ",";
-}
- | PLUSPLUS
-{
- $$ = "++";
-}
- | MINUSMINUS
-{
- $$ = "--";
-}
- | TIMESEQUAL
-{
- $$ = "*=";
-}
- | DIVIDEEQUAL
-{
- $$ = "/=";
-}
- | MODEQUAL
-{
- $$ = "%=";
-}
- | PLUSEQUAL
-{
- $$ = "+=";
-}
- | MINUSEQUAL
-{
- $$ = "-=";
-}
- | OREQUAL
-{
- $$ = "|=";
-}
- | ANDEQUAL
-{
- $$ = "&=";
-}
- | XOREQUAL
-{
- $$ = "^=";
-}
- | LSHIFTEQUAL
-{
- $$ = "<<=";
-}
- | RSHIFTEQUAL
-{
- $$ = ">>=";
-}
- | POINTSAT
-{
- $$ = "->";
-}
- | '[' ']'
-{
- $$ = "[]";
-}
- | '(' ')'
-{
- $$ = "()";
-}
- | KW_NEW
-{
- $$ = "new";
-}
- | KW_DELETE
-{
- $$ = "delete";
-}
- ;
-
-more_template_declaration:
- type_like_declaration
- | template_declaration
- | friend_declaration
- ;
-
-template_declaration:
- KW_EXTERN template_declaration
- | KW_TEMPLATE
-{
- push_scope(new CPPTemplateScope(current_scope));
-}
- '<' template_formal_parameters '>' more_template_declaration
-{
- pop_scope();
-}
- | KW_TEMPLATE type_like_declaration
- | KW_TEMPLATE friend_declaration
- ;
-
-template_formal_parameters:
- empty
- | template_nonempty_formal_parameters
- ;
-
-template_nonempty_formal_parameters:
- template_formal_parameter
-{
- CPPTemplateScope *ts = current_scope->as_template_scope();
- assert(ts != nullptr);
- ts->add_template_parameter($1);
-}
- | template_nonempty_formal_parameters ',' template_formal_parameter
-{
- CPPTemplateScope *ts = current_scope->as_template_scope();
- assert(ts != nullptr);
- ts->add_template_parameter($3);
-}
- ;
-
-typename_keyword:
- KW_CLASS
- | KW_TYPENAME
- ;
-
-template_formal_parameter:
- typename_keyword
-{
- $$ = CPPType::new_type(new CPPClassTemplateParameter(nullptr));
-}
- | typename_keyword name
-{
- $$ = CPPType::new_type(new CPPClassTemplateParameter($2));
-}
- | typename_keyword name '=' full_type
-{
- $$ = CPPType::new_type(new CPPClassTemplateParameter($2, $4));
-}
- | typename_keyword ELLIPSIS
-{
- CPPClassTemplateParameter *ctp = new CPPClassTemplateParameter(nullptr);
- ctp->_packed = true;
- $$ = CPPType::new_type(ctp);
-}
- | typename_keyword ELLIPSIS name
-{
- CPPClassTemplateParameter *ctp = new CPPClassTemplateParameter($3);
- ctp->_packed = true;
- $$ = CPPType::new_type(ctp);
-}
- | template_formal_parameter_type formal_parameter_identifier template_parameter_maybe_initialize
-{
- CPPInstance *inst = new CPPInstance($1, $2, 0, @2.file);
- inst->set_initializer($3);
- $$ = inst;
-}
- | KW_CONST template_formal_parameter_type formal_parameter_identifier template_parameter_maybe_initialize
-{
- $3->add_modifier(IIT_const);
- CPPInstance *inst = new CPPInstance($2, $3, 0, @3.file);
- inst->set_initializer($4);
- $$ = inst;
-}
- | template_formal_parameter_type parameter_pack_identifier
-{
- CPPInstance *inst = new CPPInstance($1, $2, 0, @2.file);
- $$ = inst;
-}
- | KW_CONST template_formal_parameter_type parameter_pack_identifier
-{
- $3->add_modifier(IIT_const);
- CPPInstance *inst = new CPPInstance($2, $3, 0, @3.file);
- $$ = inst;
-}
- | KW_VOLATILE template_formal_parameter_type formal_parameter_identifier template_parameter_maybe_initialize
-{
- $3->add_modifier(IIT_volatile);
- CPPInstance *inst = new CPPInstance($2, $3, 0, @3.file);
- inst->set_initializer($4);
- $$ = inst;
-}
- | KW_VOLATILE template_formal_parameter_type parameter_pack_identifier
-{
- $3->add_modifier(IIT_volatile);
- CPPInstance *inst = new CPPInstance($2, $3, 0, @3.file);
- $$ = inst;
-}
- ;
-
-template_formal_parameter_type:
- simple_type
-{
- $$ = CPPType::new_type($1);
-}
- | IDENTIFIER
-{
- yywarning("Not a type: " + $1->get_fully_scoped_name(), @1);
- $$ = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_unknown));
-}
- | TYPENAME_IDENTIFIER
-{
- $$ = $1->find_type(current_scope, global_scope, false, current_lexer);
- if ($$ == nullptr) {
- yyerror(string("internal error resolving type ") + $1->get_fully_scoped_name(), @1);
- }
- assert($$ != nullptr);
-}
- | TYPEPACK_IDENTIFIER
-{
- $$ = $1->find_type(current_scope, global_scope, false, current_lexer);
- if ($$ == nullptr) {
- yyerror(string("internal error resolving type ") + $1->get_fully_scoped_name(), @1);
- }
- assert($$ != nullptr);
-}
- ;
-
-
-instance_identifier:
- name_no_final optional_attributes
-{
- $$ = new CPPInstanceIdentifier($1, $2);
-}
- | KW_OPERATOR function_operator optional_attributes
-{
- // For an operator function. We implement this simply by building a
- // ficticious name for the function; in other respects it's just
- // like a regular function.
- CPPIdentifier *ident = $1;
- if (ident == nullptr) {
- ident = new CPPIdentifier("operator "+$2, @2);
- } else {
- ident->_names.push_back("operator "+$2);
- }
-
- $$ = new CPPInstanceIdentifier(ident, $3);
-}
- | KW_OPERATOR SIMPLE_STRING IDENTIFIER optional_attributes
-{
- // A C++11 literal operator.
- if (!$2.empty()) {
- yyerror("expected empty string", @2);
- }
- CPPIdentifier *ident = $1;
- if (ident == nullptr) {
- ident = new CPPIdentifier("operator \"\" "+$3->get_simple_name(), @3);
- } else {
- ident->_names.push_back("operator \"\" "+$3->get_simple_name());
- }
-
- $$ = new CPPInstanceIdentifier(ident, $4);
-}
- | KW_CONST instance_identifier %prec UNARY
-{
- $$ = $2;
- $$->add_modifier(IIT_const);
-}
- | KW_VOLATILE instance_identifier %prec UNARY
-{
- $$ = $2;
- $$->add_modifier(IIT_volatile);
-}
- | '*' optional_attributes instance_identifier %prec UNARY
-{
- $$ = $3;
- $$->add_modifier(IIT_pointer, $2);
-}
- | '&' optional_attributes instance_identifier %prec UNARY
-{
- $$ = $3;
- $$->add_modifier(IIT_reference, $2);
-}
- | ANDAND optional_attributes instance_identifier %prec UNARY
-{
- $$ = $3;
- $$->add_modifier(IIT_rvalue_reference, $2);
-}
- | SCOPING '*' optional_attributes instance_identifier %prec UNARY
-{
- $$ = $4;
- $$->add_scoped_pointer_modifier($1, $3);
-}
- | instance_identifier '[' optional_const_expr ']' optional_attributes
-{
- $$ = $1;
- $$->add_array_modifier($3, $5);
-}
- | '(' instance_identifier ')'
-{
- $$ = $2;
- $$->add_modifier(IIT_paren);
-}
- | instance_identifier '('
-{
- // Create a scope for this function (in case it is a function)
- CPPScope *scope = new CPPScope($1->get_scope(current_scope, global_scope),
- CPPNameComponent(""), V_private);
-
- // It still needs to be able to pick up any template arguments, if this is
- // a definition for a method template. Add a fake "using" declaration to
- // accomplish this.
- scope->_using.insert(current_scope);
-
- push_scope(scope);
-}
- formal_parameter_list ')' function_post optional_attributes
-{
- pop_scope();
- $$ = $1;
- if ($4->is_parameter_expr() && $6 == 0) {
- // Oops, this must have been an instance declaration with a
- // parameter list, not a function prototype.
- $$->add_initializer_modifier($4);
- }
- else {
- // This was (probably) a function prototype.
- $$->add_func_modifier($4, $6, nullptr, $7);
- }
-}
- ;
-
-
-instance_identifier_and_maybe_trailing_return_type:
- instance_identifier maybe_trailing_return_type
-{
- // This is handled a bit awkwardly right now. Ideally it'd be wrapped
- // up in the instance_identifier rule, but then more needs to happen in
- // order to avoid shift/reduce conflicts.
- if ($2 != nullptr) {
- $1->add_trailing_return_type($2);
- }
- $$ = $1;
-}
- | instance_identifier ':' const_expr
-{
- // Bitfield definition.
- $1->_bit_width = $3;
- $$ = $1;
-}
- ;
-
-
-maybe_trailing_return_type:
- empty
-{
- $$ = nullptr;
-}
- | POINTSAT predefined_type empty_instance_identifier
-{
- $$ = $3->unroll_type($2);
-}
- | POINTSAT KW_CONST predefined_type empty_instance_identifier
-{
- $4->add_modifier(IIT_const);
- $$ = $4->unroll_type($3);
-}
- ;
-
-
-maybe_comma_identifier:
- empty
-{
- $$ = nullptr;
-}
- | ',' IDENTIFIER
-{
- $$ = $2;
-}
- ;
-
-
-function_parameter_list:
- empty
-{
- $$ = new CPPParameterList;
-}
- | ELLIPSIS
-{
- $$ = new CPPParameterList;
- $$->_includes_ellipsis = true;
-}
- | function_parameters
-{
- $$ = $1;
-}
- | function_parameters ',' ELLIPSIS
-{
- $$ = $1;
- $$->_includes_ellipsis = true;
-}
- | function_parameters ELLIPSIS
-{
- $$ = $1;
- $$->_includes_ellipsis = true;
-}
- ;
-
-function_parameters:
- function_parameter
-{
- $$ = new CPPParameterList;
- $$->_parameters.push_back($1);
-}
- | function_parameters ',' function_parameter
-{
- $$ = $1;
- $$->_parameters.push_back($3);
-}
- ;
-
-formal_parameter_list:
- empty
-{
- $$ = new CPPParameterList;
-}
- | ELLIPSIS
-{
- $$ = new CPPParameterList;
- $$->_includes_ellipsis = true;
-}
- | formal_parameters
-{
- $$ = $1;
-}
- | formal_parameters ',' ELLIPSIS
-{
- $$ = $1;
- $$->_includes_ellipsis = true;
-}
- | formal_parameters ELLIPSIS
-{
- $$ = $1;
- $$->_includes_ellipsis = true;
-}
- ;
-
-formal_parameters:
- formal_parameter
-{
- $$ = new CPPParameterList;
- $$->_parameters.push_back($1);
-}
- | formal_parameters ',' formal_parameter
-{
- $$ = $1;
- $$->_parameters.push_back($3);
-}
- ;
-
-template_parameter_maybe_initialize:
- empty
-{
- $$ = nullptr;
-}
- | '=' no_angle_bracket_const_expr
-{
- $$ = $2;
-}
- ;
-
-maybe_initialize:
- empty
-{
- $$ = nullptr;
-}
- | '=' const_expr
-{
- $$ = $2;
-}
- ;
-
-maybe_initialize_or_constructor_body:
- ';'
-{
- $$ = nullptr;
-}
- | '{' code '}'
-{
- $$ = nullptr;
-}
- | ':' constructor_inits '{' code '}'
-{
- $$ = nullptr;
-}
- | '=' KW_DEFAULT ';'
-{
- $$ = new CPPExpression(CPPExpression::get_default());
-}
- | '=' KW_DELETE ';'
-{
- $$ = new CPPExpression(CPPExpression::get_delete());
-}
- ;
-
-maybe_initialize_or_function_body:
- ';'
-{
- $$ = nullptr;
-}
- | '{' code '}'
-{
- $$ = nullptr;
-}
- | '=' const_expr ';'
-{
- $$ = $2;
-}
- | '=' KW_DEFAULT ';'
-{
- $$ = new CPPExpression(CPPExpression::get_default());
-}
- | '=' KW_DELETE ';'
-{
- $$ = new CPPExpression(CPPExpression::get_delete());
-}
- | '=' '{' structure_init '}'
-{
- $$ = nullptr;
-}
- ;
-
-structure_init:
- empty
- | structure_init_body
- | structure_init_body ','
- ;
-
-structure_init_body:
- const_expr
-{
-}
- | '{' structure_init '}'
- | structure_init_body ',' const_expr
- | structure_init_body ',' '{' structure_init '}'
- ;
-
-function_parameter:
- optional_attributes storage_class type formal_parameter_identifier maybe_initialize
-{
- if ($2 & CPPInstance::SC_const) {
- $4->add_modifier(IIT_const);
- }
- if ($2 & CPPInstance::SC_volatile) {
- $4->add_modifier(IIT_volatile);
- }
- $4->add_attributes($1);
- $$ = new CPPInstance($3, $4, 0, @4.file);
- $$->set_initializer($5);
-}
- | optional_attributes storage_class type_pack parameter_pack_identifier maybe_initialize
-{
- if ($2 & CPPInstance::SC_const) {
- $4->add_modifier(IIT_const);
- }
- if ($2 & CPPInstance::SC_volatile) {
- $4->add_modifier(IIT_volatile);
- }
- $4->add_attributes($1);
- $$ = new CPPInstance($3, $4, 0, @4.file);
- $$->set_initializer($5);
-}
- ;
-
-/* A "formal parameter" is like a function parameter, except that it parses
- * instance declarations (that look like functions declaration) as well, and
- * as such accepts constexpr parameters.
- */
-formal_parameter:
- function_parameter
-{
- $$ = $1;
-}
- | formal_const_expr
-{
- CPPType *type =
- CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_parameter));
- $$ = new CPPInstance(type, "expr");
- $$->set_initializer($1);
-}
- ;
-
-not_paren_formal_parameter_identifier:
- empty
-{
- $$ = new CPPInstanceIdentifier(nullptr);
-}
- | name_no_final optional_attributes
-{
- $$ = new CPPInstanceIdentifier($1, $2);
-}
- | KW_CONST not_paren_formal_parameter_identifier %prec UNARY
-{
- $$ = $2;
- $$->add_modifier(IIT_const);
-}
- | KW_VOLATILE not_paren_formal_parameter_identifier %prec UNARY
-{
- $$ = $2;
- $$->add_modifier(IIT_volatile);
-}
- | KW_RESTRICT not_paren_formal_parameter_identifier %prec UNARY
-{
- $$ = $2;
- $$->add_modifier(IIT_restrict);
-}
- | '*' optional_attributes not_paren_formal_parameter_identifier %prec UNARY
-{
- $$ = $3;
- $$->add_modifier(IIT_pointer, $2);
-}
- | '&' optional_attributes not_paren_formal_parameter_identifier %prec UNARY
-{
- $$ = $3;
- $$->add_modifier(IIT_reference, $2);
-}
- | ANDAND optional_attributes not_paren_formal_parameter_identifier %prec UNARY
-{
- $$ = $3;
- $$->add_modifier(IIT_rvalue_reference, $2);
-}
- | SCOPING '*' optional_attributes not_paren_formal_parameter_identifier %prec UNARY
-{
- $$ = $4;
- $$->add_scoped_pointer_modifier($1, $3);
-}
- | not_paren_formal_parameter_identifier '[' optional_const_expr ']' optional_attributes
-{
- $$ = $1;
- $$->add_array_modifier($3, $5);
-}
- ;
-
-formal_parameter_identifier:
- empty
-{
- $$ = new CPPInstanceIdentifier(nullptr);
-}
- | name_no_final optional_attributes
-{
- $$ = new CPPInstanceIdentifier($1, $2);
-}
- | KW_CONST formal_parameter_identifier %prec UNARY
-{
- $$ = $2;
- $$->add_modifier(IIT_const);
-}
- | KW_VOLATILE formal_parameter_identifier %prec UNARY
-{
- $$ = $2;
- $$->add_modifier(IIT_volatile);
-}
- | KW_RESTRICT formal_parameter_identifier %prec UNARY
-{
- $$ = $2;
- $$->add_modifier(IIT_restrict);
-}
- | '*' optional_attributes formal_parameter_identifier %prec UNARY
-{
- $$ = $3;
- $$->add_modifier(IIT_pointer, $2);
-}
- | '&' optional_attributes formal_parameter_identifier %prec UNARY
-{
- $$ = $3;
- $$->add_modifier(IIT_reference, $2);
-}
- | ANDAND optional_attributes formal_parameter_identifier %prec UNARY
-{
- $$ = $3;
- $$->add_modifier(IIT_rvalue_reference, $2);
-}
- | SCOPING '*' optional_attributes formal_parameter_identifier %prec UNARY
-{
- $$ = $4;
- $$->add_scoped_pointer_modifier($1, $3);
-}
- | formal_parameter_identifier '[' optional_const_expr ']' optional_attributes
-{
- $$ = $1;
- $$->add_array_modifier($3, $5);
-}
- | '(' formal_parameter_identifier ')' '(' function_parameter_list ')' function_post optional_attributes
-{
- $$ = $2;
- $$->add_modifier(IIT_paren);
- $$->add_func_modifier($5, $7, nullptr, $8);
-}
- | '(' formal_parameter_identifier ')'
-{
- $$ = $2;
- $$->add_modifier(IIT_paren);
-}
- ;
-
-parameter_pack_identifier:
- ELLIPSIS
-{
- $$ = new CPPInstanceIdentifier(nullptr);
- $$->_packed = true;
-}
- | ELLIPSIS name optional_attributes
-{
- $$ = new CPPInstanceIdentifier($2, $3);
- $$->_packed = true;
-}
- | KW_CONST parameter_pack_identifier %prec UNARY
-{
- $$ = $2;
- $$->add_modifier(IIT_const);
-}
- | KW_VOLATILE parameter_pack_identifier %prec UNARY
-{
- $$ = $2;
- $$->add_modifier(IIT_volatile);
-}
- | KW_RESTRICT parameter_pack_identifier %prec UNARY
-{
- $$ = $2;
- $$->add_modifier(IIT_restrict);
-}
- | '*' optional_attributes parameter_pack_identifier %prec UNARY
-{
- $$ = $3;
- $$->add_modifier(IIT_pointer, $2);
-}
- | '&' optional_attributes parameter_pack_identifier %prec UNARY
-{
- $$ = $3;
- $$->add_modifier(IIT_reference, $2);
-}
- | ANDAND optional_attributes parameter_pack_identifier %prec UNARY
-{
- $$ = $3;
- $$->add_modifier(IIT_rvalue_reference, $2);
-}
- | SCOPING '*' optional_attributes parameter_pack_identifier %prec UNARY
-{
- $$ = $4;
- $$->add_scoped_pointer_modifier($1, $3);
-}
- | parameter_pack_identifier '[' optional_const_expr ']' optional_attributes
-{
- $$ = $1;
- $$->add_array_modifier($3, $5);
-}
- | '(' parameter_pack_identifier ')' '(' function_parameter_list ')' function_post optional_attributes
-{
- $$ = $2;
- $$->add_modifier(IIT_paren);
- $$->add_func_modifier($5, $7, nullptr, $8);
-}
- | '(' parameter_pack_identifier ')'
-{
- $$ = $2;
- $$->add_modifier(IIT_paren);
-}
- ;
-
-not_paren_empty_instance_identifier:
- empty
-{
- $$ = new CPPInstanceIdentifier(nullptr);
-}
- | ELLIPSIS
-{
- $$ = new CPPInstanceIdentifier(nullptr);
- $$->_packed = true;
-}
- | ELLIPSIS name optional_attributes
-{
- $$ = new CPPInstanceIdentifier($2, $3);
- $$->_packed = true;
-}
- | KW_CONST not_paren_empty_instance_identifier %prec UNARY
-{
- $$ = $2;
- $$->add_modifier(IIT_const);
-}
- | KW_VOLATILE not_paren_empty_instance_identifier %prec UNARY
-{
- $$ = $2;
- $$->add_modifier(IIT_volatile);
-}
- | KW_RESTRICT not_paren_empty_instance_identifier %prec UNARY
-{
- $$ = $2;
- $$->add_modifier(IIT_restrict);
-}
- | '*' optional_attributes not_paren_empty_instance_identifier %prec UNARY
-{
- $$ = $3;
- $$->add_modifier(IIT_pointer, $2);
-}
- | '&' optional_attributes not_paren_empty_instance_identifier %prec UNARY
-{
- $$ = $3;
- $$->add_modifier(IIT_reference, $2);
-}
- | ANDAND optional_attributes not_paren_empty_instance_identifier %prec UNARY
-{
- $$ = $3;
- $$->add_modifier(IIT_rvalue_reference, $2);
-}
- | SCOPING '*' optional_attributes not_paren_empty_instance_identifier %prec UNARY
-{
- $$ = $4;
- $$->add_scoped_pointer_modifier($1, $3);
-}
- | not_paren_empty_instance_identifier '[' optional_const_expr ']' optional_attributes
-{
- $$ = $1;
- $$->add_array_modifier($3, $5);
-}
- ;
-
-empty_instance_identifier:
- empty
-{
- $$ = new CPPInstanceIdentifier(nullptr);
-}
- | ELLIPSIS
-{
- $$ = new CPPInstanceIdentifier(nullptr);
- $$->_packed = true;
-}
- | ELLIPSIS name optional_attributes
-{
- $$ = new CPPInstanceIdentifier($2, $3);
- $$->_packed = true;
-}
- | KW_CONST empty_instance_identifier %prec UNARY
-{
- $$ = $2;
- $$->add_modifier(IIT_const);
-}
- | KW_VOLATILE empty_instance_identifier %prec UNARY
-{
- $$ = $2;
- $$->add_modifier(IIT_volatile);
-}
- | KW_RESTRICT empty_instance_identifier %prec UNARY
-{
- $$ = $2;
- $$->add_modifier(IIT_restrict);
-}
- | '*' optional_attributes not_paren_empty_instance_identifier %prec UNARY
-{
- $$ = $3;
- $$->add_modifier(IIT_pointer, $2);
-}
- | '&' optional_attributes not_paren_empty_instance_identifier %prec UNARY
-{
- $$ = $3;
- $$->add_modifier(IIT_reference, $2);
-}
- | ANDAND optional_attributes not_paren_empty_instance_identifier %prec UNARY
-{
- $$ = $3;
- $$->add_modifier(IIT_rvalue_reference, $2);
-}
- | SCOPING '*' optional_attributes not_paren_empty_instance_identifier %prec UNARY
-{
- $$ = $4;
- $$->add_scoped_pointer_modifier($1, $3);
-}
- | not_paren_empty_instance_identifier '[' optional_const_expr ']' optional_attributes
-{
- $$ = $1;
- $$->add_array_modifier($3, $5);
-}
- | '(' function_parameter_list ')' function_post optional_attributes maybe_trailing_return_type
-{
- $$ = new CPPInstanceIdentifier(nullptr);
- $$->add_modifier(IIT_paren);
- $$->add_func_modifier($2, $4, $6, $5);
-}
- | '(' '*' optional_attributes not_paren_empty_instance_identifier ')' '(' function_parameter_list ')' function_post optional_attributes maybe_trailing_return_type
-{
- $$ = $4;
- $$->add_modifier(IIT_pointer, $3);
- $$->add_modifier(IIT_paren);
- $$->add_func_modifier($7, $9, $11, $10);
-}
- | '(' '&' optional_attributes not_paren_empty_instance_identifier ')' '(' function_parameter_list ')' function_post optional_attributes maybe_trailing_return_type
-{
- $$ = $4;
- $$->add_modifier(IIT_reference, $3);
- $$->add_modifier(IIT_paren);
- $$->add_func_modifier($7, $9, $11, $10);
-}
- | '(' ANDAND optional_attributes not_paren_empty_instance_identifier ')' '(' function_parameter_list ')' function_post optional_attributes maybe_trailing_return_type
-{
- $$ = $4;
- $$->add_modifier(IIT_rvalue_reference, $3);
- $$->add_modifier(IIT_paren);
- $$->add_func_modifier($7, $9, $11, $10);
-}
- ;
-
-type:
- simple_type
-{
- $$ = CPPType::new_type($1);
-}
- | TYPENAME_IDENTIFIER
-{
- $$ = $1->find_type(current_scope, global_scope, false, current_lexer);
- if ($$ == nullptr) {
- yyerror(string("internal error resolving type ") + $1->get_fully_scoped_name(), @1);
- }
- assert($$ != nullptr);
-}
- | KW_TYPENAME name
-{
- $$ = CPPType::new_type(new CPPTBDType($2));
-}
- | anonymous_struct
-{
- $$ = CPPType::new_type($1);
-}
- | named_struct
-{
- $$ = CPPType::new_type($1);
-}
- | enum
-{
- $$ = CPPType::new_type($1);
-}
- | struct_keyword optional_attributes name
-{
- CPPType *type = $3->find_type(current_scope, global_scope, false, current_lexer);
- if (type != nullptr) {
- $$ = type;
- } else {
- CPPExtensionType *et =
- CPPType::new_type(new CPPExtensionType($1, $3, current_scope, @1.file, $2))
- ->as_extension_type();
- CPPScope *scope = $3->get_scope(current_scope, global_scope);
- if (scope != nullptr) {
- scope->define_extension_type(et);
- }
- $$ = et;
- }
-}
- | enum_keyword optional_attributes name_no_final ':' enum_element_type
-{
- CPPType *type = $3->find_type(current_scope, global_scope, false, current_lexer);
- if (type != nullptr) {
- $$ = type;
- } else {
- CPPExtensionType *et =
- CPPType::new_type(new CPPExtensionType($1, $3, current_scope, @1.file, $2))
- ->as_extension_type();
- CPPScope *scope = $3->get_scope(current_scope, global_scope);
- if (scope != nullptr) {
- scope->define_extension_type(et);
- }
- $$ = et;
- }
-}
- | KW_DECLTYPE '(' const_expr ')'
-{
- $$ = $3->determine_type();
- if ($$ == nullptr) {
- stringstream str;
- str << *$3;
- yyerror("could not determine type of " + str.str(), @3);
- }
-}
- | KW_DECLTYPE '(' KW_AUTO ')'
-{
- $$ = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_auto));
-}
- | KW_UNDERLYING_TYPE '(' full_type ')'
-{
- CPPEnumType *enum_type = $3->as_enum_type();
- if (enum_type == nullptr) {
- yyerror("an enumeration type is required", @3);
- $$ = $3;
- } else {
- $$ = enum_type->get_underlying_type();
- }
-}
- | KW_AUTO
-{
- $$ = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_auto));
-}
- | KW_BUILTIN_VA_LIST
-{
- $$ = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_va_list));
-}
- ;
-
-type_pack:
- TYPEPACK_IDENTIFIER
-{
- $$ = $1->find_type(current_scope, global_scope, false, current_lexer);
- if ($$ == nullptr) {
- yyerror(string("internal error resolving type ") + $1->get_fully_scoped_name(), @1);
- }
- assert($$ != nullptr);
-}
- ;
-
-type_decl:
- simple_type
-{
- $$ = CPPType::new_type($1);
-}
- | TYPENAME_IDENTIFIER
-{
- $$ = $1->find_type(current_scope, global_scope, false, current_lexer);
- if ($$ == nullptr) {
- yyerror(string("internal error resolving type ") + $1->get_fully_scoped_name(), @1);
- }
- assert($$ != nullptr);
-}
- | KW_TYPENAME name
-{
- $$ = CPPType::new_type(new CPPTBDType($2));
-}
- | anonymous_struct
-{
- $$ = CPPType::new_type($1);
-}
- | named_struct
-{
- $$ = new CPPTypeDeclaration(CPPType::new_type($1));
-}
- | enum
-{
- $$ = new CPPTypeDeclaration(CPPType::new_type($1));
-}
- | struct_keyword optional_attributes name
-{
- CPPType *type = $3->find_type(current_scope, global_scope, false, current_lexer);
- if (type != nullptr) {
- $$ = type;
- } else {
- CPPExtensionType *et =
- CPPType::new_type(new CPPExtensionType($1, $3, current_scope, @1.file, $2))
- ->as_extension_type();
- CPPScope *scope = $3->get_scope(current_scope, global_scope);
- if (scope != nullptr) {
- scope->define_extension_type(et);
- }
- $$ = et;
- }
-}
- | enum_keyword optional_attributes name_no_final ':' enum_element_type
-{
- CPPType *type = $3->find_type(current_scope, global_scope, false, current_lexer);
- if (type != nullptr) {
- $$ = type;
- } else {
- CPPExtensionType *et =
- CPPType::new_type(new CPPExtensionType($1, $3, current_scope, @1.file, $2))
- ->as_extension_type();
- CPPScope *scope = $3->get_scope(current_scope, global_scope);
- if (scope != nullptr) {
- scope->define_extension_type(et);
- }
- $$ = et;
- }
-}
- | enum_keyword optional_attributes name
-{
- yywarning(string("C++ does not permit forward declaration of untyped enum ") + $3->get_fully_scoped_name(), @1);
-
- CPPType *type = $3->find_type(current_scope, global_scope, false, current_lexer);
- if (type != nullptr) {
- $$ = type;
- } else {
- CPPExtensionType *et =
- CPPType::new_type(new CPPExtensionType($1, $3, current_scope, @1.file, $2))
- ->as_extension_type();
- CPPScope *scope = $3->get_scope(current_scope, global_scope);
- if (scope != nullptr) {
- scope->define_extension_type(et);
- }
- $$ = et;
- }
-}
- | KW_DECLTYPE '(' const_expr ')'
-{
- $$ = $3->determine_type();
- if ($$ == nullptr) {
- stringstream str;
- str << *$3;
- yyerror("could not determine type of " + str.str(), @3);
- }
-}
- | KW_DECLTYPE '(' KW_AUTO ')'
-{
- $$ = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_auto));
-}
- | KW_UNDERLYING_TYPE '(' full_type ')'
-{
- CPPEnumType *enum_type = $3->as_enum_type();
- if (enum_type == nullptr) {
- yyerror("an enumeration type is required", @3);
- $$ = $3;
- } else {
- $$ = enum_type->get_underlying_type();
- }
-}
- | KW_AUTO
-{
- $$ = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_auto));
-}
- | KW_BUILTIN_VA_LIST
-{
- $$ = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_va_list));
-}
- ;
-
-predefined_type:
- simple_type
-{
- $$ = CPPType::new_type($1);
-}
- | TYPENAME_IDENTIFIER
-{
- $$ = $1->find_type(current_scope, global_scope, false, current_lexer);
- if ($$ == nullptr) {
- yyerror(string("internal error resolving type ") + $1->get_fully_scoped_name(), @1);
- }
- assert($$ != nullptr);
-}
- | KW_TYPENAME name
-{
- $$ = CPPType::new_type(new CPPTBDType($2));
-}
- | struct_keyword optional_attributes name
-{
- CPPType *type = $3->find_type(current_scope, global_scope, false, current_lexer);
- if (type != nullptr) {
- $$ = type;
- } else {
- CPPExtensionType *et =
- CPPType::new_type(new CPPExtensionType($1, $3, current_scope, @1.file, $2))
- ->as_extension_type();
- CPPScope *scope = $3->get_scope(current_scope, global_scope);
- if (scope != nullptr) {
- scope->define_extension_type(et);
- }
- $$ = et;
- }
-}
- | enum_keyword optional_attributes name
-{
- CPPType *type = $3->find_type(current_scope, global_scope, false, current_lexer);
- if (type != nullptr) {
- $$ = type;
- } else {
- CPPExtensionType *et =
- CPPType::new_type(new CPPExtensionType($1, $3, current_scope, @1.file, $2))
- ->as_extension_type();
- CPPScope *scope = $3->get_scope(current_scope, global_scope);
- if (scope != nullptr) {
- scope->define_extension_type(et);
- }
- $$ = et;
- }
-}
- | KW_DECLTYPE '(' const_expr ')'
-{
- $$ = $3->determine_type();
- if ($$ == nullptr) {
- stringstream str;
- str << *$3;
- yyerror("could not determine type of " + str.str(), @3);
- }
-}
- | KW_UNDERLYING_TYPE '(' full_type ')'
-{
- CPPEnumType *enum_type = $3->as_enum_type();
- if (enum_type == nullptr) {
- yyerror("an enumeration type is required", @3);
- $$ = $3;
- } else {
- $$ = enum_type->get_underlying_type();
- }
-}
- | KW_AUTO
-{
- $$ = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_auto));
-}
- | KW_BUILTIN_VA_LIST
-{
- $$ = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_va_list));
-}
- ;
-
-var_type_decl:
- type_decl
-{
- $$ = $1;
-}
- | IDENTIFIER
-{
- yyerror(string("unknown type '") + $1->get_fully_scoped_name() + "'", @1);
-
- $$ = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_unknown));
-}
-
-full_type:
- type empty_instance_identifier
-{
- $$ = $2->unroll_type($1);
-}
- | KW_CONST type empty_instance_identifier
-{
- $3->add_modifier(IIT_const);
- $$ = $3->unroll_type($2);
-}
- | type_pack empty_instance_identifier
-{
- $$ = $2->unroll_type($1);
-}
- | KW_CONST type_pack empty_instance_identifier
-{
- $3->add_modifier(IIT_const);
- $$ = $3->unroll_type($2);
-}
- ;
-
-anonymous_struct:
- struct_keyword optional_attributes '{'
-{
- CPPVisibility starting_vis =
- ($1 == CPPExtensionType::T_class) ? V_private : V_public;
-
- CPPScope *new_scope = new CPPScope(current_scope, CPPNameComponent("anon"),
- starting_vis);
- CPPStructType *st = new CPPStructType($1, nullptr, current_scope,
- new_scope, @1.file, $2);
- new_scope->set_struct_type(st);
-
- push_scope(new_scope);
- push_struct(st);
-}
- cpp '}'
-{
- $$ = current_struct;
- current_struct->_incomplete = false;
- pop_struct();
- pop_scope();
-}
- ;
-
-named_struct:
- struct_keyword optional_attributes name_no_final
-{
- CPPVisibility starting_vis =
- ($1 == CPPExtensionType::T_class) ? V_private : V_public;
-
- CPPScope *scope = $3->get_scope(current_scope, global_scope, current_lexer);
- if (scope == nullptr) {
- scope = current_scope;
- }
- CPPScope *new_scope = new CPPScope(scope, $3->_names.back(),
- starting_vis);
-
- CPPStructType *st = new CPPStructType($1, $3, current_scope,
- new_scope, @1.file, $2);
- new_scope->set_struct_type(st);
- current_scope->define_extension_type(st);
-
- push_scope(new_scope);
- push_struct(st);
-}
- maybe_final maybe_class_derivation '{' cpp '}'
-{
- $$ = current_struct;
- current_struct->_incomplete = false;
- pop_struct();
- pop_scope();
-}
- ;
-
-maybe_final:
- empty
- | KW_FINAL
-{
- current_struct->_final = true;
-}
- ;
-
-maybe_class_derivation:
- empty
- | class_derivation
- ;
-
-class_derivation:
- ':' base_specification
- | class_derivation ',' base_specification
- ;
-
-base_specification:
- class_derivation_name
-{
- current_struct->append_derivation($1, V_unknown, false);
-}
- | KW_PUBLIC class_derivation_name
-{
- current_struct->append_derivation($2, V_public, false);
-}
- | KW_PROTECTED class_derivation_name
-{
- current_struct->append_derivation($2, V_protected, false);
-}
- | KW_PRIVATE class_derivation_name
-{
- current_struct->append_derivation($2, V_private, false);
-}
- | KW_VIRTUAL KW_PUBLIC class_derivation_name
-{
- current_struct->append_derivation($3, V_public, true);
-}
- | KW_VIRTUAL KW_PROTECTED class_derivation_name
-{
- current_struct->append_derivation($3, V_protected, true);
-}
- | KW_VIRTUAL KW_PRIVATE class_derivation_name
-{
- current_struct->append_derivation($3, V_private, true);
-}
- | KW_PUBLIC KW_VIRTUAL class_derivation_name
-{
- current_struct->append_derivation($3, V_public, true);
-}
- | KW_PROTECTED KW_VIRTUAL class_derivation_name
-{
- current_struct->append_derivation($3, V_protected, true);
-}
- | KW_PRIVATE KW_VIRTUAL class_derivation_name
-{
- current_struct->append_derivation($3, V_private, true);
-}
- ;
-
-enum:
- enum_decl
-{
- if (current_enum->_scope != nullptr) {
- push_scope(current_enum->_scope);
- }
-}
- '{' enum_body '}'
-{
- if (current_enum->_scope != nullptr) {
- pop_scope();
- }
- $$ = current_enum;
- current_enum = nullptr;
-}
- ;
-
-enum_decl:
- enum_keyword optional_attributes ':' enum_element_type
-{
- current_enum = new CPPEnumType($1, nullptr, $4, current_scope, nullptr, @1.file, $2);
-}
- | enum_keyword optional_attributes
-{
- current_enum = new CPPEnumType($1, nullptr, current_scope, nullptr, @1.file, $2);
-}
- | enum_keyword optional_attributes name_no_final ':' enum_element_type
-{
- CPPScope *new_scope = new CPPScope(current_scope, $3->_names.back(), V_public);
- current_enum = new CPPEnumType($1, $3, $5, current_scope, new_scope, @1.file, $2);
-}
- | enum_keyword optional_attributes name_no_final
-{
- CPPScope *new_scope = new CPPScope(current_scope, $3->_names.back(), V_public);
- current_enum = new CPPEnumType($1, $3, current_scope, new_scope, @1.file, $2);
-}
- ;
-
-enum_element_type:
- simple_int_type
-{
- $$ = CPPType::new_type($1);
-}
- | TYPENAME_IDENTIFIER
-{
- $$ = $1->find_type(current_scope, global_scope, false, current_lexer);
-}
- ;
-
-enum_body_trailing_comma:
- empty
- | enum_body_trailing_comma name optional_attributes ','
-{
- assert(current_enum != nullptr);
- current_enum->add_element($2->get_simple_name(), nullptr, current_lexer, @2, $3);
-}
- | enum_body_trailing_comma name optional_attributes '=' const_expr ','
-{
- assert(current_enum != nullptr);
- current_enum->add_element($2->get_simple_name(), $5, current_lexer, @2, $3);
-};
-
-enum_body:
- enum_body_trailing_comma
- | enum_body_trailing_comma name optional_attributes
-{
- assert(current_enum != nullptr);
- current_enum->add_element($2->get_simple_name(), nullptr, current_lexer, @2, $3);
-}
- | enum_body_trailing_comma name optional_attributes '=' const_expr
-{
- assert(current_enum != nullptr);
- current_enum->add_element($2->get_simple_name(), $5, current_lexer, @2, $3);
-}
- ;
-
-enum_keyword:
- KW_ENUM
-{
- $$ = CPPExtensionType::T_enum;
-}
- | KW_ENUM KW_CLASS
-{
- $$ = CPPExtensionType::T_enum_class;
-}
- | KW_ENUM KW_STRUCT
-{
- $$ = CPPExtensionType::T_enum_struct;
-}
- ;
-
-struct_keyword:
- KW_CLASS
-{
- $$ = CPPExtensionType::T_class;
-}
- | KW_STRUCT
-{
- $$ = CPPExtensionType::T_struct;
-}
- | KW_UNION
-{
- $$ = CPPExtensionType::T_union;
-}
- ;
-
-namespace_declaration:
- KW_NAMESPACE optional_attributes name '{'
-{
- CPPScope *scope = $3->find_scope(current_scope, global_scope, current_lexer);
- if (scope == nullptr) {
- // This must be a new namespace declaration.
- CPPScope *parent_scope =
- $3->get_scope(current_scope, global_scope, current_lexer);
- if (parent_scope == nullptr) {
- parent_scope = current_scope;
- }
- scope = new CPPScope(parent_scope, $3->_names.back(), V_public);
- }
-
- CPPNamespace *nspace = new CPPNamespace($3, scope, @1.file, $2);
- current_scope->add_declaration(nspace, global_scope, current_lexer, @1);
- current_scope->define_namespace(nspace);
- push_scope(scope);
-}
- cpp '}'
-{
- pop_scope();
-}
- | KW_INLINE KW_NAMESPACE name '{'
-{
- CPPScope *scope = $3->find_scope(current_scope, global_scope, current_lexer);
- if (scope == nullptr) {
- // This must be a new namespace declaration.
- CPPScope *parent_scope =
- $3->get_scope(current_scope, global_scope, current_lexer);
- if (parent_scope == nullptr) {
- parent_scope = current_scope;
- }
- scope = new CPPScope(parent_scope, $3->_names.back(), V_public);
- }
-
- CPPNamespace *nspace = new CPPNamespace($3, scope, @2.file);
- nspace->_is_inline = true;
- current_scope->add_declaration(nspace, global_scope, current_lexer, @2);
- current_scope->define_namespace(nspace);
- push_scope(scope);
-}
- cpp '}'
-{
- pop_scope();
-}
- | KW_NAMESPACE '{' cpp '}'
- | KW_INLINE KW_NAMESPACE '{' cpp '}'
- ;
-
-using_declaration:
- KW_USING name ';'
-{
- CPPUsing *using_decl = new CPPUsing($2, false, @1.file);
- current_scope->add_declaration(using_decl, global_scope, current_lexer, @1);
- current_scope->add_using(using_decl, global_scope, current_lexer);
-}
- | KW_USING name optional_attributes '=' full_type ';'
-{
- // This is really just an alternative way to declare a typedef.
- CPPTypedefType *typedef_type = new CPPTypedefType($5, $2, current_scope, $3);
- typedef_type->_using = true;
- current_scope->add_declaration(CPPType::new_type(typedef_type), global_scope, current_lexer, @1);
-}
- | KW_USING KW_NAMESPACE name ';'
-{
- CPPUsing *using_decl = new CPPUsing($3, true, @1.file);
- current_scope->add_declaration(using_decl, global_scope, current_lexer, @1);
- current_scope->add_using(using_decl, global_scope, current_lexer);
-}
- | KW_USING KW_ENUM name ';'
-{
- CPPUsing *using_decl = new CPPUsing($3, false, @1.file);
- current_scope->add_declaration(using_decl, global_scope, current_lexer, @1);
- current_scope->add_using(using_decl, global_scope, current_lexer);
-}
- ;
-
-simple_type:
- simple_int_type
- | simple_float_type
- | simple_void_type
- ;
-
-simple_int_type:
- KW_BOOL
-{
- $$ = new CPPSimpleType(CPPSimpleType::T_bool);
-}
- | KW_CHAR
-{
- $$ = new CPPSimpleType(CPPSimpleType::T_char);
-}
- | KW_WCHAR_T
-{
- $$ = new CPPSimpleType(CPPSimpleType::T_wchar_t);
-}
- | KW_CHAR8_T
-{
- $$ = new CPPSimpleType(CPPSimpleType::T_char8_t);
-}
- | KW_CHAR16_T
-{
- $$ = new CPPSimpleType(CPPSimpleType::T_char16_t);
-}
- | KW_CHAR32_T
-{
- $$ = new CPPSimpleType(CPPSimpleType::T_char32_t);
-}
- | KW_SHORT
-{
- $$ = new CPPSimpleType(CPPSimpleType::T_int,
- CPPSimpleType::F_short);
-}
- | KW_LONG
-{
- $$ = new CPPSimpleType(CPPSimpleType::T_int,
- CPPSimpleType::F_long);
-}
- | KW_UNSIGNED
-{
- $$ = new CPPSimpleType(CPPSimpleType::T_int,
- CPPSimpleType::F_unsigned);
-}
- | KW_SIGNED
-{
- $$ = new CPPSimpleType(CPPSimpleType::T_int,
- CPPSimpleType::F_signed);
-}
- | KW_INT
-{
- $$ = new CPPSimpleType(CPPSimpleType::T_int);
-}
- | KW_SHORT simple_int_type
-{
- $$ = $2;
- $$->_flags |= CPPSimpleType::F_short;
-}
- | KW_LONG simple_int_type
-{
- $$ = $2;
- if ($$->_flags & CPPSimpleType::F_long) {
- $$->_flags |= CPPSimpleType::F_longlong;
- } else {
- $$->_flags |= CPPSimpleType::F_long;
- }
-}
- | KW_UNSIGNED simple_int_type
-{
- $$ = $2;
- $$->_flags |= CPPSimpleType::F_unsigned;
-}
- | KW_SIGNED simple_int_type
-{
- $$ = $2;
- $$->_flags |= CPPSimpleType::F_signed;
-}
- ;
-
-simple_float_type:
- KW_FLOAT
-{
- $$ = new CPPSimpleType(CPPSimpleType::T_float);
-}
- | KW_DOUBLE
-{
- $$ = new CPPSimpleType(CPPSimpleType::T_double);
-}
- | KW_LONG KW_DOUBLE
-{
- $$ = new CPPSimpleType(CPPSimpleType::T_double,
- CPPSimpleType::F_long);
-}
- ;
-
-simple_void_type:
- KW_VOID
-{
- $$ = new CPPSimpleType(CPPSimpleType::T_void);
-}
- ;
-
-/* We don't care what the code is. We just want to be sure we match
- up opening and closing braces properly. For anything else, we'll
- accept just token salad. */
-code:
-{
- current_lexer->_resolve_identifiers = false;
-}
- code_block
-{
- current_lexer->_resolve_identifiers = true;
-}
- ;
-
-code_block:
- empty
- | code_block element
- ;
-
-element:
- REAL
- | INTEGER
- | SIMPLE_STRING
- | STRING_LITERAL
- | CUSTOM_LITERAL
- | CHAR_TOK
- | IDENTIFIER
- | TYPENAME_IDENTIFIER
- | TYPEPACK_IDENTIFIER
- | SCOPING
- | SIMPLE_IDENTIFIER
- | ELLIPSIS | OROR | ANDAND
- | EQCOMPARE | NECOMPARE | LECOMPARE | GECOMPARE | SPACESHIP
- | LSHIFT | RSHIFT | POINTSAT_STAR | DOT_STAR | POINTSAT
- | SCOPE | PLUSPLUS | MINUSMINUS
- | TIMESEQUAL | DIVIDEEQUAL | MODEQUAL | PLUSEQUAL | MINUSEQUAL
- | OREQUAL | ANDEQUAL | XOREQUAL | LSHIFTEQUAL | RSHIFTEQUAL
- | ATTR_LEFT | ATTR_RIGHT
- | KW_ALIGNAS | KW_ALIGNOF | KW_AUTO | KW_BOOL | KW_BUILTIN_VA_LIST
- | KW_CATCH | KW_CHAR | KW_CHAR8_T | KW_CHAR16_T | KW_CHAR32_T | KW_CLASS
- | KW_CONST | KW_CONSTEVAL | KW_CONSTEXPR | KW_CONSTINIT | KW_CONST_CAST
- | KW_DECLTYPE | KW_DEFAULT | KW_DELETE | KW_DOUBLE | KW_DYNAMIC_CAST
- | KW_ELSE | KW_ENUM | KW_EXTERN | KW_EXPLICIT | KW_EXPLICIT_LPAREN
- | KW_FALSE | KW_FINAL | KW_FLOAT | KW_FRIEND | KW_FOR
- | KW_GOTO | KW_IF | KW_INLINE | KW_INT | KW_LONG | KW_MUTABLE
- | KW_NAMESPACE | KW_NEW | KW_NOEXCEPT | KW_NOEXCEPT_LPAREN | KW_NULLPTR
- | KW_OPERATOR | KW_OVERRIDE | KW_PRIVATE | KW_PROTECTED
- | KW_PUBLIC | KW_PUBLISHED | KW_REGISTER | KW_REINTERPRET_CAST
- | KW_RESTRICT | KW_RETURN | KW_SHORT | KW_SIGNED | KW_SIZEOF | KW_STATIC
- | KW_STATIC_ASSERT | KW_STATIC_CAST | KW_STRUCT | KW_TEMPLATE
- | KW_THREAD_LOCAL | KW_THROW | KW_TRUE | KW_TRY | KW_TYPEDEF
- | KW_TYPEID | KW_TYPENAME | KW_UNDERLYING_TYPE | KW_UNION
- | KW_UNSIGNED | KW_USING | KW_VIRTUAL | KW_VOID | KW_VOLATILE
- | KW_WCHAR_T | KW_WHILE
-{
-}
- | '+' | '-' | '*' | '/' | '&' | '|' | '^' | '!' | '~' | '=' | '%'
- | '<' | '>' | '(' | ')' | '.' | ',' | ';' | ':' | '[' | ']'
- | '?' | '{' code_block '}'
- ;
-
-optional_const_expr:
- empty
-{
- $$ = nullptr;
-}
- | const_expr
-{
- $$ = $1;
-}
- ;
-
-optional_const_expr_comma:
- empty
-{
- $$ = nullptr;
-}
- | const_expr_comma
-{
- $$ = $1;
-}
- ;
-
-const_expr_comma:
- const_expr
-{
- $$ = $1;
-}
- | const_expr_comma ',' const_expr
-{
- $$ = new CPPExpression(',', $1, $3);
-}
- ;
-
-no_angle_bracket_const_expr:
- const_operand
-{
- $$ = $1;
-}
- | '(' full_type ')' no_angle_bracket_const_expr %prec UNARY
-{
- $$ = new CPPExpression(CPPExpression::typecast_op($2, $4));
-}
- | KW_STATIC_CAST '<' full_type '>' '(' const_expr_comma ')'
-{
- $$ = new CPPExpression(CPPExpression::typecast_op($3, $6, CPPExpression::T_static_cast));
-}
- | KW_DYNAMIC_CAST '<' full_type '>' '(' const_expr_comma ')'
-{
- $$ = new CPPExpression(CPPExpression::typecast_op($3, $6, CPPExpression::T_dynamic_cast));
-}
- | KW_CONST_CAST '<' full_type '>' '(' const_expr_comma ')'
-{
- $$ = new CPPExpression(CPPExpression::typecast_op($3, $6, CPPExpression::T_const_cast));
-}
- | KW_REINTERPRET_CAST '<' full_type '>' '(' const_expr_comma ')'
-{
- $$ = new CPPExpression(CPPExpression::typecast_op($3, $6, CPPExpression::T_reinterpret_cast));
-}
- | KW_SIZEOF '(' full_type ')' %prec UNARY
-{
- $$ = new CPPExpression(CPPExpression::sizeof_func($3));
-}
- | KW_SIZEOF no_angle_bracket_const_expr %prec UNARY
-{
- $$ = new CPPExpression(CPPExpression::sizeof_func($2));
-}
- | KW_SIZEOF ELLIPSIS '(' name ')' %prec UNARY
-{
- $$ = new CPPExpression(CPPExpression::sizeof_ellipsis_func($4));
-}
- | KW_ALIGNOF '(' full_type ')' %prec UNARY
-{
- $$ = new CPPExpression(CPPExpression::alignof_func($3));
-}
- | '!' no_angle_bracket_const_expr %prec UNARY
-{
- $$ = new CPPExpression(UNARY_NOT, $2);
-}
- | '~' no_angle_bracket_const_expr %prec UNARY
-{
- $$ = new CPPExpression(UNARY_NEGATE, $2);
-}
- | '-' no_angle_bracket_const_expr %prec UNARY
-{
- $$ = new CPPExpression(UNARY_MINUS, $2);
-}
- | '+' no_angle_bracket_const_expr %prec UNARY
-{
- $$ = new CPPExpression(UNARY_PLUS, $2);
-}
- | '*' no_angle_bracket_const_expr %prec UNARY
-{
- $$ = new CPPExpression(UNARY_STAR, $2);
-}
- | '&' no_angle_bracket_const_expr %prec UNARY
-{
- $$ = new CPPExpression(UNARY_REF, $2);
-}
- | no_angle_bracket_const_expr '*' no_angle_bracket_const_expr
-{
- $$ = new CPPExpression('*', $1, $3);
-}
- | no_angle_bracket_const_expr '/' no_angle_bracket_const_expr
-{
- $$ = new CPPExpression('/', $1, $3);
-}
- | no_angle_bracket_const_expr '%' no_angle_bracket_const_expr
-{
- $$ = new CPPExpression('%', $1, $3);
-}
- | no_angle_bracket_const_expr '+' no_angle_bracket_const_expr
-{
- $$ = new CPPExpression('+', $1, $3);
-}
- | no_angle_bracket_const_expr '-' no_angle_bracket_const_expr
-{
- $$ = new CPPExpression('-', $1, $3);
-}
- | no_angle_bracket_const_expr '|' no_angle_bracket_const_expr
-{
- $$ = new CPPExpression('|', $1, $3);
-}
- | no_angle_bracket_const_expr '^' no_angle_bracket_const_expr
-{
- $$ = new CPPExpression('^', $1, $3);
-}
- | no_angle_bracket_const_expr '&' no_angle_bracket_const_expr
-{
- $$ = new CPPExpression('&', $1, $3);
-}
- | no_angle_bracket_const_expr OROR no_angle_bracket_const_expr
-{
- $$ = new CPPExpression(OROR, $1, $3);
-}
- | no_angle_bracket_const_expr ANDAND no_angle_bracket_const_expr
-{
- $$ = new CPPExpression(ANDAND, $1, $3);
-}
- | no_angle_bracket_const_expr EQCOMPARE no_angle_bracket_const_expr
-{
- $$ = new CPPExpression(EQCOMPARE, $1, $3);
-}
- | no_angle_bracket_const_expr NECOMPARE no_angle_bracket_const_expr
-{
- $$ = new CPPExpression(NECOMPARE, $1, $3);
-}
- | no_angle_bracket_const_expr LECOMPARE no_angle_bracket_const_expr
-{
- $$ = new CPPExpression(LECOMPARE, $1, $3);
-}
- | no_angle_bracket_const_expr GECOMPARE no_angle_bracket_const_expr
-{
- $$ = new CPPExpression(GECOMPARE, $1, $3);
-}
- | no_angle_bracket_const_expr SPACESHIP no_angle_bracket_const_expr
-{
- $$ = new CPPExpression(SPACESHIP, $1, $3);
-}
- | no_angle_bracket_const_expr LSHIFT no_angle_bracket_const_expr
-{
- $$ = new CPPExpression(LSHIFT, $1, $3);
-}
- | no_angle_bracket_const_expr RSHIFT no_angle_bracket_const_expr
-{
- $$ = new CPPExpression(RSHIFT, $1, $3);
-}
- | no_angle_bracket_const_expr '?' no_angle_bracket_const_expr ':' no_angle_bracket_const_expr
-{
- $$ = new CPPExpression('?', $1, $3, $5);
-}
- | no_angle_bracket_const_expr '[' const_expr ']'
-{
- $$ = new CPPExpression('[', $1, $3);
-}
- | no_angle_bracket_const_expr '(' const_expr_comma ')'
-{
- $$ = new CPPExpression('f', $1, $3);
-}
- | no_angle_bracket_const_expr '(' ')'
-{
- $$ = new CPPExpression('f', $1);
-}
- | no_angle_bracket_const_expr '.' name
-{
- $$ = new CPPExpression('.', $1, new CPPExpression($3, current_scope, global_scope, current_lexer));
-}
- | no_angle_bracket_const_expr POINTSAT no_angle_bracket_const_expr
-{
- $$ = new CPPExpression(POINTSAT, $1, $3);
-}
- | '(' const_expr_comma ')'
-{
- $$ = $2;
-}
- ;
-
-
-const_expr:
- const_operand
-{
- $$ = $1;
-}
- | '(' full_type ')' const_expr %prec UNARY
-{
- $$ = new CPPExpression(CPPExpression::typecast_op($2, $4));
-}
- | KW_STATIC_CAST '<' full_type '>' '(' const_expr_comma ')'
-{
- $$ = new CPPExpression(CPPExpression::typecast_op($3, $6, CPPExpression::T_static_cast));
-}
- | KW_DYNAMIC_CAST '<' full_type '>' '(' const_expr_comma ')'
-{
- $$ = new CPPExpression(CPPExpression::typecast_op($3, $6, CPPExpression::T_dynamic_cast));
-}
- | KW_CONST_CAST '<' full_type '>' '(' const_expr_comma ')'
-{
- $$ = new CPPExpression(CPPExpression::typecast_op($3, $6, CPPExpression::T_const_cast));
-}
- | KW_REINTERPRET_CAST '<' full_type '>' '(' const_expr_comma ')'
-{
- $$ = new CPPExpression(CPPExpression::typecast_op($3, $6, CPPExpression::T_reinterpret_cast));
-}
- | TYPENAME_IDENTIFIER '(' optional_const_expr_comma ')'
-{
- // A constructor call.
- CPPType *type = $1->find_type(current_scope, global_scope, false, current_lexer);
- if (type == nullptr) {
- yyerror(string("internal error resolving type ") + $1->get_fully_scoped_name(), @1);
- }
- assert(type != nullptr);
- $$ = new CPPExpression(CPPExpression::construct_op(type, $3));
-}
- | TYPENAME_IDENTIFIER '{' optional_const_expr_comma '}'
-{
- // Aggregate initialization.
- CPPType *type = $1->find_type(current_scope, global_scope, false, current_lexer);
- if (type == nullptr) {
- yyerror(string("internal error resolving type ") + $1->get_fully_scoped_name(), @1);
- }
- assert(type != nullptr);
- $$ = new CPPExpression(CPPExpression::aggregate_init_op(type, $3));
-}
- | KW_INT '(' optional_const_expr_comma ')'
-{
- CPPType *type =
- CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int));
- $$ = new CPPExpression(CPPExpression::construct_op(type, $3));
-}
- | KW_CHAR '(' optional_const_expr_comma ')'
-{
- CPPType *type =
- CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char));
- $$ = new CPPExpression(CPPExpression::construct_op(type, $3));
-}
- | KW_WCHAR_T '(' optional_const_expr_comma ')'
-{
- CPPType *type =
- CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_wchar_t));
- $$ = new CPPExpression(CPPExpression::construct_op(type, $3));
-}
- | KW_CHAR8_T '(' optional_const_expr_comma ')'
-{
- CPPType *type =
- CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char8_t));
- $$ = new CPPExpression(CPPExpression::construct_op(type, $3));
-}
- | KW_CHAR16_T '(' optional_const_expr_comma ')'
-{
- CPPType *type =
- CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char16_t));
- $$ = new CPPExpression(CPPExpression::construct_op(type, $3));
-}
- | KW_CHAR32_T '(' optional_const_expr_comma ')'
-{
- CPPType *type =
- CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char32_t));
- $$ = new CPPExpression(CPPExpression::construct_op(type, $3));
-}
- | KW_BOOL '(' optional_const_expr_comma ')'
-{
- CPPType *type =
- CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_bool));
- $$ = new CPPExpression(CPPExpression::construct_op(type, $3));
-}
- | KW_SHORT '(' optional_const_expr_comma ')'
-{
- CPPType *type =
- CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int,
- CPPSimpleType::F_short));
- $$ = new CPPExpression(CPPExpression::construct_op(type, $3));
-}
- | KW_LONG '(' optional_const_expr_comma ')'
-{
- CPPType *type =
- CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int,
- CPPSimpleType::F_long));
- $$ = new CPPExpression(CPPExpression::construct_op(type, $3));
-}
- | KW_UNSIGNED '(' optional_const_expr_comma ')'
-{
- CPPType *type =
- CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int,
- CPPSimpleType::F_unsigned));
- $$ = new CPPExpression(CPPExpression::construct_op(type, $3));
-}
- | KW_SIGNED '(' optional_const_expr_comma ')'
-{
- CPPType *type =
- CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int,
- CPPSimpleType::F_signed));
- $$ = new CPPExpression(CPPExpression::construct_op(type, $3));
-}
- | KW_FLOAT '(' optional_const_expr_comma ')'
-{
- CPPType *type =
- CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_float));
- $$ = new CPPExpression(CPPExpression::construct_op(type, $3));
-}
- | KW_DOUBLE '(' optional_const_expr_comma ')'
-{
- CPPType *type =
- CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_double));
- $$ = new CPPExpression(CPPExpression::construct_op(type, $3));
-}
- | KW_SIZEOF '(' full_type ')' %prec UNARY
-{
- $$ = new CPPExpression(CPPExpression::sizeof_func($3));
-}
- | KW_SIZEOF const_expr %prec UNARY
-{
- $$ = new CPPExpression(CPPExpression::sizeof_func($2));
-}
- | KW_SIZEOF ELLIPSIS '(' name ')' %prec UNARY
-{
- $$ = new CPPExpression(CPPExpression::sizeof_ellipsis_func($4));
-}
- | KW_ALIGNOF '(' full_type ')' %prec UNARY
-{
- $$ = new CPPExpression(CPPExpression::alignof_func($3));
-}
- | KW_NEW predefined_type %prec UNARY
-{
- $$ = new CPPExpression(CPPExpression::new_op($2));
-}
- | KW_NEW predefined_type '(' optional_const_expr_comma ')' %prec UNARY
-{
- $$ = new CPPExpression(CPPExpression::new_op($2, $4));
-}
- | KW_TYPEID '(' full_type ')'
-{
- CPPIdentifier ident("");
- ident.add_name("std");
- ident.add_name("type_info");
- CPPType *std_type_info = ident.find_type(current_scope, global_scope, false, current_lexer);
- if (!std_type_info) {
- yywarning("cannot use typeid before including ", @1);
- }
- $$ = new CPPExpression(CPPExpression::typeid_op($3, std_type_info));
-}
- | KW_TYPEID '(' const_expr ')'
-{
- CPPIdentifier ident("");
- ident.add_name("std");
- ident.add_name("type_info");
- CPPType *std_type_info = ident.find_type(current_scope, global_scope, false, current_lexer);
- if (!std_type_info) {
- yywarning("cannot use typeid before including ", @1);
- }
- $$ = new CPPExpression(CPPExpression::typeid_op($3, std_type_info));
-}
- | '!' const_expr %prec UNARY
-{
- $$ = new CPPExpression(UNARY_NOT, $2);
-}
- | '~' const_expr %prec UNARY
-{
- $$ = new CPPExpression(UNARY_NEGATE, $2);
-}
- | '-' const_expr %prec UNARY
-{
- $$ = new CPPExpression(UNARY_MINUS, $2);
-}
- | '+' const_expr %prec UNARY
-{
- $$ = new CPPExpression(UNARY_PLUS, $2);
-}
- | '*' const_expr %prec UNARY
-{
- $$ = new CPPExpression(UNARY_STAR, $2);
-}
- | '&' const_expr %prec UNARY
-{
- $$ = new CPPExpression(UNARY_REF, $2);
-}
- | const_expr '*' const_expr
-{
- $$ = new CPPExpression('*', $1, $3);
-}
- | const_expr '/' const_expr
-{
- $$ = new CPPExpression('/', $1, $3);
-}
- | const_expr '%' const_expr
-{
- $$ = new CPPExpression('%', $1, $3);
-}
- | const_expr '+' const_expr
-{
- $$ = new CPPExpression('+', $1, $3);
-}
- | const_expr '-' const_expr
-{
- $$ = new CPPExpression('-', $1, $3);
-}
- | const_expr '|' const_expr
-{
- $$ = new CPPExpression('|', $1, $3);
-}
- | const_expr '^' const_expr
-{
- $$ = new CPPExpression('^', $1, $3);
-}
- | const_expr '&' const_expr
-{
- $$ = new CPPExpression('&', $1, $3);
-}
- | const_expr OROR const_expr
-{
- $$ = new CPPExpression(OROR, $1, $3);
-}
- | const_expr ANDAND const_expr
-{
- $$ = new CPPExpression(ANDAND, $1, $3);
-}
- | const_expr EQCOMPARE const_expr
-{
- $$ = new CPPExpression(EQCOMPARE, $1, $3);
-}
- | const_expr NECOMPARE const_expr
-{
- $$ = new CPPExpression(NECOMPARE, $1, $3);
-}
- | const_expr LECOMPARE const_expr
-{
- $$ = new CPPExpression(LECOMPARE, $1, $3);
-}
- | const_expr GECOMPARE const_expr
-{
- $$ = new CPPExpression(GECOMPARE, $1, $3);
-}
- | const_expr SPACESHIP const_expr
-{
- $$ = new CPPExpression(SPACESHIP, $1, $3);
-}
- | const_expr '<' const_expr
-{
- $$ = new CPPExpression('<', $1, $3);
-}
- | const_expr '>' const_expr
-{
- $$ = new CPPExpression('>', $1, $3);
-}
- | const_expr LSHIFT const_expr
-{
- $$ = new CPPExpression(LSHIFT, $1, $3);
-}
- | const_expr RSHIFT const_expr
-{
- $$ = new CPPExpression(RSHIFT, $1, $3);
-}
- | const_expr '?' const_expr ':' const_expr
-{
- $$ = new CPPExpression('?', $1, $3, $5);
-}
- | const_expr '[' const_expr ']'
-{
- $$ = new CPPExpression('[', $1, $3);
-}
- | const_expr '(' const_expr_comma ')'
-{
- $$ = new CPPExpression('f', $1, $3);
-}
- | const_expr '(' ')'
-{
- $$ = new CPPExpression('f', $1);
-}
- | KW_NOEXCEPT_LPAREN const_expr ')'
-{
- $$ = new CPPExpression(KW_NOEXCEPT, $2);
-}
- | const_expr '.' name
-{
- $$ = new CPPExpression('.', $1, new CPPExpression($3, current_scope, global_scope, current_lexer));
-}
- | const_expr POINTSAT const_expr
-{
- $$ = new CPPExpression(POINTSAT, $1, $3);
-}
- | '(' const_expr_comma ')'
-{
- $$ = $2;
-}
- ;
-
-const_operand:
- INTEGER
-{
- $$ = new CPPExpression($1);
-}
- | KW_TRUE
-{
- $$ = new CPPExpression(true);
-}
- | KW_FALSE
-{
- $$ = new CPPExpression(false);
-}
- | CHAR_TOK
-{
- $$ = new CPPExpression($1);
-}
- | REAL
-{
- $$ = new CPPExpression($1);
-}
- | string_literal
-{
- $$ = $1;
-}
- | CUSTOM_LITERAL
-{
- $$ = $1;
-}
- | IDENTIFIER
-{
- $$ = new CPPExpression($1, current_scope, global_scope, current_lexer);
-}
- | KW_FINAL
-{
- // A variable named "final". C++11 explicitly permits this.
- CPPIdentifier *ident = new CPPIdentifier("final", @1);
- $$ = new CPPExpression(ident, current_scope, global_scope, current_lexer);
-}
- | KW_OVERRIDE
-{
- // A variable named "override". C++11 explicitly permits this.
- CPPIdentifier *ident = new CPPIdentifier("override", @1);
- $$ = new CPPExpression(ident, current_scope, global_scope, current_lexer);
-}
- | KW_NULLPTR
-{
- $$ = new CPPExpression(CPPExpression::get_nullptr());
-}
- | '[' capture_list ']' function_post optional_attributes maybe_trailing_return_type '{' code '}'
-{
- $2->_flags = $4;
- $2->_attributes = $5;
- $2->_return_type = $6;
- $$ = new CPPExpression(CPPExpression::lambda($2));
-}
- | '[' capture_list ']' '(' function_parameter_list ')' function_post optional_attributes maybe_trailing_return_type '{' code '}'
-{
- $2->_parameters = $5;
- $2->_flags = $7;
- $2->_attributes = $8;
- $2->_return_type = $9;
- $$ = new CPPExpression(CPPExpression::lambda($2));
-}
- | KW_HAS_VIRTUAL_DESTRUCTOR '(' full_type ')'
-{
- $$ = new CPPExpression(CPPExpression::type_trait(KW_HAS_VIRTUAL_DESTRUCTOR, $3));
-}
- | KW_IS_ABSTRACT '(' full_type ')'
-{
- $$ = new CPPExpression(CPPExpression::type_trait(KW_IS_ABSTRACT, $3));
-}
- | KW_IS_BASE_OF '(' full_type ',' full_type ')'
-{
- $$ = new CPPExpression(CPPExpression::type_trait(KW_IS_CLASS, $3, $5));
-}
- | KW_IS_CLASS '(' full_type ')'
-{
- $$ = new CPPExpression(CPPExpression::type_trait(KW_IS_CLASS, $3));
-}
- | KW_IS_CONSTRUCTIBLE '(' full_type ')'
-{
- $$ = new CPPExpression(CPPExpression::type_trait(KW_IS_CONSTRUCTIBLE, $3));
-}
- | KW_IS_CONSTRUCTIBLE '(' full_type ',' full_type ')'
-{
- $$ = new CPPExpression(CPPExpression::type_trait(KW_IS_CONSTRUCTIBLE, $3, $5));
-}
- | KW_IS_CONVERTIBLE_TO '(' full_type ',' full_type ')'
-{
- $$ = new CPPExpression(CPPExpression::type_trait(KW_IS_CONVERTIBLE_TO, $3, $5));
-}
- | KW_IS_DESTRUCTIBLE '(' full_type ')'
-{
- $$ = new CPPExpression(CPPExpression::type_trait(KW_IS_DESTRUCTIBLE, $3));
-}
- | KW_IS_EMPTY '(' full_type ')'
-{
- $$ = new CPPExpression(CPPExpression::type_trait(KW_IS_EMPTY, $3));
-}
- | KW_IS_ENUM '(' full_type ')'
-{
- $$ = new CPPExpression(CPPExpression::type_trait(KW_IS_ENUM, $3));
-}
- | KW_IS_FINAL '(' full_type ')'
-{
- $$ = new CPPExpression(CPPExpression::type_trait(KW_IS_FINAL, $3));
-}
- | KW_IS_FUNDAMENTAL '(' full_type ')'
-{
- $$ = new CPPExpression(CPPExpression::type_trait(KW_IS_FUNDAMENTAL, $3));
-}
- | KW_IS_POD '(' full_type ')'
-{
- $$ = new CPPExpression(CPPExpression::type_trait(KW_IS_POD, $3));
-}
- | KW_IS_POLYMORPHIC '(' full_type ')'
-{
- $$ = new CPPExpression(CPPExpression::type_trait(KW_IS_POLYMORPHIC, $3));
-}
- | KW_IS_STANDARD_LAYOUT '(' full_type ')'
-{
- $$ = new CPPExpression(CPPExpression::type_trait(KW_IS_STANDARD_LAYOUT, $3));
-}
- | KW_IS_TRIVIAL '(' full_type ')'
-{
- $$ = new CPPExpression(CPPExpression::type_trait(KW_IS_TRIVIAL, $3));
-}
- | KW_IS_TRIVIALLY_COPYABLE '(' full_type ')'
-{
- $$ = new CPPExpression(CPPExpression::type_trait(KW_IS_TRIVIALLY_COPYABLE, $3));
-}
- | KW_IS_UNION '(' full_type ')'
-{
- $$ = new CPPExpression(CPPExpression::type_trait(KW_IS_UNION, $3));
-}
- ;
-
-/* This is used for a const_expr as a "formal parameter", which really
- means an instance declaration using a parameter list (which looks a
- lot like a function prototype). It differs from const_expr mainly
- in that it forbids some expressions unless they are parenthesized,
- to avoid shift/reduce conflicts with the actual formal parameter
- definition. */
-
-formal_const_expr:
- formal_const_operand
-{
- $$ = $1;
-}
- | '(' full_type ')' const_expr %prec UNARY
-{
- $$ = new CPPExpression(CPPExpression::typecast_op($2, $4));
-}
- | KW_STATIC_CAST '<' full_type '>' '(' const_expr_comma ')'
-{
- $$ = new CPPExpression(CPPExpression::typecast_op($3, $6, CPPExpression::T_static_cast));
-}
- | KW_DYNAMIC_CAST '<' full_type '>' '(' const_expr_comma ')'
-{
- $$ = new CPPExpression(CPPExpression::typecast_op($3, $6, CPPExpression::T_dynamic_cast));
-}
- | KW_CONST_CAST '<' full_type '>' '(' const_expr_comma ')'
-{
- $$ = new CPPExpression(CPPExpression::typecast_op($3, $6, CPPExpression::T_const_cast));
-}
- | KW_REINTERPRET_CAST '<' full_type '>' '(' const_expr_comma ')'
-{
- $$ = new CPPExpression(CPPExpression::typecast_op($3, $6, CPPExpression::T_reinterpret_cast));
-}
- | KW_SIZEOF '(' full_type ')' %prec UNARY
-{
- $$ = new CPPExpression(CPPExpression::sizeof_func($3));
-}
- | KW_SIZEOF formal_const_expr %prec UNARY
-{
- $$ = new CPPExpression(CPPExpression::sizeof_func($2));
-}
- | KW_SIZEOF ELLIPSIS '(' name ')' %prec UNARY
-{
- $$ = new CPPExpression(CPPExpression::sizeof_ellipsis_func($4));
-}
- | KW_ALIGNOF '(' full_type ')' %prec UNARY
-{
- $$ = new CPPExpression(CPPExpression::alignof_func($3));
-}
- | KW_NEW predefined_type %prec UNARY
-{
- $$ = new CPPExpression(CPPExpression::new_op($2));
-}
- | KW_NEW predefined_type '(' optional_const_expr_comma ')' %prec UNARY
-{
- $$ = new CPPExpression(CPPExpression::new_op($2, $4));
-}
- | KW_TYPEID '(' full_type ')'
-{
- CPPIdentifier ident("");
- ident.add_name("std");
- ident.add_name("type_info");
- CPPType *std_type_info = ident.find_type(current_scope, global_scope, false, current_lexer);
- if (!std_type_info) {
- yywarning("cannot use typeid before including ", @1);
- }
- $$ = new CPPExpression(CPPExpression::typeid_op($3, std_type_info));
-}
- | KW_TYPEID '(' const_expr ')'
-{
- CPPIdentifier ident("");
- ident.add_name("std");
- ident.add_name("type_info");
- CPPType *std_type_info = ident.find_type(current_scope, global_scope, false, current_lexer);
- if (!std_type_info) {
- yywarning("cannot use typeid before including ", @1);
- }
- $$ = new CPPExpression(CPPExpression::typeid_op($3, std_type_info));
-}
- | '!' const_expr %prec UNARY
-{
- $$ = new CPPExpression(UNARY_NOT, $2);
-}
- | '~' const_expr %prec UNARY
-{
- $$ = new CPPExpression(UNARY_NEGATE, $2);
-}
- | '-' const_expr %prec UNARY
-{
- $$ = new CPPExpression(UNARY_MINUS, $2);
-}
- | '+' const_expr %prec UNARY
-{
- $$ = new CPPExpression(UNARY_PLUS, $2);
-}
- | '&' const_expr %prec UNARY
-{
- $$ = new CPPExpression(UNARY_REF, $2);
-}
- | formal_const_expr '*' const_expr
-{
- $$ = new CPPExpression('*', $1, $3);
-}
- | formal_const_expr '/' const_expr
-{
- $$ = new CPPExpression('/', $1, $3);
-}
- | formal_const_expr '%' const_expr
-{
- $$ = new CPPExpression('%', $1, $3);
-}
- | formal_const_expr '+' const_expr
-{
- $$ = new CPPExpression('+', $1, $3);
-}
- | formal_const_expr '-' const_expr
-{
- $$ = new CPPExpression('-', $1, $3);
-}
- | formal_const_expr '|' const_expr
-{
- $$ = new CPPExpression('|', $1, $3);
-}
- | formal_const_expr '^' const_expr
-{
- $$ = new CPPExpression('^', $1, $3);
-}
- | formal_const_expr '&' const_expr
-{
- $$ = new CPPExpression('&', $1, $3);
-}
- | formal_const_expr OROR const_expr
-{
- $$ = new CPPExpression(OROR, $1, $3);
-}
- | formal_const_expr ANDAND const_expr
-{
- $$ = new CPPExpression(ANDAND, $1, $3);
-}
- | formal_const_expr EQCOMPARE const_expr
-{
- $$ = new CPPExpression(EQCOMPARE, $1, $3);
-}
- | formal_const_expr NECOMPARE const_expr
-{
- $$ = new CPPExpression(NECOMPARE, $1, $3);
-}
- | formal_const_expr LECOMPARE const_expr
-{
- $$ = new CPPExpression(LECOMPARE, $1, $3);
-}
- | formal_const_expr GECOMPARE const_expr
-{
- $$ = new CPPExpression(GECOMPARE, $1, $3);
-}
- | formal_const_expr SPACESHIP const_expr
-{
- $$ = new CPPExpression(SPACESHIP, $1, $3);
-}
- | formal_const_expr '<' const_expr
-{
- $$ = new CPPExpression('<', $1, $3);
-}
- | formal_const_expr '>' const_expr
-{
- $$ = new CPPExpression('>', $1, $3);
-}
- | formal_const_expr LSHIFT const_expr
-{
- $$ = new CPPExpression(LSHIFT, $1, $3);
-}
- | formal_const_expr RSHIFT const_expr
-{
- $$ = new CPPExpression(RSHIFT, $1, $3);
-}
- | formal_const_expr '?' const_expr ':' const_expr
-{
- $$ = new CPPExpression('?', $1, $3, $5);
-}
- | formal_const_expr '[' const_expr ']'
-{
- $$ = new CPPExpression('[', $1, $3);
-}
- | formal_const_expr '(' const_expr_comma ')'
-{
- $$ = new CPPExpression('f', $1, $3);
-}
- | formal_const_expr '(' ')'
-{
- $$ = new CPPExpression('f', $1);
-}
- | formal_const_expr '.' name
-{
- $$ = new CPPExpression('.', $1, new CPPExpression($3, current_scope, global_scope, current_lexer));
-}
- | formal_const_expr POINTSAT const_expr
-{
- $$ = new CPPExpression(POINTSAT, $1, $3);
-}
- | '(' const_expr_comma ')'
-{
- $$ = $2;
-}
- ;
-
-formal_const_operand:
- INTEGER
-{
- $$ = new CPPExpression($1);
-}
- | KW_TRUE
-{
- $$ = new CPPExpression(true);
-}
- | KW_FALSE
-{
- $$ = new CPPExpression(false);
-}
- | CHAR_TOK
-{
- $$ = new CPPExpression($1);
-}
- | REAL
-{
- $$ = new CPPExpression($1);
-}
- | string_literal
-{
- $$ = $1;
-}
- | CUSTOM_LITERAL
-{
- $$ = $1;
-}
- | IDENTIFIER
-{
- $$ = new CPPExpression($1, current_scope, global_scope, current_lexer);
-}
- | KW_FINAL
-{
- // A variable named "final". C++11 explicitly permits this.
- CPPIdentifier *ident = new CPPIdentifier("final", @1);
- $$ = new CPPExpression(ident, current_scope, global_scope, current_lexer);
-}
- | KW_OVERRIDE
-{
- // A variable named "override". C++11 explicitly permits this.
- CPPIdentifier *ident = new CPPIdentifier("override", @1);
- $$ = new CPPExpression(ident, current_scope, global_scope, current_lexer);
-}
- | KW_NULLPTR
-{
- $$ = new CPPExpression(CPPExpression::get_nullptr());
-}
- ;
-
-/* The contents of the [] list preceding a lambda expression. */
-capture_list:
- empty
-{
- $$ = new CPPClosureType();
-}
- | '='
-{
- $$ = new CPPClosureType(CPPClosureType::CT_by_value);
-}
- | '&'
-{
- $$ = new CPPClosureType(CPPClosureType::CT_by_reference);
-}
- | capture maybe_initialize
-{
- $$ = new CPPClosureType();
- $1->_initializer = $2;
- $$->_captures.push_back(*$1);
- delete $1;
-}
- | capture_list ',' capture maybe_initialize
-{
- $$ = $1;
- $3->_initializer = $4;
- $$->_captures.push_back(*$3);
- delete $3;
-}
- ;
-
-capture:
- '&' name
-{
- $$ = new CPPClosureType::Capture;
- $$->_name = $2->get_simple_name();
- $$->_type = CPPClosureType::CT_by_reference;
-}
- | '&' name ELLIPSIS
-{
- $$ = new CPPClosureType::Capture;
- $$->_name = $2->get_simple_name();
- $$->_type = CPPClosureType::CT_by_reference;
-}
- | name
-{
- $$ = new CPPClosureType::Capture;
- $$->_name = $1->get_simple_name();
- if ($$->_name == "this") {
- $$->_type = CPPClosureType::CT_by_reference;
- } else {
- $$->_type = CPPClosureType::CT_by_value;
- }
-}
- | '*' name
-{
- $$ = new CPPClosureType::Capture;
- $$->_name = $2->get_simple_name();
- $$->_type = CPPClosureType::CT_by_value;
- if ($$->_name != "this") {
- yywarning("only capture name 'this' may be preceded by an asterisk", @2);
- }
-}
- ;
-
-class_derivation_name:
- name
-{
- CPPType *type = $1->find_type(current_scope, global_scope, true);
- if (type == nullptr) {
- type = CPPType::new_type(new CPPTBDType($1));
- }
- $$ = type;
-}
- | KW_TYPENAME name
-{
- $$ = CPPType::new_type(new CPPTBDType($2));
-}
- | name ELLIPSIS
-{
- CPPClassTemplateParameter *ctp = new CPPClassTemplateParameter($1);
- ctp->_packed = true;
- $$ = CPPType::new_type(ctp);
-}
- ;
-
-/*
-typedefname:
- TYPENAME_IDENTIFIER
-{
- CPPType *type = $1->find_type(current_scope, global_scope, false, current_lexer);
- if (type == NULL) {
- yyerror(string("internal error resolving type ") + $1->get_fully_scoped_name(), @1);
- }
- assert(type != NULL);
- $$ = type;
-}
- | KW_TYPENAME name
-{
- $$ = CPPType::new_type(new CPPTBDType($2));
-}
- ;
-*/
-
-
-/* Note that we should also accept "final" and "override" as valid names,
- * according to C++11. */
-name:
- IDENTIFIER
-{
- $$ = $1;
-}
- | TYPENAME_IDENTIFIER
-{
- $$ = $1;
-}
- | TYPEPACK_IDENTIFIER
-{
- $$ = $1;
-}
- | KW_FINAL
-{
- $$ = new CPPIdentifier("final", @1);
-}
- | KW_OVERRIDE
-{
- $$ = new CPPIdentifier("override", @1);
-}
- | KW_SIGNED
-{
- // This is not a keyword in Python, so it is useful to be able to use this
- // in MAKE_PROPERTY definitions, etc.
- $$ = new CPPIdentifier("signed", @1);
-}
- | KW_FLOAT
-{
- $$ = new CPPIdentifier("float", @1);
-}
- | KW_PUBLIC
-{
- $$ = new CPPIdentifier("public", @1);
-}
- | KW_PRIVATE
-{
- $$ = new CPPIdentifier("private", @1);
-}
- | KW_STATIC
-{
- $$ = new CPPIdentifier("static", @1);
-}
- | KW_DEFAULT
-{
- $$ = new CPPIdentifier("default", @1);
-}
- ;
-
-
-/* A variant on name that's used for structs, where we disallow final
- * to disambiguate the case of struct A final {};
- */
-name_no_final:
- IDENTIFIER
-{
- $$ = $1;
-}
- | TYPENAME_IDENTIFIER
-{
- $$ = $1;
-}
- | TYPEPACK_IDENTIFIER
-{
- $$ = $1;
-}
- | KW_OVERRIDE
-{
- $$ = new CPPIdentifier("override", @1);
-}
- ;
-
-
-string_literal:
- SIMPLE_STRING
-{
- $$ = new CPPExpression($1);
-}
- | STRING_LITERAL
-{
- $$ = $1;
-}
- | string_literal SIMPLE_STRING
-{
- // The right string takes on the literal type of the left.
- $$ = $1;
- $$->_str += $2;
-}
- | string_literal STRING_LITERAL
-{
- // We have to check that the two literal types match up.
- $$ = $1;
- if ($2->_type != CPPExpression::T_string && $2->_type != $1->_type) {
- yywarning("cannot concatenate two string literals of different types", @$);
- }
- $$->_str += $2->_str;
-}
- ;
-
-empty:
- ;
diff --git a/dtool/src/cppparser/cppBisonDefs.h b/dtool/src/cppparser/cppBisonDefs.h
deleted file mode 100644
index 2859ee30abb..00000000000
--- a/dtool/src/cppparser/cppBisonDefs.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/**
- * PANDA 3D SOFTWARE
- * Copyright (c) Carnegie Mellon University. All rights reserved.
- *
- * All use of this software is subject to the terms of the revised BSD
- * license. You should have received a copy of this license along
- * with this source code in a file named "LICENSE."
- *
- * @file cppBisonDefs.h
- * @author drose
- * @date 1999-01-17
- */
-
-#ifndef CPPBISON_H
-#define CPPBISON_H
-
-// This header file defines the interface to the yacc (actually, bison) parser
-// and grammar. None of these interfaces are intended to be used directly;
-// they're defined here strictly to be used by the CPPParser and
-// CPPExpressionParser classes.
-
-#include "dtoolbase.h"
-
-#include
-
-#include "cppAttributeList.h"
-#include "cppClosureType.h"
-#include "cppExtensionType.h"
-#include "cppFile.h"
-
-class CPPParser;
-class CPPExpression;
-class CPPPreprocessor;
-class CPPDeclaration;
-class CPPInstance;
-class CPPType;
-class CPPStructType;
-class CPPEnumType;
-class CPPSimpleType;
-class CPPInstanceIdentifier;
-class CPPParameterList;
-class CPPTemplateParameterList;
-class CPPScope;
-class CPPIdentifier;
-class CPPCaptureType;
-
-void parse_cpp(CPPParser *cp);
-CPPExpression *parse_const_expr(CPPPreprocessor *pp,
- CPPScope *new_current_scope,
- CPPScope *new_global_scope);
-CPPType *parse_type(CPPPreprocessor *pp,
- CPPScope *new_current_scope,
- CPPScope *new_global_scope);
-
-extern CPPScope *current_scope;
-extern CPPScope *global_scope;
-extern CPPPreprocessor *current_lexer;
-
-
-// This structure holds the return value for each token. Traditionally, this
-// is a union, and is declared with the %union declaration in the parser.y
-// file, but unions are pretty worthless in C++ (you can't include an object
-// that has member functions in a union), so we'll use a class instead. That
-// means we need to declare it externally, here.
-
-class cppyystype {
-public:
- std::string str;
- CPPAttributeList attr_list;
- union {
- unsigned long long integer;
- long double real;
- CPPScope *scope;
- CPPDeclaration *decl;
- CPPInstance *instance;
- CPPType *type;
- CPPStructType *struct_type;
- CPPEnumType *enum_type;
- CPPSimpleType *simple_type;
- CPPInstanceIdentifier *inst_ident;
- CPPParameterList *param_list;
- CPPTemplateParameterList *template_param_list;
- CPPExtensionType::Type extension_enum;
- CPPExpression *expr;
- CPPIdentifier *identifier;
- CPPClosureType *closure_type;
- CPPClosureType::Capture *capture;
- } u;
-};
-#define YYSTYPE cppyystype
-
-// This structure takes advantage of a bison feature to track the exact
-// location in the file of each token, for more useful error reporting. We
-// define it up here so we can reference it in the lexer.
-
-struct cppyyltype {
- // Bison expects these members to be part of this struct.
- int first_line;
- int first_column;
- int last_line;
- int last_column;
-
- // Early versions of bison (1.25 and earlier) expected these members to be
- // in this struct as well.
- int timestamp;
- char *text;
-
- // The remaining members are added for this application and have no meaning
- // to bison.
- CPPFile file;
-};
-#define YYLTYPE cppyyltype
-
-// Beginning around bison 1.35 or so, we need to define this macro as well, to
-// tell bison how to collect multiple locations together. (The default
-// implementation copies only first_line through last_column, whereas here we
-// use the struct assignment operator to copy all the members of the
-// structure).
-#define YYLLOC_DEFAULT(Current, Rhs, N) \
- (Current) = (Rhs)[1]; \
- (Current).last_line = (Rhs)[N].last_line; \
- (Current).last_column = (Rhs)[N].last_column;
-
-#endif
diff --git a/dtool/src/cppparser/cppClassTemplateParameter.cxx b/dtool/src/cppparser/cppClassTemplateParameter.cxx
deleted file mode 100644
index 7c85eb6c24e..00000000000
--- a/dtool/src/cppparser/cppClassTemplateParameter.cxx
+++ /dev/null
@@ -1,126 +0,0 @@
-/**
- * PANDA 3D SOFTWARE
- * Copyright (c) Carnegie Mellon University. All rights reserved.
- *
- * All use of this software is subject to the terms of the revised BSD
- * license. You should have received a copy of this license along
- * with this source code in a file named "LICENSE."
- *
- * @file cppClassTemplateParameter.cxx
- * @author drose
- * @date 1999-10-28
- */
-
-#include "cppClassTemplateParameter.h"
-#include "cppIdentifier.h"
-
-/**
- *
- */
-CPPClassTemplateParameter::
-CPPClassTemplateParameter(CPPIdentifier *ident, CPPType *default_type) :
- CPPType(CPPFile()),
- _ident(ident),
- _default_type(default_type),
- _packed(false)
-{
-}
-
-/**
- * Returns true if this declaration is an actual, factual declaration, or
- * false if some part of the declaration depends on a template parameter which
- * has not yet been instantiated.
- */
-bool CPPClassTemplateParameter::
-is_fully_specified() const {
- return false;
-}
-
-/**
- *
- */
-void CPPClassTemplateParameter::
-output(std::ostream &out, int indent_level, CPPScope *scope, bool complete) const {
- if (complete) {
- out << "class";
- if (_packed) {
- out << "...";
- }
- if (_ident != nullptr) {
- out << " ";
- _ident->output(out, scope);
- }
- if (_default_type) {
- out << " = ";
- _default_type->output(out, indent_level, scope, false);
- }
- } else {
- _ident->output(out, scope);
- }
-}
-
-
-/**
- *
- */
-CPPDeclaration::SubType CPPClassTemplateParameter::
-get_subtype() const {
- return ST_class_template_parameter;
-}
-
-/**
- *
- */
-CPPClassTemplateParameter *CPPClassTemplateParameter::
-as_class_template_parameter() {
- return this;
-}
-
-/**
- * Called by CPPDeclaration() to determine whether this type is equivalent to
- * another type of the same type.
- */
-bool CPPClassTemplateParameter::
-is_equal(const CPPDeclaration *other) const {
- const CPPClassTemplateParameter *ot = ((CPPDeclaration *)other)->as_class_template_parameter();
- assert(ot != nullptr);
-
- if (_default_type != ot->_default_type) {
- return false;
- }
-
- if (_packed != ot->_packed) {
- return false;
- }
-
- if (_ident == nullptr || ot->_ident == nullptr) {
- return _ident == ot->_ident;
- }
-
- return *_ident == *ot->_ident;
-}
-
-
-/**
- * Called by CPPDeclaration() to determine whether this type should be ordered
- * before another type of the same type, in an arbitrary but fixed ordering.
- */
-bool CPPClassTemplateParameter::
-is_less(const CPPDeclaration *other) const {
- const CPPClassTemplateParameter *ot = ((CPPDeclaration *)other)->as_class_template_parameter();
- assert(ot != nullptr);
-
- if (_default_type != ot->_default_type) {
- return _default_type < ot->_default_type;
- }
-
- if (_packed != ot->_packed) {
- return _packed < ot->_packed;
- }
-
- if (_ident == nullptr || ot->_ident == nullptr) {
- return _ident < ot->_ident;
- }
-
- return *_ident < *ot->_ident;
-}
diff --git a/dtool/src/cppparser/cppClassTemplateParameter.h b/dtool/src/cppparser/cppClassTemplateParameter.h
deleted file mode 100644
index 8ff6fe15389..00000000000
--- a/dtool/src/cppparser/cppClassTemplateParameter.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * PANDA 3D SOFTWARE
- * Copyright (c) Carnegie Mellon University. All rights reserved.
- *
- * All use of this software is subject to the terms of the revised BSD
- * license. You should have received a copy of this license along
- * with this source code in a file named "LICENSE."
- *
- * @file cppClassTemplateParameter.h
- * @author drose
- * @date 1999-10-28
- */
-
-#ifndef CPPCLASSTEMPLATEPARAMETER_H
-#define CPPCLASSTEMPLATEPARAMETER_H
-
-#include "dtoolbase.h"
-
-#include "cppType.h"
-
-class CPPIdentifier;
-
-/**
- *
- */
-class CPPClassTemplateParameter : public CPPType {
-public:
- CPPClassTemplateParameter(CPPIdentifier *ident,
- CPPType *default_type = nullptr);
-
- virtual bool is_fully_specified() const;
- virtual void output(std::ostream &out, int indent_level, CPPScope *scope,
- bool complete) const;
- virtual SubType get_subtype() const;
-
- virtual CPPClassTemplateParameter *as_class_template_parameter();
-
- CPPIdentifier *_ident;
- CPPType *_default_type;
- bool _packed;
-
-protected:
- virtual bool is_equal(const CPPDeclaration *other) const;
- virtual bool is_less(const CPPDeclaration *other) const;
-};
-
-#endif
diff --git a/dtool/src/cppparser/cppClosureType.cxx b/dtool/src/cppparser/cppClosureType.cxx
deleted file mode 100644
index 5c201580f14..00000000000
--- a/dtool/src/cppparser/cppClosureType.cxx
+++ /dev/null
@@ -1,200 +0,0 @@
-/**
- * PANDA 3D SOFTWARE
- * Copyright (c) Carnegie Mellon University. All rights reserved.
- *
- * All use of this software is subject to the terms of the revised BSD
- * license. You should have received a copy of this license along
- * with this source code in a file named "LICENSE."
- *
- * @file cppClosureType.cxx
- * @author rdb
- * @date 2017-01-14
- */
-
-#include "cppClosureType.h"
-#include "cppParameterList.h"
-#include "cppExpression.h"
-
-/**
- *
- */
-CPPClosureType::
-CPPClosureType(CaptureType default_capture) :
- CPPFunctionType(nullptr, nullptr, 0),
- _default_capture(default_capture) {
-}
-
-/**
- *
- */
-CPPClosureType::
-CPPClosureType(const CPPClosureType ©) :
- CPPFunctionType(copy),
- _captures(copy._captures),
- _default_capture(copy._default_capture)
-{
-}
-
-/**
- *
- */
-void CPPClosureType::
-operator = (const CPPClosureType ©) {
- CPPFunctionType::operator = (copy);
- _captures = copy._captures;
- _default_capture = copy._default_capture;
-}
-
-/**
- * Adds a new capture to the beginning of the capture list.
- */
-void CPPClosureType::
-add_capture(std::string name, CaptureType type, CPPExpression *initializer) {
- if (type == CT_none) {
- if (name == "this") {
- type = CT_by_reference;
- } else {
- type = CT_by_value;
- }
- }
-
- Capture capture = {std::move(name), type, initializer};
- _captures.insert(_captures.begin(), std::move(capture));
-}
-
-/**
- * Returns true if this declaration is an actual, factual declaration, or
- * false if some part of the declaration depends on a template parameter which
- * has not yet been instantiated.
- */
-bool CPPClosureType::
-is_fully_specified() const {
- return CPPFunctionType::is_fully_specified();
-}
-
-/**
- * Returns true if the type is default-constructible.
- */
-bool CPPClosureType::
-is_default_constructible() const {
- return false;
-}
-
-/**
- * Returns true if the type is copy-constructible.
- */
-bool CPPClosureType::
-is_copy_constructible() const {
- return true;
-}
-
-/**
- * Returns true if the type is destructible.
- */
-bool CPPClosureType::
-is_destructible() const {
- return true;
-}
-
-/**
- *
- */
-void CPPClosureType::
-output(std::ostream &out, int indent_level, CPPScope *scope, bool complete) const {
- out.put('[');
-
- bool have_capture = false;
- switch (_default_capture) {
- case CT_none:
- break;
- case CT_by_reference:
- out.put('&');
- have_capture = true;
- break;
- case CT_by_value:
- out.put('=');
- have_capture = true;
- break;
- }
-
- Captures::const_iterator it;
- for (it = _captures.begin(); it != _captures.end(); ++it) {
- const Capture &capture = *it;
- if (have_capture) {
- out << ", ";
- }
- if (capture._name == "this") {
- if (capture._type == CT_by_value) {
- out.put('*');
- }
- } else {
- if (capture._type == CT_by_reference) {
- out.put('&');
- }
- }
- out << capture._name;
-
- if (capture._initializer != nullptr) {
- out << " = " << *capture._initializer;
- }
-
- have_capture = true;
- }
- out.put(']');
-
- if (_parameters != nullptr) {
- out.put('(');
- _parameters->output(out, scope, true, -1);
- out.put(')');
- }
-
- if (_flags & F_noexcept) {
- out << " noexcept";
- }
-
- if (!_attributes.is_empty()) {
- out << " " << _attributes;
- }
-
- if (_return_type != nullptr) {
- out << " -> ";
- _return_type->output(out, indent_level, scope, false);
- }
-
- out << " {}";
-}
-
-/**
- *
- */
-CPPDeclaration::SubType CPPClosureType::
-get_subtype() const {
- return ST_closure;
-}
-
-/**
- *
- */
-CPPClosureType *CPPClosureType::
-as_closure_type() {
- return this;
-}
-
-/**
- * Called by CPPDeclaration() to determine whether this type is equivalent to
- * another type of the same type.
- */
-bool CPPClosureType::
-is_equal(const CPPDeclaration *other) const {
- return (this == other);
-}
-
-
-/**
- * Called by CPPDeclaration() to determine whether this type should be ordered
- * before another type of the same type, in an arbitrary but fixed ordering.
- */
-bool CPPClosureType::
-is_less(const CPPDeclaration *other) const {
- return (this < other);
-}
diff --git a/dtool/src/cppparser/cppClosureType.h b/dtool/src/cppparser/cppClosureType.h
deleted file mode 100644
index 9e11a2f1245..00000000000
--- a/dtool/src/cppparser/cppClosureType.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * PANDA 3D SOFTWARE
- * Copyright (c) Carnegie Mellon University. All rights reserved.
- *
- * All use of this software is subject to the terms of the revised BSD
- * license. You should have received a copy of this license along
- * with this source code in a file named "LICENSE."
- *
- * @file cppClosureType.h
- * @author rdb
- * @date 2017-01-14
- */
-
-#ifndef CPPCLOSURETYPE_H
-#define CPPCLOSURETYPE_H
-
-#include "dtoolbase.h"
-
-#include "cppFunctionType.h"
-
-/**
- * The type of a lambda expression. This is like a function, but with
- * additional captures defined.
- */
-class CPPClosureType : public CPPFunctionType {
-public:
- enum CaptureType {
- CT_none,
- CT_by_reference,
- CT_by_value,
- };
-
- CPPClosureType(CaptureType default_capture = CT_none);
- CPPClosureType(const CPPClosureType ©);
- void operator = (const CPPClosureType ©);
-
- struct Capture {
- std::string _name;
- CaptureType _type;
- CPPExpression *_initializer;
- };
- typedef std::vector Captures;
- Captures _captures;
-
- CaptureType _default_capture;
-
- void add_capture(std::string name, CaptureType type, CPPExpression *initializer = nullptr);
-
- virtual bool is_fully_specified() const;
-
- virtual bool is_default_constructible() const;
- virtual bool is_copy_constructible() const;
- virtual bool is_destructible() const;
-
- virtual void output(std::ostream &out, int indent_level, CPPScope *scope,
- bool complete) const;
- virtual SubType get_subtype() const;
- virtual CPPClosureType *as_closure_type();
-
-protected:
- virtual bool is_equal(const CPPDeclaration *other) const;
- virtual bool is_less(const CPPDeclaration *other) const;
-};
-
-#endif
diff --git a/dtool/src/cppparser/cppCommentBlock.h b/dtool/src/cppparser/cppCommentBlock.h
deleted file mode 100644
index e31b3b6278f..00000000000
--- a/dtool/src/cppparser/cppCommentBlock.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * PANDA 3D SOFTWARE
- * Copyright (c) Carnegie Mellon University. All rights reserved.
- *
- * All use of this software is subject to the terms of the revised BSD
- * license. You should have received a copy of this license along
- * with this source code in a file named "LICENSE."
- *
- * @file cppCommentBlock.h
- * @author drose
- * @date 2000-08-15
- */
-
-#ifndef CPPCOMMENTBLOCK_H
-#define CPPCOMMENTBLOCK_H
-
-#include "dtoolbase.h"
-
-#include "cppFile.h"
-
-#include
-
-/**
- * This represents a comment appearing in the source code. The
- * CPPPreprocessor collects these, and saves the complete list of comments
- * encountered; it also stores a list of the comment blocks appearing before
- * each declaration.
- */
-class CPPCommentBlock {
-public:
- CPPFile _file;
- int _line_number;
- int _col_number;
- int _last_line;
- bool _c_style;
- std::string _comment;
-};
-
-typedef std::list CPPComments;
-
-#endif
diff --git a/dtool/src/cppparser/cppConstType.cxx b/dtool/src/cppparser/cppConstType.cxx
deleted file mode 100644
index 585f545b636..00000000000
--- a/dtool/src/cppparser/cppConstType.cxx
+++ /dev/null
@@ -1,240 +0,0 @@
-/**
- * PANDA 3D SOFTWARE
- * Copyright (c) Carnegie Mellon University. All rights reserved.
- *
- * All use of this software is subject to the terms of the revised BSD
- * license. You should have received a copy of this license along
- * with this source code in a file named "LICENSE."
- *
- * @file cppConstType.cxx
- * @author drose
- * @date 1999-10-28
- */
-
-#include "cppConstType.h"
-
-/**
- *
- */
-CPPConstType::
-CPPConstType(CPPType *wrapped_around) :
- CPPType(CPPFile()),
- _wrapped_around(wrapped_around)
-{
-}
-
-/**
- * Returns true if this declaration is an actual, factual declaration, or
- * false if some part of the declaration depends on a template parameter which
- * has not yet been instantiated.
- */
-bool CPPConstType::
-is_fully_specified() const {
- return CPPType::is_fully_specified() &&
- _wrapped_around->is_fully_specified();
-}
-
-/**
- *
- */
-CPPDeclaration *CPPConstType::
-substitute_decl(CPPDeclaration::SubstDecl &subst,
- CPPScope *current_scope, CPPScope *global_scope) {
- SubstDecl::const_iterator si = subst.find(this);
- if (si != subst.end()) {
- return (*si).second;
- }
-
- CPPConstType *rep = new CPPConstType(*this);
- rep->_wrapped_around =
- _wrapped_around->substitute_decl(subst, current_scope, global_scope)
- ->as_type();
-
- if (rep->_wrapped_around == _wrapped_around) {
- delete rep;
- rep = this;
- }
- rep = CPPType::new_type(rep)->as_const_type();
- subst.insert(SubstDecl::value_type(this, rep));
- return rep;
-}
-
-/**
- * If this CPPType object is a forward reference or other nonspecified
- * reference to a type that might now be known a real type, returns the real
- * type. Otherwise returns the type itself.
- */
-CPPType *CPPConstType::
-resolve_type(CPPScope *current_scope, CPPScope *global_scope) {
- CPPType *ptype = _wrapped_around->resolve_type(current_scope, global_scope);
-
- if (ptype != _wrapped_around) {
- CPPConstType *rep = new CPPConstType(*this);
- rep->_wrapped_around = ptype;
- return CPPType::new_type(rep);
- }
- return this;
-}
-
-/**
- * Returns true if the type, or any nested type within the type, is a
- * CPPTBDType and thus isn't fully determined right now. In this case,
- * calling resolve_type() may or may not resolve the type.
- */
-bool CPPConstType::
-is_tbd() const {
- return _wrapped_around->is_tbd();
-}
-
-/**
- * Returns true if the type is considered a fundamental type.
- */
-bool CPPConstType::
-is_fundamental() const {
- return _wrapped_around->is_fundamental();
-}
-
-/**
- * Returns true if the type is considered a standard layout type.
- */
-bool CPPConstType::
-is_standard_layout() const {
- return _wrapped_around->is_standard_layout();
-}
-
-/**
- * Returns true if the type is considered a Plain Old Data (POD) type.
- */
-bool CPPConstType::
-is_trivial() const {
- return _wrapped_around->is_trivial();
-}
-
-/**
- * Returns true if the type can be safely copied by memcpy or memmove.
- */
-bool CPPConstType::
-is_trivially_copyable() const {
- return _wrapped_around->is_trivially_copyable();
-}
-
-/**
- * Returns true if the type can be constructed using the given argument.
- */
-bool CPPConstType::
-is_constructible(const CPPType *given_type) const {
- return _wrapped_around->is_constructible(given_type);
-}
-
-/**
- * Returns true if the type is default-constructible.
- */
-bool CPPConstType::
-is_default_constructible() const {
- return _wrapped_around->is_default_constructible();
-}
-
-/**
- * Returns true if the type is copy-constructible.
- */
-bool CPPConstType::
-is_copy_constructible() const {
- return _wrapped_around->is_copy_constructible();
-}
-
-/**
- * Returns true if the type is destructible.
- */
-bool CPPConstType::
-is_destructible() const {
- return _wrapped_around->is_destructible();
-}
-
-/**
- * Returns true if variables of this type may be implicitly converted to
- * the other type.
- */
-bool CPPConstType::
-is_convertible_to(const CPPType *other) const {
- return _wrapped_around->is_convertible_to(other);
-}
-
-/**
- * This is a little more forgiving than is_equal(): it returns true if the
- * types appear to be referring to the same thing, even if they may have
- * different pointers or somewhat different definitions. It's useful for
- * parameter matching, etc.
- */
-bool CPPConstType::
-is_equivalent(const CPPType &other) const {
- const CPPConstType *ot = ((CPPType *)&other)->as_const_type();
- if (ot == nullptr) {
- return CPPType::is_equivalent(other);
- }
-
- return _wrapped_around->is_equivalent(*ot->_wrapped_around);
-}
-
-/**
- *
- */
-void CPPConstType::
-output(std::ostream &out, int indent_level, CPPScope *scope, bool complete) const {
- _wrapped_around->output(out, indent_level, scope, complete);
- out << " const";
-}
-
-/**
- * Formats a C++-looking line that defines an instance of the given type, with
- * the indicated name. In most cases this will be "type name", but some types
- * have special exceptions.
- */
-void CPPConstType::
-output_instance(std::ostream &out, int indent_level, CPPScope *scope,
- bool complete, const std::string &prename,
- const std::string &name) const {
- _wrapped_around->output_instance(out, indent_level, scope, complete,
- "const " + prename, name);
-}
-
-/**
- *
- */
-CPPDeclaration::SubType CPPConstType::
-get_subtype() const {
- return ST_const;
-}
-
-/**
- *
- */
-CPPConstType *CPPConstType::
-as_const_type() {
- return this;
-}
-
-
-/**
- * Called by CPPDeclaration() to determine whether this type is equivalent to
- * another type of the same type.
- */
-bool CPPConstType::
-is_equal(const CPPDeclaration *other) const {
- const CPPConstType *ot = ((CPPDeclaration *)other)->as_const_type();
- assert(ot != nullptr);
-
- return _wrapped_around == ot->_wrapped_around;
-}
-
-
-/**
- * Called by CPPDeclaration() to determine whether this type should be ordered
- * before another type of the same type, in an arbitrary but fixed ordering.
- */
-bool CPPConstType::
-is_less(const CPPDeclaration *other) const {
- const CPPConstType *ot = ((CPPDeclaration *)other)->as_const_type();
- assert(ot != nullptr);
-
- return _wrapped_around < ot->_wrapped_around;
-}
diff --git a/dtool/src/cppparser/cppConstType.h b/dtool/src/cppparser/cppConstType.h
deleted file mode 100644
index 81db17884ab..00000000000
--- a/dtool/src/cppparser/cppConstType.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * PANDA 3D SOFTWARE
- * Copyright (c) Carnegie Mellon University. All rights reserved.
- *
- * All use of this software is subject to the terms of the revised BSD
- * license. You should have received a copy of this license along
- * with this source code in a file named "LICENSE."
- *
- * @file cppConstType.h
- * @author drose
- * @date 1999-10-28
- */
-
-#ifndef CPPCONSTTYPE_H
-#define CPPCONSTTYPE_H
-
-#include "dtoolbase.h"
-
-#include "cppType.h"
-
-/**
- *
- */
-class CPPConstType : public CPPType {
-public:
- CPPConstType(CPPType *wrapped_around);
-
- CPPType *_wrapped_around;
-
- virtual bool is_fully_specified() const;
- virtual CPPDeclaration *substitute_decl(SubstDecl &subst,
- CPPScope *current_scope,
- CPPScope *global_scope);
-
- virtual CPPType *resolve_type(CPPScope *current_scope,
- CPPScope *global_scope);
-
- virtual bool is_tbd() const;
- virtual bool is_fundamental() const;
- virtual bool is_standard_layout() const;
- virtual bool is_trivial() const;
- virtual bool is_trivially_copyable() const;
- virtual bool is_constructible(const CPPType *type) const;
- virtual bool is_default_constructible() const;
- virtual bool is_copy_constructible() const;
- virtual bool is_destructible() const;
- virtual bool is_convertible_to(const CPPType *other) const;
- virtual bool is_equivalent(const CPPType &other) const;
-
- virtual void output(std::ostream &out, int indent_level, CPPScope *scope,
- bool complete) const;
- virtual void output_instance(std::ostream &out, int indent_level,
- CPPScope *scope,
- bool complete, const std::string &prename,
- const std::string &name) const;
-
- virtual SubType get_subtype() const;
-
- virtual CPPConstType *as_const_type();
-
-protected:
- virtual bool is_equal(const CPPDeclaration *other) const;
- virtual bool is_less(const CPPDeclaration *other) const;
-};
-
-#endif
diff --git a/dtool/src/cppparser/cppDeclaration.cxx b/dtool/src/cppparser/cppDeclaration.cxx
deleted file mode 100644
index ef7e87bdf6c..00000000000
--- a/dtool/src/cppparser/cppDeclaration.cxx
+++ /dev/null
@@ -1,379 +0,0 @@
-/**
- * PANDA 3D SOFTWARE
- * Copyright (c) Carnegie Mellon University. All rights reserved.
- *
- * All use of this software is subject to the terms of the revised BSD
- * license. You should have received a copy of this license along
- * with this source code in a file named "LICENSE."
- *
- * @file cppDeclaration.cxx
- * @author drose
- * @date 1999-10-19
- */
-
-#include "cppDeclaration.h"
-#include "cppPreprocessor.h"
-
-/**
- *
- */
-CPPDeclaration::
-CPPDeclaration(const CPPFile &file, CPPAttributeList attr) :
- _file(file),
- _attributes(std::move(attr))
-{
- _vis = V_unknown;
- _template_scope = nullptr;
- _leading_comment = nullptr;
-}
-
-/**
- *
- */
-CPPDeclaration::
-CPPDeclaration(const CPPDeclaration ©) :
- _vis(copy._vis),
- _template_scope(copy._template_scope),
- _file(copy._file),
- _leading_comment(copy._leading_comment),
- _attributes(copy._attributes)
-{
-}
-
-/**
- *
- */
-CPPDeclaration &CPPDeclaration::
-operator = (const CPPDeclaration ©) {
- _vis = copy._vis;
- _template_scope = copy._template_scope;
- _file = copy._file;
- _leading_comment = copy._leading_comment;
- _attributes = copy._attributes;
- return *this;
-}
-
-/**
- *
- */
-bool CPPDeclaration::
-operator == (const CPPDeclaration &other) const {
- if (get_subtype() != other.get_subtype()) {
- return false;
- }
- return is_equal(&other);
-}
-
-/**
- *
- */
-bool CPPDeclaration::
-operator != (const CPPDeclaration &other) const {
- return !(*this == other);
-}
-
-/**
- *
- */
-bool CPPDeclaration::
-operator < (const CPPDeclaration &other) const {
- if (get_subtype() != other.get_subtype()) {
- return get_subtype() < other.get_subtype();
- }
- return is_less(&other);
-}
-
-/**
- * Returns true if this is a template declaration of some kind: a template
- * function or a template class, typically.
- */
-bool CPPDeclaration::
-is_template() const {
- return _template_scope != nullptr;
-}
-
-/**
- * If is_template(), above, returns true, this returns the CPPTemplateScope in
- * which this particular template declaration is defined. This scope includes
- * the information about the template parameters.
- */
-CPPTemplateScope *CPPDeclaration::
-get_template_scope() const {
- return _template_scope;
-}
-
-/**
- * Returns true if this declaration is an actual, factual declaration, or
- * false if some part of the declaration depends on a template parameter which
- * has not yet been instantiated.
- */
-bool CPPDeclaration::
-is_fully_specified() const {
- return !is_template();
-}
-
-/**
- *
- */
-CPPDeclaration *CPPDeclaration::
-instantiate(const CPPTemplateParameterList *,
- CPPScope *, CPPScope *,
- CPPPreprocessor *error_sink) const {
- if (error_sink != nullptr) {
- error_sink->warning("Ignoring template parameters");
- }
- return (CPPDeclaration *)this;
-}
-
-/**
- *
- */
-CPPDeclaration *CPPDeclaration::
-substitute_decl(SubstDecl &subst, CPPScope *, CPPScope *) {
- SubstDecl::const_iterator si = subst.find(this);
- if (si != subst.end()) {
- assert((*si).second != nullptr);
- return (*si).second;
- }
- return this;
-}
-
-/**
- *
- */
-void CPPDeclaration::
-output(std::ostream &out, int indent_level, CPPScope *scope, bool complete) const {
- out << _attributes;
-}
-
-/**
- *
- */
-CPPDeclaration::SubType CPPDeclaration::
-get_subtype() const {
- return ST_empty;
-}
-
-/**
- *
- */
-CPPInstance *CPPDeclaration::
-as_instance() {
- return nullptr;
-}
-
-/**
- *
- */
-CPPClassTemplateParameter *CPPDeclaration::
-as_class_template_parameter() {
- return nullptr;
-}
-
-/**
- *
- */
-CPPTypedefType *CPPDeclaration::
-as_typedef_type() {
- return nullptr;
-}
-
-/**
- *
- */
-CPPTypeDeclaration *CPPDeclaration::
-as_type_declaration() {
- return nullptr;
-}
-
-/**
- *
- */
-CPPExpression *CPPDeclaration::
-as_expression() {
- return nullptr;
-}
-
-/**
- *
- */
-CPPType *CPPDeclaration::
-as_type() {
- return nullptr;
-}
-
-/**
- *
- */
-CPPNamespace *CPPDeclaration::
-as_namespace() {
- return nullptr;
-}
-
-/**
- *
- */
-CPPUsing *CPPDeclaration::
-as_using() {
- return nullptr;
-}
-
-/**
- *
- */
-CPPSimpleType *CPPDeclaration::
-as_simple_type() {
- return nullptr;
-}
-
-/**
- *
- */
-CPPPointerType *CPPDeclaration::
-as_pointer_type() {
- return nullptr;
-}
-
-/**
- *
- */
-CPPReferenceType *CPPDeclaration::
-as_reference_type() {
- return nullptr;
-}
-
-/**
- *
- */
-CPPArrayType *CPPDeclaration::
-as_array_type() {
- return nullptr;
-}
-
-/**
- *
- */
-CPPConstType *CPPDeclaration::
-as_const_type() {
- return nullptr;
-}
-
-/**
- *
- */
-CPPFunctionType *CPPDeclaration::
-as_function_type() {
- return nullptr;
-}
-
-/**
- *
- */
-CPPFunctionGroup *CPPDeclaration::
-as_function_group() {
- return nullptr;
-}
-
-/**
- *
- */
-CPPExtensionType *CPPDeclaration::
-as_extension_type() {
- return nullptr;
-}
-
-/**
- *
- */
-CPPStructType *CPPDeclaration::
-as_struct_type() {
- return nullptr;
-}
-
-/**
- *
- */
-CPPEnumType *CPPDeclaration::
-as_enum_type() {
- return nullptr;
-}
-
-/**
- *
- */
-CPPTBDType *CPPDeclaration::
-as_tbd_type() {
- return nullptr;
-}
-
-/**
- *
- */
-CPPTypeProxy *CPPDeclaration::
-as_type_proxy() {
- return nullptr;
-}
-
-/**
- *
- */
-CPPMakeProperty *CPPDeclaration::
-as_make_property() {
- return nullptr;
-}
-
-/**
- *
- */
-CPPMakeSeq *CPPDeclaration::
-as_make_seq() {
- return nullptr;
-}
-
-/**
- *
- */
-CPPClosureType *CPPDeclaration::
-as_closure_type() {
- return nullptr;
-}
-
-/**
- * Called by CPPDeclaration to determine whether this type is equivalent to
- * another type of the same type.
- */
-bool CPPDeclaration::
-is_equal(const CPPDeclaration *other) const {
- return this == other;
-}
-
-/**
- * Called by CPPDeclaration to determine whether this type should be ordered
- * before another type of the same type, in an arbitrary but fixed ordering.
- */
-bool CPPDeclaration::
-is_less(const CPPDeclaration *other) const {
- return this < other;
-}
-
-
-std::ostream &
-operator << (std::ostream &out, const CPPDeclaration::SubstDecl &subst) {
- CPPDeclaration::SubstDecl::const_iterator it;
- for (it = subst.begin(); it != subst.end(); ++it) {
- out << " ";
- if (it->first == nullptr) {
- out << "(null)";
- } else {
- out << *(it->first);
- }
- out << " -> ";
- if (it->second == nullptr) {
- out << "(null)";
- } else {
- out << *(it->second);
- }
- out << "\n";
- }
- return out;
-}
diff --git a/dtool/src/cppparser/cppDeclaration.h b/dtool/src/cppparser/cppDeclaration.h
deleted file mode 100644
index 73c8fd49bbf..00000000000
--- a/dtool/src/cppparser/cppDeclaration.h
+++ /dev/null
@@ -1,239 +0,0 @@
-/**
- * PANDA 3D SOFTWARE
- * Copyright (c) Carnegie Mellon University. All rights reserved.
- *
- * All use of this software is subject to the terms of the revised BSD
- * license. You should have received a copy of this license along
- * with this source code in a file named "LICENSE."
- *
- * @file cppDeclaration.h
- * @author drose
- * @date 1999-10-19
- */
-
-#ifndef CPPDECLARATION_H
-#define CPPDECLARATION_H
-
-#include "dtoolbase.h"
-
-#include "cppVisibility.h"
-#include "cppFile.h"
-#include "cppCommentBlock.h"
-#include "cppAttributeList.h"
-
-#include
-#include
-#include